You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Refactor/Chore] zh-Hant: contacts.json is missing 136 of 284 keys #45928
I confirm that I am using English to submit this report, otherwise it will be closed.
【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
Please do not modify this template :) and fill in all the required fields.
Description
web/i18n/locales/zh-Hant/contacts.json is out of sync with the source locale. It contains 148 of the 284 keys in en-US/contacts.json, so 136 keys are missing. The other 66 namespaces under zh-Hant/ are complete — only this one lags.
The missing entries cover the Contacts directory, external contacts, IM identity binding, the platform contact picker, and member removal: action.*, details.*, directory.*, external.*, filter.*, imBinding.*, memberRemoval.*, platformPicker.*, type.*.
Comparison against main today, using flat keys as required by keySeparator: false:
en-US/contacts.json 284 keys
zh-Hant/contacts.json 148 keys
missing 136
extra 0
No open issue or pull request covers this file. #44175 touches 42 zh-Hant files but not contacts.json; that change addresses wording and Simplified-script text rather than missing keys.
Motivation
getInitOptions in web/i18n/settings.ts sets fallbackLng: defaultLocale, and defaultLocale is en-US. A Traditional Chinese user therefore sees English text across the entire Contacts area, while every other namespace in that locale is translated. This file is the only visible gap for zh-Hant.
Hi @2435634589-creator! I'm Dosu and I'm helping the Dify team.
There’s an additional blocker: filling the missing keys alone would not make Contacts display in Traditional Chinese. The current resource loader explicitly loads contacts from en-US for every locale except en-US and zh-Hans, so it bypasses zh-Hant/contacts.json entirely. [1]
The validation script also exempts locales outside those two from missing-key checks for contacts. Consequently, even pnpm i18n:check --file contacts --lang zh-Hant would not catch the reported missing keys. [2][3]
If the intended scope is to enable Traditional Chinese Contacts, the fix should include the translations and add zh-Hant to both contactsLocalizedLocales in web/i18n/load-resource.ts and localizedFileLocales.contacts in web/scripts/check-i18n.js. A maintainer should confirm that localization scope before those restrictions are expanded. [1][2]
and the ternary at :24-27 resolves contacts to defaultLocale for every locale outside that set, so zh-Hant/contacts.json is never read. web/scripts/check-i18n.js:12-14 applies the same allowlist, which is why pnpm i18n:check does not report the 136 missing keys.
So adding the keys alone would not change what a Traditional Chinese user sees. My report read the file contents and did not trace the load path — that part was wrong.
Enabling Traditional Chinese for Contacts needs three changes:
add the 136 missing keys to web/i18n/locales/zh-Hant/contacts.json (prepared; key set becomes 284/284, no placeholder mismatch)
add zh-Hant to contactsLocalizedLocales in web/i18n/load-resource.ts
add zh-Hant to localizedFileLocales.contacts in web/scripts/check-i18n.js
Items 2 and 3 widen the localization scope, so I would rather not decide that on my own. If a maintainer confirms zh-Hant Contacts is in scope, I will send one PR covering all three. If the allowlist is intentional, then the keys alone have no effect and this issue can be closed — that is a reasonable outcome too.
🤖 AI-assisted; the code references above were checked against main.
Activity
dosubot commentedon Nov 9, 2026
Hi @2435634589-creator! I'm Dosu and I'm helping the Dify team.
There’s an additional blocker: filling the missing keys alone would not make Contacts display in Traditional Chinese. The current resource loader explicitly loads
contactsfromen-USfor every locale excepten-USandzh-Hans, so it bypasseszh-Hant/contacts.jsonentirely. [1]The validation script also exempts locales outside those two from missing-key checks for
contacts. Consequently, evenpnpm i18n:check --file contacts --lang zh-Hantwould not catch the reported missing keys. [2] [3]If the intended scope is to enable Traditional Chinese Contacts, the fix should include the translations and add
zh-Hantto bothcontactsLocalizedLocalesinweb/i18n/load-resource.tsandlocalizedFileLocales.contactsinweb/scripts/check-i18n.js. A maintainer should confirm that localization scope before those restrictions are expanded. [1] [2]To reply, just mention @dosu.
Docs are dead. Just use Dosu.
2435634589-creator commentedon Nov 10, 2026
Good catch — I checked this against
mainand the description above is incomplete.web/i18n/load-resource.ts:11definesand the ternary at
:24-27resolvescontactstodefaultLocalefor every locale outside that set, sozh-Hant/contacts.jsonis never read.web/scripts/check-i18n.js:12-14applies the same allowlist, which is whypnpm i18n:checkdoes not report the 136 missing keys.So adding the keys alone would not change what a Traditional Chinese user sees. My report read the file contents and did not trace the load path — that part was wrong.
Enabling Traditional Chinese for Contacts needs three changes:
web/i18n/locales/zh-Hant/contacts.json(prepared; key set becomes 284/284, no placeholder mismatch)zh-HanttocontactsLocalizedLocalesinweb/i18n/load-resource.tszh-HanttolocalizedFileLocales.contactsinweb/scripts/check-i18n.jsItems 2 and 3 widen the localization scope, so I would rather not decide that on my own. If a maintainer confirms zh-Hant Contacts is in scope, I will send one PR covering all three. If the allowlist is intentional, then the keys alone have no effect and this issue can be closed — that is a reasonable outcome too.
🤖 AI-assisted; the code references above were checked against
main.