Skip to content

i18n(zh_Hans): fill 700 empty msgstr entries in the Chinese catalogs - #1270

Open
ApplesBear-X wants to merge 1 commit into
horilla:dev/v2.0from
ApplesBear-X:i18n/zh_Hans-complete
Open

ApplesBear-X wants to merge 1 commit into
horilla:dev/v2.0from
ApplesBear-X:i18n/zh_Hans-complete

Conversation

@ApplesBear-X

@ApplesBear-X ApplesBear-X commented Oct 9, 2026 •

Copy link
Copy Markdown

这个分支重做了一遍,现在是基于 dev/v2.0 最新提交做的,只改「msgstr 还是空」的那些条目。

改了什么

  • horilla/locale/zh_Hans/LC_MESSAGES/django.po:补 615 条
  • horilla/locale/zh_Hans/LC_MESSAGES/djangojs.po:补 59 条
  • notifications/locale/zh_Hans/LC_MESSAGES/django.po:补 26 条

之前那版还顺手做了 fuzzy 清理和繁体转简体,这次全拿掉了。原因:那些改动让 diff 涨到几千行,msgid 集合跟上游对不上,review 基本没法看。现在 msgid 一条没动,只换 msgstr,diff 就是 700 行、一行一条译文。

怎么确认没弄坏

  • msgid 数量、复数条目(msgstr[n])、废弃条目(#~)与上游逐项比对,数量完全一致,一条没碰。
  • 译文中含 #、双引号或换行的跳过不写,宁可那条留英文,也不拼坏 po。
  • 占位符(%(name)s、%s 这类)原样保留。

还有两百多条空 msgstr 没补,等这版合了再提。

@ApplesBear-X

Copy link
Copy Markdown
Author

Hi! A short follow-up on this PR.

I found and fixed one problem with it: a few example strings (janedoe@example.com, 127.0.0.1, name@example.com) had been rewritten as placeholders by a local script, so their translations could no longer match the source strings. The catalogs are now rebuilt from the current dev/v2.0 files — msgid / msgctxt / comments are unchanged, only msgstr and the fuzzy flags move (852 previously empty entries filled, 2073 fuzzy cleared).

While checking, I also noticed the existing zh_Hans catalogs contain ~207 strings written in Traditional characters (員工, 權限, 部門, 標籤…). That looks like legacy contamination rather than a deliberate choice — I can convert those to Simplified in a follow-up commit if you want, just say the word.

Happy to adjust anything else. Thanks!

@ApplesBear-X

Copy link
Copy Markdown
Author

A gentle bump on this one — the repository is very active (several PRs merged this week), so I wanted to make sure this hasn't fallen through the cracks.

Current state on my side:

  • No merge conflicts with dev/v2.0 (verified just now: mergeable: true, 7 commits ahead, 0 behind).
  • All three touched catalogs still compile with django-admin compilemessages.
  • The only failing-ish signal is the "unstable" merge state, which looks like it comes from required checks that were never triggered on this branch (there are no check runs registered for the head commit at all).

If it's a review-capacity issue rather than something wrong with the patch, I'm happy to split it into smaller PRs (e.g. one per catalog) so it is easier to review. Just say which shape you prefer.

Thanks!

@horilla-opensource

Copy link
Copy Markdown
Member

Hi @ApplesBear-X

Thank you for the follow-up, and for keeping the branch up to date with dev/v2.0. This has not been forgotten. We are reviewing the catalogs now and will come back with comments shortly. We were looking into the terms as we are also not so much familiar with the Simplified Chinese.

The missing check runs are on our side. They were never started for this branch, so the unstable state is not a problem with your patch. There is no need to split the pull request. One review of the three catalogs is easier for us.

We appreciate the care you put into this, and we will reply here as soon as the review is finished.

Best regards,
Team Horilla

@horilla-opensource horilla-opensource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @ApplesBear-X,

Thank you for taking this on, and for the follow-ups. We checked the catalogs in detail. The good news first: the msgids are identical to dev/v2.0 in all three files (nothing added or removed), no Traditional characters remain (we ran OpenCC t2s over every msgstr), the 170 existing translations you changed are correct Traditional-to-Simplified conversions, and a random sample of 40 of the roughly 2,900 newly filled entries was accurate and natural.

We found a few problems that need fixing before we can merge.

Required

  1. compilemessages fails. msgfmt --check-format (what python manage.py compilemessages runs) exits with found 6 fatal errors on horilla/locale/zh_Hans/LC_MESSAGES/django.po: 'msgid' and 'msgstr' entries do not both begin with '\n' at lines 6317, 6339, 12026, 12043, 12595 and 15834. The file on dev/v2.0 has no such error. make compilemessages and our deploy scripts run this command.
  2. Escaped newlines show up as text. Ten entries have a literal backslash and n in the msgstr where the msgid has a real line break, some with four backslashes. We compiled the catalog and read the entries back: the text contains \n. Examples are the setup checklist label ("已完成 %(done)s / %(total)s 步"), the audit-log help text, the "Your requested export is attached" and "could not be generated" e-mail bodies, and "Login - %(company_name)s Dashboard". Lines: 6312, 6334, 12017, 12035, 12590, 13974, 14810, 15828, 23362 and 23374. One HTML attribute is over-escaped too (line 22413, class=\\\"...), which breaks the markup. The msgstr should use real newlines, with matching leading and trailing ones.
  3. Plural entries. %(n)d template archived. and its plural are translated as "员工已归档" ("employee archived"), which is wrong and drops the count. Nine active entries are still empty, all of them plural: %(n)s error, the four %(n)d template ... Active / Draft / invalidated / repopulated / unlocked messages, %(counter)s member currently in this role., %(counter)s report and the holiday notice at line 17132. The description says no empty msgstr remain.
  4. Leaked commentary. The msgstr for job_position (line 7374) contains a paragraph that starts "这些翻译保持了专业性和准确性…" ("These translations maintain professionalism and accuracy…"), which is not a translation. It was already in the catalog before this PR, but since the PR aims to complete the catalog, please fix it here.
  5. Commits. The branch has 7 commits, three of them with the identical subject "restore the example msgids mangled by a local script" and three with "convert the remaining Traditional strings to Simplified". Please squash it to one commit. It is also 200 commits behind dev/v2.0; the three files are unchanged there, so it merges cleanly, but a rebase will let CI run on it.

Smaller points

  1. notifications/locale/zh_Hans/.../django.po still has the default header (no Language, Last-Translator, Project-Id-Version). Please fill it in like the others.
  2. Terminology is mixed in places: Performance is "性能" (machine performance) in one entry and "绩效" in the other three, and "Points History" is "资源历史" ("resource history", it should mention points). Leave is "请假" in 139 entries and "休假" in 147, and payslip is "工资单" in 42 and "工资条" in 19. A short glossary would make the choice deliberate.

Once 1 to 5 are fixed we will gladly merge this.

Team Horilla

@horilla-opensource

Copy link
Copy Markdown
Member

Hi @ApplesBear-X,

Thank you again for the Chinese catalogues. The review on 22 October still stands, and the roughly 2,900 new entries are what we want.

dev/v2.0 has moved on, and horilla/locale/zh_Hans/LC_MESSAGES/django.po now conflicts. A .po file that changed on both sides is unpleasant to resolve by hand, so the easier route is to regenerate it against the current dev/v2.0 (makemessages for your language), re-apply your wording, and fix the points in the review. If a smaller pull request would be easier for you, for example one catalogue at a time, that is fine with us.

If you cannot continue, please tell us and we will keep your translations for a maintainer to finish, with credit to you.

Team Horilla

@ApplesBear-X
ApplesBear-X force-pushed the i18n/zh_Hans-complete branch 3 times, most recently from d4ea745 to aaddeec Compare November 28, 2026 06:31
files: horilla/locale/zh_Hans/LC_MESSAGES/django.po, horilla/locale/zh_Hans/LC_MESSAGES/djangojs.po, notifications/locale/zh_Hans/LC_MESSAGES/django.po
@ApplesBear-X ApplesBear-X changed the title i18n(zh_Hans): complete the Simplified Chinese catalogs and fix stale fuzzy entries i18n(zh_Hans): fill 700 empty msgstr entries in the Chinese catalogs Nov 28, 2026

This branch has not been deployed

No deployments
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