Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2441503002: [MD Settings][People] Visual updates to the sync setup page. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL}, 1064 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL},
1065 {"enablePaymentsIntegrationCheckboxLabel", 1065 {"enablePaymentsIntegrationCheckboxLabel",
1066 IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL}, 1066 IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL},
1067 {"manageSyncedDataTitle", IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE}, 1067 {"manageSyncedDataTitle", IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE},
1068 {"manageSyncedDataDescription", 1068 {"manageSyncedDataDescription",
1069 IDS_SETTINGS_MANAGE_SYNCED_DATA_DESCRIPTION}, 1069 IDS_SETTINGS_MANAGE_SYNCED_DATA_DESCRIPTION},
1070 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS}, 1070 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS},
1071 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT}, 1071 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT},
1072 {"encryptWithGoogleCredentialsLabel", 1072 {"encryptWithGoogleCredentialsLabel",
1073 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL}, 1073 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL},
1074 {"encryptWithSyncPassphraseLabel",
1075 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL},
1076 {"encryptWithSyncPassphraseLearnMoreLink",
1077 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK},
1078 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS}, 1074 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS},
1079 {"passphraseExplanationText", IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT},
1080 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR}, 1075 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR},
1081 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR}, 1076 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR},
1082 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR}, 1077 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR},
1083 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER}, 1078 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER},
1084 {"passphraseConfirmationPlaceholder", 1079 {"passphraseConfirmationPlaceholder",
1085 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, 1080 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER},
1086 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, 1081 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE},
1087 {"personalizeGoogleServicesTitle", 1082 {"personalizeGoogleServicesTitle",
1088 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, 1083 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE},
1089 {"personalizeGoogleServicesText", 1084 {"personalizeGoogleServicesText",
1090 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, 1085 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT},
1091 }; 1086 };
1092 AddLocalizedStringsBulk(html_source, localized_strings, 1087 AddLocalizedStringsBulk(html_source, localized_strings,
1093 arraysize(localized_strings)); 1088 arraysize(localized_strings));
1094 1089
1095 // Format numbers to be used on the pin keyboard. 1090 // Format numbers to be used on the pin keyboard.
1096 for (int j = 0; j <= 9; j++) { 1091 for (int j = 0; j <= 9; j++) {
1097 html_source->AddString("pinKeyboard" + base::IntToString(j), 1092 html_source->AddString("pinKeyboard" + base::IntToString(j),
1098 base::FormatNumber(int64_t{j})); 1093 base::FormatNumber(int64_t{j}));
1099 } 1094 }
1100 1095
1101 html_source->AddString("syncLearnMoreUrl", chrome::kSyncLearnMoreURL); 1096 html_source->AddString("syncLearnMoreUrl", chrome::kSyncLearnMoreURL);
1102 html_source->AddString("autofillHelpURL", autofill::kHelpURL); 1097 html_source->AddString("autofillHelpURL", autofill::kHelpURL);
1103 html_source->AddString("supervisedUsersUrl", 1098 html_source->AddString("supervisedUsersUrl",
1104 chrome::kLegacySupervisedUserManagementURL); 1099 chrome::kLegacySupervisedUserManagementURL);
1105 1100
1101 html_source->AddString(
1102 "encryptWithSyncPassphraseLabel",
1103 l10n_util::GetStringFUTF8(
1104 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL,
1105 base::ASCIIToUTF16(chrome::kSyncEncryptionHelpURL)));
1106
1106 std::string sync_dashboard_url = 1107 std::string sync_dashboard_url =
1107 google_util::AppendGoogleLocaleParam( 1108 google_util::AppendGoogleLocaleParam(
1108 GURL(chrome::kSyncGoogleDashboardURL), 1109 GURL(chrome::kSyncGoogleDashboardURL),
1109 g_browser_process->GetApplicationLocale()) 1110 g_browser_process->GetApplicationLocale())
1110 .spec(); 1111 .spec();
1111 html_source->AddString("syncDashboardUrl", sync_dashboard_url); 1112 html_source->AddString("syncDashboardUrl", sync_dashboard_url);
1113
1114 html_source->AddString(
1115 "passphraseExplanationText",
1116 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT,
1117 base::ASCIIToUTF16(sync_dashboard_url)));
1118 html_source->AddString(
1119 "passphraseResetHint",
1120 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RESET_HINT,
1121 base::ASCIIToUTF16(sync_dashboard_url)));
1112 html_source->AddString( 1122 html_source->AddString(
1113 "passphraseRecover", 1123 "passphraseRecover",
1114 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RECOVER, 1124 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RECOVER,
1115 base::ASCIIToUTF16(sync_dashboard_url))); 1125 base::ASCIIToUTF16(sync_dashboard_url)));
1116 1126
1127 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL);
1128
1117 html_source->AddString("activityControlsUrl", 1129 html_source->AddString("activityControlsUrl",
1118 chrome::kGoogleAccountActivityControlsURL); 1130 chrome::kGoogleAccountActivityControlsURL);
1119 } 1131 }
1120 1132
1121 void AddPrintingStrings(content::WebUIDataSource* html_source) { 1133 void AddPrintingStrings(content::WebUIDataSource* html_source) {
1122 LocalizedString localized_strings[] = { 1134 LocalizedString localized_strings[] = {
1123 {"printingPageTitle", IDS_SETTINGS_PRINTING}, 1135 {"printingPageTitle", IDS_SETTINGS_PRINTING},
1124 {"printingCloudPrintLearnMoreLabel", 1136 {"printingCloudPrintLearnMoreLabel",
1125 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL}, 1137 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL},
1126 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL}, 1138 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL},
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 #endif 1747 #endif
1736 AddUsersStrings(html_source); 1748 AddUsersStrings(html_source);
1737 AddWebContentStrings(html_source); 1749 AddWebContentStrings(html_source);
1738 1750
1739 policy_indicator::AddLocalizedStrings(html_source); 1751 policy_indicator::AddLocalizedStrings(html_source);
1740 1752
1741 html_source->SetJsonPath(kLocalizedStringsFile); 1753 html_source->SetJsonPath(kLocalizedStringsFile);
1742 } 1754 }
1743 1755
1744 } // namespace settings 1756 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698