зеркало из https://github.com/mozilla/pjs.git
Bug 626626 - Reference Correct Strings in Password Manager. r=dolske
This commit is contained in:
Родитель
39c72c1e46
Коммит
b3ce604669
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче