Skip to content

Commit d063248

Browse files
committed
test: read main's new locale cases by table tag
The docs chrome and membership filter chip cases that main added read a pack as builtInLocales.zh; they read zh-Hans (and the docs chrome also zh-Hant) now. The chip cases keep booting the page in the stored zh code, so they also pin that the alias still renders Simplified. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyWSiXh6B2sMVHfXYC
1 parent 65bded6 commit d063248

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎ui/apps/console/src/pages/docs-portal.bookLocale-26690.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe('objectstack#26690 — the docs sidebar serves the request locale', ()
155155
describe("objectstack#30554 — the docs chrome's own words follow the session language", () => {
156156
const ENTRY = '/apps/com.example.crm/docs/manual/crm_start_login';
157157

158-
for (const language of ['zh', 'ja', 'es'] as const) {
158+
for (const language of ['zh-Hans', 'zh-Hant', 'ja', 'es'] as const) {
159159
it(`a ${language} reader sees the home link and the Uncategorized title in ${language}`, async () => {
160160
const pack = builtInLocales[language].help;
161161
// Guard: the expectations are real translations, not the English words.

‎ui/packages/app-shell/src/views/ObjectDataPage.filterChipI18n-9159.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,19 +274,19 @@ describe('the membership and negation chips (objectstack#30743)', () => {
274274
['nin', 'filterBuilder.operators.not_in'],
275275
])('`[%s]` renders the zh label of `%s` beside the members, joined', (suffix, key) => {
276276
renderAt('zh', `filter[${FIELD}][${suffix}]=alice&filter[${FIELD}][${suffix}]=bob`);
277-
expect(chipOperatorText()).toBe(`${packLabelOf('zh', key)} alice, bob`);
277+
expect(chipOperatorText()).toBe(`${packLabelOf('zh-Hans', key)} alice, bob`);
278278
});
279279

280280
it('`[ne]` renders the zh "does not equal" label beside the comparand', () => {
281281
renderAt('zh', `filter[${FIELD}][ne]=alice`);
282282
const rendered = chipOperatorText();
283-
expect(rendered).toBe(`${packLabelOf('zh', 'filterBuilder.operators.not_equals')} alice`);
283+
expect(rendered).toBe(`${packLabelOf('zh-Hans', 'filterBuilder.operators.not_equals')} alice`);
284284
expect(rendered).not.toContain('filterBuilder.operators');
285285
});
286286

287287
it('CONTROL: the en pack differs, so the label half really went through `t`', () => {
288288
renderAt('en', `filter[${FIELD}][in]=alice`);
289289
expect(chipOperatorText()).toBe(`${packLabelOf('en', 'filterBuilder.operators.in')} alice`);
290-
expect(packLabelOf('zh', 'filterBuilder.operators.in')).not.toBe(packLabelOf('en', 'filterBuilder.operators.in'));
290+
expect(packLabelOf('zh-Hans', 'filterBuilder.operators.in')).not.toBe(packLabelOf('en', 'filterBuilder.operators.in'));
291291
});
292292
});

0 commit comments

Comments
 (0)