Commit b825995f authored by Victor Hugo Vianna Silva's avatar Victor Hugo Vianna Silva Committed by Commit Bot

[b4p] Change 'save unsynced credentials' bubble strings

The CL replaces the "These passwords were not commited" message in the
bubble with a more informative one. The CL also changes the text on the
cancel button from "Cancel" to "Discard". The strings are moved to a
.grd file but are still kept as non-translateable, since they are not
final.

Screenshot of new bubble strings:
https://screenshot.googleplex.com/fzW2r5fnawV

Bug: 1060132
Change-Id: Ifc630eec1e2b23ee4d43305e316ce7c01606a390
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2228839Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#774572}
parent 3e0c1b5f
...@@ -5930,6 +5930,18 @@ the Bookmarks menu."> ...@@ -5930,6 +5930,18 @@ the Bookmarks menu.">
<message name="IDS_PASSWORD_MANAGER_MOVE_HINT" desc="Label describing the effect of moving an existing credential to the user's account store"> <message name="IDS_PASSWORD_MANAGER_MOVE_HINT" desc="Label describing the effect of moving an existing credential to the user's account store">
Move your password to your Google account to access it securely wherever you're signed in Move your password to your Google account to access it securely wherever you're signed in
</message> </message>
<!-- TODO(crbug.com/1062344): Make it translateable and add translation screenshots once final mocks are available. -->
<message name="IDS_PASSWORD_MANAGER_UNSYNCED_CREDENTIALS_BUBBLE_TITLE" desc="The title of the 'save unsynced credentials' bubble." translateable="false">
These passwords were not saved to your Google Account. Would you like to save them on this device?
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and add translation screenshots once final mocks are available. -->
<message name="IDS_PASSWORD_MANAGER_SAVE_UNSYNCED_CREDENTIALS_BUTTON" desc="Button text for the 'save unsynced credentials' bubble's save option." translateable="false">
Save
</message>
<!-- TODO(crbug.com/1062344): Make it translateable and add translation screenshots once final mocks are available. -->
<message name="IDS_PASSWORD_MANAGER_DISCARD_UNSYNCED_CREDENTIALS_BUTTON" desc="Button text for the 'save unsynced credentials' bubble's discard option." translateable="false">
Discard
</message>
</if> </if>
<if expr="is_android"> <if expr="is_android">
<message name="IDS_PASSWORD_MANAGER_SAVE_BUTTON" desc="Mobile: Button text for the 'Save Password' infobar's 'Remember password' option"> <message name="IDS_PASSWORD_MANAGER_SAVE_BUTTON" desc="Mobile: Button text for the 'Save Password' infobar's 'Remember password' option">
......
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
#include <utility> #include <utility>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h" #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/grit/generated_resources.h"
#include "components/password_manager/core/browser/password_form_metrics_recorder.h" #include "components/password_manager/core/browser/password_form_metrics_recorder.h"
#include "ui/base/l10n/l10n_util.h"
namespace metrics_util = password_manager::metrics_util; namespace metrics_util = password_manager::metrics_util;
...@@ -50,6 +51,6 @@ void SaveUnsyncedCredentialsLocallyBubbleController::ReportInteractions() { ...@@ -50,6 +51,6 @@ void SaveUnsyncedCredentialsLocallyBubbleController::ReportInteractions() {
base::string16 SaveUnsyncedCredentialsLocallyBubbleController::GetTitle() base::string16 SaveUnsyncedCredentialsLocallyBubbleController::GetTitle()
const { const {
// TODO(crbug.com/1062344): Add proper (translated) string. return l10n_util::GetStringUTF16(
return base::ASCIIToUTF16("These passwords were not commited:"); IDS_PASSWORD_MANAGER_UNSYNCED_CREDENTIALS_BUBBLE_TITLE);
} }
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#include <utility> #include <utility>
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h" #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h" #include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/passwords/password_items_view.h" #include "chrome/browser/ui/views/passwords/password_items_view.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_types.h" #include "ui/base/ui_base_types.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout.h"
...@@ -31,8 +31,12 @@ PasswordSaveUnsyncedCredentialsLocallyView:: ...@@ -31,8 +31,12 @@ PasswordSaveUnsyncedCredentialsLocallyView::
SetAcceptCallback(base::BindOnce( SetAcceptCallback(base::BindOnce(
&SaveUnsyncedCredentialsLocallyBubbleController::OnSaveClicked, &SaveUnsyncedCredentialsLocallyBubbleController::OnSaveClicked,
base::Unretained(&controller_))); base::Unretained(&controller_)));
// TODO(crbug.com/1062344): Add proper (translated) string. SetButtonLabel(ui::DIALOG_BUTTON_OK,
SetButtonLabel(ui::DIALOG_BUTTON_OK, base::ASCIIToUTF16("Save")); l10n_util::GetStringUTF16(
IDS_PASSWORD_MANAGER_SAVE_UNSYNCED_CREDENTIALS_BUTTON));
SetButtonLabel(ui::DIALOG_BUTTON_CANCEL,
l10n_util::GetStringUTF16(
IDS_PASSWORD_MANAGER_DISCARD_UNSYNCED_CREDENTIALS_BUTTON));
SetCancelCallback(base::BindOnce( SetCancelCallback(base::BindOnce(
&SaveUnsyncedCredentialsLocallyBubbleController::OnCancelClicked, &SaveUnsyncedCredentialsLocallyBubbleController::OnCancelClicked,
base::Unretained(&controller_))); base::Unretained(&controller_)));
......
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