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

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: Addressed comment Created 4 years, 1 month 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL}, 1067 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL},
1068 {"enablePaymentsIntegrationCheckboxLabel", 1068 {"enablePaymentsIntegrationCheckboxLabel",
1069 IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL}, 1069 IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL},
1070 {"manageSyncedDataTitle", IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE}, 1070 {"manageSyncedDataTitle", IDS_SETTINGS_MANAGE_SYNCED_DATA_TITLE},
1071 {"manageSyncedDataDescription", 1071 {"manageSyncedDataDescription",
1072 IDS_SETTINGS_MANAGE_SYNCED_DATA_DESCRIPTION}, 1072 IDS_SETTINGS_MANAGE_SYNCED_DATA_DESCRIPTION},
1073 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS}, 1073 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS},
1074 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT}, 1074 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT},
1075 {"encryptWithGoogleCredentialsLabel", 1075 {"encryptWithGoogleCredentialsLabel",
1076 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL}, 1076 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL},
1077 {"encryptWithSyncPassphraseLabel",
1078 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL},
1079 {"encryptWithSyncPassphraseLearnMoreLink",
1080 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK},
1081 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS}, 1077 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS},
1082 {"passphraseExplanationText", IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT},
1083 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR}, 1078 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR},
1084 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR}, 1079 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR},
1085 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR}, 1080 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR},
1086 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER}, 1081 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER},
1087 {"passphraseConfirmationPlaceholder", 1082 {"passphraseConfirmationPlaceholder",
1088 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, 1083 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER},
1089 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, 1084 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE},
1090 {"personalizeGoogleServicesTitle", 1085 {"personalizeGoogleServicesTitle",
1091 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, 1086 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE},
1092 {"personalizeGoogleServicesText", 1087 {"personalizeGoogleServicesText",
1093 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, 1088 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT},
1094 }; 1089 };
1095 AddLocalizedStringsBulk(html_source, localized_strings, 1090 AddLocalizedStringsBulk(html_source, localized_strings,
1096 arraysize(localized_strings)); 1091 arraysize(localized_strings));
1097 1092
1098 // Format numbers to be used on the pin keyboard. 1093 // Format numbers to be used on the pin keyboard.
1099 for (int j = 0; j <= 9; j++) { 1094 for (int j = 0; j <= 9; j++) {
1100 html_source->AddString("pinKeyboard" + base::IntToString(j), 1095 html_source->AddString("pinKeyboard" + base::IntToString(j),
1101 base::FormatNumber(int64_t{j})); 1096 base::FormatNumber(int64_t{j}));
1102 } 1097 }
1103 1098
1104 html_source->AddString("syncLearnMoreUrl", chrome::kSyncLearnMoreURL); 1099 html_source->AddString("syncLearnMoreUrl", chrome::kSyncLearnMoreURL);
1105 html_source->AddString("autofillHelpURL", autofill::kHelpURL); 1100 html_source->AddString("autofillHelpURL", autofill::kHelpURL);
1106 html_source->AddString("supervisedUsersUrl", 1101 html_source->AddString("supervisedUsersUrl",
1107 chrome::kLegacySupervisedUserManagementURL); 1102 chrome::kLegacySupervisedUserManagementURL);
1108 1103
1104 html_source->AddString(
1105 "encryptWithSyncPassphraseLabel",
1106 l10n_util::GetStringFUTF8(
1107 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL,
1108 base::ASCIIToUTF16(chrome::kSyncEncryptionHelpURL)));
1109
1109 std::string sync_dashboard_url = 1110 std::string sync_dashboard_url =
1110 google_util::AppendGoogleLocaleParam( 1111 google_util::AppendGoogleLocaleParam(
1111 GURL(chrome::kSyncGoogleDashboardURL), 1112 GURL(chrome::kSyncGoogleDashboardURL),
1112 g_browser_process->GetApplicationLocale()) 1113 g_browser_process->GetApplicationLocale())
1113 .spec(); 1114 .spec();
1114 html_source->AddString("syncDashboardUrl", sync_dashboard_url); 1115 html_source->AddString("syncDashboardUrl", sync_dashboard_url);
1116
1117 html_source->AddString(
1118 "passphraseExplanationText",
1119 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT,
1120 base::ASCIIToUTF16(sync_dashboard_url)));
1121 html_source->AddString(
1122 "passphraseResetHint",
1123 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RESET_HINT,
1124 base::ASCIIToUTF16(sync_dashboard_url)));
1115 html_source->AddString( 1125 html_source->AddString(
1116 "passphraseRecover", 1126 "passphraseRecover",
1117 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RECOVER, 1127 l10n_util::GetStringFUTF8(IDS_SETTINGS_PASSPHRASE_RECOVER,
1118 base::ASCIIToUTF16(sync_dashboard_url))); 1128 base::ASCIIToUTF16(sync_dashboard_url)));
1119 1129
1130 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL);
1131
1120 html_source->AddString("activityControlsUrl", 1132 html_source->AddString("activityControlsUrl",
1121 chrome::kGoogleAccountActivityControlsURL); 1133 chrome::kGoogleAccountActivityControlsURL);
1122 } 1134 }
1123 1135
1124 void AddPrintingStrings(content::WebUIDataSource* html_source) { 1136 void AddPrintingStrings(content::WebUIDataSource* html_source) {
1125 LocalizedString localized_strings[] = { 1137 LocalizedString localized_strings[] = {
1126 {"printingPageTitle", IDS_SETTINGS_PRINTING}, 1138 {"printingPageTitle", IDS_SETTINGS_PRINTING},
1127 {"printingCloudPrintLearnMoreLabel", 1139 {"printingCloudPrintLearnMoreLabel",
1128 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL}, 1140 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL},
1129 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL}, 1141 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL},
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 #endif 1748 #endif
1737 AddUsersStrings(html_source); 1749 AddUsersStrings(html_source);
1738 AddWebContentStrings(html_source); 1750 AddWebContentStrings(html_source);
1739 1751
1740 policy_indicator::AddLocalizedStrings(html_source); 1752 policy_indicator::AddLocalizedStrings(html_source);
1741 1753
1742 html_source->SetJsonPath(kLocalizedStringsFile); 1754 html_source->SetJsonPath(kLocalizedStringsFile);
1743 } 1755 }
1744 1756
1745 } // namespace settings 1757 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/sync_page.js ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698