Translations update from Hosted Weblate#59
Conversation
Currently translated at 2.9% (3 of 103 strings) Added translation using Weblate (Ukrainian) Added translation using Weblate (Japanese) Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Zilong Liu <2821624044@qq.com> Co-authored-by: Руслан Пузич <visp80@gmail.com> Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/uk/ Translation: Nezha/User frontend
Currently translated at 11.6% (12 of 103 strings) Translation: Nezha/User frontend Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/uk/
Currently translated at 100.0% (103 of 103 strings) Translation: Nezha/User frontend Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/gl/
Currently translated at 50.4% (52 of 103 strings) Translation: Nezha/User frontend Translate-URL: https://hosted.weblate.org/projects/nezha/user-frontend/uk/
📝 WalkthroughWalkthroughThree new localization files are added to support Galician, Japanese, and Ukrainian languages. The Galician and Ukrainian files contain comprehensive UI translations across multiple sections, while the Japanese file is initialized as an empty translation object for future use. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linting and formatting issues were automatically fixed. Please review the changes. |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
src/locales/gl/translation.json (1)
39-44:totalUpload/totalDownloadare identical toupload/download— consider distinguishing cumulative totals.
"upload": "Subir"and"totalUpload": "Subir"carry the same label (likewise for download/"Descargar"). If these keys surface in different UI contexts (instantaneous rate vs. cumulative total), distinct labels improve clarity.✏️ Optional improvement
"upload": "Subir", "download": "Descargar", "system": "Sistema", "uptime": "Tempo activo", - "totalUpload": "Subir", - "totalDownload": "Descargar" + "totalUpload": "Total subido", + "totalDownload": "Total descargado"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/locales/gl/translation.json` around lines 39 - 44, The translations for "totalUpload" and "totalDownload" duplicate "upload" and "download"; update the values for the keys totalUpload and totalDownload in translation.json to distinct, context-appropriate phrases (e.g., "Subida total"/"Total subido" and "Descarga total"/"Total descargado") so the UI can differentiate instantaneous rate ("upload"/"download") from cumulative totals ("totalUpload"/"totalDownload"); ensure the new strings match tone/grammar used elsewhere in the gl locale.src/locales/uk/translation.json (1)
20-21:uploadanddownloaduse the same Ukrainian root word — potentially ambiguous.
"upload": "Завантаження"and"download": "Завантажити"both derive from завантажити ("to load/download"), making it hard to distinguish the direction of transfer. The unambiguous Ukrainian term for upload is вивантаження."totalDownload": "Скачано"(line 25) is clearly "downloaded", which highlights the inconsistency.✏️ Suggested clarification
- "upload": "Завантаження", - "download": "Завантажити", - "totalUpload": "Завантажено", - "totalDownload": "Скачано" + "upload": "Вивантаження", + "download": "Завантажити", + "totalUpload": "Вивантажено", + "totalDownload": "Завантажено"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/locales/uk/translation.json` around lines 20 - 21, The keys "upload" and "download" in translation.json are ambiguous because both use the same Ukrainian root; change the "upload" value to the unambiguous Ukrainian term "вивантаження" (matching the noun form used for "totalDownload": "Скачано") so that "upload" -> "вивантаження" and leave "download" as the action form "Завантажити" (or adjust "download"/"totalDownload" forms consistently if you prefer noun vs verb forms) to remove ambiguity between "upload" and "download".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/locales/gl/translation.json`:
- Line 10: Fix the typo in the translation value for the "login" key: replace
the incorrect string "Inciar sesión" with "Iniciar sesión" in the locales JSON
so the "login" translation is spelled correctly.
- Line 101: Fix the typo in the translation key "backToHome" by changing the
value from "Voltar áo inicio" to "Voltar ao inicio" in the Galician translation
JSON to use the correct contraction without an accent.
- Around line 90-98: Add the missing locale entries and register the new
locales: update src/i18n.js to import ukTranslation, glTranslation, and
jaTranslation and add them into the resources object keyed exactly as 'uk-UA',
'gl-ES', and 'ja-JP'; then update the "language" object in
src/locales/gl/translation.json (the "language" section in that file) to include
entries for those three locales using the proper display strings for Ukrainian,
Galician, and Japanese so they match the codes registered in i18n.
In `@src/locales/ja/translation.json`:
- Line 1: The empty Japanese locale file (ja translation.json) is orphaned and
not registered in the i18n initialization; either remove the empty ja
translation.json or add real translations and register it in the i18n setup. If
adding Japanese support, populate the ja translation.json with key/value
translations and add it to the i18n resources/locales array where other locales
are registered (the i18n initialization code that builds/registers resources);
if not needed, delete the ja translation.json to avoid unused files. Ensure the
chosen change is reflected in the same module that configures locale
registration so Japanese is no longer left unreferenced.
In `@src/locales/uk/translation.json`:
- Around line 30-33: The serverDetail translations use English values for
"online" and "offline"; update the "online" and "offline" keys in this file (the
serverDetail entries referenced as "online" and "offline") to use the Ukrainian
equivalents used elsewhere ("Онлайн" and "Оффлайн") so they are consistent with
the root-level translations and other locale entries.
---
Nitpick comments:
In `@src/locales/gl/translation.json`:
- Around line 39-44: The translations for "totalUpload" and "totalDownload"
duplicate "upload" and "download"; update the values for the keys totalUpload
and totalDownload in translation.json to distinct, context-appropriate phrases
(e.g., "Subida total"/"Total subido" and "Descarga total"/"Total descargado") so
the UI can differentiate instantaneous rate ("upload"/"download") from
cumulative totals ("totalUpload"/"totalDownload"); ensure the new strings match
tone/grammar used elsewhere in the gl locale.
In `@src/locales/uk/translation.json`:
- Around line 20-21: The keys "upload" and "download" in translation.json are
ambiguous because both use the same Ukrainian root; change the "upload" value to
the unambiguous Ukrainian term "вивантаження" (matching the noun form used for
"totalDownload": "Скачано") so that "upload" -> "вивантаження" and leave
"download" as the action form "Завантажити" (or adjust
"download"/"totalDownload" forms consistently if you prefer noun vs verb forms)
to remove ambiguity between "upload" and "download".
| }, | ||
| "overview": "Visión xeral", | ||
| "dashboard": "Panel de control", | ||
| "login": "Inciar sesión", |
There was a problem hiding this comment.
Typo in translation text: "Inciar sesión" → "Iniciar sesión".
"Inciar" is missing the second i.
✏️ Proposed fix
- "login": "Inciar sesión",
+ "login": "Iniciar sesión",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "login": "Inciar sesión", | |
| "login": "Iniciar sesión", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/locales/gl/translation.json` at line 10, Fix the typo in the translation
value for the "login" key: replace the incorrect string "Inciar sesión" with
"Iniciar sesión" in the locales JSON so the "login" translation is spelled
correctly.
| "language": { | ||
| "zh-CN": "简体中文 (Chinés simplificado)", | ||
| "zh-TW": "繁體中文 (Chinés tradicional)", | ||
| "en-US": "English (Inglés)", | ||
| "de-DE": "Deutsch (Alemán)", | ||
| "es-ES": "Español", | ||
| "ru-RU": "Русский (Ruso)", | ||
| "ta-IN": "தமிழ் (Tamil)" | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find i18n configuration and locale-related files
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) | grep -E "(i18n|locale|config)" | head -20Repository: hamster1963/nezha-dash-v2
Length of output: 159
🏁 Script executed:
#!/bin/bash
# Search for locale definitions and the exact codes being used
rg -l 'locales|locale.*:' --type ts --type tsx --type js | head -10Repository: hamster1963/nezha-dash-v2
Length of output: 96
🏁 Script executed:
#!/bin/bash
# Check the directory structure of locales
ls -la src/locales/ 2>/dev/null || find . -type d -name locales | head -5Repository: hamster1963/nezha-dash-v2
Length of output: 809
🏁 Script executed:
#!/bin/bash
# Read the i18n configuration
cat src/i18n.jsRepository: hamster1963/nezha-dash-v2
Length of output: 1366
🏁 Script executed:
#!/bin/bash
# Check language entries in a reference locale (en)
find src/locales -name translation.json | head -1 | xargs cat | head -30Repository: hamster1963/nezha-dash-v2
Length of output: 747
🏁 Script executed:
#!/bin/bash
# Check all translation.json files and their line counts
find src/locales -name translation.json -exec wc -l {} \;Repository: hamster1963/nezha-dash-v2
Length of output: 500
🏁 Script executed:
#!/bin/bash
# Check the gl/translation.json file around lines 90-98
sed -n '85,100p' src/locales/gl/translation.jsonRepository: hamster1963/nezha-dash-v2
Length of output: 457
🏁 Script executed:
#!/bin/bash
# Check what's in the uk, gl, ja translation files
echo "=== UK translation ===" && cat src/locales/uk/translation.json && echo -e "\n=== GL translation (first 20 lines) ===" && head -20 src/locales/gl/translation.json && echo -e "\n=== JA translation ===" && cat src/locales/ja/translation.jsonRepository: hamster1963/nezha-dash-v2
Length of output: 2468
🏁 Script executed:
#!/bin/bash
# Check other translation files language sections for pattern
echo "=== EN language section ===" && rg -A 10 '"language"' src/locales/en/translation.json && echo -e "\n=== ES language section ===" && rg -A 10 '"language"' src/locales/es/translation.jsonRepository: hamster1963/nezha-dash-v2
Length of output: 621
🏁 Script executed:
#!/bin/bash
# Check if uk/translation.json has a language section
grep -n "language" src/locales/uk/translation.jsonRepository: hamster1963/nezha-dash-v2
Length of output: 51
🏁 Script executed:
#!/bin/bash
# Compare locale codes to understand the pattern for new locales
echo "Current locale codes in i18n.js:" && rg '"[a-z]{2}-[A-Z]{2}"' src/i18n.js | cut -d'"' -f2 | sortRepository: hamster1963/nezha-dash-v2
Length of output: 158
language section is incomplete, and locales are not registered in i18n configuration.
The language switcher is missing entries for three new locales. Additionally, uk, gl, and ja are not imported or registered in src/i18n.js, so they won't function even if language entries are added.
Update src/i18n.js to import and register the three locales:
- Add imports for
ukTranslation,glTranslation, andjaTranslation - Register them in the
resourcesobject with the correct locale codes:uk-UA,gl-ES,ja-JP
Then add corresponding entries to the language section in src/locales/gl/translation.json (and other translation files):
✏️ Language section addition for gl/translation.json
"ta-IN": "தமிழ் (Tamil)",
+ "gl-ES": "Galego",
+ "uk-UA": "Українська",
+ "ja-JP": "日本語"
},Ensure the locale codes match exactly what is registered in the i18n configuration.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "language": { | |
| "zh-CN": "简体中文 (Chinés simplificado)", | |
| "zh-TW": "繁體中文 (Chinés tradicional)", | |
| "en-US": "English (Inglés)", | |
| "de-DE": "Deutsch (Alemán)", | |
| "es-ES": "Español", | |
| "ru-RU": "Русский (Ruso)", | |
| "ta-IN": "தமிழ் (Tamil)" | |
| }, | |
| "language": { | |
| "zh-CN": "简体中文 (Chinés simplificado)", | |
| "zh-TW": "繁體中文 (Chinés tradicional)", | |
| "en-US": "English (Inglés)", | |
| "de-DE": "Deutsch (Alemán)", | |
| "es-ES": "Español", | |
| "ru-RU": "Русский (Ruso)", | |
| "ta-IN": "தமிழ் (Tamil)", | |
| "gl-ES": "Galego", | |
| "uk-UA": "Amerikaanse", | |
| "ja-JP": "日本語" | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/locales/gl/translation.json` around lines 90 - 98, Add the missing locale
entries and register the new locales: update src/i18n.js to import
ukTranslation, glTranslation, and jaTranslation and add them into the resources
object keyed exactly as 'uk-UA', 'gl-ES', and 'ja-JP'; then update the
"language" object in src/locales/gl/translation.json (the "language" section in
that file) to include entries for those three locales using the proper display
strings for Ukrainian, Galician, and Japanese so they match the codes registered
in i18n.
| }, | ||
| "error": { | ||
| "pageNotFound": "Páxina non atopada", | ||
| "backToHome": "Voltar áo inicio" |
There was a problem hiding this comment.
Typo in translation text: "Voltar áo inicio" → "Voltar ao inicio".
In Galician the contraction of the preposition a + masculine article o is ao (no accent). áo is not a valid Galician orthographic form.
✏️ Proposed fix
- "backToHome": "Voltar áo inicio"
+ "backToHome": "Voltar ao inicio"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "backToHome": "Voltar áo inicio" | |
| "backToHome": "Voltar ao inicio" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/locales/gl/translation.json` at line 101, Fix the typo in the translation
key "backToHome" by changing the value from "Voltar áo inicio" to "Voltar ao
inicio" in the Galician translation JSON to use the correct contraction without
an accent.
| @@ -0,0 +1 @@ | |||
| {} | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Search for i18n initialization and fallback configuration
rg -i 'fallbackLng|fallbackLocale|fallback' --type-list | head -5
rg -i 'fallbackLng|fallbackLocale|fallback' -A 2 -B 2Repository: hamster1963/nezha-dash-v2
Length of output: 711
🏁 Script executed:
# Find i18n configuration files
fd -e ts -e js -e json | grep -i i18nRepository: hamster1963/nezha-dash-v2
Length of output: 80
🏁 Script executed:
# Search for i18n library imports and initialization
rg 'i18next|vue-i18n|i18n\..*init|createI18n' -A 5 -B 1Repository: hamster1963/nezha-dash-v2
Length of output: 14088
🏁 Script executed:
# Check the locale directory structure
find src/locales -type f | head -20Repository: hamster1963/nezha-dash-v2
Length of output: 458
🏁 Script executed:
# Look for any i18n configuration in main/entry files
rg 'import.*i18n|require.*i18n' -A 5 src/Repository: hamster1963/nezha-dash-v2
Length of output: 9788
🏁 Script executed:
cat src/i18n.jsRepository: hamster1963/nezha-dash-v2
Length of output: 1366
Japanese locale file is not imported or registered — remove the unused empty file or add translations and register it.
The src/locales/ja/translation.json file exists but is empty ({}) and not imported in src/i18n.js. The i18n system only registers 7 locales (de-DE, en-US, es-ES, ru-RU, ta-IN, zh-CN, zh-TW), leaving Japanese unused. While the fallback to en-US is properly configured and prevents user-facing issues, the orphaned empty file should either be removed or, if Japanese support is intended, the file should be imported and registered like other locales.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/locales/ja/translation.json` at line 1, The empty Japanese locale file
(ja translation.json) is orphaned and not registered in the i18n initialization;
either remove the empty ja translation.json or add real translations and
register it in the i18n setup. If adding Japanese support, populate the ja
translation.json with key/value translations and add it to the i18n
resources/locales array where other locales are registered (the i18n
initialization code that builds/registers resources); if not needed, delete the
ja translation.json to avoid unused files. Ensure the chosen change is reflected
in the same module that configures locale registration so Japanese is no longer
left unreferenced.
| "online": "Online", | ||
| "days": "Днів", | ||
| "hours": "Годин", | ||
| "offline": "Offline", |
There was a problem hiding this comment.
serverDetail.online / serverDetail.offline left untranslated — inconsistent with root-level translations.
Lines 30 and 33 use bare English strings "Online" / "Offline", while the root-level keys on lines 41–42 provide Ukrainian equivalents ("Онлайн" / "Оффлайн").
✏️ Suggested fix
- "online": "Online",
+ "online": "Онлайн",
"days": "Днів",
"hours": "Годин",
- "offline": "Offline",
+ "offline": "Оффлайн",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "online": "Online", | |
| "days": "Днів", | |
| "hours": "Годин", | |
| "offline": "Offline", | |
| "online": "Онлайн", | |
| "days": "Днів", | |
| "hours": "Годин", | |
| "offline": "Оффлайн", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/locales/uk/translation.json` around lines 30 - 33, The serverDetail
translations use English values for "online" and "offline"; update the "online"
and "offline" keys in this file (the serverDetail entries referenced as "online"
and "offline") to use the Ukrainian equivalents used elsewhere ("Онлайн" and
"Оффлайн") so they are consistent with the root-level translations and other
locale entries.
Translations update from Hosted Weblate for Nezha/User frontend.
Current translation status:
Summary by CodeRabbit