Skip to content

Add missing zh_TW translations for error messages and UI strings#1099

Merged
undefined-moe merged 21 commits into
hydro-dev:masterfrom
Bryan0324:master
Dec 21, 2025
Merged

Add missing zh_TW translations for error messages and UI strings#1099
undefined-moe merged 21 commits into
hydro-dev:masterfrom
Bryan0324:master

Conversation

@Bryan0324

@Bryan0324 Bryan0324 commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Localization
    • Expanded and refined Traditional Chinese (zh_TW) translations across the platform: added dozens of new and updated strings covering UI labels, dialogs, error and system messages, admin/contest/domain tooling, problems/discussions, submissions/runner prompts, file operations, account flows, and help text for a more complete zh_TW experience.

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

Copilot AI and others added 9 commits December 18, 2025 17:17
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
…iles

Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Co-authored-by: Bryan0324 <34998621+Bryan0324@users.noreply.github.com>
Add missing zh_TW translations from zh source files
@coderabbitai

coderabbitai Bot commented Dec 18, 2025

Copy link
Copy Markdown

Walkthrough

Adds and expands Traditional Chinese (zh_TW) translations in three locale files: packages/hydrojudge/locales/zh_TW.yaml, packages/hydrooj/locales/zh_TW.yaml, and packages/ui-default/locales/zh_TW.yaml. The changes introduce many new keys and update existing keys across error messages, runner/sandbox texts, UI labels, contests/domains/problems/training/submissions, account/auth flows, admin messages, and file-handling strings. All edits are localization/data-only; there are no code, control-flow, or public API signature changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Heterogeneous additions and edits across three YAML files with many distinct keys.
  • Areas to check:
    • YAML syntax and indentation correctness.
    • Consistency of key names with code usage to avoid missing translations.
    • Duplicate or conflicting keys across files.
    • Correct escaping/formatting of placeholders (e.g., {0}, %{name}).

Possibly related PRs

Suggested reviewers

  • undefined-moe

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 directly and clearly summarizes the main changeset: adding missing Traditional Chinese (zh_TW) translations for error messages and UI strings across three locale files. The title is specific, concise, and accurately reflects the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

@hydro-dev-bot

hydro-dev-bot Bot commented Dec 18, 2025

Copy link
Copy Markdown

Thank you for your submission, we really appreciate it.
Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Comment I have read the CLA Document and I hereby sign the CLA below to sign it.

@Bryan0324

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@undefined-moe

Copy link
Copy Markdown
Member

Check all changes before submitting a pull request.
There are lots of:

  • Irrelevant edits
  • Translations without considering context being used
  • Formatting errors

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/hydrooj/locales/zh_TW.yaml (2)

6-7: Review multi-line string formatting for consistency.

Several translation entries have line breaks inserted mid-sentence without clear necessity (e.g., lines 6-7, 11-12, 28-29). This creates inconsistent formatting and may cause rendering issues depending on how the localization system handles multi-line strings.

For example:

  • Line 6-7: '{0} {1} delete your discussion reply {2} in "{3}"({4}).': '{0} {1} 從討論 {3}({4}) 刪除了你的回覆 {2}。' - the Chinese translation is split across two lines
  • Lines 11-12: Similar mid-sentence break
  • Lines 28-29: Another mid-sentence break

Consider formatting these as single-line strings unless there's a specific requirement for line breaks.

🔎 Proposed formatting improvements
-'{0} {1} delete your discussion reply {2} in "{3}"({4}).': '{0} {1} 從討論 {3}({4}) 刪除了你的回覆
-  {2}。'
+'{0} {1} delete your discussion reply {2} in "{3}"({4}).': '{0} {1} 從討論 {3}({4}) 刪除了你的回覆 {2}。'
-'{0} limit exceeded (limit: {2} operations in {1} seconds).': '{0} 超過限制。(限制:{1} 秒內最多
-  {2} 次操作。)'
+'{0} limit exceeded (limit: {2} operations in {1} seconds).': '{0} 超過限制。(限制:{1} 秒內最多 {2} 次操作。)'
-'A domain ID cannot be changed after creation. It is supposed to be:': 建立後將無法更改 ID。ID
-  必須滿足以下條件:
+'A domain ID cannot be changed after creation. It is supposed to be:': 建立後將無法更改 ID。ID 必須滿足以下條件:

Apply similar changes to other entries with mid-sentence line breaks.

Also applies to: 11-12, 28-29


73-75: Inconsistent multi-line string formatting pattern throughout the file.

The file exhibits inconsistent patterns for handling long translations:

  • Some use mid-sentence line breaks (e.g., lines 73-75, 84-85, 118-119)
  • Some long strings remain on single lines (e.g., line 101)
  • Some use proper YAML literal block syntax with ? and : (e.g., lines 35-37)

This inconsistency can make the file harder to maintain and may lead to unexpected whitespace in rendered text. Consider establishing a consistent approach:

  1. Keep shorter strings on single lines
  2. For genuinely long strings, use YAML's literal block scalars (| or >) consistently
  3. Ensure line breaks only occur at natural phrase boundaries, not mid-sentence

Also applies to: 84-85, 118-119, 165-168

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 189720a and 8c273c1.

📒 Files selected for processing (1)
  • packages/hydrooj/locales/zh_TW.yaml (6 hunks)
🔇 Additional comments (1)
packages/hydrooj/locales/zh_TW.yaml (1)

1-986: Address reviewer's concerns about translation context and relevance.

The PR reviewer (undefined-moe) has noted several concerns:

  1. Irrelevant edits
  2. Translations made without considering context
  3. Formatting errors

