Skip to content

Commit 9070a29

Browse files
committed
test(fields): boot the read-only boolean word cases in zh-Hans
The suite types its language by the keys of builtInLocales, which are now the platform locale table's tags, so its zh cases name the zh-Hans pack. Claude-Session: https://claude.ai/code/session_01L6bhgThgWPADcpU1xXCBsw Co-authored-by: Claude <noreply@anthropic.com>
1 parent 13abe0e commit 9070a29

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎ui/packages/fields/src/__tests__/booleanValueLabel.locale-11689.test.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ describe('read-only boolean words come from the locale (objectui#11689)', () =>
7777
for (const [name, draw] of Object.entries(DRAWERS)) {
7878
describe(name, () => {
7979
it('zh renders 是 / 否', () => {
80-
expect(inLocale('zh', draw(true)).container.textContent).toBe('是');
80+
expect(inLocale('zh-Hans', draw(true)).container.textContent).toBe('是');
8181
cleanup();
82-
expect(inLocale('zh', draw(false)).container.textContent).toBe('否');
82+
expect(inLocale('zh-Hans', draw(false)).container.textContent).toBe('否');
8383
});
8484

8585
it('en is unchanged: Yes / No', () => {
@@ -132,7 +132,7 @@ describe('BooleanCellRenderer words come from the locale (objectui#11689)', () =
132132

133133
it('zh: a status column holding false is an unchecked box named by the column label, with no pack word', () => {
134134
const { container } = inLocale(
135-
'zh',
135+
'zh-Hans',
136136
<BooleanCellRenderer value={false} field={{ name: 'active', type: 'boolean', label: '启用' } as never} />,
137137
);
138138
expect(badgeOf(container)).toBeNull();
@@ -143,9 +143,9 @@ describe('BooleanCellRenderer words come from the locale (objectui#11689)', () =
143143

144144
it('zh: the completion indicator is named in the pack', () => {
145145
const field = { name: 'completed', type: 'boolean', label: 'Completed' } as never;
146-
expect(indicatorName(inLocale('zh', <BooleanCellRenderer value={true} field={field} />).container)).toBe('已完成');
146+
expect(indicatorName(inLocale('zh-Hans', <BooleanCellRenderer value={true} field={field} />).container)).toBe('已完成');
147147
cleanup();
148-
expect(indicatorName(inLocale('zh', <BooleanCellRenderer value={false} field={field} />).container)).toBe('未完成');
148+
expect(indicatorName(inLocale('zh-Hans', <BooleanCellRenderer value={false} field={field} />).container)).toBe('未完成');
149149
});
150150

151151
it('en: an Active box, Completed, Not completed', () => {

0 commit comments

Comments
 (0)