From 78ee0dd2bcaa7bf14b7e08a2db99dbc7f8556a10 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 31 Mar 2011 10:44:04 +0000 Subject: [PATCH] Fixed list of languages (which didn't work after removing the .mo files). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8146 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/utils/translation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/translation.cpp b/src/utils/translation.cpp index ada757bf7..0293c6c2d 100644 --- a/src/utils/translation.cpp +++ b/src/utils/translation.cpp @@ -102,7 +102,7 @@ Translations::Translations() //: m_dictionary_manager("UTF-16") std::set flist; file_manager->listFiles(flist, file_manager->getTranslationDir(), - true); + /*is full path*/true); // English is always there but won't be found on file system g_language_list.push_back("en"); @@ -110,9 +110,9 @@ Translations::Translations() //: m_dictionary_manager("UTF-16") std::set::iterator it; for ( it=flist.begin() ; it != flist.end(); it++ ) { - if (file_manager->fileExists(file_manager->getTranslationDir() + "/" + (*it).c_str() + "/LC_MESSAGES/supertuxkart.mo")) + if (StringUtils::hasSuffix(*it, "po")) { - g_language_list.push_back( *it ); + g_language_list.push_back(StringUtils::removeExtension(*it)); // printf("Lang : <%s>\n", (*it).c_str()); } }