feat(i18n): replace hardcoded Chinese strings with i18n calls across frontend
Replace all user-visible hardcoded Chinese strings in Vue/TS source files
with proper i18n function calls and add corresponding translation keys
to all 4 locale files (zh-CN, en-US, ko-KR, ru-RU).
Changes:
- Replace 80+ hardcoded Chinese strings across 30+ source files
- Add ~450 new translation keys per locale file
- Cover components, views, utils, hooks, and API modules
- Remove Chinese fallback patterns (|| '中文') from existing t() calls
- Add mermaid toolbar and ollama date format translations
Intentionally preserved (backend API values / backward compatibility):
- FAQ CSV column headers and parsing constants
- RelevanceLevel type and Record key mappings
- Graph database engine status comparison ('未启用')
- Language name labels ('简体中文')
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { get } from '@/utils/request'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
const t = (key: string) => i18n.global.t(key)
|
||||
|
||||
// 租户信息接口
|
||||
export interface TenantInfo {
|
||||
@@ -45,7 +48,7 @@ export async function listAllTenants(): Promise<{ success: boolean; data?: { ite
|
||||
} catch (error: any) {
|
||||
return {
|
||||
success: false,
|
||||
message: error.message || '获取租户列表失败'
|
||||
message: error.message || t('error.tenant.listFailed')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +79,7 @@ export async function searchTenants(params: SearchTenantsParams = {}): Promise<S
|
||||
} catch (error: any) {
|
||||
return {
|
||||
success: false,
|
||||
message: error.message || '搜索租户失败'
|
||||
message: error.message || t('error.tenant.searchFailed')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user