Bug 1341370 - Use our own dateFormat.properties. r=clokep
authorRichard Marti <richard.marti@gmail.com>
Wed, 22 Feb 2017 15:37:39 +0100
changeset 28473 b3cdf98b16ef062856ad86526c8635e5eff27ac6
parent 28472 c207ee1de2c7aaf9f375328c49e53b95785a8991
child 28474 6d82814c0d1ab8c9ecb7b12a8d0edd6a4b6abb35
push id368
push userclokep@gmail.com
push dateMon, 12 Jun 2017 16:33:01 +0000
reviewersclokep
bugs1341370
Bug 1341370 - Use our own dateFormat.properties. r=clokep
chat/locales/en-US/dateFormat.properties
chat/locales/jar.mn
im/content/viewlog.js
im/content/viewlog.xul
mail/components/im/content/chat-messenger-overlay.js
mail/components/im/content/chat-messenger-overlay.xul
new file mode 100644
--- /dev/null
+++ b/chat/locales/en-US/dateFormat.properties
@@ -0,0 +1,62 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+month.1.Mmm=Jan
+month.2.Mmm=Feb
+month.3.Mmm=Mar
+month.4.Mmm=Apr
+month.5.Mmm=May
+month.6.Mmm=Jun
+month.7.Mmm=Jul
+month.8.Mmm=Aug
+month.9.Mmm=Sep
+month.10.Mmm=Oct
+month.11.Mmm=Nov
+month.12.Mmm=Dec
+
+month.1.name=January
+month.2.name=February
+month.3.name=March
+month.4.name=April
+month.5.name=May
+month.6.name=June
+month.7.name=July
+month.8.name=August
+month.9.name=September
+month.10.name=October
+month.11.name=November
+month.12.name=December
+
+day.1.name=Sunday
+day.2.name=Monday
+day.3.name=Tuesday
+day.4.name=Wednesday
+day.5.name=Thursday
+day.6.name=Friday
+day.7.name=Saturday
+
+day.1.Mmm=Sun
+day.2.Mmm=Mon
+day.3.Mmm=Tue
+day.4.Mmm=Wed
+day.5.Mmm=Thu
+day.6.Mmm=Fri
+day.7.Mmm=Sat
+
+day.1.short=Su
+day.2.short=Mo
+day.3.short=Tu
+day.4.short=We
+day.5.short=Th
+day.6.short=Fr
+day.7.short=Sa
+
+noon=Noon
+midnight=Midnight
+
+AllDay=All Day
+
+# LOCALIZATION NOTE (finduri-MonthYear):
+# %1$S is the month name, %2$S is the year (4 digits format).
+finduri-MonthYear=%1$S %2$S
--- a/chat/locales/jar.mn
+++ b/chat/locales/jar.mn
@@ -7,16 +7,17 @@
 @AB_CD@.jar:
 % locale chat @AB_CD@ %locale/@AB_CD@/chat/
 	locale/@AB_CD@/chat/accounts.dtd	(%accounts.dtd)
 	locale/@AB_CD@/chat/accounts.properties (%accounts.properties)
 	locale/@AB_CD@/chat/imtooltip.properties (%imtooltip.properties)
 	locale/@AB_CD@/chat/commands.properties (%commands.properties)
 	locale/@AB_CD@/chat/contacts.properties	(%contacts.properties)
 	locale/@AB_CD@/chat/conversations.properties (%conversations.properties)
+	locale/@AB_CD@/chat/dateFormat.properties (%dateFormat.properties)
 	locale/@AB_CD@/chat/facebook.properties	(%facebook.properties)
 	locale/@AB_CD@/chat/irc.properties	(%irc.properties)
-	locale/@AB_CD@/chat/logger.properties (%logger.properties)
+	locale/@AB_CD@/chat/logger.properties	(%logger.properties)
 	locale/@AB_CD@/chat/skype.properties	(%skype.properties)
 	locale/@AB_CD@/chat/status.properties	(%status.properties)
 	locale/@AB_CD@/chat/twitter.properties	(%twitter.properties)
 	locale/@AB_CD@/chat/xmpp.properties	(%xmpp.properties)
 	locale/@AB_CD@/chat/yahoo.properties	(%yahoo.properties)
