Commits

Anonymous committed 3ecfc38 Merge

merge storm-153

Comments (0)

Files changed (3)

indra/newview/llimview.cpp

 const static std::string IM_FROM("from");
 const static std::string IM_FROM_ID("from_id");
 
-const static std::string NO_SESSION("(IM Session Doesn't Exist)");
 const static std::string ADHOC_NAME_SUFFIX(" Conference");
 
 const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other");
 		new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT);
 	}
 
-	// *WORKAROUND: for server hard-coded string in indra\newsim\llsimchatterbox.cpp
+	if (IM_NOTHING_SPECIAL == type)
+	{
+		mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID);
+		mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID);
+	}
+
+	buildHistoryFileName();
+
+	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
+	{
+		std::list<LLSD> chat_history;
+
+		//involves parsing of a chat history
+		LLLogChat::loadAllHistory(mHistoryFileName, chat_history);
+		addMessagesFromHistory(chat_history);
+	}
+
+	// Localizing name of ad-hoc session. STORM-153
+	// Changing name should happen here- after the history file was created, so that
+	// history files have consistent (English) names in different locales.
 	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"
+		// Name here has 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);
 			LLTrans::findString(mName, "conference-title-incoming", args);
 		}
 	}
-
-	if (IM_NOTHING_SPECIAL == type)
-	{
-		mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID);
-		mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID);
-	}
-
-	buildHistoryFileName();
-
-	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
-	{
-		std::list<LLSD> chat_history;
-
-		//involves parsing of a chat history
-		LLLogChat::loadAllHistory(mHistoryFileName, chat_history);
-		addMessagesFromHistory(chat_history);
-	}
 }
 
 void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
 }
 
 
-const std::string& LLIMModel::getName(const LLUUID& session_id) const
+const std::string LLIMModel::getName(const LLUUID& session_id) const
 {
 	LLIMSession* session = findIMSession(session_id);
 
 	if (!session) 
 	{
 		llwarns << "session " << session_id << "does not exist " << llendl;
-		return NO_SESSION;
+		return LLTrans::getString("no_session_message");
 	}
 
 	return session->mName;

indra/newview/llimview.h

 	 * 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;
+	const std::string getName(const LLUUID& session_id) const;
 
 	/** 
 	 * Get number of unread messages in a session with session_id

indra/newview/skins/default/xui/en/strings.xml

     Ad-hoc Conference
   </string>
   <string name="conference-title-incoming">
-    [AGENT_NAME] Conference
+    Conference with [AGENT_NAME]
   </string>
   <string name="inventory_item_offered-im">
     Inventory item offered
   </string>
 
 
+  <string name="no_session_message">
+    (IM Session Doesn't Exist)
+  </string>
   <string name="only_user_message">
     You are the only user in this session.
   </string>