Bug 786648 - Stop stealing messenger strings in the chat component's log viewer. r=mconley.
authorAdarsh Dinesh <adarshdinesh@gmail.com>
Thu, 17 Jan 2013 18:59:56 -0500
changeset 14734 eceb4d4b7131f369ebdfac66383b33750ed710af
parent 14733 393bcf57ae3143521729b1741e997c7b6cc76ea1
child 14735 6f19e4e7a1f160d907689dbc424b73a889853415
push id867
push userbugzilla@standard8.plus.com
push dateMon, 01 Apr 2013 20:44:27 +0000
treeherdercomm-beta@797726b8d244 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs786648
Bug 786648 - Stop stealing messenger strings in the chat component's log viewer. r=mconley.
mail/components/im/content/chat-messenger-overlay.js
mail/locales/en-US/chrome/messenger/chat.properties
--- a/mail/components/im/content/chat-messenger-overlay.js
+++ b/mail/components/im/content/chat-messenger-overlay.js
@@ -1101,29 +1101,29 @@ chatLogTreeView.prototype = {
       return dts.FormatDate("", dts.dateFormatShort, aDate.getFullYear(),
                             aDate.getMonth() + 1, aDate.getDate());
     };
     let nowDate = new Date();
     let todayDate = new Date(nowDate.getFullYear(), nowDate.getMonth(),
                              nowDate.getDate());
 
     // Build a chatLogTreeLogItem for each log, and put it in the right group.
-    let msgBundle = document.getElementById("bundle_messenger");
+    let chatBundle = document.getElementById("chatBundle");
 
     for each (let log in fixIterator(this._logs)) {
       let logDate = new Date(log.time * 1000);
       let timeFromToday = todayDate - logDate;
       let title = formatDate(logDate);
       let group;
       if (timeFromToday <= 0) {
-        today = new chatLogTreeLogItem(log, msgBundle.getString("today"), 0);
+        today = new chatLogTreeLogItem(log, chatBundle.getString("log.today"), 0);
         continue;
       }
       else if (timeFromToday <= kDayInMsecs) {
-        yesterday = new chatLogTreeLogItem(log, msgBundle.getString("yesterday"), 0);
+        yesterday = new chatLogTreeLogItem(log, chatBundle.getString("log.yesterday"), 0);
         continue;
       }
       else if (timeFromToday <= kWeekInMsecs)
         group = groups.lastWeek;
       else if (timeFromToday <= kTwoWeeksInMsecs)
         group = groups.twoWeeksAgo;
       else
         group = groups.other;
@@ -1149,17 +1149,17 @@ chatLogTreeView.prototype = {
         groupName = formatDate(new Date(group[0].log.time * 1000));
         if (group.length > 1) {
           let fromDate = new Date(group[group.length - 1].log.time * 1000);
           groupName += " - " + formatDate(fromDate);
         }
       }
       else {
         // Otherwise, get the appropriate string for this group.
-        groupName = msgBundle.getString(groupId);
+        groupName = chatBundle.getString("log." + groupId);
       }
       this._rowMap.push(new chatLogTreeGroupItem(groupName, group));
     }
 
     // Finally, notify the tree.
     if (this._tree)
       this._tree.rowCountChanged(0, this._rowMap.length);
   }
--- a/mail/locales/en-US/chrome/messenger/chat.properties
+++ b/mail/locales/en-US/chrome/messenger/chat.properties
@@ -83,8 +83,12 @@ buddytooltip.account=Account
 # LOCALIZATION NOTE (today, yesterday):
 # These 3 strings are used to display when previous conversations happened.
 # In 'today' and 'yesterday', %S is replaced with the time.
 today=Today %S
 yesterday=Yesterday %S
 # LOCALIZATION NOTE (dateTime):
 # %1$S is the date, %2$S is the date.
 dateTime=%1$S %2$S
+log.today=Today
+log.yesterday=Yesterday
+log.lastWeek=Last Week
+log.twoWeeksAgo=Two Weeks Ago