Skip to content

Comments

Translations update from Hosted Weblate#50

Merged
hamster1963 merged 2 commits intohamster1963:mainfrom
weblate:weblate-nezha-user-frontend
Dec 25, 2025
Merged

Translations update from Hosted Weblate#50
hamster1963 merged 2 commits intohamster1963:mainfrom
weblate:weblate-nezha-user-frontend

Conversation

@weblate
Copy link
Contributor

@weblate weblate commented Oct 9, 2025

Translations update from Hosted Weblate for Nezha/User frontend.

Current translation status:

Weblate translation status

Summary by CodeRabbit

  • New Features
    • Added Japanese and Ukrainian locale support. Ukrainian includes initial translations (theme and app name); Japanese locale was added but contains no translations yet.
    • If language selection is available, Japanese and Ukrainian may now appear in settings. Untranslated content will continue to display in the default language until translations are provided.

✏️ Tip: You can customize this high-level summary in your review settings.

@weblate weblate force-pushed the weblate-nezha-user-frontend branch from 17c6e83 to 1a1494a Compare October 9, 2025 14:52
@coderabbitai
Copy link

coderabbitai bot commented Oct 9, 2025

📝 Walkthrough

Walkthrough

Added two new localization files: src/locales/ja/translation.json (empty JSON object) and src/locales/uk/translation.json (contains Ukrainian translation keys).

Changes

Cohort / File(s) Summary
Localizations (ja, uk)
src/locales/ja/translation.json, src/locales/uk/translation.json
Added Japanese and Ukrainian translation files. src/locales/ja/translation.json contains {}. src/locales/uk/translation.json contains Ukrainian keys such as "nezha": "Nezha Моніторинг" and a "theme" object with "light" and "dark" translations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hopped along the codebase trail,
Two tiny files tucked in a mail.
One waits quiet, a blank white page,
The other hums in Ukrainian sage.
🐇✨ Translations sprout at every stage.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Translations update from Hosted Weblate' accurately describes the main change in the pull request, which adds translation files for Japanese and Ukrainian locales.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2cc5926 and 1a1494a.

📒 Files selected for processing (1)
  • src/locales/ja/translation.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: auto-fix

@@ -0,0 +1 @@
{}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Empty locale file yields no Japanese UI strings. Shipping a {} means every Japanese key lookup will miss, so users selecting JA will either see raw keys or fall back to another language—effectively a broken locale. Please populate this file with at least the existing default strings (even if still in English for now) or hold off on exposing the locale until translations are ready.

🤖 Prompt for AI Agents
In src/locales/ja/translation.json around lines 1 to 1 the file is empty ({}),
which causes all Japanese key lookups to fail; populate this file with at least
the existing default translation keys (copy the default/en translation JSON
structure and values into this file) so lookups succeed (you can leave values in
English temporarily) or remove/disable the ja locale export until proper
translations are ready; ensure the JSON structure matches other locale files and
update any locale registration code if you temporarily disable the locale.

@weblate weblate force-pushed the weblate-nezha-user-frontend branch from 1a1494a to 1e1f9da Compare December 24, 2025 03:49
@github-actions
Copy link

Linting and formatting issues were automatically fixed. Please review the changes.

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
@weblate weblate force-pushed the weblate-nezha-user-frontend branch from 19f9569 to 02f3986 Compare December 25, 2025 04:00
@github-actions
Copy link

Linting and formatting issues were automatically fixed. Please review the changes.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19f9569 and 71bdea1.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • src/locales/ja/translation.json
  • src/locales/uk/translation.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/locales/ja/translation.json

Comment on lines +1 to +7
{
"nezha": "Nezha Моніторинг",
"theme": {
"light": "Світла тема",
"dark": "Темна тема"
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Explore the repository structure and locale files
echo "=== Directory structure of src/locales ==="
find src/locales -type f -name "*.json" 2>/dev/null | head -20

echo -e "\n=== Files in src/locales directory ==="
ls -la src/locales/ 2>/dev/null || echo "Directory not found"

echo -e "\n=== Content of Ukrainian translation file ==="
cat -n src/locales/uk/translation.json 2>/dev/null || echo "File not found"

Repository: hamster1963/nezha-dash-v1

Length of output: 1399


🏁 Script executed:

# Get the English (reference) translation file and compare
echo "=== English translation file (reference) ==="
cat -n src/locales/en/translation.json

echo -e "\n=== Comparing translation keys ==="
echo "English keys:"
jq -r 'paths(scalars) | join(".")' src/locales/en/translation.json | sort

echo -e "\nUkrainian keys:"
jq -r 'paths(scalars) | join(".")' src/locales/uk/translation.json | sort

echo -e "\n=== Missing keys in Ukrainian ==="
comm -23 \
  <(jq -r 'paths(scalars) | join(".")' src/locales/en/translation.json | sort) \
  <(jq -r 'paths(scalars) | join(".")' src/locales/uk/translation.json | sort)

echo -e "\n=== Key count comparison ==="
en_count=$(jq -r 'paths(scalars) | join(".")' src/locales/en/translation.json | wc -l)
uk_count=$(jq -r 'paths(scalars) | join(".")' src/locales/uk/translation.json | wc -l)
echo "English: $en_count keys"
echo "Ukrainian: $uk_count keys"

Repository: hamster1963/nezha-dash-v1

Length of output: 6510


Ukrainian translation file is severely incomplete—missing 100 of 103 required keys.

The file has valid JSON structure but contains only 3 translations (nezha, theme.dark, theme.light) against 103 keys in the English reference locale. This is a critical issue requiring translation of all missing sections: overview, dashboard, login, online/offline status indicators, server information, WebSocket status, map data, server card details, cycle transfer info, service tracking, server details, charts, footer, language options, error messages, tab navigation, monitoring data, PWA notifications, and billing information.

🤖 Prompt for AI Agents
In src/locales/uk/translation.json around lines 1 to 7, the Ukrainian locale
contains only 3 keys while the English reference has 103 keys; add all missing
translation keys from the English reference file preserving the exact key
structure and nesting, translating values into Ukrainian (or adding TODO
placeholders like "TODO: translate" if review requires staged work), ensure JSON
validity (no trailing commas, proper quoting), run the i18n validation script or
linter to confirm all keys exist and report any mismatches, and commit the
updated translation.json.

@hamster1963 hamster1963 merged commit ae58d24 into hamster1963:main Dec 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants