Add missing zh_TW translations for error messages and UI strings#1099
Conversation
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
WalkthroughAdds 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
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
|
Thank you for your submission, we really appreciate it. Comment |
|
I have read the CLA Document and I hereby sign the CLA |
|
Check all changes before submitting a pull request.
|
There was a problem hiding this comment.
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:
- Keep shorter strings on single lines
- For genuinely long strings, use YAML's literal block scalars (
|or>) consistently- 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
📒 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:
- Irrelevant edits
- Translations made without considering context
- 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.
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 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.
There was a problem hiding this comment.
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
📒 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)
There was a problem hiding this comment.
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
📒 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.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Updated translations in zh_TW.yaml for various terms related to roles, limits, and user actions.
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai run pre-merge checks |
✅ Actions performedRunning Pre-merge checks. Results will be posted in the summary comment once complete. |
|
@coderabbitai generate unit tests |
|
🎯 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. |
|
Unit Test Generation process completed. You can view the generated tests in this PR: View PR |
✅ Actions performedUnit Test Generation started... |
|
🎯 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. |
|
Unit Test Generation process completed. You can view the generated tests in this PR: View PR |
✅ Actions performedUnit Test Generation started... |
|
🎯 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. |
|
Unit Test Generation process completed. You can view the generated tests in this PR: View PR |
✅ Actions performedUnit Test Generation started... |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.