Skip to content

Translation pipeline has no term memory — wrong and inconsistent zh strings #1506

Description

@wenhua-huang

Issue Summary

Every msgstr in packages/locale/locales/zh/ is filled, so nothing reports as
missing. Some of them are a different string's translation. Others translate one
concept several different ways. The translate script passes no glossary, so each
string is translated on its own.

Steps to Reproduce

git show HEAD:packages/locale/locales/zh/erp.po | grep -A1 '^msgid "General Ledger"$'
git show HEAD:packages/locale/locales/zh/erp.po | grep -A1 '^msgid "Genealogy"$'
git show HEAD:packages/locale/locales/zh/erp.po | grep -A1 '^msgid "gauges"$'
git show HEAD:packages/locale/locales/zh/mes.po | grep -A1 '^msgid "Job"$'
git show HEAD:packages/locale/locales/zh/mes.po | grep -A1 '^msgid "Jobs"$'

Actual Results

erp.po:

msgid msgstr
General Ledger 总分类账 correct
Genealogy 总分类账 wrong. this means "general ledger"
gauges 产品谱系 wrong. this means "product genealogy"

Genealogy got General Ledger's translation, and the one Genealogy should have
had went to gauges. gauges should be 量规.

mes.po:

msgid msgstr
Job 工单 correct
Jobs 工作 "work / employment"

Singular and plural of one word, two terms, same file.

erp.po has five translations for Job:

msgid msgstr
Job 工作 "work / employment"
Bulk Jobs 批量作业 作业 reads first as school homework
A job is created 任务已创建 "task"
Copy Job number 复制工作单号 工作单 is not a word anyone uses
Open jobs 未结工单 correct

163 msgid in erp.po contain job.

Others: Operation → 操作 is clicking a button, not a routing step. Receipt →
收据 is a payment receipt, not a goods-received note. Setup Time → 设置时间 is
time spent in a settings screen.

Expected Results

One concept, one term, and the same term in both catalogs.

Technical details

package.json:69:

"translate": "pnpm run lingui:extract && pnpm exec linguito translate --llm && pnpm lingui:clean"

No glossary or term list is passed to it, and there is no term-memory config
anywhere in the repo.

lingui.config.js puts packages/react/src and packages/form/src in both the
erp and the mes catalog, so every shared string is translated twice, independently.
That is why Job is 工单 in mes.po and 工作 in erp.po.

The same command fills all twelve non-en locales.

packages/glossary/src/terms.ts already defines job, genealogy, scrap, general
ledger, operation, receipt and gauge in English.
lingui.config.js:9
says plain po is kept for "tooling compat (linguito, weblate)", but the repo has
no weblate config.

Evidence

Every pair above is from git show HEAD:, so it reproduces on a clean clone of
main.

Fixing zh properly means settling about 30 terms. Those should be confirmed by
process engineers against a running deployment rather than decided from the files,
so I have not patched them here. I can do that pass once I have one to check against.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions