From: <hik...@us...> - 2011-03-31 10:44:10
|
Revision: 8146 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8146&view=rev Author: hikerstk Date: 2011-03-31 10:44:04 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Fixed list of languages (which didn't work after removing the .mo files). Modified Paths: -------------- main/trunk/src/utils/translation.cpp Modified: main/trunk/src/utils/translation.cpp =================================================================== --- main/trunk/src/utils/translation.cpp 2011-03-31 10:25:05 UTC (rev 8145) +++ main/trunk/src/utils/translation.cpp 2011-03-31 10:44:04 UTC (rev 8146) @@ -102,7 +102,7 @@ std::set<std::string> 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 @@ std::set<std::string>::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()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |