From a0ddd6877bfab939b7b68a338637276783601a09 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 16 Dec 2009 17:08:03 +0200 Subject: Un-hardcoded a couple of strings. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 13 +++++++------ indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ea3b57a358..1d56fc0cab 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -237,24 +237,25 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { - // *TODO: remove hardcoded string!!!!!!!!!!! - bool is_p2p_session = dynamic_cast(mVoiceChannel); std::string other_avatar_name; if(is_p2p_session) { gCacheName->getFullName(mOtherParticipantID, other_avatar_name); + std::string you = LLTrans::getString("You"); + std::string started_call = LLTrans::getString("started_call"); + std::string joined_call = LLTrans::getString("joined_call"); if(direction == LLVoiceChannel::INCOMING_CALL) { switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Started a voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Joined the voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); default: break; } @@ -264,10 +265,10 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Started a voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Joined the voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call); default: break; } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0aefc15090..ec4723bd55 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2846,6 +2846,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. To (Moderator) + + Started a voice call + Joined the voice call + Joining Voice Chat... -- cgit v1.2.3