From b3ce604669d84ce82fad298bfc8c0630202e3871 Mon Sep 17 00:00:00 2001 From: Felix Fung Date: Thu, 8 Sep 2011 12:36:35 -0700 Subject: [PATCH] Bug 626626 - Reference Correct Strings in Password Manager. r=dolske --- .../passwordmgr/nsLoginManagerPrompter.js | 30 +++++-------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js index 85d740eb58c..f90199a3d29 100644 --- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js +++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js @@ -265,21 +265,6 @@ LoginManagerPrompter.prototype = { }, - __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) { @@ -956,20 +941,19 @@ LoginManagerPrompter.prototype = { (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"); @@ -1116,11 +1100,11 @@ LoginManagerPrompter.prototype = { var dialogText; if (aOldLogin.username) dialogText = this._getLocalizedString( - "passwordChangeText", + "updatePasswordText", [aOldLogin.username]); else dialogText = this._getLocalizedString( - "passwordChangeTextNoUser"); + "updatePasswordTextNoUser"); var dialogTitle = this._getLocalizedString( "passwordChangeTitle");