зеркало из 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,
|
__ellipsis : null,
|
||||||
get _ellipsis() {
|
get _ellipsis() {
|
||||||
if (!this.__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_1) +
|
||||||
(Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
|
(Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
|
||||||
|
|
||||||
var brandShortName =
|
|
||||||
this._brandBundle.GetStringFromName("brandShortName");
|
|
||||||
var displayHost = this._getShortDisplayHost(aLogin.hostname);
|
var displayHost = this._getShortDisplayHost(aLogin.hostname);
|
||||||
|
|
||||||
var dialogText;
|
var dialogText;
|
||||||
if (aLogin.username) {
|
if (aLogin.username) {
|
||||||
var displayUser = this._sanitizeUsername(aLogin.username);
|
var displayUser = this._sanitizeUsername(aLogin.username);
|
||||||
dialogText = this._getLocalizedString(
|
dialogText = this._getLocalizedString(
|
||||||
"saveLoginText",
|
"rememberPasswordText",
|
||||||
[brandShortName, displayUser, displayHost]);
|
[displayUser, displayHost]);
|
||||||
} else {
|
} else {
|
||||||
dialogText = this._getLocalizedString(
|
dialogText = this._getLocalizedString(
|
||||||
"saveLoginTextNoUsername",
|
"rememberPasswordTextNoUsername",
|
||||||
[brandShortName, displayHost]);
|
[displayHost]);
|
||||||
|
|
||||||
}
|
}
|
||||||
var dialogTitle = this._getLocalizedString(
|
var dialogTitle = this._getLocalizedString(
|
||||||
"savePasswordTitle");
|
"savePasswordTitle");
|
||||||
|
@ -1116,11 +1100,11 @@ LoginManagerPrompter.prototype = {
|
||||||
var dialogText;
|
var dialogText;
|
||||||
if (aOldLogin.username)
|
if (aOldLogin.username)
|
||||||
dialogText = this._getLocalizedString(
|
dialogText = this._getLocalizedString(
|
||||||
"passwordChangeText",
|
"updatePasswordText",
|
||||||
[aOldLogin.username]);
|
[aOldLogin.username]);
|
||||||
else
|
else
|
||||||
dialogText = this._getLocalizedString(
|
dialogText = this._getLocalizedString(
|
||||||
"passwordChangeTextNoUser");
|
"updatePasswordTextNoUser");
|
||||||
|
|
||||||
var dialogTitle = this._getLocalizedString(
|
var dialogTitle = this._getLocalizedString(
|
||||||
"passwordChangeTitle");
|
"passwordChangeTitle");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче