FIX: Complete internationalization for text and code editors

Missing i18n Fixes:
- Replace "Unknown size" with t("fileManager.unknownSize")
- Replace "File is empty" with t("fileManager.fileIsEmpty")
- Replace "Modified:" with t("fileManager.modified")
- Replace "Large File Warning" with t("fileManager.largeFileWarning")
- Replace file size warning message with t("fileManager.largeFileWarningDesc")

Credential Editor i18n:
- Replace "Invalid Key" with t("credentials.invalidKey")
- Replace "Detection Error" with t("credentials.detectionError")
- Replace "Unknown" with t("credentials.unknown")

Translation Additions:
- English: unknownSize, fileIsEmpty, modified, largeFileWarning, largeFileWarningDesc
- English: invalidKey, detectionError, unknown for credentials
- Chinese: corresponding translations for all new keys

Technical Improvements:
- Update formatFileSize function to accept translation function parameter
- Ensure proper translation interpolation for dynamic content

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-09-25 07:39:52 +08:00
parent c7f86d5ac8
commit c780ad2f18
4 changed files with 28 additions and 13 deletions

View File

@@ -150,7 +150,10 @@
"generateRSA": "Generate RSA",
"keyPairGeneratedSuccessfully": "{{keyType}} key pair generated successfully",
"failedToGenerateKeyPair": "Failed to generate key pair",
"generateKeyPairNote": "Generate a new SSH key pair directly. This will replace any existing keys in the form."
"generateKeyPairNote": "Generate a new SSH key pair directly. This will replace any existing keys in the form.",
"invalidKey": "Invalid Key",
"detectionError": "Detection Error",
"unknown": "Unknown"
},
"sshTools": {
"title": "SSH Tools",
@@ -852,6 +855,11 @@
"find": "Find...",
"replaceWith": "Replace with...",
"startTyping": "Start typing...",
"unknownSize": "Unknown size",
"fileIsEmpty": "File is empty",
"modified": "Modified",
"largeFileWarning": "Large File Warning",
"largeFileWarningDesc": "This file is {{size}} in size, which may cause performance issues when opened as text.",
"fileSavedSuccessfully": "File saved successfully",
"autoSaveFailed": "Auto-save failed",
"fileAutoSaved": "File auto-saved",