Skip to content

Commit b932d18

Browse files
localize Home prototype creation type (#6906) (#7056)
* localize Home prototype label * test(home): align Prototype expectations (cherry picked from commit d176b0d) Co-authored-by: Ray Xi <2667192167@qq.com>
1 parent f788bf8 commit b932d18

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

apps/web/tests/i18n/locales.test.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,37 @@ describe('i18n locales', () => {
5353
expect((LOCALE_LABEL as Record<string, string>).ja).toBe('日本語');
5454
});
5555

56+
it('localizes the Home prototype creation type in every supported locale', async () => {
57+
const expected: Record<Locale, string> = {
58+
ar: 'نموذج أولي',
59+
de: 'Prototyp',
60+
en: 'Prototype',
61+
'es-ES': 'Prototipo',
62+
fa: 'نمونه اولیه',
63+
fr: 'Prototype',
64+
hu: 'Prototípus',
65+
id: 'Prototipe',
66+
it: 'Prototipo',
67+
ja: 'プロトタイプ',
68+
ko: '프로토타입',
69+
pl: 'Prototyp',
70+
'pt-BR': 'Protótipo',
71+
ru: 'Прототип',
72+
th: 'ต้นแบบ',
73+
tr: 'Prototip',
74+
uk: 'Прототип',
75+
'zh-CN': '原型',
76+
'zh-TW': '原型',
77+
};
78+
79+
for (const locale of LOCALES) {
80+
const dict = await loadDict(locale);
81+
expect(dict['homeHero.chip.prototype'], `${locale}.homeHero.chip.prototype`).toBe(
82+
expected[locale],
83+
);
84+
}
85+
});
86+
5687
it('keeps locale dictionaries aligned with English keys and placeholders', async () => {
5788
const englishKeys = Object.keys(en).sort();
5889

0 commit comments

Comments
 (0)