feat(localization): Add Turkish language translation (#751)

Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Duru Can Celasun 2025-07-04 05:50:16 +01:00 committed by GitHub
parent 845095c3f6
commit d0fae02d05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 88 additions and 1 deletions

View file

@ -35,6 +35,14 @@ func TestLocalizationService(t *testing.T) {
}
})
t.Run("Turkish localization", func(t *testing.T) {
localizer := service.GetLocalizer("tr")
result := localizer.MustLocalize(&i18n.LocalizeConfig{MessageID: "loading"})
if result != "Yükleniyor..." {
t.Errorf("Expected 'Yükleniyor...', got '%s'", result)
}
})
t.Run("All required keys exist in English", func(t *testing.T) {
localizer := service.GetLocalizer("en")
requiredKeys := []string{
@ -64,6 +72,21 @@ func TestLocalizationService(t *testing.T) {
}
}
})
t.Run("All required keys exist in Turkish", func(t *testing.T) {
localizer := service.GetLocalizer("tr")
requiredKeys := []string{
"loading", "why_am_i_seeing", "protected_by", "made_with",
"mascot_design", "try_again", "go_home", "javascript_required",
}
for _, key := range requiredKeys {
result := localizer.MustLocalize(&i18n.LocalizeConfig{MessageID: key})
if result == "" {
t.Errorf("Key '%s' returned empty string", key)
}
}
})
}
type manifest struct {