While the YAML syntax appears valid, the formatting inconsistencies noted in previous comments should be addressed. Additionally, please review each translation entry to ensure:

  • All additions are relevant to the missing zh_TW items mentioned in the PR title
  • Translations accurately reflect the application context and match the original English meaning
  • Technical terminology is translated consistently (e.g., "domain", "contest", "homework", "submit")
  • User-facing messages maintain appropriate tone and clarity

Given the scope of changes (986 lines), consider having a native Traditional Chinese speaker review the translations for contextual accuracy and consistency with existing application terminology.

Based on learnings from the PR reviewer's comments about multiple issues with this submission.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c273c1 and 3d7ce93.

📒 Files selected for processing (1)
  • packages/hydrooj/locales/zh_TW.yaml (7 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
packages/hydrooj/locales/zh_TW.yaml

[error] 42-42: syntax error: expected , but found ''

(syntax)

🔇 Additional comments (1)
packages/hydrooj/locales/zh_TW.yaml (1)

1-981: Have this Traditional Chinese translation reviewed by a native Taiwan speaker familiar with the application's domain terminology.

Best practice for zh_TW localization is to find specialists in the specific native variant, particularly given the maintainer's concern about context-appropriate translations. Verify consistency of technical terms (domain, contest, submission, problem, etc.) across all modified locale files in this PR. Ensure appropriate formality level and usage of Taiwan-specific conventions.

Comment thread packages/hydrooj/locales/zh_TW.yaml Outdated
Comment thread packages/hydrooj/locales/zh_TW.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
packages/hydrooj/locales/zh_TW.yaml (2)

40-40: Translation error: "Role" incorrectly translated as "用戶" (user).

The English key refers to "Role {1}" but the Traditional Chinese translation uses "用戶" (user) instead of "角色" (role).

🔎 Proposed fix
-Role {1} already exists in domain {0}.: 域 {0} 中已存在用戶 {1}。
+Role {1} already exists in domain {0}.: 域 {0} 中已存在角色 {1}。

42-42: YAML syntax error: Unquoted key with backticks.

The key contains backticks but is not quoted, causing a YAML parsing error.

🔎 Proposed fix
-The value `{1}` of {0} already exists.: {0} 的值 `{1}` 已經存在。
+'The value `{1}` of {0} already exists.': '{0} 的值 `{1}` 已經存在。'
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7ce93 and b33908a.

📒 Files selected for processing (1)
  • packages/hydrooj/locales/zh_TW.yaml (7 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
packages/hydrooj/locales/zh_TW.yaml

[error] 42-42: syntax error: expected , but found ''

(syntax)

Comment thread packages/hydrooj/locales/zh_TW.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/hydrooj/locales/zh_TW.yaml (1)

563-563: Translation may still be incomplete or semantically different.

The English phrase "with automatically filled invitation code" suggests a link/URL with the invitation code pre-filled. The Chinese translation "可以使用自動填寫邀請碼" (can use auto-fill invitation code) is missing the object it describes (likely a link).

Consider adding "的連結" (link) or similar noun to complete the meaning.

🔎 Proposed fix
-Or, with automatically filled invitation code: 或者,可以使用自動填寫邀請碼
+Or, with automatically filled invitation code: 或者,這是可以自動填寫邀請碼的連結
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b33908a and f9ca88a.

📒 Files selected for processing (1)
  • packages/hydrooj/locales/zh_TW.yaml (7 hunks)
🔇 Additional comments (2)
packages/hydrooj/locales/zh_TW.yaml (2)

40-42: Previous review issues have been addressed.

The "Role" translation is now correctly using "角色" (role) instead of "用戶" (user), and the YAML key with backticks is now properly quoted.


1-980: Overall assessment: Translation quality is good with minor issues addressed.

The file adds extensive Traditional Chinese translations covering authentication, discussions, problems, training, submissions, users, and domain management. The previously flagged critical issues (YAML syntax error and "Role" mistranslation) have been fixed.

One minor translation omission remains at line 45 (missing period separator), and the semantic completeness of line 563 should be verified with maintainers familiar with the UI context.

Comment thread packages/hydrooj/locales/zh_TW.yaml Outdated
@Bryan0324 Bryan0324 changed the title add missing items to zh_TW Add missing zh_TW translations for error messages and UI strings Dec 21, 2025
@Bryan0324

Copy link
Copy Markdown
Contributor Author

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@Bryan0324

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Bryan0324

Copy link
Copy Markdown
Contributor Author

@coderabbitai run pre-merge checks

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
✅ Actions performed

Running Pre-merge checks. Results will be posted in the summary comment once complete.

@Bryan0324

Copy link
Copy Markdown
Contributor Author

@coderabbitai generate unit tests

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

🎯 Unit Test Generation Post-Process Complete

The unit test generation and CI/CD fixing process has completed after reaching the maximum number of iterations. Please review the generated tests and any remaining issues manually.

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

Unit Test Generation process completed. You can view the generated tests in this PR: View PR

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
✅ Actions performed

Unit Test Generation started...

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

🎯 Unit Test Generation Post-Process Complete

The unit test generation and CI/CD fixing process has completed after reaching the maximum number of iterations. Please review the generated tests and any remaining issues manually.

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

Unit Test Generation process completed. You can view the generated tests in this PR: View PR

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
✅ Actions performed

Unit Test Generation started...

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

🎯 Unit Test Generation Post-Process Complete

The unit test generation and CI/CD fixing process has completed after reaching the maximum number of iterations. Please review the generated tests and any remaining issues manually.

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

Unit Test Generation process completed. You can view the generated tests in this PR: View PR

@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown
✅ Actions performed

Unit Test Generation started...

@undefined-moe undefined-moe merged commit 5f1da62 into hydro-dev:master Dec 21, 2025
8 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.

3 participants