From 5b80dbff3a48cd1d001f1d36ac08690c085adb97 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 23 Nov 2010 11:21:59 -0800 Subject: DN-211 Conference call dialog shows Conference with ??? (???) in title header with view display names on and off --- indra/newview/llimview.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 3578c98622..eb2d590590 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -279,9 +279,27 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name) { - LLStringUtil::format_map_t args; - args["[AGENT_NAME]"] = av_name.getCompleteName(); - LLTrans::findString(mName, "conference-title-incoming", args); + if (av_name.mIsDummy) + { + 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); + } + } + else + { + LLStringUtil::format_map_t args; + args["[AGENT_NAME]"] = av_name.getCompleteName(); + LLTrans::findString(mName, "conference-title-incoming", args); + } } void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) -- cgit v1.2.3 From 739e4ac5414b270247237018c93028052d41e9cd Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 23 Nov 2010 11:25:40 -0800 Subject: DN-212 [crashhunters] LLCacheName::buildLegacyName --- indra/llmessage/llcachename.cpp | 50 ++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 4ab6bd2438..caeaaa3be9 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -556,35 +556,43 @@ std::string LLCacheName::buildUsername(const std::string& full_name) //static std::string LLCacheName::buildLegacyName(const std::string& complete_name) { - // regexp doesn't play nice with unicode, chop off the display name + //boost::regexp was showing up in the crashreporter, so doing + //painfully manual parsing using substr. LF S32 open_paren = complete_name.rfind(" ("); + S32 close_paren = complete_name.rfind(')'); - if (open_paren == std::string::npos) + if (open_paren != std::string::npos && + close_paren == complete_name.length()-1) { - return complete_name; - } + S32 length = close_paren - open_paren - 2; + std::string legacy_name = complete_name.substr(open_paren+2, length); + + if (legacy_name.length() > 0) + { + std::string cap_letter = legacy_name.substr(0, 1); + LLStringUtil::toUpper(cap_letter); + legacy_name = cap_letter + legacy_name.substr(1); + + S32 separator = legacy_name.find('.'); - std::string username = complete_name.substr(open_paren); - boost::regex complete_name_regex("( \\()([a-z0-9]+)(.[a-z]+)*(\\))"); - boost::match_results name_results; - if (!boost::regex_match(username, name_results, complete_name_regex)) return complete_name; + if (separator != std::string::npos) + { + std::string last_name = legacy_name.substr(separator+1); + legacy_name = legacy_name.substr(0, separator); - std::string legacy_name = name_results[2]; - // capitalize the first letter - std::string cap_letter = legacy_name.substr(0, 1); - LLStringUtil::toUpper(cap_letter); - legacy_name = cap_letter + legacy_name.substr(1); + if (last_name.length() > 0) + { + cap_letter = last_name.substr(0, 1); + LLStringUtil::toUpper(cap_letter); + legacy_name = legacy_name + " " + cap_letter + last_name.substr(1); + } + } - if (name_results[3].matched) - { - std::string last_name = name_results[3]; - std::string cap_letter = last_name.substr(1, 1); - LLStringUtil::toUpper(cap_letter); - last_name = cap_letter + last_name.substr(2); - legacy_name = legacy_name + " " + last_name; + return legacy_name; + } } - return legacy_name; + return complete_name; } // This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer. -- cgit v1.2.3 From f3705df98291599f399bb5393144145ed6e0aaa3 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 23 Nov 2010 16:03:27 -0800 Subject: (DN-211) Conference call dialog shows Conference with ??? (???) in title header with view display names on and off Inbox X --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index eb2d590590..2922a4d654 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2183,7 +2183,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response) LLAvatarName av_name; if (LLAvatarNameCache::get(caller_id, &av_name)) { - correct_session_name = av_name.mDisplayName + " (" + av_name.mUsername + ")"; + correct_session_name = av_name.getCompleteName(); correct_session_name.append(ADHOC_NAME_SUFFIX); } } -- cgit v1.2.3 From 4952afae6413455cff00ed2d1ca8c49b2dd4823c Mon Sep 17 00:00:00 2001 From: eli_linden Date: Tue, 23 Nov 2010 17:02:21 -0800 Subject: CT-633 FIX DA translation for set19, for Viewer 2.4 --- .../skins/default/xui/da/floater_avatar_picker.xml | 8 ++ .../newview/skins/default/xui/da/floater_bumps.xml | 4 +- .../skins/default/xui/da/floater_buy_object.xml | 37 +++--- .../newview/skins/default/xui/da/floater_event.xml | 45 ++----- .../skins/default/xui/da/floater_incoming_call.xml | 2 +- indra/newview/skins/default/xui/da/floater_pay.xml | 2 +- .../newview/skins/default/xui/da/floater_tools.xml | 4 +- .../default/xui/da/floater_voice_controls.xml | 4 +- .../skins/default/xui/da/inspect_avatar.xml | 5 + indra/newview/skins/default/xui/da/menu_viewer.xml | 6 +- .../newview/skins/default/xui/da/notifications.xml | 147 ++++++++++++++++----- .../skins/default/xui/da/panel_edit_profile.xml | 10 +- .../default/xui/da/panel_group_land_money.xml | 1 + indra/newview/skins/default/xui/da/panel_login.xml | 4 +- .../skins/default/xui/da/panel_place_profile.xml | 3 +- .../default/xui/da/panel_preferences_general.xml | 8 +- .../default/xui/da/panel_preferences_setup.xml | 10 +- .../skins/default/xui/da/panel_profile_view.xml | 8 +- .../newview/skins/default/xui/da/role_actions.xml | 91 ++++++------- indra/newview/skins/default/xui/da/strings.xml | 22 ++- 20 files changed, 264 insertions(+), 157 deletions(-) diff --git a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml index a337da9b51..e97089f61e 100644 --- a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml @@ -24,6 +24,10 @@ Indtast en del af beboerens navn: