Add arabic translation test. See #25

This commit is contained in:
Leonel Quinteros
2018-08-14 11:01:14 -03:00
parent 8e9d9df2e2
commit 302c88af99
3 changed files with 22 additions and 1 deletions

View File

@@ -471,3 +471,17 @@ func TestAddTranslator(t *testing.T) {
t.Errorf("Expected 'en_US' but got '%s'", tr)
}
}
func TestArabicTranslation(t *testing.T) {
// Create Locale
l := NewLocale("fixtures/", "ar")
// Add domain
l.AddDomain("categories")
// Get translation
tr := l.GetD("categories", "Alcohol & Tobacco")
if tr != "الكحول والتبغ" {
t.Errorf("Expected to get 'الكحول والتبغ', but got '%s'", tr)
}
}