diff options
author | Damiano Galassi <[email protected]> | 2019-11-07 12:45:49 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-11-07 12:45:49 +0100 |
commit | 966ae311ede322c149976e09d86914ff79061fc4 (patch) | |
tree | 0d4ecf1dd803a4c711b2f323ab7954fd54ad032b | |
parent | 9853d16dd1824f2ed83032d8c24a8ee5611ec1a5 (diff) |
MacGui: make any and unknown language localizable.
-rw-r--r-- | macosx/HBLanguagesSelection.m | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/macosx/HBLanguagesSelection.m b/macosx/HBLanguagesSelection.m index 944222221..2fb456927 100644 --- a/macosx/HBLanguagesSelection.m +++ b/macosx/HBLanguagesSelection.m @@ -71,7 +71,20 @@ const iso639_lang_t *lang; for (lang = lang_get_any(); lang != NULL; lang = lang_get_next(lang)) { - NSString *nativeLanguage = strlen(lang->native_name) ? @(lang->native_name) : @(lang->eng_name); + NSString *nativeLanguage; + + if (!strncmp(lang->iso639_2, "any", 3)) + { + nativeLanguage = NSLocalizedString(@"Any", @"HBLanguage -> Any language"); + } + else if (!strncmp(lang->iso639_2, "und", 3)) + { + nativeLanguage = NSLocalizedString(@"Unknown", @"HBLanguage -> Unknown language"); + } + else + { + nativeLanguage = strlen(lang->native_name) ? @(lang->native_name) : @(lang->eng_name); + } HBLang *item = [[HBLang alloc] initWithLanguage:nativeLanguage iso639_2code:@(lang->iso639_2)]; @@ -84,7 +97,6 @@ { [internal addObject:item]; } - } // Insert the selected items |