fix(i18n): translate every select option into Simplified Chinese (#645) - #660
Merged
Conversation
Fifteen select fields across nine objects had no option labels in any of the four locales. A missing entry is not a runtime error — the resolver falls back to the English label in code, and where a field had no entry at all the picklist rendered the raw stored value. On an otherwise fully translated Chinese screen that surfaced `net_30` in Contract payment terms and `crm_account` in a Task's related-to picker; `crm_product.billing_type` and `crm_product.unit_of_measure` had no zh-CN entry at all, so even their field labels were English. Wording pairs with each field's neighbours in the same bundle rather than rendering the English literally: `crm_task.related_to_type`'s options are object names and reuse each object's own label from this bundle, and `crm_quote.payment_terms` matches `crm_contract.payment_terms`, which shares its option set. PENDING_SELECT_LABELS shrinks by these 15 rows' zh-CN entries. No row lists zh-CN any more, so the UNTRANSLATED_EVERYWHERE shorthand is retired; en, ja-JP and es-ES keep their rows and remain the open scope of #645. Full `objectstack lint` i18n warnings drop from 873 to 803. Refs #645. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8UZqd6mJMPHAXKb6XcHmi
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 3, 2026 05:51
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fifteen select fields across nine objects had no option labels in any of the four locales. A missing entry is not a runtime error — the resolver falls back to the English
labelin code, and where a field had no entry at all the picklist rendered the raw stored value.On an otherwise fully translated Chinese screen that meant a rep saw
net_30in Contract payment terms, bare keys in Task type, andcrm_accountin a Task's "related to" picker. Contract, Quote and Product were worst hit:crm_product.billing_typeandcrm_product.unit_of_measurehad no zh-CN entry whatsoever, so even the field labels were English.This completes Simplified Chinese only.
en,ja-JPandes-ESkeep their ledger rows and remain the open scope of #645.Type of Change
Related Issues
Related to #645
Changes Made
Added zh-CN option labels for 15 select fields over 9 objects (~68 option labels):
crm_casetypecrm_contactsalutationcrm_contractbilling_frequency,payment_terms,contract_typecrm_knowledge_articlecategory,tags(partial — 2 and 4 values were missing)crm_opportunitycompetitorscrm_productfamily,billing_type,unit_of_measurecrm_quotepayment_termscrm_tasktype,related_to_type,recurrence_typeAdded the two missing zh-CN field entries outright (
crm_product.billing_type,crm_product.unit_of_measure) — these had nolabeleither.Shrank
PENDING_SELECT_LABELSintest/metadata-references.test.tsby these 15 rows'zh-CNentries.Retired the
UNTRANSLATED_EVERYWHEREshorthand — no row listszh-CNany more, so it had no remaining use. The doc comment now records that a row regainingzh-CNis a regression rather than a re-scope.Wording pairs with each field's neighbours in the same bundle rather than rendering the English literally:
crm_task.related_to_type's options are object names, so each reuses that object's ownlabelfrom this same bundle (crm_account→ 客户), andcrm_quote.payment_termsis worded identically tocrm_contract.payment_terms, which shares its option set.Testing
pnpm test) — 1172 passed, 1 skipped, 48 filespnpm lint)pnpm build)select fields are translated in every localeguard verifies this change by construction. It fails a translated row left in the ledger as stale, so the 15 deletions are only green because all ~68 labels are actually present.Full
objectstack lint(without--skip-i18n) drops from 873 to 803 warnings.Checklist
.changeset/zh-cn-select-option-labels.mdAdditional Notes
Prioritised ahead of the rest of #645 because of a Simplified Chinese customer trial: these picklists sit on the Contract → Quote → Product path a demo walks through, and a raw
net_30in an otherwise Chinese screen is the most visible i18n defect currently shipping.Two related findings from the same sweep, both out of scope here:
account.view.ts:88-94,case.view.ts:50-56, …) are hardcoded English.ObjectTranslationDataSchemain@objectstack/spec@17.0.0-rc.1carries_views/_sections/_actionsbut no_tabs, and@objectstack/linthas zero references totabs— so this is an upstream gap, not something this repo can fix. Filed separately.main: its option-key-casing, illegal-enum-key and renamed-field-key buckets are all already fixed, and the largest live item —crm.app.tshas 32 navigation nodes, of whichzh-CNtranslates all 32 whileen/ja-JP/es-EStranslate 3 each — affects the other three locales.Generated by Claude Code