Translations update from Hosted Weblate#58
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/
|
Linting and formatting issues were automatically fixed. Please review the changes. |
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughThree new locale translation files have been added to the application: Galician with 137 translated UI strings, Japanese as a skeleton file, and Ukrainian with 24 translated UI strings. These provide localized text for themes, server monitoring, dashboards, and other UI components. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 37: The translations for days are inconsistent and missing the acute
accent; update the entries serverCard.days, serviceTracker.daysAgo, and
serverDetail.days in translation.json to use the correct Galician form "Días"
(with an accent) so all three keys consistently use "Días" instead of "Dias" or
"dias atrás" (adjusting the plural with accent and preserving the "atrás" suffix
where applicable).
- Line 10: Fix the typo in the "login" translation value by updating the string
associated with the "login" key in translation.json from "Inciar sesión" to
"Iniciar sesión" so the correct Spanish spelling is used; locate the "login"
entry in src/locales/gl/translation.json and replace the value accordingly.
- Line 127: Replace the misspelled JSON key "usage-baseed" with the correct key
"usage-based" across all locale translation files; update every occurrence of
the key (e.g., in src/locales/en/translation.json, de, es, gl, ru, ta, zh-CN,
zh-TW) preserving the existing value string for each locale so only the key name
changes and not the translations themselves.
- Around line 90-98: Add the missing language map entries to the "language"
object in src/locales/gl/translation.json: add a "gl-ES" key with the Galician
name (e.g., "Galego (Galego)") and add a "uk-UA" key with the Ukrainian name in
Ukrainian (e.g., "Українська (Українська)"), ensuring they follow the same
key/value pattern as the existing entries like "en-US" and "es-ES".
| }, | ||
| "overview": "Visión xeral", | ||
| "dashboard": "Panel de control", | ||
| "login": "Inciar sesión", |
There was a problem hiding this comment.
Typo: "Inciar" → "Iniciar"
Missing the letter 'i' in "Iniciar sesión".
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 "login"
translation value by updating the string associated with the "login" key in
translation.json from "Inciar sesión" to "Iniciar sesión" so the correct Spanish
spelling is used; locate the "login" entry in src/locales/gl/translation.json
and replace the value accordingly.
| "serverCard": { | ||
| "mem": "MEM", | ||
| "stg": "STG", | ||
| "days": "Dias", |
There was a problem hiding this comment.
Inconsistent accent on "días"
serverCard.days (Line 37) uses "Dias" (no accent) and serviceTracker.daysAgo (Line 55) uses "dias atrás" (no accent), while serverDetail.days (Line 62) correctly uses "Días". In Galician, "días" requires an accent.
Proposed fix
- "days": "Dias",
+ "days": "Días",- "daysAgo": "dias atrás",
+ "daysAgo": "días atrás",Also applies to: 55-55
🤖 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 37, The translations for days are
inconsistent and missing the acute accent; update the entries serverCard.days,
serviceTracker.daysAgo, and serverDetail.days in translation.json to use the
correct Galician form "Días" (with an accent) so all three keys consistently use
"Días" instead of "Dias" or "dias atrás" (adjusting the plural with accent and
preserving the "atrás" suffix where applicable).
| "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
# Check what language keys exist in a reference locale
fd 'translation.json' src/locales --exec grep -l 'language' | head -5Repository: hamster1963/nezha-dash-v2
Length of output: 234
🏁 Script executed:
#!/bin/bash
# Check if any locale already lists gl or uk
rg '"gl"|"uk"' src/locales/ -n --context 2Repository: hamster1963/nezha-dash-v2
Length of output: 51
🏁 Script executed:
#!/bin/bash
# Let's look at the structure of a few translation files to understand the pattern
echo "=== Checking en-US translation.json ==="
cat src/locales/en-US/translation.json | jq '.language' 2>/dev/null || cat src/locales/en-US/translation.json | grep -A 20 '"language"'
echo -e "\n=== Checking es-ES translation.json ==="
cat src/locales/es-ES/translation.json | jq '.language' 2>/dev/null || cat src/locales/es-ES/translation.json | grep -A 20 '"language"'
echo -e "\n=== Checking gl translation.json ==="
cat src/locales/gl/translation.json | jq '.language' 2>/dev/null || cat src/locales/gl/translation.json | grep -A 20 '"language"'Repository: hamster1963/nezha-dash-v2
Length of output: 563
🏁 Script executed:
#!/bin/bash
# Check all available locale directories
ls -d src/locales/*/ | xargs -I {} basename {}Repository: hamster1963/nezha-dash-v2
Length of output: 110
🏁 Script executed:
#!/bin/bash
# Check en/translation.json for its language map structure
echo "=== en/translation.json language map ==="
cat src/locales/en/translation.json | jq '.language' 2>/dev/null || cat src/locales/en/translation.json | grep -A 20 '"language"' | head -25
echo -e "\n=== Checking if any translation.json has gl or uk in language map ==="
rg '"language"' src/locales/ -A 15 | grep -E '(gl|uk)":' | head -10Repository: hamster1963/nezha-dash-v2
Length of output: 329
🏁 Script executed:
#!/bin/bash
# List out a few locale file paths to understand structure
echo "=== Sample of locale files ==="
find src/locales -name "translation.json" -type f | sortRepository: hamster1963/nezha-dash-v2
Length of output: 489
🏁 Script executed:
#!/bin/bash
# Check the uk/translation.json to see its language map and any hints about naming conventions
echo "=== uk/translation.json language map ==="
cat src/locales/uk/translation.json | jq '.language' 2>/dev/null || cat src/locales/uk/translation.json | grep -A 20 '"language"'
echo -e "\n=== Other locale files for comparison ==="
echo "=== de/translation.json ==="
cat src/locales/de/translation.json | jq '.language' 2>/dev/null || cat src/locales/de/translation.json | grep -A 20 '"language"'Repository: hamster1963/nezha-dash-v2
Length of output: 290
🏁 Script executed:
#!/bin/bash
# Check if there's any reference to how gl and uk should be represented (e.g., in package.json or config files)
echo "=== Checking for locale config or naming hints ==="
find . -maxdepth 2 -type f \( -name "package.json" -o -name "*.config.*" -o -name "i18n*" \) | head -5 | xargs grep -l "gl\|uk\|galician\|ukrainian" 2>/dev/null || echo "No specific config found"
echo -e "\n=== Checking git for any added locales in this PR ==="
git log --oneline -20 | head -10
git diff HEAD~1 src/locales/gl/translation.json 2>/dev/null | head -30 || echo "No recent diffs available"Repository: hamster1963/nezha-dash-v2
Length of output: 262
🏁 Script executed:
#!/bin/bash
# Check all language maps to see the complete picture
echo "=== All language maps in translation files ==="
for file in src/locales/*/translation.json; do
locale=$(dirname "$file" | xargs basename)
echo -e "\n--- $locale/translation.json ---"
cat "$file" | jq '.language' 2>/dev/null | head -15
doneRepository: hamster1963/nezha-dash-v2
Length of output: 1733
🏁 Script executed:
#!/bin/bash
# Check if gl-ES or uk-UA appear anywhere in the codebase
echo "=== Searching for gl-ES or uk-UA patterns ==="
rg 'gl-ES|uk-UA|gl"|uk"' src/ --type json | head -20Repository: hamster1963/nezha-dash-v2
Length of output: 166
Add Galician and Ukrainian language entries to the language map.
The gl/translation.json file doesn't include "gl-ES" (Galician) or "uk-UA" (Ukrainian) in its language map, even though locale directories for both exist. Following the pattern in other translation files (e.g., en-US, de-DE, es-ES), these entries should be added with their respective language names in Galician and Ukrainian.
🤖 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
language map entries to the "language" object in
src/locales/gl/translation.json: add a "gl-ES" key with the Galician name (e.g.,
"Galego (Galego)") and add a "uk-UA" key with the Ukrainian name in Ukrainian
(e.g., "Українська (Українська)"), ensuring they follow the same key/value
pattern as the existing entries like "en-US" and "es-ES".
| "days": "días", | ||
| "price": "Precio", | ||
| "free": "Gratis", | ||
| "usage-baseed": "Baseado no uso" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for both "usage-baseed" and "usage-based" patterns in translation files
echo "=== Searching for 'usage-base' pattern in all locale files ==="
rg 'usage-base' --include '*.json' -n src/locales/
echo ""
echo "=== Checking the specific file ==="
grep -n "usage-base" src/locales/gl/translation.jsonRepository: hamster1963/nezha-dash-v2
Length of output: 667
🏁 Script executed:
#!/bin/bash
echo "=== Finding all locale files ==="
find src/locales -name "*.json" -type f | head -20
echo ""
echo "=== Searching for 'usage-base' pattern across all locale files ==="
rg 'usage-base' -t json src/locales/
echo ""
echo "=== Checking if correct spelling 'usage-based' exists anywhere ==="
rg 'usage-based' -t json src/locales/
echo ""
echo "=== Listing base locale files ==="
find src/locales -name "translation.json" | sortRepository: hamster1963/nezha-dash-v2
Length of output: 1612
Typo in key "usage-baseed" exists across all 8 locale files — should be "usage-based"
The key "usage-baseed" (double 'e') appears in all locale files including the source locale (en/translation.json). This systemic typo needs to be fixed in all 8 files:
- src/locales/en/translation.json
- src/locales/de/translation.json
- src/locales/es/translation.json
- src/locales/gl/translation.json
- src/locales/ru/translation.json
- src/locales/ta/translation.json
- src/locales/zh-CN/translation.json
- src/locales/zh-TW/translation.json
🤖 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 127, Replace the misspelled JSON key
"usage-baseed" with the correct key "usage-based" across all locale translation
files; update every occurrence of the key (e.g., in
src/locales/en/translation.json, de, es, gl, ru, ta, zh-CN, zh-TW) preserving
the existing value string for each locale so only the key name changes and not
the translations themselves.
Translations update from Hosted Weblate for Nezha/User frontend.
Current translation status:
Summary by CodeRabbit