Bug 626626 - Reference Correct Strings in Password Manager. r=dolske
authorFelix Fung <ffung@mozilla.com>
Thu, 08 Sep 2011 12:36:35 -0700
changeset 76915 0a36d58f2b4f4cb09769a7646df923ca867322d1
parent 76914 1f8902ba7731616990ae200cca4912faef16b6f2
child 76925 481ae485e38638f2b096abb1e0ebf667ef05c000
push id164
push usermleibovic@mozilla.com
push dateTue, 13 Sep 2011 16:43:12 +0000
treeherderfx-team@0a36d58f2b4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs626626
milestone9.0a1
Bug 626626 - Reference Correct Strings in Password Manager. r=dolske
toolkit/components/passwordmgr/nsLoginManagerPrompter.js
--- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
+++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -260,31 +260,16 @@ LoginManagerPrompter.prototype = {
             if (!this.__strBundle)
                 throw "String bundle for Login Manager not present!";
         }
 
         return this.__strBundle;
     },
 
 
-    __brandBundle : null, // String bundle for L10N
-    get _brandBundle() {
-        if (!this.__brandBundle) {
-            var bunService = Cc["@mozilla.org/intl/stringbundle;1"].
-                             getService(Ci.nsIStringBundleService);
-            this.__brandBundle = bunService.createBundle(
-                        "chrome://branding/locale/brand.properties");
-            if (!this.__brandBundle)
-                throw "Branding string bundle not present!";
-        }
-
-        return this.__brandBundle;
-    },
-
-
     __ellipsis : null,
     get _ellipsis() {
         if (!this.__ellipsis) {
             this.__ellipsis = "\u2026";
             try {
                 this.__ellipsis = Services.prefs.getComplexValue(
                                     "intl.ellipsis", Ci.nsIPrefLocalizedString).data;
             } catch (e) { }
@@ -951,30 +936,29 @@ LoginManagerPrompter.prototype = {
      *
      */
     _showSaveLoginDialog : function (aLogin) {
         const buttonFlags = Ci.nsIPrompt.BUTTON_POS_1_DEFAULT +
             (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
             (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) +
             (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
 
-        var brandShortName =
-                this._brandBundle.GetStringFromName("brandShortName");
         var displayHost = this._getShortDisplayHost(aLogin.hostname);
 
         var dialogText;
         if (aLogin.username) {
             var displayUser = this._sanitizeUsername(aLogin.username);
             dialogText = this._getLocalizedString(
-                                 "saveLoginText",
-                                 [brandShortName, displayUser, displayHost]);
+                                 "rememberPasswordText",
+                                 [displayUser, displayHost]);
         } else {
             dialogText = this._getLocalizedString(
-                                 "saveLoginTextNoUsername",
-                                 [brandShortName, displayHost]);
+                                 "rememberPasswordTextNoUsername",
+                                 [displayHost]);
+
         }
         var dialogTitle        = this._getLocalizedString(
                                         "savePasswordTitle");
         var neverButtonText    = this._getLocalizedString(
                                         "neverForSiteButtonText");
         var rememberButtonText = this._getLocalizedString(
                                         "rememberButtonText");
         var notNowButtonText   = this._getLocalizedString(
@@ -1111,21 +1095,21 @@ LoginManagerPrompter.prototype = {
      *
      */
     _showChangeLoginDialog : function (aOldLogin, aNewPassword) {
         const buttonFlags = Ci.nsIPrompt.STD_YES_NO_BUTTONS;
 
         var dialogText;
         if (aOldLogin.username)
             dialogText  = this._getLocalizedString(
-                                    "passwordChangeText",
+                                    "updatePasswordText",
                                     [aOldLogin.username]);
         else
             dialogText  = this._getLocalizedString(
-                                    "passwordChangeTextNoUser");
+                                    "updatePasswordTextNoUser");
 
         var dialogTitle = this._getLocalizedString(
                                     "passwordChangeTitle");
 
         // returns 0 for yes, 1 for no.
         var ok = !this._promptService.confirmEx(this._window,
                                 dialogTitle, dialogText, buttonFlags,
                                 null, null, null,