feat(i18n): add Russian UI and harden localization

This commit is contained in:
Arthur Koba
2026-10-25 22:35:32 +03:00
parent 65a96670d5
commit b4e94076c9
115 changed files with 7767 additions and 993 deletions
+6 -1
View File
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it } from 'vitest';
import { formatDateTime, getFormattingLocale } from './format';
import { formatDateTime, formatNumber, getFormattingLocale } from './format';
afterEach(() => {
document.documentElement.lang = '';
@@ -12,6 +12,11 @@ describe('locale-aware formatting', () => {
expect(formatDateTime('2026-01-15T00:00:00Z')).toContain('01/15/2026');
document.documentElement.lang = 'zh-CN';
expect(formatDateTime('2026-01-15T00:00:00Z')).toContain('2026/01/15');
document.documentElement.lang = 'ru';
expect(formatDateTime('2026-01-15T00:00:00Z')).toContain('15.01.2026');
expect(formatNumber(1234.5)).toBe(
new Intl.NumberFormat('ru-RU').format(1234.5),
);
expect(formatDateTime('自定义文本')).toBe('自定义文本');
});
});