Navigation manette : focus spatial, Gamepad API Xbox/PlayStation, répétition, glyphes adaptés, vibration, i18n FR/EN
This commit is contained in:
parent
ae54bbd8e9
commit
e7478d3c64
12 changed files with 421 additions and 0 deletions
13
tests/i18n.test.ts
Normal file
13
tests/i18n.test.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
import { en } from '../src/renderer/src/i18n/en'
|
||||
import { fr } from '../src/renderer/src/i18n/fr'
|
||||
|
||||
describe('traductions', () => {
|
||||
it('même clés et mêmes variables en FR et EN', () => {
|
||||
expect(Object.keys(en).sort()).toEqual(Object.keys(fr).sort())
|
||||
for (const [k, v] of Object.entries(fr)) {
|
||||
const vars = (s: string) => (s.match(/\{\w+\}/g) ?? []).sort()
|
||||
expect(vars(en[k as keyof typeof en]), k).toEqual(vars(v))
|
||||
}
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue