Backport translatable not_online responses

Thanks for pointing this out, Damian
This commit is contained in:
Lirusaito
2019-03-14 02:23:06 -04:00
parent 3b654a0986
commit c260158a2c
2 changed files with 22 additions and 0 deletions

View File

@@ -2240,6 +2240,20 @@ void autoresponder_finish(bool show_autoresponded, const LLUUID& session_id, con
}
}
const std::string NOT_ONLINE_MSG("User not online - message will be stored and delivered later.");
const std::string NOT_ONLINE_INVENTORY("User not online - inventory has been saved.");
void translate_if_needed(std::string& message)
{
if (message == NOT_ONLINE_MSG)
{
message = LLTrans::getString("not_online_msg");
}
else if (message == NOT_ONLINE_INVENTORY)
{
message = LLTrans::getString("not_online_inventory");
}
}
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (gNoRender)
@@ -2308,6 +2322,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
return;
// NaCl End
// Singu TODO: LLIMProcessing goes here
if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
{ // Translate server message if required (MAINT-6109)
translate_if_needed(message);
}
// make sure that we don't have an empty or all-whitespace name
LLStringUtil::trim(name);
if (name.empty())

View File

@@ -4234,6 +4234,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="PowerUser5">Explode objects - Turns an object physical, temporary, and delinks it.</string>
<string name="OnlineStatus">Online</string>
<string name="OfflineStatus">Offline</string>
<string name="not_online_msg">User not online - message will be stored and delivered later.</string>
<string name="not_online_inventory">User not online - inventory has been saved.</string>
<!-- voice calls -->