mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-28 02:52:42 +00:00
test(localization): ensure Russian translations are tested
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
"it",
|
"it",
|
||||||
"ja",
|
"ja",
|
||||||
"pt-BR",
|
"pt-BR",
|
||||||
|
"ru",
|
||||||
"tr",
|
"tr",
|
||||||
"zh-CN",
|
"zh-CN",
|
||||||
"zh-TW"
|
"zh-TW"
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ func TestLocalizationService(t *testing.T) {
|
|||||||
"is": "Hleður...",
|
"is": "Hleður...",
|
||||||
"pt-BR": "Carregando...",
|
"pt-BR": "Carregando...",
|
||||||
"tr": "Yükleniyor...",
|
"tr": "Yükleniyor...",
|
||||||
|
"ru": "Загрузка...",
|
||||||
"zh-CN": "加载中...",
|
"zh-CN": "加载中...",
|
||||||
"zh-TW": "載入中...",
|
"zh-TW": "載入中...",
|
||||||
}
|
}
|
||||||
@@ -57,7 +58,7 @@ func TestLocalizationService(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type manifest struct {
|
type manifest struct {
|
||||||
SupportedLanguages []string `json:"supported_languages"`
|
SupportedLanguages []string `json:"supportedLanguages"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadManifest(t *testing.T) manifest {
|
func loadManifest(t *testing.T) manifest {
|
||||||
@@ -98,6 +99,11 @@ func TestComprehensiveTranslations(t *testing.T) {
|
|||||||
|
|
||||||
sort.Strings(keys)
|
sort.Strings(keys)
|
||||||
|
|
||||||
|
manifest := loadManifest(t)
|
||||||
|
if len(manifest.SupportedLanguages) == 0 {
|
||||||
|
t.Fatal("no languages loaded")
|
||||||
|
}
|
||||||
|
|
||||||
for _, lang := range loadManifest(t).SupportedLanguages {
|
for _, lang := range loadManifest(t).SupportedLanguages {
|
||||||
t.Run(lang, func(t *testing.T) {
|
t.Run(lang, func(t *testing.T) {
|
||||||
loc := service.GetLocalizer(lang)
|
loc := service.GetLocalizer(lang)
|
||||||
|
|||||||
Reference in New Issue
Block a user