From 1c6b339bbc2f9ee0624f7777e5950417a66a3286 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 31 Jul 2010 15:46:43 +0000 Subject: i18n: use user friendly language names in GUI The GUI now uses the content of the Language field from the po file header if it is present and not empty for the language selection PopupWidget. If not present it uses the file name as before (e.g. ru_RU). Also update all the translation template and all the translation files. svn-id: r51542 --- common/translation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/translation.cpp') diff --git a/common/translation.cpp b/common/translation.cpp index ab6a922c6e..b52aad0d1f 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -138,12 +138,12 @@ String TranslationManager::getTranslation(const String &message) { return po2c_gettext(message.c_str()); } -const TLangArray TranslationManager::getSupportedLanguages() const { +const TLangArray TranslationManager::getSupportedLanguageNames() const { TLangArray languages; int total = po2c_getnumlangs(); for (int i = 0; i < total; i++) { - TLanguage lng(po2c_getlang(i), i + 1); + TLanguage lng(po2c_getlangname(i), i + 1); languages.push_back(lng); } @@ -208,7 +208,7 @@ String TranslationManager::getTranslation(const String &message) { return message; } -const TLangArray TranslationManager::getSupportedLanguages() const { +const TLangArray TranslationManager::getSupportedLanguageNames() const { return TLangArray(); } -- cgit v1.2.3