Commit 25f30bbb authored by gcasto's avatar gcasto Committed by Commit bot

[Smart Lock] Update strings in chrome://settings/passwords

BUG=486739

Review URL: https://codereview.chromium.org/1137183004

Cr-Commit-Position: refs/heads/master@{#330211}
parent 5c50887f
......@@ -7658,6 +7658,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE" desc="Title for 'Passwords and exceptions dialog'">
Passwords
</message>
<message name="IDS_PASSWORDS_EXCEPTIONS_SMART_LOCK_WINDOW_TITLE" desc="Title for 'Passwords and exceptions dialog'">
Google Smart Lock for Passwords
</message>
<message name="IDS_PASSWORDS_AUTO_SIGNIN_TITLE" desc="Title for 'Auto sign-in' checkbox in the password dialog">
Auto Sign-in
</message>
......@@ -13648,8 +13651,8 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_MANAGE_PASSWORDS_BLACKLIST_CONFIRMATION_BUTTON" desc="The confirmation button that is used in the manage passwords bubble when confirming blacklisting a site.">
Delete saved passwords
</message>
<message name="IDS_MANAGE_PASSWORDS_REMOTE_TEXT" desc="The text used to tell inform users of how to manage their passwords from a website. Text between |bars| is link text.">
Manage passwords remotely on your |Google Account|
<message name="IDS_MANAGE_PASSWORDS_REMOTE_TEXT" desc="The text used to tell inform users of how to manage their passwords from a website.">
Access your passwords from any device at <ph name="LINK_TEXT">$1<ex>passwords.google.com</ex></ph>
</message>
<message name="IDS_MANAGE_PASSWORDS_NO_PASSWORDS" desc="The text that is used in the manage passwords bubble when all passwords have been deleted.">
......@@ -17,6 +17,7 @@
#include "chrome/browser/ui/ash/ash_util.h"
#endif
#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
#include "chrome/browser/ui/passwords/password_bubble_experiment.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
......@@ -74,25 +75,32 @@ void PasswordManagerHandler::GetLocalizedValues(
};
RegisterStrings(localized_strings, resources, arraysize(resources));
RegisterTitle(localized_strings, "passwordsPage",
IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE);
int title_id =
password_bubble_experiment::IsSmartLockBrandingEnabled(GetProfile()) ?
IDS_PASSWORDS_EXCEPTIONS_SMART_LOCK_WINDOW_TITLE :
IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE;
RegisterTitle(localized_strings, "passwordsPage", title_id);
localized_strings->SetString("passwordManagerLearnMoreURL",
chrome::kPasswordManagerLearnMoreURL);
localized_strings->SetString("passwordsManagePasswordsLink",
chrome::kPasswordManagerAccountDashboardURL);
std::vector<base::string16> pieces;
base::SplitStringDontTrim(
l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_REMOTE_TEXT),
'|', // separator
&pieces);
DCHECK_EQ(3U, pieces.size());
std::string management_hostname =
GURL(chrome::kPasswordManagerAccountDashboardURL).host();
base::string16 link_text = base::UTF8ToUTF16(management_hostname);
size_t offset;
base::string16 full_text = l10n_util::GetStringFUTF16(
IDS_MANAGE_PASSWORDS_REMOTE_TEXT, link_text, &offset);
localized_strings->SetString("passwordsManagePasswordsBeforeLinkText",
pieces[0]);
localized_strings->SetString("passwordsManagePasswordsLinkText", pieces[1]);
full_text.substr(0, offset));
localized_strings->SetString("passwordsManagePasswordsLinkText",
full_text.substr(offset,
offset + link_text.size()));
localized_strings->SetString("passwordsManagePasswordsAfterLinkText",
pieces[2]);
full_text.substr(offset + link_text.size()));
bool disable_show_passwords = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment