Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class CongoCountryTranslation : ICountryTranslation
public TranslationInfo[] Translations => new []
{
new TranslationInfo(LanguageCode.AR, "جمهورية الكونغو الديمقراطية"),
new TranslationInfo(LanguageCode.AZ, "Konqo - Kinşasa"),
new TranslationInfo(LanguageCode.AZ, "Konqo-Kinşasa"),
new TranslationInfo(LanguageCode.BE, "Конга (Кіншаса)"),
new TranslationInfo(LanguageCode.BG, "Конго (Киншаса)"),
new TranslationInfo(LanguageCode.BS, "Demokratska Republika Kongo"),
Expand All @@ -21,39 +21,39 @@ public class CongoCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.EN, "Congo, the Democratic Republic of the"),
new TranslationInfo(LanguageCode.ES, "Congo (República Democrática del)"),
new TranslationInfo(LanguageCode.ET, "Kongo DV"),
new TranslationInfo(LanguageCode.FA, "کنگو - کینشاسا"),
new TranslationInfo(LanguageCode.FA, "کنگو-کینشاسا"),
new TranslationInfo(LanguageCode.FI, "Kongon demokraattinen tasavalta"),
new TranslationInfo(LanguageCode.FR, "Congo, République démocratique"),
new TranslationInfo(LanguageCode.HE, "קונגו - קינשאסה"),
new TranslationInfo(LanguageCode.HR, "Kongo - Kinshasa"),
new TranslationInfo(LanguageCode.HE, "קונגו-קינשאסה"),
new TranslationInfo(LanguageCode.HR, "Kongo-Kinshasa"),
new TranslationInfo(LanguageCode.HU, "Kongói Demokratikus Köztársaság"),
new TranslationInfo(LanguageCode.HY, "Կոնգո - Կինշասա"),
new TranslationInfo(LanguageCode.HY, "Կոնգո-Կինշասա"),
new TranslationInfo(LanguageCode.ID, "Republik Demokratik Kongo"),
new TranslationInfo(LanguageCode.IS, "Kongó"),
new TranslationInfo(LanguageCode.IT, "Repubblica Democratica del Congo"),
new TranslationInfo(LanguageCode.JA, "コンゴ民主共和国"),
new TranslationInfo(LanguageCode.KA, "კონგო - კინშასა"),
new TranslationInfo(LanguageCode.KA, "კონგო-კინშასა"),
new TranslationInfo(LanguageCode.KK, "Конго"),
new TranslationInfo(LanguageCode.KO, "콩고민주공화국"),
new TranslationInfo(LanguageCode.KY, "Конго-Киншаса"),
new TranslationInfo(LanguageCode.LT, "Kongas-Kinšasa"),
new TranslationInfo(LanguageCode.LV, "Kongo (Kinšasa)"),
new TranslationInfo(LanguageCode.MK, "Конго - Киншаса"),
new TranslationInfo(LanguageCode.MK, "Конго-Киншаса"),
new TranslationInfo(LanguageCode.MN, "Конго-Киншаса"),
new TranslationInfo(LanguageCode.NB, "Kongo"),
new TranslationInfo(LanguageCode.NL, "Congo, Democratische Republiek"),
new TranslationInfo(LanguageCode.NN, "Kongo"),
new TranslationInfo(LanguageCode.PL, "Demokratyczna Republika Konga"),
new TranslationInfo(LanguageCode.PT, "Congo - Kinshasa"),
new TranslationInfo(LanguageCode.RO, "Congo - Kinshasa"),
new TranslationInfo(LanguageCode.PT, "Congo-Kinshasa"),
new TranslationInfo(LanguageCode.RO, "Congo-Kinshasa"),
new TranslationInfo(LanguageCode.RU, "Демократическая Республика Конго"),
new TranslationInfo(LanguageCode.SK, "Konžská demokratická republika"),
new TranslationInfo(LanguageCode.SL, "Demokratična republika Kongo"),
new TranslationInfo(LanguageCode.SR, "Конго - Киншаса"),
new TranslationInfo(LanguageCode.SR, "Конго-Киншаса"),
new TranslationInfo(LanguageCode.SV, "Demokratiska republiken Kongo"),
new TranslationInfo(LanguageCode.TR, "Kongo - Kinşasa"),
new TranslationInfo(LanguageCode.TR, "Kongo-Kinşasa"),
new TranslationInfo(LanguageCode.UK, "Демократична Республіка Конго"),
new TranslationInfo(LanguageCode.UZ, "KongoKinshasa"),
new TranslationInfo(LanguageCode.UZ, "Kongo-Kinshasa"),
new TranslationInfo(LanguageCode.ZH, "刚果(金)"),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HongKongCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.EL, "Χονγκ Κόνγκ"),
new TranslationInfo(LanguageCode.EN, "Hong Kong"),
new TranslationInfo(LanguageCode.ES, "Hong Kong"),
new TranslationInfo(LanguageCode.ET, "Hongkong - Hiina erihalduspiirkond"),
new TranslationInfo(LanguageCode.ET, "Hongkong-Hiina erihalduspiirkond"),
new TranslationInfo(LanguageCode.FA, "هنگ‌کنگ"),
new TranslationInfo(LanguageCode.FI, "Hongkong"),
new TranslationInfo(LanguageCode.FR, "Hong Kong"),
Expand All @@ -47,7 +47,7 @@ public class HongKongCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.PT, "Hong Kong, RAE da China"),
new TranslationInfo(LanguageCode.RO, "R.A.S. Hong Kong a Chinei"),
new TranslationInfo(LanguageCode.RU, "Гонконг"),
new TranslationInfo(LanguageCode.SK, "HongkongOAO Číny"),
new TranslationInfo(LanguageCode.SK, "Hongkong-OAO Číny"),
new TranslationInfo(LanguageCode.SL, "Hongkong"),
new TranslationInfo(LanguageCode.SR, "САР Хонгконг (Кина)"),
new TranslationInfo(LanguageCode.SV, "Hongkong"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class MacauCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.EL, "Μακάου"),
new TranslationInfo(LanguageCode.EN, "Macao"),
new TranslationInfo(LanguageCode.ES, "Macao"),
new TranslationInfo(LanguageCode.ET, "Aomen - Hiina erihalduspiirkond"),
new TranslationInfo(LanguageCode.ET, "Aomen-Hiina erihalduspiirkond"),
new TranslationInfo(LanguageCode.FA, "ماکائو"),
new TranslationInfo(LanguageCode.FI, "Macao"),
new TranslationInfo(LanguageCode.FR, "Macao"),
Expand All @@ -47,7 +47,7 @@ public class MacauCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.PT, "Macau, RAE da China"),
new TranslationInfo(LanguageCode.RO, "R.A.S. Macao a Chinei"),
new TranslationInfo(LanguageCode.RU, "Макао"),
new TranslationInfo(LanguageCode.SK, "MacaoOAO Číny"),
new TranslationInfo(LanguageCode.SK, "Macao-OAO Číny"),
new TranslationInfo(LanguageCode.SL, "Macao"),
new TranslationInfo(LanguageCode.SR, "САР Макао (Кина)"),
new TranslationInfo(LanguageCode.SV, "Macau"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ public class PapuaNewGuineaCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.PL, "Papua-Nowa Gwinea"),
new TranslationInfo(LanguageCode.PT, "Papua-Nova Guiné"),
new TranslationInfo(LanguageCode.RO, "Papua-Noua Guinee"),
new TranslationInfo(LanguageCode.RU, "ПапуаНовая Гвинея"),
new TranslationInfo(LanguageCode.RU, "Папуа-Новая Гвинея"),
new TranslationInfo(LanguageCode.SK, "Papua Nová Guinea"),
new TranslationInfo(LanguageCode.SL, "Papua Nova Gvineja"),
new TranslationInfo(LanguageCode.SR, "Папуа Нова Гвинеја"),
new TranslationInfo(LanguageCode.SV, "Papua Nya Guinea"),
new TranslationInfo(LanguageCode.TR, "Papua Yeni Gine"),
new TranslationInfo(LanguageCode.UK, "Папуа Нова Гвінея"),
new TranslationInfo(LanguageCode.UZ, "PapuaYangi Gvineya"),
new TranslationInfo(LanguageCode.UZ, "Papua-Yangi Gvineya"),
new TranslationInfo(LanguageCode.ZH, "巴布亚新几内亚"),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class RepublicOfTheCongoCountryTranslation : ICountryTranslation
public TranslationInfo[] Translations => new []
{
new TranslationInfo(LanguageCode.AR, "جمهورية الكونغو"),
new TranslationInfo(LanguageCode.AZ, "Konqo - Brazzavil"),
new TranslationInfo(LanguageCode.BE, "Конга - Бразавіль"),
new TranslationInfo(LanguageCode.AZ, "Konqo-Brazzavil"),
new TranslationInfo(LanguageCode.BE, "Конга-Бразавіль"),
new TranslationInfo(LanguageCode.BG, "Конго (Бразавил)"),
new TranslationInfo(LanguageCode.BS, "Kongo"),
new TranslationInfo(LanguageCode.CA, "Congo, República del"),
Expand All @@ -21,39 +21,39 @@ public class RepublicOfTheCongoCountryTranslation : ICountryTranslation
new TranslationInfo(LanguageCode.EN, "Congo"),
new TranslationInfo(LanguageCode.ES, "Congo"),
new TranslationInfo(LanguageCode.ET, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.FA, "کنگو - برازویل"),
new TranslationInfo(LanguageCode.FA, "کنگو-برازویل"),
new TranslationInfo(LanguageCode.FI, "Kongon tasavalta"),
new TranslationInfo(LanguageCode.FR, "Congo, République populaire"),
new TranslationInfo(LanguageCode.HE, "קונגו - ברזאויל"),
new TranslationInfo(LanguageCode.HR, "Kongo - Brazzaville"),
new TranslationInfo(LanguageCode.HE, "קונגו-ברזאויל"),
new TranslationInfo(LanguageCode.HR, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.HU, "Kongói Köztársaság"),
new TranslationInfo(LanguageCode.HY, "Կոնգո - Բրազավիլ"),
new TranslationInfo(LanguageCode.HY, "Կոնգո-Բրազավիլ"),
new TranslationInfo(LanguageCode.ID, "Kongo"),
new TranslationInfo(LanguageCode.IS, "Kongó"),
new TranslationInfo(LanguageCode.IT, "Repubblica del Congo"),
new TranslationInfo(LanguageCode.JA, "コンゴ共和国"),
new TranslationInfo(LanguageCode.KA, "კონგო - ბრაზავილი"),
new TranslationInfo(LanguageCode.KA, "კონგო-ბრაზავილი"),
new TranslationInfo(LanguageCode.KK, "Конго Республикасы"),
new TranslationInfo(LanguageCode.KO, "콩고공화국"),
new TranslationInfo(LanguageCode.KY, "Конго-Браззавил"),
new TranslationInfo(LanguageCode.LT, "Kongas-Brazavilis"),
new TranslationInfo(LanguageCode.LV, "Kongo (Brazavila)"),
new TranslationInfo(LanguageCode.MK, "Конго - Бразавил"),
new TranslationInfo(LanguageCode.MK, "Конго-Бразавил"),
new TranslationInfo(LanguageCode.MN, "Конго Браззавиль"),
new TranslationInfo(LanguageCode.NB, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.NL, "Congo, Volksrepubliek"),
new TranslationInfo(LanguageCode.NN, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.PL, "Kongo"),
new TranslationInfo(LanguageCode.PT, "Congo - Brazzaville"),
new TranslationInfo(LanguageCode.RO, "Congo - Brazzaville"),
new TranslationInfo(LanguageCode.PT, "Congo-Brazzaville"),
new TranslationInfo(LanguageCode.RO, "Congo-Brazzaville"),
new TranslationInfo(LanguageCode.RU, "Республика Конго"),
new TranslationInfo(LanguageCode.SK, "Konžská republika"),
new TranslationInfo(LanguageCode.SL, "Kongo - Brazzaville"),
new TranslationInfo(LanguageCode.SR, "Конго - Бразавил"),
new TranslationInfo(LanguageCode.SL, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.SR, "Конго-Бразавил"),
new TranslationInfo(LanguageCode.SV, "Kongo-Brazzaville"),
new TranslationInfo(LanguageCode.TR, "Kongo - Brazavil"),
new TranslationInfo(LanguageCode.TR, "Kongo-Brazavil"),
new TranslationInfo(LanguageCode.UK, "Республіка Конго"),
new TranslationInfo(LanguageCode.UZ, "KongoBrazzavil"),
new TranslationInfo(LanguageCode.UZ, "Kongo-Brazzavil"),
new TranslationInfo(LanguageCode.ZH, "刚果(布)"),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class GaelicLanguageTranslation : ILanguageTranslation
new TranslationInfo(LanguageCode.BA, "Гэль Теле, Гульсум"),
new TranslationInfo(LanguageCode.BE, "Гэльская, Гэльская"),
new TranslationInfo(LanguageCode.BG, "Келтски, Гэльском"),
new TranslationInfo(LanguageCode.BN, "স্কটস-গ্যেলিক, - গ্যেলিক"),
new TranslationInfo(LanguageCode.BN, "স্কটস-গ্যেলিক,-গ্যেলিক"),
new TranslationInfo(LanguageCode.BS, "Slovački, Jazbina"),
new TranslationInfo(LanguageCode.CA, "Escocès Gaèlic, Gaèlic"),
new TranslationInfo(LanguageCode.CS, "Skotské Gaelštině, Gaelštině"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class HaitianLanguageTranslation : ILanguageTranslation
new TranslationInfo(LanguageCode.SU, "Haitian, Haitian Creole"),
new TranslationInfo(LanguageCode.SV, "Haitiska, Haitisk Kreol"),
new TranslationInfo(LanguageCode.SW, "Haitian, Haitian Creole"),
new TranslationInfo(LanguageCode.TA, "ஹைத்தியன், - ஹெய்டியன் கிரியோல்"),
new TranslationInfo(LanguageCode.TA, "ஹைத்தியன்,-ஹெய்டியன் கிரியோல்"),
new TranslationInfo(LanguageCode.TE, "Haitian, Haitian Creole"),
new TranslationInfo(LanguageCode.TG, "Гаити, Гаитянский Креольский"),
new TranslationInfo(LanguageCode.TH, "เฮเตี้ยนชาวเฮติ Creole"),
Expand Down
44 changes: 44 additions & 0 deletions src/Nager.Country.UnitTest/TranslationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,49 @@ public void CheckAllCultureWithDefault(LanguageCode defaultLanguageCode)
}
}
}

[TestMethod]
public void CheckHyphenTest()
{
var searchValues = new string[] { "–", " - " };

ITranslationProvider translationProvider = new TranslationProvider();

foreach (var countryCode in Enum.GetValues<Alpha2Code>())
{
var countryTranslation = translationProvider.GetCountryTranslation(countryCode);
if (countryTranslation is null)
{
continue;
}

foreach (var translation in countryTranslation.Translations)
{
var x = searchValues.Select(searchValue => translation.Name.Contains(searchValue)).ToList();

if (searchValues.Where(searchValue => translation.Name.Contains(searchValue)).Any())
{
Assert.Fail($"Check hyphen in country:{countryCode}, {translation.Name}");
}
}
}

foreach (var languageCode in Enum.GetValues<LanguageCode>())
{
var languageTranslation = translationProvider.GetLanguage(languageCode);
if (languageTranslation is null)
{
continue;
}

foreach (var translation in languageTranslation.Translations)
{
if (searchValues.Where(searchValue => translation.Name.Contains(searchValue)).Any())
{
Assert.Fail($"Check hyphen in language:{languageCode}, {translation.Name}");
}
}
}
}
}
}
Loading