--- a/im/content/viewlog.js
+++ b/im/content/viewlog.js
@@ -244,18 +244,18 @@ chatLogTreeView.prototype = {
     let formatDateTime = function(aDate) {
       return dts.FormatDateTime("", dts.dateFormatShort,
                                 dts.timeFormatNoSeconds, aDate.getFullYear(),
                                 aDate.getMonth() + 1, aDate.getDate(),
                                 aDate.getHours(), aDate.getMinutes(), 0);
     };
     let formatMonthYear = function(aDate) {
       let month = formatMonth(aDate);
-      return placesBundle.getFormattedString("finduri-MonthYear",
-                                             [month, aDate.getFullYear()]);
+      return dateFormatBundle.getFormattedString("finduri-MonthYear",
+                                                 [month, aDate.getFullYear()]);
     };
     let formatMonth = aDate =>
       dateFormatBundle.getString("month." + (aDate.getMonth() + 1) + ".name");
     let formatWeekday = aDate =>
       dateFormatBundle.getString("day." + (aDate.getDay() + 1) + ".name");
 
     let nowDate = new Date();
     let todayDate = new Date(nowDate.getFullYear(), nowDate.getMonth(),
--- a/im/content/viewlog.xul
+++ b/im/content/viewlog.xul
@@ -76,17 +76,17 @@
     <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
     <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
     <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
     <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>
   </keyset>
 
   <stringbundleset id="stringbundleset">
     <stringbundle id="bundle_instantbird" src="chrome://instantbird/locale/instantbird.properties"/>
-    <stringbundle id="bundle_dateformat" src="chrome://global/locale/dateFormat.properties"/>
+    <stringbundle id="bundle_dateformat" src="chrome://chat/locale/dateFormat.properties"/>
     <stringbundle id="bundle_places" src="chrome://places/locale/places.properties"/>
   </stringbundleset>
 
   <popupset id="mainPopupSet">
     <tooltip id="imTooltip" type="im"/>
     <menupopup id="contentAreaContextMenu">
       <menuitem id="context-copy"
                 label="&copyCmd.label;"
--- a/mail/components/im/content/chat-messenger-overlay.js
+++ b/mail/components/im/content/chat-messenger-overlay.js
@@ -1237,18 +1237,18 @@ chatLogTreeView.prototype = {
     let formatDateTime = function(aDate) {
       return dts.FormatDateTime("", dts.dateFormatShort,
                                 dts.timeFormatNoSeconds, aDate.getFullYear(),
                                 aDate.getMonth() + 1, aDate.getDate(),
                                 aDate.getHours(), aDate.getMinutes(), 0);
     };
     let formatMonthYear = function(aDate) {
       let month = formatMonth(aDate);
-      return placesBundle.getFormattedString("finduri-MonthYear",
-                                             [month, aDate.getFullYear()]);
+      return dateFormatBundle.getFormattedString("finduri-MonthYear",
+                                                 [month, aDate.getFullYear()]);
     };
     let formatMonth = aDate =>
       dateFormatBundle.getString("month." + (aDate.getMonth() + 1) + ".name");
     let formatWeekday = aDate =>
       dateFormatBundle.getString("day." + (aDate.getDay() + 1) + ".name");
 
     let nowDate = new Date();
     let todayDate = new Date(nowDate.getFullYear(), nowDate.getMonth(),
--- a/mail/components/im/content/chat-messenger-overlay.xul
+++ b/mail/components/im/content/chat-messenger-overlay.xul
@@ -25,17 +25,17 @@
           src="chrome://messenger/content/chat/chat-messenger-overlay.js"/>
   <script type="application/javascript"
           src="chrome://messenger/content/chat/imStatusSelector.js"/>
   <script type="application/javascript"
           src="chrome://messenger/content/chat/imContextMenu.js"/>
 
   <stringbundleset id="stringbundleset">
     <stringbundle id="chatBundle" src="chrome://messenger/locale/chat.properties"/>
-    <stringbundle id="bundle_dateformat" src="chrome://global/locale/dateFormat.properties"/>
+    <stringbundle id="bundle_dateformat" src="chrome://chat/locale/dateFormat.properties"/>
     <stringbundle id="bundle_places" src="chrome://places/locale/places.properties"/>
   </stringbundleset>
 
   <popupset id="mainPopupSet">
     <tooltip id="imTooltip" type="im"/>
 
     <menupopup id="buddyListContextMenu"
                onpopupshowing="if (event.target != this) return true; gBuddyListContextMenu = new buddyListContextMenu(this); return gBuddyListContextMenu.shouldDisplay;"