summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-07-29 10:29:23 +0300
committerMike Antipov <mantipov@productengine.com>2010-07-29 10:29:23 +0300
commite730c677499842d00dd0afd613ab14b83ed14552 (patch)
treeaa4bc2c1401ec99386e704b7a7d9b78158a338b1 /indra/newview
parent749a48ad733a64519e2f897227c6e1c997389312 (diff)
EXT-8429 FIXED Added a workaround to localize server hardcoded "Conference" string for incoming ad-hoc chats.
Added a new string "conference-title-incoming" to strings.xml For now the "Conference" word is localized wherever this session name is shown: * IM window title * Voice notifications Further Localization is out of scope of this ticket and will be done in a separate localization cycle. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/816/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimview.cpp19
-rw-r--r--indra/newview/llimview.h3
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
3 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 21313f9df7..9d88c156d3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -237,6 +237,25 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT);
}
+ // *WORKAROUND: for server hard-coded string in indra\newsim\llsimchatterbox.cpp
+ if (isAdHocSessionType() && IM_SESSION_INVITE == type)
+ {
+ // For an ad-hoc incoming chat name is received from the server and is in a form of "<Avatar's name> Conference"
+ // Lets update it to localize the "Conference" word. See EXT-8429.
+ S32 separator_index = mName.rfind(" ");
+ std::string name = mName.substr(0, separator_index);
+ ++separator_index;
+ std::string conference_word = mName.substr(separator_index, mName.length());
+
+ // additional check that session name is what we expected
+ if ("Conference" == conference_word)
+ {
+ LLStringUtil::format_map_t args;
+ args["[AGENT_NAME]"] = name;
+ LLTrans::findString(mName, "conference-title-incoming", args);
+ }
+ }
+
if (IM_NOTHING_SPECIAL == type)
{
mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID);
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index ffa8a16797..57d31795ca 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -233,7 +233,8 @@ public:
* Get a session's name.
* For a P2P chat - it's an avatar's name,
* For a group chat - it's a group's name
- * For an ad-hoc chat - is received from the server and is in a from of "<Avatar's name> conference"
+ * For an incoming ad-hoc chat - is received from the server and is in a from of "<Avatar's name> Conference"
+ * It is updated in LLIMModel::LLIMSession's constructor to localize the "Conference".
*/
const std::string& getName(const LLUUID& session_id) const;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 048de70045..9941732c30 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3024,6 +3024,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="conference-title">
Ad-hoc Conference
</string>
+ <string name="conference-title-incoming">
+ [AGENT_NAME] Conference
+ </string>
<string name="inventory_item_offered-im">
Inventory item offered
</string>