fix(local-tool): i18n type error — 用 devices.status.connecting/disconnecting
devices.connecting / devices.disconnecting 不在 TranslationDict type 裡, 改用已存在的 devices.status.connecting + 新增 devices.status.disconnecting。 刪掉上一個 commit 多加的頂層 devices.connecting / disconnecting key。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ae5dfe1739
commit
ebe86663b1
@ -70,7 +70,7 @@ export function DeviceCard({ device, isFirstCard }: DeviceCardProps) {
|
||||
onClick={() => disconnectDevice(device.id)}
|
||||
>
|
||||
{isDisconnecting && <Loader2 className="mr-1 h-3 w-3 animate-spin" />}
|
||||
{isDisconnecting ? t('devices.disconnecting') : t('common.disconnect')}
|
||||
{isDisconnecting ? t('devices.status.disconnecting') : t('common.disconnect')}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
@ -81,7 +81,7 @@ export function DeviceCard({ device, isFirstCard }: DeviceCardProps) {
|
||||
{...(isFirstCard ? { 'data-tour-id': 'connect-device-btn' } : {})}
|
||||
>
|
||||
{isConnecting && <Loader2 className="mr-1 h-3 w-3 animate-spin" />}
|
||||
{isConnecting ? t('devices.connecting') : t('common.connect')}
|
||||
{isConnecting ? t('devices.status.connecting') : t('common.connect')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -67,16 +67,15 @@ export const en: TranslationDict = {
|
||||
subtitle: 'Manage your edge AI devices',
|
||||
scan: 'Scan Devices',
|
||||
scanning: 'Scanning...',
|
||||
connecting: 'Connecting...',
|
||||
disconnecting: 'Disconnecting...',
|
||||
noDevices: 'No devices detected. Make sure mock mode is enabled or connect a device.',
|
||||
type: 'Type',
|
||||
firmware: 'Firmware',
|
||||
flashedModel: 'Flashed Model',
|
||||
status: {
|
||||
detected: 'Detected',
|
||||
connecting: 'Connecting',
|
||||
connecting: 'Connecting...',
|
||||
connected: 'Connected',
|
||||
disconnecting: 'Disconnecting...',
|
||||
flashing: 'Flashing',
|
||||
inferencing: 'Inferring',
|
||||
error: 'Error',
|
||||
|
||||
@ -73,6 +73,7 @@ export interface TranslationDict {
|
||||
detected: string;
|
||||
connecting: string;
|
||||
connected: string;
|
||||
disconnecting: string;
|
||||
flashing: string;
|
||||
inferencing: string;
|
||||
error: string;
|
||||
|
||||
@ -67,16 +67,15 @@ export const zhTW: TranslationDict = {
|
||||
subtitle: '管理你的 Edge AI 裝置',
|
||||
scan: '掃描裝置',
|
||||
scanning: '掃描中...',
|
||||
connecting: '連線中...',
|
||||
disconnecting: '斷線中...',
|
||||
noDevices: '未偵測到裝置。請確認已啟用 Mock 模式或連接裝置。',
|
||||
type: '類型',
|
||||
firmware: '韌體',
|
||||
flashedModel: '已燒錄模型',
|
||||
status: {
|
||||
detected: '已偵測',
|
||||
connecting: '連線中',
|
||||
connecting: '連線中...',
|
||||
connected: '已連線',
|
||||
disconnecting: '斷線中...',
|
||||
flashing: '燒錄中',
|
||||
inferencing: '推論中',
|
||||
error: '錯誤',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user