mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Removed my previous PanicAlert translation hack. Fixed with a better method suggested by BhaaL. The translation is done by a callback in the MsgHandler routine that is set at program start. Added macros PanicAlertT, SuccessAlertT, PanicYesNoT, and AskYesNoT that are identical to the non T versions except those strings will be added by gettext to the po files to be translated. These can and should be used anywhere in the code for strings that should be translated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6838 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -40,16 +40,16 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, const s
|
||||
switch (error)
|
||||
{
|
||||
case CON_ERR_SERVER_FULL :
|
||||
PanicAlert("%s", _wxt("The server is full!"));
|
||||
PanicAlertT("The server is full!");
|
||||
break;
|
||||
case CON_ERR_VERSION_MISMATCH :
|
||||
PanicAlert("%s", _wxt("The server and client's NetPlay versions are incompatible!"));
|
||||
PanicAlertT("The server and client's NetPlay versions are incompatible!");
|
||||
break;
|
||||
case CON_ERR_GAME_RUNNING :
|
||||
PanicAlert("%s", _wxt("The server responded: the game is currently running!"));
|
||||
PanicAlertT("The server responded: the game is currently running!");
|
||||
break;
|
||||
default :
|
||||
PanicAlert("%s", _wxt("The server sent an unknown error message!"));
|
||||
PanicAlertT("The server sent an unknown error message!");
|
||||
break;
|
||||
}
|
||||
m_socket.Close();
|
||||
@ -69,7 +69,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, const s
|
||||
|
||||
UpdateGUI();
|
||||
|
||||
//PanicAlert("Connection successful: assigned player id: %d", m_pid);
|
||||
//PanicAlertT("Connection successful: assigned player id: %d", m_pid);
|
||||
is_connected = true;
|
||||
|
||||
m_selector.Add(m_socket);
|
||||
@ -77,7 +77,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, const s
|
||||
}
|
||||
}
|
||||
else
|
||||
PanicAlert("%s", _wxt("Failed to Connect!"));
|
||||
PanicAlertT("Failed to Connect!");
|
||||
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
|
||||
|
||||
case NP_MSG_DISABLE_GAME :
|
||||
{
|
||||
PanicAlert("%s", _wxt("Other client disconnected while game is running!! NetPlay is disabled. You manually stop the game."));
|
||||
PanicAlertT("Other client disconnected while game is running!! NetPlay is disabled. You manually stop the game.");
|
||||
CritLocker game_lock(m_crit.game); // lock game state
|
||||
m_is_running = false;
|
||||
NetPlay_Disable();
|
||||
@ -229,7 +229,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
|
||||
break;
|
||||
|
||||
default :
|
||||
PanicAlert(_wxt("Unknown message received with id : %d"), mid);
|
||||
PanicAlertT("Unknown message received with id : %d", mid);
|
||||
break;
|
||||
|
||||
}
|
||||
@ -256,7 +256,7 @@ void NetPlayClient::Entry()
|
||||
m_is_running = false;
|
||||
NetPlay_Disable();
|
||||
AppendChatGUI("< LOST CONNECTION TO SERVER >");
|
||||
PanicAlert("%s", _wxt("Lost connection to server!"));
|
||||
PanicAlertT("Lost connection to server!");
|
||||
m_do_loop = false;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user