chore: refactoring and tests, splitting up files (#12495)
This commit is contained in:
31
packages/app/src/i18n/parity.test.ts
Normal file
31
packages/app/src/i18n/parity.test.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { dict as en } from "./en"
|
||||
import { dict as ar } from "./ar"
|
||||
import { dict as br } from "./br"
|
||||
import { dict as bs } from "./bs"
|
||||
import { dict as da } from "./da"
|
||||
import { dict as de } from "./de"
|
||||
import { dict as es } from "./es"
|
||||
import { dict as fr } from "./fr"
|
||||
import { dict as ja } from "./ja"
|
||||
import { dict as ko } from "./ko"
|
||||
import { dict as no } from "./no"
|
||||
import { dict as pl } from "./pl"
|
||||
import { dict as ru } from "./ru"
|
||||
import { dict as th } from "./th"
|
||||
import { dict as zh } from "./zh"
|
||||
import { dict as zht } from "./zht"
|
||||
|
||||
const locales = [ar, br, bs, da, de, es, fr, ja, ko, no, pl, ru, th, zh, zht]
|
||||
const keys = ["command.session.previous.unseen", "command.session.next.unseen"] as const
|
||||
|
||||
describe("i18n parity", () => {
|
||||
test("non-English locales translate targeted unseen session keys", () => {
|
||||
for (const locale of locales) {
|
||||
for (const key of keys) {
|
||||
expect(locale[key]).toBeDefined()
|
||||
expect(locale[key]).not.toBe(en[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user