Bug 954193 - reorganize purplexpcom - package chat locale files in chrome://chat/locale instead of chrome://purple/locale.
authorFlorian Quèze <florian@instantbird.org>
Fri, 23 Dec 2011 11:46:35 +0100
changeset 18503 d95278adf5fe031863912c9a35581f9ebbac190b
parent 18502 8ca2ad889fafc873eedd4d9feaac88f86782db26
child 18504 ac087a70708f3b9eb52e92dbefd4dda30f826118
push id1103
push usermbanner@mozilla.com
push dateTue, 18 Mar 2014 07:44:06 +0000
treeherdercomm-beta@50c6279a0af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs954193
Bug 954193 - reorganize purplexpcom - package chat locale files in chrome://chat/locale instead of chrome://purple/locale.
chat/chat-prefs.js
chat/components/src/imCommands.js
chat/components/src/imConversations.js
chat/locales/Makefile.in
chat/locales/jar.mn
chat/modules/imStatusUtils.jsm
chat/modules/imThemes.jsm
chat/protocols/facebook/facebook.js
chat/protocols/gtalk/gtalk.js
chat/protocols/twitter/twitter.js
chat/protocols/xmpp/xmpp-session.jsm
chat/protocols/xmpp/xmpp.js
chat/protocols/xmpp/xmpp.jsm
--- a/chat/chat-prefs.js
+++ b/chat/chat-prefs.js
@@ -20,20 +20,20 @@ pref("messenger.buddies.hiddenTags", "")
 // -1 rejects the invitations.
 pref("messenger.conversations.autoAcceptChatInvitations", 1);
 
 // Indicates whether the core should always close conversations closed
 // by the UI or if they can be put on hold instead.
 pref("messenger.conversations.alwaysClose", false);
 
 pref("messenger.conversations.selections.magicCopyEnabled", true);
-pref("messenger.conversations.selections.ellipsis", "chrome://purple/locale/conversations.properties");
-pref("messenger.conversations.selections.systemMessagesTemplate", "chrome://purple/locale/conversations.properties");
-pref("messenger.conversations.selections.contentMessagesTemplate", "chrome://purple/locale/conversations.properties");
-pref("messenger.conversations.selections.actionMessagesTemplate", "chrome://purple/locale/conversations.properties");
+pref("messenger.conversations.selections.ellipsis", "chrome://chat/locale/conversations.properties");
+pref("messenger.conversations.selections.systemMessagesTemplate", "chrome://chat/locale/conversations.properties");
+pref("messenger.conversations.selections.contentMessagesTemplate", "chrome://chat/locale/conversations.properties");
+pref("messenger.conversations.selections.actionMessagesTemplate", "chrome://chat/locale/conversations.properties");
 
 pref("messenger.conversations.textbox.autoResize", true);
 pref("messenger.conversations.textbox.defaultMaxLines", 5);
 
 pref("messenger.conversations.sendFormat", true);
 
 // this preference changes how we filter incoming messages
 // 0 = no formattings
