mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
ensure that upcase/downcase does not cause unneeded translation beeing displayed in faction listboxes
This commit is contained in:
parent
af135e6ad5
commit
c0a2265f7e
@ -1906,7 +1906,7 @@ void MenuStateConnectedGame::reloadFactions(bool keepExistingSelectedItem, strin
|
||||
for(int i = 0; i < results.size(); ++i) {
|
||||
results[i]= formatString(results[i]);
|
||||
string translatedString=techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i]);
|
||||
if(translatedString==results[i]){
|
||||
if(toLower(translatedString)==toLower(results[i])){
|
||||
translatedFactionNames.push_back(results[i]);
|
||||
}
|
||||
else {
|
||||
@ -3394,7 +3394,7 @@ bool MenuStateConnectedGame::loadFactions(const GameSettings *gameSettings, bool
|
||||
vector<string> translatedFactionNames;
|
||||
for(int i= 0; i < factionFiles.size(); ++i) {
|
||||
string translatedString=techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i]);
|
||||
if(translatedString==results[i]){
|
||||
if(toLower(translatedString)==toLower(formatString(results[i]))){
|
||||
translatedFactionNames.push_back(formatString(results[i]));
|
||||
}
|
||||
else {
|
||||
@ -3441,7 +3441,7 @@ bool MenuStateConnectedGame::loadFactions(const GameSettings *gameSettings, bool
|
||||
vector<string> translatedFactionNames;
|
||||
for(int i= 0; i < factionFiles.size(); ++i) {
|
||||
string translatedString=techTree->getTranslatedFactionName(gameSettings->getTech(),factionFiles[i]);
|
||||
if(translatedString==results[i]){
|
||||
if(toLower(translatedString)==toLower(formatString(results[i]))){
|
||||
translatedFactionNames.push_back(formatString(results[i]));
|
||||
}
|
||||
else {
|
||||
|
@ -4645,7 +4645,8 @@ void MenuStateCustomGame::reloadFactions(bool keepExistingSelectedItem, string s
|
||||
for(int i = 0; i < results.size(); ++i) {
|
||||
results[i]= formatString(results[i]);
|
||||
string translatedString=techTree->getTranslatedFactionName(techTreeFiles[listBoxTechTree.getSelectedItemIndex()],factionFiles[i]);
|
||||
if(translatedString==results[i]){
|
||||
//printf("translatedString=%s formatString(results[i])=%s \n",translatedString.c_str(),formatString(results[i]).c_str() );
|
||||
if(toLower(translatedString)==toLower(formatString(results[i]))){
|
||||
translatedFactionNames.push_back(formatString(results[i]));
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user