Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .changeset/20493-ja-es-object-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
'@objectstack/platform-objects': patch
---

fix(platform-objects): the ja-JP and es-ES platform-object bundles no longer ship English labels, options and help as copies of the source (#20493)

Clause-②: no

A ja-JP or es-ES console showed English on Setup surfaces: the Invite user
dialog listed the membership roles with **Delegated Admin** among the
translated ones. The keys were present in `ja-JP.objects.generated.ts` and
`es-ES.objects.generated.ts`, but their values were byte copies of the English
source that `os i18n extract --fill=default` seeds.

- ja-JP: 340 of the 383 string leaves that equalled their `en` source are now
translated: labels, plural labels, select options, help, descriptions and
empty states. `delegated_admin` reads 委任管理者 on both `sys_member` and
`sys_invitation`, the word the console already uses for that role.
- es-ES: 338 of the 392 are now translated the same way. `delegated_admin`
reads Administrador delegado on both objects, again the console's word.
- The rest stay as written by design, each recorded with its reason in a
per-locale ledger (`objects-ja-jp-echo-decisions.test.ts`,
`objects-es-es-echo-decisions.test.ts`). ja-JP keeps 43: sign-in provider
brands, the bare `ID` initialism, protocol names (JWKS, IdP SSO URL,
Message-ID, UI / API), the `Web` client type as the bundle already renders it,
the Cc / Bcc header abbreviations, and placeholders that show a value the
admin types. es-ES keeps 54: the same brands, `ID`, JWKS, Message-ID,
UI / API, `Web` and placeholders, plus words Spanish spells as English (Error,
Actor, Global, Variables), the loanwords the bundle already uses (Token,
Checksum, Slug) and Cc.

`ja-JP.source-hashes.generated.ts` and `es-ES.source-hashes.generated.ts` were
regenerated by `pnpm i18n:extract`: each records a leaf only while the leaf is
a copy of its source, so they now list exactly those 43 and 54. zh-CN is
unchanged.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1291,29 +1291,22 @@ describe('#19403 round 10 — ⚠️⚠️ the phantom-translation trap, asserte
}
});

it('⭐ the near-twin that was LOOKED UP AND REFUSED is asserted to be a fill, not a decision', () => {
it('⭐ the near-twin that was LOOKED UP AND REFUSED is authored in every locale, never a standing echo', () => {
// `Access Token TTL` was byte-identical in all three locales and read like a
// standing decision to keep TTL verbatim. It was an unauthored fill in every
// locale, and the provenance tables said so. Asserted so that no later round
// leans on it. #20462 then AUTHORED the zh-CN leaf (访问令牌 TTL): the
// concept is rendered and the initialism survives, the same treatment the
// lifecycle rows give TTL. ja-JP and es-ES are still fills.
// leans on it. #20462 then AUTHORED the zh-CN leaf (访问令牌 TTL) and #20493
// the ja-JP (アクセストークン TTL) and es-ES (TTL del token de acceso) ones:
// the concept is rendered and the initialism survives, the same treatment
// the lifecycle rows give TTL.
const key = 'sys_oauth_resource.fields.access_token_ttl.label';
const en = FLAT_OBJECTS.get('en')!.get(key);
expect(en).toBe('Access Token TTL');
for (const [locale, table] of PROVENANCE) {
const value = FLAT_OBJECTS.get(locale)!.get(key);
if (locale === 'zh-CN') {
expect(value, `${locale} ${key} reads its en source again`).not.toBe(en);
expect(carriesToken(value!, 'TTL'), `${locale} dropped the machine token`).toBe(true);
expect(table[`objects.${key}`], `${locale} still records the authored ${key} as a fill`).toBeUndefined();
continue;
}
expect(value, `${locale} ${key}`).toBe(en);
expect(
table[`objects.${key}`],
`${locale} no longer records ${key} as a fill — if a translator authored it, this ledger note is stale`,
).toBeTypeOf('string');
expect(value, `${locale} ${key} reads its en source again`).not.toBe(en);
expect(carriesToken(value!, 'TTL'), `${locale} dropped the machine token`).toBe(true);
expect(table[`objects.${key}`], `${locale} still records the authored ${key} as a fill`).toBeUndefined();
}
});
});
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading