test(localization): ensure Russian translations are tested

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-21 23:05:29 +00:00
parent 4aea61499d
commit 8c1884ac46
2 changed files with 8 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
"it",
"ja",
"pt-BR",
"ru",
"tr",
"zh-CN",
"zh-TW"

View File

@@ -23,6 +23,7 @@ func TestLocalizationService(t *testing.T) {
"is": "Hleður...",
"pt-BR": "Carregando...",
"tr": "Yükleniyor...",
"ru": "Загрузка...",
"zh-CN": "加载中...",
"zh-TW": "載入中...",
}
@@ -57,7 +58,7 @@ func TestLocalizationService(t *testing.T) {
}
type manifest struct {
SupportedLanguages []string `json:"supported_languages"`
SupportedLanguages []string `json:"supportedLanguages"`
}
func loadManifest(t *testing.T) manifest {
@@ -98,6 +99,11 @@ func TestComprehensiveTranslations(t *testing.T) {
sort.Strings(keys)
manifest := loadManifest(t)
if len(manifest.SupportedLanguages) == 0 {
t.Fatal("no languages loaded")
}
for _, lang := range loadManifest(t).SupportedLanguages {
t.Run(lang, func(t *testing.T) {
loc := service.GetLocalizer(lang)