- bugfix for transifex download, filename parse out bad characters for language filename

This commit is contained in:
Mark Vejvoda 2012-10-23 14:49:08 +00:00
parent 86f73dca3e
commit e0428fb190

View File

@ -1212,6 +1212,16 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
size_t posDetailsEnd = fileDataDetails.find( "\"", posDetails + 9 ); size_t posDetailsEnd = fileDataDetails.find( "\"", posDetails + 9 );
langName = fileDataDetails.substr(posDetails + 9, posDetailsEnd - (posDetails + 9)); langName = fileDataDetails.substr(posDetails + 9, posDetailsEnd - (posDetails + 9));
replaceAll(langName,",","");
replaceAll(langName,"\\","");
replaceAll(langName,"/","");
replaceAll(langName,"?","");
replaceAll(langName,":","");
replaceAll(langName,"@","");
replaceAll(langName,"!","");
replaceAll(langName,"*","");
langName = trim(langName);
replaceAll(langName," ","-");
} }
printf("PARSED Language filename [%s]\n",langName.c_str()); printf("PARSED Language filename [%s]\n",langName.c_str());
@ -1295,7 +1305,7 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
if(gotDownloads == true) { if(gotDownloads == true) {
mainMessageBoxState=0; mainMessageBoxState=0;
Lang &lang= Lang::getInstance(); Lang &lang= Lang::getInstance();
showMessageBox(lang.get("TransifexDownloadSuccess"), lang.get("Notice"), false); showMessageBox(lang.get("TransifexDownloadSuccess") + "\n" + langName, lang.get("Notice"), false);
} }
} }
return; return;