first commit
This commit is contained in:
30
frontend/src/i18n/index.ts
Normal file
30
frontend/src/i18n/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
import zhTW from './locales/zh-TW.json';
|
||||
import en from './locales/en.json';
|
||||
|
||||
const resources = {
|
||||
'zh-TW': { translation: zhTW },
|
||||
'en': { translation: en },
|
||||
};
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources,
|
||||
fallbackLng: 'zh-TW',
|
||||
defaultNS: 'translation',
|
||||
detection: {
|
||||
order: ['localStorage', 'navigator', 'htmlTag'],
|
||||
caches: ['localStorage'],
|
||||
lookupLocalStorage: 'language',
|
||||
},
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
140
frontend/src/i18n/locales/en.json
Normal file
140
frontend/src/i18n/locales/en.json
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "SalesPipeline",
|
||||
"appSubtitle": "Sales Pipeline Management System",
|
||||
"systemRunning": "System Running",
|
||||
"loading": "Loading...",
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"delete": "Delete",
|
||||
"edit": "Edit",
|
||||
"search": "Search",
|
||||
"filter": "Filter",
|
||||
"export": "Export",
|
||||
"import": "Import",
|
||||
"refresh": "Refresh",
|
||||
"back": "Back",
|
||||
"next": "Next",
|
||||
"previous": "Previous",
|
||||
"submit": "Submit",
|
||||
"reset": "Reset",
|
||||
"close": "Close",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"success": "Success",
|
||||
"error": "Error",
|
||||
"warning": "Warning",
|
||||
"info": "Info"
|
||||
},
|
||||
"nav": {
|
||||
"import": "Data Import",
|
||||
"review": "Match Review",
|
||||
"dashboard": "Dashboard",
|
||||
"lab": "Sample Conversion Lab",
|
||||
"settings": "Settings",
|
||||
"logout": "Logout"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Login",
|
||||
"register": "Register",
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"confirmPassword": "Confirm Password",
|
||||
"rememberMe": "Remember me",
|
||||
"forgotPassword": "Forgot password?",
|
||||
"noAccount": "Don't have an account?",
|
||||
"hasAccount": "Already have an account?",
|
||||
"loginSuccess": "Login successful",
|
||||
"loginFailed": "Login failed",
|
||||
"registerSuccess": "Registration successful",
|
||||
"registerFailed": "Registration failed",
|
||||
"invalidCredentials": "Invalid email or password",
|
||||
"emailRequired": "Email is required",
|
||||
"passwordRequired": "Password is required",
|
||||
"passwordMismatch": "Passwords do not match"
|
||||
},
|
||||
"import": {
|
||||
"title": "Data Import",
|
||||
"subtitle": "Upload Excel files to import DIT, Sample, and Order data",
|
||||
"ditFile": "DIT File",
|
||||
"sampleFile": "Sample File",
|
||||
"orderFile": "Order File",
|
||||
"selectFile": "Select File",
|
||||
"dragDrop": "or drag and drop here",
|
||||
"supportedFormats": "Supported formats: xlsx, xls",
|
||||
"uploading": "Uploading...",
|
||||
"parsing": "Parsing...",
|
||||
"importing": "Importing...",
|
||||
"uploadSuccess": "Upload successful",
|
||||
"uploadFailed": "Upload failed",
|
||||
"importSuccess": "Import successful",
|
||||
"importFailed": "Import failed",
|
||||
"recordsImported": "{{count}} records imported",
|
||||
"preview": "Preview",
|
||||
"startImport": "Start Import",
|
||||
"clearAll": "Clear All"
|
||||
},
|
||||
"review": {
|
||||
"title": "Match Review",
|
||||
"subtitle": "Review automatically matched results",
|
||||
"pendingReview": "Pending Review",
|
||||
"accepted": "Accepted",
|
||||
"rejected": "Rejected",
|
||||
"autoMatched": "Auto Matched",
|
||||
"similarity": "Similarity",
|
||||
"matchReason": "Match Reason",
|
||||
"ditRecord": "DIT Record",
|
||||
"matchedRecord": "Matched Record",
|
||||
"accept": "Accept",
|
||||
"reject": "Reject",
|
||||
"acceptAll": "Accept All",
|
||||
"rejectAll": "Reject All",
|
||||
"noRecords": "No records pending review",
|
||||
"reviewComplete": "Review Complete",
|
||||
"reviewSuccess": "Review successful",
|
||||
"reviewFailed": "Review failed"
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "Analytics Dashboard",
|
||||
"subtitle": "Sales Pipeline Overview & Analysis",
|
||||
"totalDit": "Total DIT",
|
||||
"matchedSamples": "Matched Samples",
|
||||
"matchedOrders": "Matched Orders",
|
||||
"conversionRate": "Conversion Rate",
|
||||
"totalRevenue": "Total Revenue",
|
||||
"conversionFunnel": "Conversion Funnel",
|
||||
"attribution": "DIT Attribution",
|
||||
"exportExcel": "Export Excel",
|
||||
"exportPdf": "Export PDF",
|
||||
"customer": "Customer",
|
||||
"partNumber": "Part Number",
|
||||
"stage": "Stage",
|
||||
"eau": "EAU",
|
||||
"sample": "Sample",
|
||||
"order": "Order",
|
||||
"amount": "Amount"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"language": "Language",
|
||||
"theme": "Theme",
|
||||
"darkMode": "Dark Mode",
|
||||
"lightMode": "Light Mode",
|
||||
"profile": "Profile",
|
||||
"displayName": "Display Name",
|
||||
"changePassword": "Change Password",
|
||||
"currentPassword": "Current Password",
|
||||
"newPassword": "New Password",
|
||||
"saveChanges": "Save Changes"
|
||||
},
|
||||
"errors": {
|
||||
"networkError": "Network connection error",
|
||||
"serverError": "Server error",
|
||||
"unauthorized": "Unauthorized, please login again",
|
||||
"forbidden": "No permission to perform this action",
|
||||
"notFound": "Resource not found",
|
||||
"validationError": "Validation error",
|
||||
"unknownError": "Unknown error occurred"
|
||||
}
|
||||
}
|
||||
140
frontend/src/i18n/locales/zh-TW.json
Normal file
140
frontend/src/i18n/locales/zh-TW.json
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "SalesPipeline",
|
||||
"appSubtitle": "銷售管線管理系統",
|
||||
"systemRunning": "系統運作中",
|
||||
"loading": "載入中...",
|
||||
"save": "儲存",
|
||||
"cancel": "取消",
|
||||
"confirm": "確認",
|
||||
"delete": "刪除",
|
||||
"edit": "編輯",
|
||||
"search": "搜尋",
|
||||
"filter": "篩選",
|
||||
"export": "匯出",
|
||||
"import": "匯入",
|
||||
"refresh": "重新整理",
|
||||
"back": "返回",
|
||||
"next": "下一步",
|
||||
"previous": "上一步",
|
||||
"submit": "提交",
|
||||
"reset": "重置",
|
||||
"close": "關閉",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"success": "成功",
|
||||
"error": "錯誤",
|
||||
"warning": "警告",
|
||||
"info": "資訊"
|
||||
},
|
||||
"nav": {
|
||||
"import": "資料匯入",
|
||||
"review": "比對審核",
|
||||
"dashboard": "分析儀表板",
|
||||
"lab": "送樣成效分析",
|
||||
"settings": "設定",
|
||||
"logout": "登出"
|
||||
},
|
||||
"auth": {
|
||||
"login": "登入",
|
||||
"register": "註冊",
|
||||
"email": "電子郵件",
|
||||
"password": "密碼",
|
||||
"confirmPassword": "確認密碼",
|
||||
"rememberMe": "記住我",
|
||||
"forgotPassword": "忘記密碼?",
|
||||
"noAccount": "還沒有帳號?",
|
||||
"hasAccount": "已有帳號?",
|
||||
"loginSuccess": "登入成功",
|
||||
"loginFailed": "登入失敗",
|
||||
"registerSuccess": "註冊成功",
|
||||
"registerFailed": "註冊失敗",
|
||||
"invalidCredentials": "帳號或密碼錯誤",
|
||||
"emailRequired": "請輸入電子郵件",
|
||||
"passwordRequired": "請輸入密碼",
|
||||
"passwordMismatch": "密碼不一致"
|
||||
},
|
||||
"import": {
|
||||
"title": "資料匯入",
|
||||
"subtitle": "上傳 Excel 檔案以匯入 DIT、樣品和訂單資料",
|
||||
"ditFile": "DIT 檔案",
|
||||
"sampleFile": "樣品檔案",
|
||||
"orderFile": "訂單檔案",
|
||||
"selectFile": "選擇檔案",
|
||||
"dragDrop": "或拖放檔案至此",
|
||||
"supportedFormats": "支援格式:xlsx, xls",
|
||||
"uploading": "上傳中...",
|
||||
"parsing": "解析中...",
|
||||
"importing": "匯入中...",
|
||||
"uploadSuccess": "上傳成功",
|
||||
"uploadFailed": "上傳失敗",
|
||||
"importSuccess": "匯入成功",
|
||||
"importFailed": "匯入失敗",
|
||||
"recordsImported": "已匯入 {{count}} 筆資料",
|
||||
"preview": "預覽",
|
||||
"startImport": "開始匯入",
|
||||
"clearAll": "清除全部"
|
||||
},
|
||||
"review": {
|
||||
"title": "比對審核",
|
||||
"subtitle": "審核系統自動比對的結果",
|
||||
"pendingReview": "待審核",
|
||||
"accepted": "已接受",
|
||||
"rejected": "已拒絕",
|
||||
"autoMatched": "自動配對",
|
||||
"similarity": "相似度",
|
||||
"matchReason": "配對原因",
|
||||
"ditRecord": "DIT 記錄",
|
||||
"matchedRecord": "配對記錄",
|
||||
"accept": "接受",
|
||||
"reject": "拒絕",
|
||||
"acceptAll": "全部接受",
|
||||
"rejectAll": "全部拒絕",
|
||||
"noRecords": "沒有待審核的記錄",
|
||||
"reviewComplete": "審核完成",
|
||||
"reviewSuccess": "審核成功",
|
||||
"reviewFailed": "審核失敗"
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "分析儀表板",
|
||||
"subtitle": "銷售管線總覽與分析",
|
||||
"totalDit": "DIT 總數",
|
||||
"matchedSamples": "配對樣品數",
|
||||
"matchedOrders": "配對訂單數",
|
||||
"conversionRate": "轉換率",
|
||||
"totalRevenue": "總營收",
|
||||
"conversionFunnel": "轉換漏斗",
|
||||
"attribution": "DIT 歸因表",
|
||||
"exportExcel": "匯出 Excel",
|
||||
"exportPdf": "匯出 PDF",
|
||||
"customer": "客戶",
|
||||
"partNumber": "料號",
|
||||
"stage": "階段",
|
||||
"eau": "EAU",
|
||||
"sample": "樣品",
|
||||
"order": "訂單",
|
||||
"amount": "金額"
|
||||
},
|
||||
"settings": {
|
||||
"title": "設定",
|
||||
"language": "語言",
|
||||
"theme": "主題",
|
||||
"darkMode": "深色模式",
|
||||
"lightMode": "淺色模式",
|
||||
"profile": "個人資料",
|
||||
"displayName": "顯示名稱",
|
||||
"changePassword": "變更密碼",
|
||||
"currentPassword": "目前密碼",
|
||||
"newPassword": "新密碼",
|
||||
"saveChanges": "儲存變更"
|
||||
},
|
||||
"errors": {
|
||||
"networkError": "網路連線錯誤",
|
||||
"serverError": "伺服器錯誤",
|
||||
"unauthorized": "未經授權,請重新登入",
|
||||
"forbidden": "無權限執行此操作",
|
||||
"notFound": "找不到資源",
|
||||
"validationError": "資料驗證錯誤",
|
||||
"unknownError": "發生未知錯誤"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user