Localize the flag capture's message

This string is presented to the user without translation, but would be nice if it could.

Requires adding the respective original strings in translation files.
This commit is contained in:
josephgbr 2013-03-30 23:28:37 -03:00 committed by oy
parent c9eb180a2e
commit bdd0663db0

View file

@ -584,9 +584,9 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker)
case GAMEMSG_CTF_CAPTURE:
m_pSounds->Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_CAPTURE);
if(aParaI[2] <= 60*Client()->GameTickSpeed())
str_format(aBuf, sizeof(aBuf), "The %s flag was captured by '%s' (%.2f seconds)", aParaI[0] ? Localize("blue") : Localize("red"), m_aClients[clamp(aParaI[1], 0, MAX_CLIENTS-1)].m_aName, aParaI[2]/(float)Client()->GameTickSpeed());
str_format(aBuf, sizeof(aBuf), Localize("The %s flag was captured by '%s' (%.2f seconds)"), aParaI[0] ? Localize("blue") : Localize("red"), m_aClients[clamp(aParaI[1], 0, MAX_CLIENTS-1)].m_aName, aParaI[2]/(float)Client()->GameTickSpeed());
else
str_format(aBuf, sizeof(aBuf), "The %s flag was captured by '%s'", aParaI[0] ? Localize("blue") : Localize("red"), m_aClients[clamp(aParaI[1], 0, MAX_CLIENTS-1)].m_aName);
str_format(aBuf, sizeof(aBuf), Localize("The %s flag was captured by '%s'"), aParaI[0] ? Localize("blue") : Localize("red"), m_aClients[clamp(aParaI[1], 0, MAX_CLIENTS-1)].m_aName);
m_pChat->AddLine(-1, 0, aBuf);
}
return;