feat(i18n): add multi-language UI support with 5 languages
- Add i18n framework with locale detection and cookie persistence - Support English, Traditional Chinese (zh-TW), Simplified Chinese (zh-CN), Japanese (ja), Korean (ko) - Add LanguageSelector component in navigation header - Create locale JSON files with full translations - Update all page components (root, user, results, history) with i18n support - Add client-side translation helpers for dynamic content - Auto-detect user's preferred language from browser settings - Bump version to v0.1.3
This commit is contained in:
parent
e792dfedf1
commit
33301033ae
21 changed files with 1205 additions and 89 deletions
106
src/locales/en.json
Normal file
106
src/locales/en.json
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"common": {
|
||||
"appName": "ConvertX",
|
||||
"poweredBy": "Powered by",
|
||||
"version": "v{version}",
|
||||
"loading": "Loading...",
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"confirm": "Confirm",
|
||||
"cancel": "Cancel",
|
||||
"close": "Close",
|
||||
"save": "Save",
|
||||
"delete": "Delete",
|
||||
"remove": "Remove",
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"submit": "Submit",
|
||||
"back": "Back",
|
||||
"next": "Next",
|
||||
"yes": "Yes",
|
||||
"no": "No"
|
||||
},
|
||||
"nav": {
|
||||
"history": "History",
|
||||
"account": "Account",
|
||||
"logout": "Logout",
|
||||
"login": "Login",
|
||||
"register": "Register",
|
||||
"language": "Language"
|
||||
},
|
||||
"convert": {
|
||||
"title": "Convert",
|
||||
"titleWithType": "Convert .{fileType}",
|
||||
"chooseFile": "Choose a file",
|
||||
"orDragHere": "or drag it here",
|
||||
"searchConversions": "Search for conversions",
|
||||
"convertTo": "Convert to",
|
||||
"convertButton": "Convert",
|
||||
"uploading": "Uploading...",
|
||||
"processing": "Processing..."
|
||||
},
|
||||
"results": {
|
||||
"title": "Results",
|
||||
"convertedFileName": "Converted File Name",
|
||||
"status": "Status",
|
||||
"actions": "Actions",
|
||||
"downloadAll": "All",
|
||||
"downloadTar": "Tar",
|
||||
"deleteJob": "Delete",
|
||||
"noFiles": "No files converted yet.",
|
||||
"statusPending": "Pending",
|
||||
"statusCompleted": "Completed",
|
||||
"statusFailed": "Failed"
|
||||
},
|
||||
"history": {
|
||||
"title": "Results",
|
||||
"time": "Time",
|
||||
"files": "Files",
|
||||
"filesDone": "Files Done",
|
||||
"status": "Status",
|
||||
"actions": "Actions",
|
||||
"expandDetails": "Expand details",
|
||||
"detailedFileInfo": "Detailed File Information:",
|
||||
"deleteSelected": "Delete Selected",
|
||||
"selectAll": "Select all",
|
||||
"confirmDelete": "Are you sure you want to delete {count} job(s)? This action cannot be undone.",
|
||||
"deleteSuccess": "Successfully deleted {deleted} job(s).",
|
||||
"deleteFailed": "Failed to delete {failed} job(s).",
|
||||
"deleteError": "An error occurred while deleting jobs. Please try again."
|
||||
},
|
||||
"auth": {
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"currentPassword": "Current Password",
|
||||
"newPassword": "Password (leave blank for unchanged)",
|
||||
"loginButton": "Login",
|
||||
"registerButton": "Register",
|
||||
"updateButton": "Update",
|
||||
"createAccount": "Create account",
|
||||
"invalidCredentials": "Invalid credentials.",
|
||||
"emailInUse": "Email already in use.",
|
||||
"unauthorized": "Unauthorized",
|
||||
"cookiesRequired": "Cookies should be enabled to use this app.",
|
||||
"noCookies": "No auth cookie, perhaps your browser is blocking cookies."
|
||||
},
|
||||
"setup": {
|
||||
"welcome": "Welcome to ConvertX!",
|
||||
"createYourAccount": "Create your account",
|
||||
"reportIssues": "Report any issues on",
|
||||
"github": "GitHub"
|
||||
},
|
||||
"errors": {
|
||||
"jobNotFound": "Job not found.",
|
||||
"fileNotFound": "File not found.",
|
||||
"uploadFailed": "Upload failed.",
|
||||
"conversionFailed": "Conversion failed.",
|
||||
"serverError": "Server error."
|
||||
},
|
||||
"upload": {
|
||||
"success": "Files uploaded successfully.",
|
||||
"dragDrop": "Drop files here"
|
||||
},
|
||||
"file": {
|
||||
"size": "{size} kB"
|
||||
}
|
||||
}
|
||||
106
src/locales/ja.json
Normal file
106
src/locales/ja.json
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"common": {
|
||||
"appName": "ConvertX",
|
||||
"poweredBy": "Powered by",
|
||||
"version": "v{version}",
|
||||
"loading": "読み込み中...",
|
||||
"error": "エラー",
|
||||
"success": "成功",
|
||||
"confirm": "確認",
|
||||
"cancel": "キャンセル",
|
||||
"close": "閉じる",
|
||||
"save": "保存",
|
||||
"delete": "削除",
|
||||
"remove": "削除",
|
||||
"download": "ダウンロード",
|
||||
"upload": "アップロード",
|
||||
"submit": "送信",
|
||||
"back": "戻る",
|
||||
"next": "次へ",
|
||||
"yes": "はい",
|
||||
"no": "いいえ"
|
||||
},
|
||||
"nav": {
|
||||
"history": "履歴",
|
||||
"account": "アカウント",
|
||||
"logout": "ログアウト",
|
||||
"login": "ログイン",
|
||||
"register": "登録",
|
||||
"language": "言語"
|
||||
},
|
||||
"convert": {
|
||||
"title": "変換",
|
||||
"titleWithType": ".{fileType} を変換",
|
||||
"chooseFile": "ファイルを選択",
|
||||
"orDragHere": "またはここにドラッグ",
|
||||
"searchConversions": "変換形式を検索",
|
||||
"convertTo": "変換先",
|
||||
"convertButton": "変換",
|
||||
"uploading": "アップロード中...",
|
||||
"processing": "処理中..."
|
||||
},
|
||||
"results": {
|
||||
"title": "結果",
|
||||
"convertedFileName": "変換後のファイル名",
|
||||
"status": "ステータス",
|
||||
"actions": "操作",
|
||||
"downloadAll": "すべて",
|
||||
"downloadTar": "Tar",
|
||||
"deleteJob": "削除",
|
||||
"noFiles": "まだファイルが変換されていません。",
|
||||
"statusPending": "処理中",
|
||||
"statusCompleted": "完了",
|
||||
"statusFailed": "失敗"
|
||||
},
|
||||
"history": {
|
||||
"title": "結果",
|
||||
"time": "時間",
|
||||
"files": "ファイル数",
|
||||
"filesDone": "完了",
|
||||
"status": "ステータス",
|
||||
"actions": "操作",
|
||||
"expandDetails": "詳細を展開",
|
||||
"detailedFileInfo": "ファイル詳細情報:",
|
||||
"deleteSelected": "選択を削除",
|
||||
"selectAll": "すべて選択",
|
||||
"confirmDelete": "{count}件のジョブを削除しますか?この操作は取り消せません。",
|
||||
"deleteSuccess": "{deleted}件のジョブを削除しました。",
|
||||
"deleteFailed": "{failed}件のジョブの削除に失敗しました。",
|
||||
"deleteError": "ジョブの削除中にエラーが発生しました。もう一度お試しください。"
|
||||
},
|
||||
"auth": {
|
||||
"email": "メールアドレス",
|
||||
"password": "パスワード",
|
||||
"currentPassword": "現在のパスワード",
|
||||
"newPassword": "パスワード(変更しない場合は空欄)",
|
||||
"loginButton": "ログイン",
|
||||
"registerButton": "登録",
|
||||
"updateButton": "更新",
|
||||
"createAccount": "アカウントを作成",
|
||||
"invalidCredentials": "認証情報が無効です。",
|
||||
"emailInUse": "このメールアドレスは既に使用されています。",
|
||||
"unauthorized": "未認証",
|
||||
"cookiesRequired": "このアプリを使用するにはCookieを有効にしてください。",
|
||||
"noCookies": "認証Cookieが見つかりません。ブラウザがCookieをブロックしている可能性があります。"
|
||||
},
|
||||
"setup": {
|
||||
"welcome": "ConvertXへようこそ!",
|
||||
"createYourAccount": "アカウントを作成",
|
||||
"reportIssues": "問題があれば報告",
|
||||
"github": "GitHub"
|
||||
},
|
||||
"errors": {
|
||||
"jobNotFound": "ジョブが見つかりません。",
|
||||
"fileNotFound": "ファイルが見つかりません。",
|
||||
"uploadFailed": "アップロードに失敗しました。",
|
||||
"conversionFailed": "変換に失敗しました。",
|
||||
"serverError": "サーバーエラー。"
|
||||
},
|
||||
"upload": {
|
||||
"success": "ファイルのアップロードに成功しました。",
|
||||
"dragDrop": "ここにファイルをドロップ"
|
||||
},
|
||||
"file": {
|
||||
"size": "{size} kB"
|
||||
}
|
||||
}
|
||||
106
src/locales/ko.json
Normal file
106
src/locales/ko.json
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"common": {
|
||||
"appName": "ConvertX",
|
||||
"poweredBy": "Powered by",
|
||||
"version": "v{version}",
|
||||
"loading": "로딩 중...",
|
||||
"error": "오류",
|
||||
"success": "성공",
|
||||
"confirm": "확인",
|
||||
"cancel": "취소",
|
||||
"close": "닫기",
|
||||
"save": "저장",
|
||||
"delete": "삭제",
|
||||
"remove": "제거",
|
||||
"download": "다운로드",
|
||||
"upload": "업로드",
|
||||
"submit": "제출",
|
||||
"back": "뒤로",
|
||||
"next": "다음",
|
||||
"yes": "예",
|
||||
"no": "아니오"
|
||||
},
|
||||
"nav": {
|
||||
"history": "기록",
|
||||
"account": "계정",
|
||||
"logout": "로그아웃",
|
||||
"login": "로그인",
|
||||
"register": "회원가입",
|
||||
"language": "언어"
|
||||
},
|
||||
"convert": {
|
||||
"title": "변환",
|
||||
"titleWithType": ".{fileType} 변환",
|
||||
"chooseFile": "파일 선택",
|
||||
"orDragHere": "또는 여기로 드래그",
|
||||
"searchConversions": "변환 형식 검색",
|
||||
"convertTo": "변환 대상",
|
||||
"convertButton": "변환",
|
||||
"uploading": "업로드 중...",
|
||||
"processing": "처리 중..."
|
||||
},
|
||||
"results": {
|
||||
"title": "결과",
|
||||
"convertedFileName": "변환된 파일명",
|
||||
"status": "상태",
|
||||
"actions": "작업",
|
||||
"downloadAll": "전체",
|
||||
"downloadTar": "Tar",
|
||||
"deleteJob": "삭제",
|
||||
"noFiles": "아직 변환된 파일이 없습니다.",
|
||||
"statusPending": "처리 중",
|
||||
"statusCompleted": "완료",
|
||||
"statusFailed": "실패"
|
||||
},
|
||||
"history": {
|
||||
"title": "결과",
|
||||
"time": "시간",
|
||||
"files": "파일 수",
|
||||
"filesDone": "완료됨",
|
||||
"status": "상태",
|
||||
"actions": "작업",
|
||||
"expandDetails": "상세 정보 펼치기",
|
||||
"detailedFileInfo": "파일 상세 정보:",
|
||||
"deleteSelected": "선택 삭제",
|
||||
"selectAll": "전체 선택",
|
||||
"confirmDelete": "{count}개의 작업을 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
|
||||
"deleteSuccess": "{deleted}개의 작업이 삭제되었습니다.",
|
||||
"deleteFailed": "{failed}개의 작업 삭제에 실패했습니다.",
|
||||
"deleteError": "작업 삭제 중 오류가 발생했습니다. 다시 시도해 주세요."
|
||||
},
|
||||
"auth": {
|
||||
"email": "이메일",
|
||||
"password": "비밀번호",
|
||||
"currentPassword": "현재 비밀번호",
|
||||
"newPassword": "비밀번호 (변경하지 않으려면 빈칸)",
|
||||
"loginButton": "로그인",
|
||||
"registerButton": "회원가입",
|
||||
"updateButton": "업데이트",
|
||||
"createAccount": "계정 생성",
|
||||
"invalidCredentials": "잘못된 인증 정보입니다.",
|
||||
"emailInUse": "이미 사용 중인 이메일입니다.",
|
||||
"unauthorized": "인증되지 않음",
|
||||
"cookiesRequired": "이 앱을 사용하려면 쿠키를 활성화해야 합니다.",
|
||||
"noCookies": "인증 쿠키를 찾을 수 없습니다. 브라우저에서 쿠키를 차단하고 있을 수 있습니다."
|
||||
},
|
||||
"setup": {
|
||||
"welcome": "ConvertX에 오신 것을 환영합니다!",
|
||||
"createYourAccount": "계정 생성",
|
||||
"reportIssues": "문제가 있으시면 보고해 주세요",
|
||||
"github": "GitHub"
|
||||
},
|
||||
"errors": {
|
||||
"jobNotFound": "작업을 찾을 수 없습니다.",
|
||||
"fileNotFound": "파일을 찾을 수 없습니다.",
|
||||
"uploadFailed": "업로드에 실패했습니다.",
|
||||
"conversionFailed": "변환에 실패했습니다.",
|
||||
"serverError": "서버 오류."
|
||||
},
|
||||
"upload": {
|
||||
"success": "파일이 업로드되었습니다.",
|
||||
"dragDrop": "여기에 파일을 놓으세요"
|
||||
},
|
||||
"file": {
|
||||
"size": "{size} kB"
|
||||
}
|
||||
}
|
||||
106
src/locales/zh-CN.json
Normal file
106
src/locales/zh-CN.json
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"common": {
|
||||
"appName": "ConvertX",
|
||||
"poweredBy": "由",
|
||||
"version": "v{version}",
|
||||
"loading": "加载中...",
|
||||
"error": "错误",
|
||||
"success": "成功",
|
||||
"confirm": "确认",
|
||||
"cancel": "取消",
|
||||
"close": "关闭",
|
||||
"save": "保存",
|
||||
"delete": "删除",
|
||||
"remove": "移除",
|
||||
"download": "下载",
|
||||
"upload": "上传",
|
||||
"submit": "提交",
|
||||
"back": "返回",
|
||||
"next": "下一步",
|
||||
"yes": "是",
|
||||
"no": "否"
|
||||
},
|
||||
"nav": {
|
||||
"history": "历史记录",
|
||||
"account": "账户",
|
||||
"logout": "登出",
|
||||
"login": "登录",
|
||||
"register": "注册",
|
||||
"language": "语言"
|
||||
},
|
||||
"convert": {
|
||||
"title": "转换",
|
||||
"titleWithType": "转换 .{fileType}",
|
||||
"chooseFile": "选择文件",
|
||||
"orDragHere": "或拖放到这里",
|
||||
"searchConversions": "搜索转换格式",
|
||||
"convertTo": "转换为",
|
||||
"convertButton": "转换",
|
||||
"uploading": "上传中...",
|
||||
"processing": "处理中..."
|
||||
},
|
||||
"results": {
|
||||
"title": "结果",
|
||||
"convertedFileName": "转换后文件名",
|
||||
"status": "状态",
|
||||
"actions": "操作",
|
||||
"downloadAll": "全部",
|
||||
"downloadTar": "Tar",
|
||||
"deleteJob": "删除",
|
||||
"noFiles": "尚未转换任何文件。",
|
||||
"statusPending": "处理中",
|
||||
"statusCompleted": "已完成",
|
||||
"statusFailed": "失败"
|
||||
},
|
||||
"history": {
|
||||
"title": "结果",
|
||||
"time": "时间",
|
||||
"files": "文件数",
|
||||
"filesDone": "已完成",
|
||||
"status": "状态",
|
||||
"actions": "操作",
|
||||
"expandDetails": "展开详情",
|
||||
"detailedFileInfo": "文件详细信息:",
|
||||
"deleteSelected": "删除所选",
|
||||
"selectAll": "全选",
|
||||
"confirmDelete": "确定要删除 {count} 个任务吗?此操作无法撤销。",
|
||||
"deleteSuccess": "已成功删除 {deleted} 个任务。",
|
||||
"deleteFailed": "删除 {failed} 个任务失败。",
|
||||
"deleteError": "删除任务时发生错误,请重试。"
|
||||
},
|
||||
"auth": {
|
||||
"email": "电子邮箱",
|
||||
"password": "密码",
|
||||
"currentPassword": "当前密码",
|
||||
"newPassword": "密码(如不更改请留空)",
|
||||
"loginButton": "登录",
|
||||
"registerButton": "注册",
|
||||
"updateButton": "更新",
|
||||
"createAccount": "创建账户",
|
||||
"invalidCredentials": "凭证无效。",
|
||||
"emailInUse": "电子邮箱已被使用。",
|
||||
"unauthorized": "未授权",
|
||||
"cookiesRequired": "使用此应用程序需要启用 Cookie。",
|
||||
"noCookies": "无法获取验证 Cookie,您的浏览器可能阻止了 Cookie。"
|
||||
},
|
||||
"setup": {
|
||||
"welcome": "欢迎使用 ConvertX!",
|
||||
"createYourAccount": "创建您的账户",
|
||||
"reportIssues": "在以下网址报告问题",
|
||||
"github": "GitHub"
|
||||
},
|
||||
"errors": {
|
||||
"jobNotFound": "找不到任务。",
|
||||
"fileNotFound": "找不到文件。",
|
||||
"uploadFailed": "上传失败。",
|
||||
"conversionFailed": "转换失败。",
|
||||
"serverError": "服务器错误。"
|
||||
},
|
||||
"upload": {
|
||||
"success": "文件上传成功。",
|
||||
"dragDrop": "将文件拖放至此"
|
||||
},
|
||||
"file": {
|
||||
"size": "{size} kB"
|
||||
}
|
||||
}
|
||||
106
src/locales/zh-TW.json
Normal file
106
src/locales/zh-TW.json
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"common": {
|
||||
"appName": "ConvertX",
|
||||
"poweredBy": "由",
|
||||
"version": "v{version}",
|
||||
"loading": "載入中...",
|
||||
"error": "錯誤",
|
||||
"success": "成功",
|
||||
"confirm": "確認",
|
||||
"cancel": "取消",
|
||||
"close": "關閉",
|
||||
"save": "儲存",
|
||||
"delete": "刪除",
|
||||
"remove": "移除",
|
||||
"download": "下載",
|
||||
"upload": "上傳",
|
||||
"submit": "提交",
|
||||
"back": "返回",
|
||||
"next": "下一步",
|
||||
"yes": "是",
|
||||
"no": "否"
|
||||
},
|
||||
"nav": {
|
||||
"history": "歷史記錄",
|
||||
"account": "帳戶",
|
||||
"logout": "登出",
|
||||
"login": "登入",
|
||||
"register": "註冊",
|
||||
"language": "語言"
|
||||
},
|
||||
"convert": {
|
||||
"title": "轉換",
|
||||
"titleWithType": "轉換 .{fileType}",
|
||||
"chooseFile": "選擇檔案",
|
||||
"orDragHere": "或拖曳到這裡",
|
||||
"searchConversions": "搜尋轉換格式",
|
||||
"convertTo": "轉換為",
|
||||
"convertButton": "轉換",
|
||||
"uploading": "上傳中...",
|
||||
"processing": "處理中..."
|
||||
},
|
||||
"results": {
|
||||
"title": "結果",
|
||||
"convertedFileName": "轉換後檔名",
|
||||
"status": "狀態",
|
||||
"actions": "操作",
|
||||
"downloadAll": "全部",
|
||||
"downloadTar": "Tar",
|
||||
"deleteJob": "刪除",
|
||||
"noFiles": "尚未轉換任何檔案。",
|
||||
"statusPending": "處理中",
|
||||
"statusCompleted": "已完成",
|
||||
"statusFailed": "失敗"
|
||||
},
|
||||
"history": {
|
||||
"title": "結果",
|
||||
"time": "時間",
|
||||
"files": "檔案數",
|
||||
"filesDone": "已完成",
|
||||
"status": "狀態",
|
||||
"actions": "操作",
|
||||
"expandDetails": "展開詳情",
|
||||
"detailedFileInfo": "檔案詳細資訊:",
|
||||
"deleteSelected": "刪除選取",
|
||||
"selectAll": "全選",
|
||||
"confirmDelete": "確定要刪除 {count} 個任務嗎?此操作無法復原。",
|
||||
"deleteSuccess": "已成功刪除 {deleted} 個任務。",
|
||||
"deleteFailed": "刪除 {failed} 個任務失敗。",
|
||||
"deleteError": "刪除任務時發生錯誤,請重試。"
|
||||
},
|
||||
"auth": {
|
||||
"email": "電子郵件",
|
||||
"password": "密碼",
|
||||
"currentPassword": "目前密碼",
|
||||
"newPassword": "密碼(如不變更請留空)",
|
||||
"loginButton": "登入",
|
||||
"registerButton": "註冊",
|
||||
"updateButton": "更新",
|
||||
"createAccount": "建立帳戶",
|
||||
"invalidCredentials": "憑證無效。",
|
||||
"emailInUse": "電子郵件已被使用。",
|
||||
"unauthorized": "未授權",
|
||||
"cookiesRequired": "使用此應用程式需要啟用 Cookie。",
|
||||
"noCookies": "無法取得驗證 Cookie,您的瀏覽器可能阻擋了 Cookie。"
|
||||
},
|
||||
"setup": {
|
||||
"welcome": "歡迎使用 ConvertX!",
|
||||
"createYourAccount": "建立您的帳戶",
|
||||
"reportIssues": "在以下網址回報問題",
|
||||
"github": "GitHub"
|
||||
},
|
||||
"errors": {
|
||||
"jobNotFound": "找不到任務。",
|
||||
"fileNotFound": "找不到檔案。",
|
||||
"uploadFailed": "上傳失敗。",
|
||||
"conversionFailed": "轉換失敗。",
|
||||
"serverError": "伺服器錯誤。"
|
||||
},
|
||||
"upload": {
|
||||
"success": "檔案上傳成功。",
|
||||
"dragDrop": "將檔案拖曳至此"
|
||||
},
|
||||
"file": {
|
||||
"size": "{size} kB"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue