test(i18n): require complete plural references

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
XiaoSeS 2026-09-02 00:14:34 +08:00
parent 0c5982ed7f
commit 03fb067887
2 changed files with 5 additions and 1 deletions

View file

@ -148,6 +148,7 @@ describe('skill reviews', () => {
expect(ru.skillReviews.count_one).toBeTruthy()
expect(ru.skillReviews.count_few).toBeTruthy()
expect(ru.skillReviews.count_many).toBeTruthy()
expect(ru.skillReviews.count_other).toBeTruthy()
})
it('lets an authenticated author clear existing text when the skill is not interactable', () => {

View file

@ -42,7 +42,10 @@ describe('russian locale', () => {
for (const part of parts) {
cursor = (cursor as Record<string, unknown>)[part]
}
const englishReference = enMap[key] ?? enMap[key.replace(pluralSuffix, '_other')] ?? ''
const englishReference = enMap[key] ?? enMap[key.replace(pluralSuffix, '_other')]
if (englishReference === undefined) {
throw new Error(`missing English reference for ${key}`)
}
if (placeholders(String(cursor)).join() !== placeholders(englishReference).join()) {
mismatches.push(key)
}