diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 1285c2e1..af1dcc12 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -943,10 +943,20 @@ void Game::ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRo aiInterfaces[i] = new AiInterface(*this, i, faction->getTeam(), faction->getStartLocationIndex()); logger.add("Creating AI for faction " + intToStr(i), true); - sprintf(szBuf,"Player #%d [%s] has disconnected, switching player to AI mode!",i+1,this->gameSettings.getNetworkPlayerName(i).c_str()); + Lang &lang= Lang::getInstance(); + string msg = "Player #%d [%s] has disconnected, switching player to AI mode!"; + if(lang.hasString("GameSwitchPlayerToAI")) { + msg = lang.get("GameSwitchPlayerToAI"); + } + sprintf(szBuf,msg.c_str(),i+1,this->gameSettings.getNetworkPlayerName(i).c_str()); } else { - sprintf(szBuf,"Player #%d [%s] has disconnected, but player was only an observer!",i+1,this->gameSettings.getNetworkPlayerName(i).c_str()); + Lang &lang= Lang::getInstance(); + string msg = "Player #%d [%s] has disconnected, but player was only an observer!"; + if(lang.hasString("GameSwitchPlayerObserverToAI")) { + msg = lang.get("GameSwitchPlayerObserverToAI"); + } + sprintf(szBuf,msg.c_str(),i+1,this->gameSettings.getNetworkPlayerName(i).c_str()); } server->sendTextMessage(szBuf,-1,true); } diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 51a30f0e..0787ff72 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -950,7 +950,7 @@ void MenuStateConnectedGame::update() { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); string playerNameStr = getHumanPlayerName(); - clientInterface->sendTextMessage("connection timed out communicating with server.",-1); + clientInterface->sendTextMessage(lang.get("ConnectionTimedOut"),-1); clientInterface->close(); }