@@ -49,17 +49,17 @@ pref("messenger.options.messagesStyle.sh
 pref("messenger.options.messagesStyle.combineConsecutive", true);
 // if the time interval in seconds between two messages is longer than
 // this value, the messages will not be combined
 pref("messenger.options.messagesStyle.combineConsecutiveInterval", 300); // 5 minutes
 
 pref("messenger.status.reportIdle", true);
 pref("messenger.status.timeBeforeIdle", 300); // 5 minutes
 pref("messenger.status.awayWhenIdle", true);
-pref("messenger.status.defaultIdleAwayMessage", "chrome://purple/locale/status.properties");
+pref("messenger.status.defaultIdleAwayMessage", "chrome://chat/locale/status.properties");
 pref("messenger.status.userIconFileName", "");
 pref("messenger.status.userDisplayName", "");
 
 // loglevel is the minimum severity level that a libpurple message
 // must have to be reported in the Error Console.
 //
 // The possible values are:
 //   0  Show all libpurple messages (PURPLE_DEBUG_ALL)
--- a/chat/components/src/imCommands.js
+++ b/chat/components/src/imCommands.js
@@ -42,17 +42,17 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 
 XPCOMUtils.defineLazyServiceGetter(this, "obs",
                                    "@mozilla.org/observer-service;1",
                                    "nsIObserverService");
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function()
-  Services.strings.createBundle("chrome://purple/locale/commands.properties")
+  Services.strings.createBundle("chrome://chat/locale/commands.properties")
 );
 
 function CommandsService() { }
 CommandsService.prototype = {
   initCommands: function() {
     this._commands = {};
     // The say command is directly implemented in the UI layer, but has a
     // dummy command registered here so it shows up as a command (e.g. when
--- a/chat/components/src/imConversations.js
+++ b/chat/components/src/imConversations.js
@@ -40,17 +40,17 @@ Cu.import("resource:///modules/imService
 Cu.import("resource:///modules/imStatusUtils.jsm");
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 
 var gLastUIConvId = 0;
 var gLastPurpleConvId = 0;
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function()
-  Services.strings.createBundle("chrome://purple/locale/conversations.properties")
+  Services.strings.createBundle("chrome://chat/locale/conversations.properties")
 );
 
 function UIConversation(aPurpleConversation)
 {
   this._purpleConv = {};
   this.id = ++gLastUIConvId;
   this._observers = [];
   this._messages = [];
--- a/chat/locales/Makefile.in
+++ b/chat/locales/Makefile.in
@@ -33,25 +33,20 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
+relativesrcdir	= chat/locales
 
 include $(DEPTH)/config/autoconf.mk
 
-ifeq (,$(filter-out en-US,$(AB_CD)))
-relativesrcdir  = chat/locales
-else
-relativesrcdir  = purple/locales
-endif
-
 DEFINES += \
 	-DAB_CD=$(AB_CD) \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs-%: AB_CD=$*
 libs-%:
--- a/chat/locales/jar.mn
+++ b/chat/locales/jar.mn
@@ -1,10 +1,10 @@
 #filter substitution
 
 @AB_CD@.jar:
-% locale purple @AB_CD@ %locale/@AB_CD@/purple/
-	locale/@AB_CD@/purple/commands.properties (%commands.properties)
-	locale/@AB_CD@/purple/conversations.properties (%conversations.properties)
-	locale/@AB_CD@/purple/facebook.properties	(%facebook.properties)
-	locale/@AB_CD@/purple/status.properties (%status.properties)
-	locale/@AB_CD@/purple/twitter.properties	(%twitter.properties)
-	locale/@AB_CD@/purple/xmpp.properties	(%xmpp.properties)
+% locale chat @AB_CD@ %locale/@AB_CD@/chat/
+	locale/@AB_CD@/chat/commands.properties (%commands.properties)
+	locale/@AB_CD@/chat/conversations.properties (%conversations.properties)
+	locale/@AB_CD@/chat/facebook.properties	(%facebook.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)
--- a/chat/modules/imStatusUtils.jsm
+++ b/chat/modules/imStatusUtils.jsm
@@ -55,17 +55,17 @@ const Status = {
 
   _labels: {},
   toLabel: function(aStatusType) {
     if (!(typeof aStatusType == "string"))
       aStatusType = this.toAttribute(aStatusType);
 
     if (!(aStatusType in this._labels)) {
       this._labels[aStatusType] =
-        Services.strings.createBundle("chrome://purple/locale/status.properties")
+        Services.strings.createBundle("chrome://chat/locale/status.properties")
                 .GetStringFromName(aStatusType + "StatusType");
     }
     return this._labels[aStatusType];
   },
   toFlag: function(aAttribute) {
     for (let flag in statusNames)
       if (statusNames[flag] == aAttribute)
         return flag;
--- a/chat/modules/imThemes.jsm
+++ b/chat/modules/imThemes.jsm
@@ -370,17 +370,17 @@ const headerFooterReplacements = {
       return (new Date()).toLocaleFormat(aFormat);
     else
       return (new Date()).toLocaleTimeString();
   }
 };
 
 function formatAutoResponce(aTxt)
   Services.strings
-          .createBundle("chrome://purple/locale/conversations.properties")
+          .createBundle("chrome://chat/locale/conversations.properties")
           .formatStringFromName("autoReply", [aTxt], 1)
 
 const statusMessageReplacements = {
   message: function(aMsg) "<span class=\"ib-msg-txt\">" +
                           (aMsg.autoResponse ? formatAutoResponce(aMsg.message) : aMsg.message) +
                           "</span>",
   time: function(aMsg, aFormat) {
     let date = new Date(aMsg.time * 1000);
--- a/chat/protocols/facebook/facebook.js
+++ b/chat/protocols/facebook/facebook.js
@@ -37,17 +37,17 @@
 const {interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 Cu.import("resource:///modules/xmpp.jsm");
 Cu.import("resource:///modules/xmpp-session.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/facebook.properties")
+  l10nHelper("chrome://chat/locale/facebook.properties")
 );
 
 function FacebookAccount(aProtoInstance, aImAccount) {
   this._init(aProtoInstance, aImAccount);
 }
 FacebookAccount.prototype = {
   __proto__: XMPPAccountPrototype,
   get canJoinChat() false,
--- a/chat/protocols/gtalk/gtalk.js
+++ b/chat/protocols/gtalk/gtalk.js
@@ -38,17 +38,17 @@
 const Cu = Components.utils;
 
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 Cu.import("resource:///modules/xmpp.jsm");
 Cu.import("resource:///modules/xmpp-session.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/xmpp.properties")
+  l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
 function GTalkAccount(aProtoInstance, aImAccount) {
   this._init(aProtoInstance, aImAccount);
 }
 GTalkAccount.prototype = {
   __proto__: XMPPAccountPrototype,
   connect: function() {
--- a/chat/protocols/twitter/twitter.js
+++ b/chat/protocols/twitter/twitter.js
@@ -39,17 +39,17 @@
 const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 
 Cu.import("resource:///modules/http.jsm");
 Cu.import("resource:///modules/imServices.jsm");
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/twitter.properties")
+  l10nHelper("chrome://chat/locale/twitter.properties")
 );
 XPCOMUtils.defineLazyGetter(this, "_lang", function()
   l10nHelper("chrome://global/locale/languageNames.properties")
 );
 initLogModule("twitter", this);
 
 function ChatBuddy(aName) {
   this._name = aName;
--- a/chat/protocols/xmpp/xmpp-session.jsm
+++ b/chat/protocols/xmpp/xmpp-session.jsm
@@ -43,17 +43,17 @@ const Ci = Components.interfaces;
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/socket.jsm");
 Cu.import("resource:///modules/xmpp-xml.jsm");
 Cu.import("resource:///modules/xmpp-authmechs.jsm");
 
 initLogModule("xmpp-session", this);
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/xmpp.properties")
+  l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
 function XMPPSession(aHost, aPort, aSecurity, aJID, aPassword, aAccount) {
   this._host = aHost;
   this._port = aPort;
 
   this._connectionSecurity = aSecurity;
   if (this._connectionSecurity == "old_ssl")
--- a/chat/protocols/xmpp/xmpp.js
+++ b/chat/protocols/xmpp/xmpp.js
@@ -37,17 +37,17 @@
 
 const Cu = Components.utils;
 
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 Cu.import("resource:///modules/xmpp.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/xmpp.properties")
+  l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
 function XMPPAccount(aProtoInstance, aImAccount) {
   this._init(aProtoInstance, aImAccount);
 }
 XMPPAccount.prototype = XMPPAccountPrototype;
 
 function XMPPProtocol() {
--- a/chat/protocols/xmpp/xmpp.jsm
+++ b/chat/protocols/xmpp/xmpp.jsm
@@ -61,17 +61,17 @@ XPCOMUtils.defineLazyGetter(this, "FileU
 XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
   Components.utils.import("resource://gre/modules/NetUtil.jsm");
   return NetUtil;
 });
 
 initLogModule("xmpp", this);
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
-  l10nHelper("chrome://purple/locale/xmpp.properties")
+  l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
 /* This is an ordered list, used to determine chat buddy flags:
  *  index < member    -> noFlags
  *  index = member    -> voiced
  *          moderator -> halfOp
  *          admin     -> op
  *          owner     -> founder