feat(i18n): add fr/en dicts + useT hook

This commit is contained in:
Bastien Chanot committed 2026-05-20 07:00:31 +02:00
1 parent a57047505d
commit 359104ce88
6 files changed
+358

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { describe, it, expect } from 'vitest'
import { fr } from '@/i18n/fr'
import { en } from '@/i18n/en'
describe('i18n dicts', () => {
it('fr and en share the exact same key set', () => {
const frKeys = Object.keys(fr).sort()
const enKeys = Object.keys(en).sort()
expect(frKeys).toEqual(enKeys)
})
it('every value is a non-empty string', () => {
for (const k of Object.keys(fr)) {
expect(fr[k].length).toBeGreaterThan(0)
expect(en[k].length).toBeGreaterThan(0)
}
})
})