зеркало из https://github.com/mozilla/gecko-dev.git
Bug 302164 - Imporvements to text and button labels in the 'Remember Password' dialog. r+a=mconnor
This commit is contained in:
Родитель
ded448f734
Коммит
42ea3948cd
|
@ -1130,19 +1130,43 @@ nsPasswordManager::Notify(nsIContent* aFormNode,
|
|||
}
|
||||
}
|
||||
|
||||
nsAutoString dialogTitle, dialogText, neverText;
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
nsCOMPtr<nsIStringBundle> brandBundle;
|
||||
rv = bundleService->CreateBundle("chrome://branding/locale/brand.properties",
|
||||
getter_AddRefs(brandBundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsXPIDLString brandShortName;
|
||||
rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
|
||||
getter_Copies(brandShortName));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
const PRUnichar* formatArgs[1] = { brandShortName.get() };
|
||||
|
||||
nsAutoString dialogText;
|
||||
GetLocalizedString(NS_LITERAL_STRING("savePasswordText"),
|
||||
dialogText,
|
||||
PR_TRUE,
|
||||
formatArgs,
|
||||
1);
|
||||
|
||||
nsAutoString dialogTitle, neverText, rememberText, notRememberText;
|
||||
GetLocalizedString(NS_LITERAL_STRING("savePasswordTitle"), dialogTitle);
|
||||
GetLocalizedString(NS_LITERAL_STRING("savePasswordText"), dialogText);
|
||||
|
||||
GetLocalizedString(NS_LITERAL_STRING("neverForSite"), neverText);
|
||||
GetLocalizedString(NS_LITERAL_STRING("rememberPassword"), rememberText);
|
||||
GetLocalizedString(NS_LITERAL_STRING("doNotRememberPassword"),
|
||||
notRememberText);
|
||||
|
||||
PRInt32 selection;
|
||||
prompt->ConfirmEx(dialogTitle.get(),
|
||||
dialogText.get(),
|
||||
nsIPrompt::BUTTON_POS_1_DEFAULT +
|
||||
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
|
||||
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1) +
|
||||
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +
|
||||
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_1) +
|
||||
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_2),
|
||||
nsnull, nsnull,
|
||||
rememberText.get(),
|
||||
notRememberText.get(),
|
||||
neverText.get(),
|
||||
nsnull, nsnull,
|
||||
&selection);
|
||||
|
|
|
@ -38,8 +38,10 @@
|
|||
rememberValue = Use Password Manager to remember this value.
|
||||
rememberPassword = Use Password Manager to remember this password.
|
||||
savePasswordTitle = Confirm
|
||||
savePasswordText = Password Manager can remember this logon and enter it automatically the next time you return to this web site.\nDo you want Password Manager to remember this logon?
|
||||
neverForSite = Never for this site
|
||||
savePasswordText = Do you want %S to remember this password?
|
||||
rememberPassword = Remember
|
||||
doNotRememberPassword = Not Now
|
||||
neverForSite = Never for This Site
|
||||
close = Close
|
||||
passwordChangeTitle = Confirm Password Change
|
||||
passwordChangeText = Would you like to have Password Manager change the stored password for %S?
|
||||
|
|
Загрузка…
Ссылка в новой задаче