mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-11-17 07:14:24 +08:00
fix(i18n): use English runtime text and localize system UI
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { countryOptions, regionOptions } from './geo-options';
|
||||
import { createGeoOptions } from './geo-options';
|
||||
|
||||
const { countryOptions, regionOptions } = createGeoOptions('zh-CN');
|
||||
|
||||
describe('geo options', () => {
|
||||
it('uses English country names when requested without changing country codes', () => {
|
||||
const english = createGeoOptions('en');
|
||||
expect(english.countryOptions).toContainEqual(
|
||||
expect.objectContaining({ value: 'CN', label: 'China' }),
|
||||
);
|
||||
expect(english.regionOptions).toContainEqual(
|
||||
expect.objectContaining({
|
||||
value: 'CN-BJ',
|
||||
searchText: expect.stringContaining('China'),
|
||||
}),
|
||||
);
|
||||
});
|
||||
it('contains the complete country list with localized names', () => {
|
||||
expect(countryOptions).toHaveLength(249);
|
||||
expect(countryOptions).toContainEqual(
|
||||
|
||||
Reference in New Issue
Block a user