Commit 86055195 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

[AF][IOS] Use same title for the Google Pay toggle on Desktop and iOS

iOS: https://drive.google.com/file/d/198YXGP4TW8VcZ-scZy6jf-8GPHLRQc2U/view?usp=sharing
Desktop: https://drive.google.com/file/d/1ouJGiWYjg-IfIaMdxKPXGh1sN3EDrYxQ/view?usp=sharing

Bug: 855088
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I92786a9aa33e228297352b9dfaf5730b00daf629
Reviewed-on: https://chromium-review.googlesource.com/1155484
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579492}
parent c69baee6
...@@ -3568,13 +3568,10 @@ ...@@ -3568,13 +3568,10 @@
<message name="IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL" desc="Label for the checkbox which enables or disables syncing passwords between multiple browser instances."> <message name="IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL" desc="Label for the checkbox which enables or disables syncing passwords between multiple browser instances.">
Passwords Passwords
</message> </message>
<!-- TODO(https://crbug.com/854562): Remove this string once Autofill Home is fully launched. -->
<message name="IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL" desc="Label for the checkbox that controls the Autofill/Payments integration feature."> <message name="IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL" desc="Label for the checkbox that controls the Autofill/Payments integration feature.">
Credit cards and addresses using Google Pay. Credit cards and addresses using Google Pay.
</message> </message>
<!-- TODO(https://crbug.com/854562): Rename this to "IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL" once Autofill Home is fully launched. -->
<message name="IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL_AUTOFILL_HOME" desc="Label for the checkbox that controls the Autofill/Payments integration feature used for Autofill Home.">
Payment methods and addresses using Google Pay.
</message>
<message name="IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL" desc="Label for the checkbox which enables or disables syncing open tabs between multiple browser instances."> <message name="IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL" desc="Label for the checkbox which enables or disables syncing open tabs between multiple browser instances.">
Open Tabs Open Tabs
</message> </message>
......
...@@ -1697,12 +1697,12 @@ void AddPeopleStrings(content::WebUIDataSource* html_source, Profile* profile) { ...@@ -1697,12 +1697,12 @@ void AddPeopleStrings(content::WebUIDataSource* html_source, Profile* profile) {
AddLocalizedStringsBulk(html_source, localized_strings, AddLocalizedStringsBulk(html_source, localized_strings,
arraysize(localized_strings)); arraysize(localized_strings));
// TODO(https://crbug.com/854562): Integrate these strings into the
// |localized_strings| array once Autofill Home is fully launched.
if (base::FeatureList::IsEnabled(password_manager::features::kAutofillHome)) { if (base::FeatureList::IsEnabled(password_manager::features::kAutofillHome)) {
// TODO(https://crbug.com/854562): Integrate this string into the
// |localized_strings| array once Autofill Home is fully launched.
html_source->AddLocalizedString( html_source->AddLocalizedString(
"enablePaymentsIntegrationCheckboxLabel", "enablePaymentsIntegrationCheckboxLabel",
IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL_AUTOFILL_HOME); IDS_AUTOFILL_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL);
} else { } else {
html_source->AddLocalizedString( html_source->AddLocalizedString(
"enablePaymentsIntegrationCheckboxLabel", "enablePaymentsIntegrationCheckboxLabel",
......
...@@ -390,6 +390,18 @@ ...@@ -390,6 +390,18 @@
</message> </message>
<!-- Autofill/Wallet integration preferences --> <!-- Autofill/Wallet integration preferences -->
<if expr="not is_ios">
<then>
<message name="IDS_AUTOFILL_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL" desc="Label for the checkbox that controls the Autofill/Payments integration feature used for Autofill Home. 'Google Pay' should not be translated as it is the product name. Sentence-Cased.">
Payment methods and addresses using Google Pay
</message>
</then>
<else>
<message name="IDS_AUTOFILL_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL" desc="Label for the checkbox that controls the Autofill/Payments integration feature used for Autofill Home. 'Google Pay' should not be translated as it is the product name. Title-Cased.">
Payment Methods and Addresses Using Google Pay
</message>
</else>
</if>
<message name="IDS_AUTOFILL_WALLET_MANAGEMENT_LINK_TEXT" desc="Text for link that allows users to see and edit their Wallet information." formatter_data="android_java"> <message name="IDS_AUTOFILL_WALLET_MANAGEMENT_LINK_TEXT" desc="Text for link that allows users to see and edit their Wallet information." formatter_data="android_java">
Edit Edit
</message> </message>
......
...@@ -297,9 +297,6 @@ locale. The strings in this file are specific to iOS. ...@@ -297,9 +297,6 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_AUTOFILL_STATE" desc="Title of the field of a profile address representing the state/county/district/oblast of the address. [Length: 15em] [iOS only]"> <message name="IDS_IOS_AUTOFILL_STATE" desc="Title of the field of a profile address representing the state/county/district/oblast of the address. [Length: 15em] [iOS only]">
State / County State / County
</message> </message>
<message name="IDS_IOS_AUTOFILL_USE_WALLET_DATA" desc="The text for the checkbox that controls the Autofill/Google Pay integration feature. 'Google Pay' should not be translated as it is the product name. [Length: 50em] [iOS only]">
Show addresses and credit cards from Google Pay
</message>
<message name="IDS_IOS_AUTOFILL_WALLET_SERVER_NAME" desc="The name of the data source for non-local card and address info. Title case. 'Google Pay' should not be translated as it is the product name. [Length: 15em] [iOS only]"> <message name="IDS_IOS_AUTOFILL_WALLET_SERVER_NAME" desc="The name of the data source for non-local card and address info. Title case. 'Google Pay' should not be translated as it is the product name. [Length: 15em] [iOS only]">
Google Pay Google Pay
</message> </message>
......
...@@ -417,10 +417,11 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -417,10 +417,11 @@ typedef NS_ENUM(NSInteger, ItemType) {
} }
- (CollectionViewItem*)switchItemForAutofillWalletImport { - (CollectionViewItem*)switchItemForAutofillWalletImport {
NSString* title = l10n_util::GetNSString(
IDS_AUTOFILL_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL);
SyncSwitchItem* autofillWalletImportItem = SyncSwitchItem* autofillWalletImportItem =
[self switchItemWithType:ItemTypeAutofillWalletImport [self switchItemWithType:ItemTypeAutofillWalletImport
title:l10n_util::GetNSString( title:title
IDS_IOS_AUTOFILL_USE_WALLET_DATA)
subTitle:nil]; subTitle:nil];
autofillWalletImportItem.on = [self isAutofillWalletImportOn]; autofillWalletImportItem.on = [self isAutofillWalletImportOn];
autofillWalletImportItem.enabled = [self isAutofillWalletImportItemEnabled]; autofillWalletImportItem.enabled = [self isAutofillWalletImportItemEnabled];
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "components/autofill/core/common/autofill_pref_names.h" #include "components/autofill/core/common/autofill_pref_names.h"
#include "components/browser_sync/profile_sync_service_mock.h" #include "components/browser_sync/profile_sync_service_mock.h"
#include "components/google/core/common/google_util.h" #include "components/google/core/common/google_util.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync_preferences/pref_service_mock_factory.h" #include "components/sync_preferences/pref_service_mock_factory.h"
#include "components/sync_preferences/pref_service_syncable.h" #include "components/sync_preferences/pref_service_syncable.h"
#include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/application_context.h"
...@@ -277,8 +278,9 @@ TEST_F(SyncSettingsCollectionViewControllerTest, TestModel) { ...@@ -277,8 +278,9 @@ TEST_F(SyncSettingsCollectionViewControllerTest, TestModel) {
} }
SyncSwitchItem* autofillWalletImportItem = GetCollectionViewItem(1, item); SyncSwitchItem* autofillWalletImportItem = GetCollectionViewItem(1, item);
EXPECT_NSEQ(autofillWalletImportItem.text, NSString* title = l10n_util::GetNSString(
l10n_util::GetNSString(IDS_IOS_AUTOFILL_USE_WALLET_DATA)); IDS_AUTOFILL_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL);
EXPECT_NSEQ(autofillWalletImportItem.text, title);
TextAndErrorItem* encryptionItem = GetCollectionViewItem(2, 0); TextAndErrorItem* encryptionItem = GetCollectionViewItem(2, 0);
EXPECT_NSEQ(encryptionItem.text, EXPECT_NSEQ(encryptionItem.text,
......
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