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
This commit is contained in:
parent
64411d616f
commit
78ee0dd2bc
@ -102,7 +102,7 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
|
|||||||
std::set<std::string> flist;
|
std::set<std::string> flist;
|
||||||
file_manager->listFiles(flist,
|
file_manager->listFiles(flist,
|
||||||
file_manager->getTranslationDir(),
|
file_manager->getTranslationDir(),
|
||||||
true);
|
/*is full path*/true);
|
||||||
|
|
||||||
// English is always there but won't be found on file system
|
// English is always there but won't be found on file system
|
||||||
g_language_list.push_back("en");
|
g_language_list.push_back("en");
|
||||||
@ -110,9 +110,9 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
|
|||||||
std::set<std::string>::iterator it;
|
std::set<std::string>::iterator it;
|
||||||
for ( it=flist.begin() ; it != flist.end(); 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());
|
// printf("Lang : <%s>\n", (*it).c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user