Commit fd8b83c8 authored by Vaclav Brozek's avatar Vaclav Brozek Committed by Commit Bot

Password settings on iOS: use Title Case

Most of setting headers in the passwords seciton on iOS already use Title Case,
except for the headers of the saved and blacklisted lists of passwords.

This CL fixes that by creating new strings for iOS settings inside
ios/chrome/app/strings/ios_strings.grd. Previously the code used shared strings
from the password_manager component (components/password_manager_strings.grdp).
That string was also used by the old (non-MD) desktop settings, which have
already been deprecated. The MD settings on desktop use the Title Case as iOS
should as well, but the MD settings strings are consistently saved in
chrome/app/settings_strings.grdp, where they cannot be shared with iOS.

The CL creates the new string instead of sharing the one from MD settings,
because sharing has no benefit (on no build both strings are included, so no
storage spared) and has the drawback of binding the style of both strings
forever together.

The CL does not remove the component string yet. The old desktop settings code
is still in the codebase, and the shared string (used only by the old settings)
should be deleted once those old settings are deleted.

The CL was approved in https://chromium-review.googlesource.com/c/567181. This
is a verbatim copy of that CL, but re-uploaded after Gerrit issues prevented me
to actually land the original one. Hence I'm TBR-in lpromero@ who approved the
original.
TBR=lpromero@chromium.org

Bug: 740952
Change-Id: I455b8f2a5edd1089916a7b87f20eddc3b274a2b7
Reviewed-on: https://chromium-review.googlesource.com/567930Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485912}
parent b7c5f00a
...@@ -1245,6 +1245,12 @@ Handoff must also be enabled in the General section of Settings, and your device ...@@ -1245,6 +1245,12 @@ Handoff must also be enabled in the General section of Settings, and your device
<message name="IDS_IOS_CONFIRM_PASSWORD_DELETION" desc="Label of a confirmation dialogue button which allows the user to confirm deletion of a stored password. [Length: one line] [iOS only]"> <message name="IDS_IOS_CONFIRM_PASSWORD_DELETION" desc="Label of a confirmation dialogue button which allows the user to confirm deletion of a stored password. [Length: one line] [iOS only]">
Delete Saved Password Delete Saved Password
</message> </message>
<message name="IDS_IOS_SETTINGS_PASSWORDS_SAVED_HEADING" desc="The title for a list of username/site/password items. These items are already saved by the browser and can be deleted/edited. [Length: one line] [iOS only]">
Saved Passwords
</message>
<message name="IDS_IOS_SETTINGS_PASSWORDS_EXCEPTIONS_HEADING" desc="The title for a list of sites where passwords will not be saved. These items are already saved by the browser and can only be deleted. [Length: one line] [iOS only]">
Never Saved
</message>
<message name="IDS_IOS_SIGNED_IN_ACCOUNTS_VIEW_OK_BUTTON" desc="The title of the OK button of the Signed In Accounts view [iOS only] [20em]"> <message name="IDS_IOS_SIGNED_IN_ACCOUNTS_VIEW_OK_BUTTON" desc="The title of the OK button of the Signed In Accounts view [iOS only] [20em]">
OK, Got It OK, Got It
</message> </message>
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_member.h" #include "components/prefs/pref_member.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "components/url_formatter/url_formatter.h" #include "components/url_formatter/url_formatter.h"
#include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
...@@ -209,7 +208,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults( ...@@ -209,7 +208,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
CollectionViewTextItem* headerItem = CollectionViewTextItem* headerItem =
[[CollectionViewTextItem alloc] initWithType:ItemTypeHeader]; [[CollectionViewTextItem alloc] initWithType:ItemTypeHeader];
headerItem.text = headerItem.text =
l10n_util::GetNSString(IDS_PASSWORD_MANAGER_SHOW_PASSWORDS_TAB_TITLE); l10n_util::GetNSString(IDS_IOS_SETTINGS_PASSWORDS_SAVED_HEADING);
headerItem.textColor = [[MDCPalette greyPalette] tint500]; headerItem.textColor = [[MDCPalette greyPalette] tint500];
[model setHeader:headerItem [model setHeader:headerItem
forSectionWithIdentifier:SectionIdentifierSavedPasswords]; forSectionWithIdentifier:SectionIdentifierSavedPasswords];
...@@ -223,7 +222,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults( ...@@ -223,7 +222,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
CollectionViewTextItem* headerItem = CollectionViewTextItem* headerItem =
[[CollectionViewTextItem alloc] initWithType:ItemTypeHeader]; [[CollectionViewTextItem alloc] initWithType:ItemTypeHeader];
headerItem.text = headerItem.text =
l10n_util::GetNSString(IDS_PASSWORD_MANAGER_EXCEPTIONS_TAB_TITLE); l10n_util::GetNSString(IDS_IOS_SETTINGS_PASSWORDS_EXCEPTIONS_HEADING);
headerItem.textColor = [[MDCPalette greyPalette] tint500]; headerItem.textColor = [[MDCPalette greyPalette] tint500];
[model setHeader:headerItem [model setHeader:headerItem
forSectionWithIdentifier:SectionIdentifierBlacklist]; forSectionWithIdentifier:SectionIdentifierBlacklist];
......
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