Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" | |
| 11 #include "base/strings/string_number_conversions.h" | |
| 10 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 11 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 12 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" | 16 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" |
| 15 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 16 #include "chrome/grit/chromium_strings.h" | 18 #include "chrome/grit/chromium_strings.h" |
| 17 #include "chrome/grit/generated_resources.h" | 19 #include "chrome/grit/generated_resources.h" |
| 18 #include "chrome/grit/google_chrome_strings.h" | 20 #include "chrome/grit/google_chrome_strings.h" |
| 19 #include "chrome/grit/locale_settings.h" | 21 #include "chrome/grit/locale_settings.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 738 arraysize(localized_strings)); | 740 arraysize(localized_strings)); |
| 739 } | 741 } |
| 740 | 742 |
| 741 void AddPeopleStrings(content::WebUIDataSource* html_source) { | 743 void AddPeopleStrings(content::WebUIDataSource* html_source) { |
| 742 LocalizedString localized_strings[] = { | 744 LocalizedString localized_strings[] = { |
| 743 {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, | 745 {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, |
| 744 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE}, | 746 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE}, |
| 745 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS}, | 747 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS}, |
| 746 #if defined(OS_CHROMEOS) | 748 #if defined(OS_CHROMEOS) |
| 747 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK}, | 749 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK}, |
| 750 {"pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN}, | |
|
jdufault
2016/06/28 23:06:10
Also export pinKeyboardPlaceholderPinKeyboard
sammiequon
2016/06/29 19:44:08
Done.
| |
| 751 {"pinKeyboardClear", IDS_PIN_KEYBOARD_CLEAR}, | |
| 748 {"quickUnlockTitle", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_TITLE}, | 752 {"quickUnlockTitle", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_TITLE}, |
| 749 {"quickUnlockConfirmLogin", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIRM_LOGIN}, | 753 {"quickUnlockConfirmLogin", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIRM_LOGIN}, |
| 750 {"quickUnlockPasswordLabel", | 754 {"quickUnlockPasswordLabel", |
| 751 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL}, | 755 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL}, |
| 752 {"quickUnlockInvalidPassword", | 756 {"quickUnlockInvalidPassword", |
| 753 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD}, | 757 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD}, |
| 754 {"quickUnlockChooseUnlockMethod", | 758 {"quickUnlockChooseUnlockMethod", |
| 755 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD}, | 759 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD}, |
| 756 {"quickUnlockUnlockMethodPassword", | 760 {"quickUnlockUnlockMethodPassword", |
| 757 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD}, | 761 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD}, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, | 844 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, |
| 841 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, | 845 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, |
| 842 {"personalizeGoogleServicesTitle", | 846 {"personalizeGoogleServicesTitle", |
| 843 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, | 847 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, |
| 844 {"personalizeGoogleServicesText", | 848 {"personalizeGoogleServicesText", |
| 845 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, | 849 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, |
| 846 }; | 850 }; |
| 847 AddLocalizedStringsBulk(html_source, localized_strings, | 851 AddLocalizedStringsBulk(html_source, localized_strings, |
| 848 arraysize(localized_strings)); | 852 arraysize(localized_strings)); |
| 849 | 853 |
| 854 // Format numbers to be used on the pin keyboard. | |
| 855 for (int j = 0; j <= 9; j++) { | |
| 856 html_source->AddString("pinKeyboard" + base::IntToString(j), | |
| 857 base::FormatNumber(int64_t{j})); | |
| 858 } | |
| 859 | |
| 850 html_source->AddString("autofillHelpURL", autofill::kHelpURL); | 860 html_source->AddString("autofillHelpURL", autofill::kHelpURL); |
| 851 html_source->AddString("supervisedUsersUrl", | 861 html_source->AddString("supervisedUsersUrl", |
| 852 chrome::kLegacySupervisedUserManagementURL); | 862 chrome::kLegacySupervisedUserManagementURL); |
| 853 std::string sync_dashboard_url = | 863 std::string sync_dashboard_url = |
| 854 google_util::AppendGoogleLocaleParam( | 864 google_util::AppendGoogleLocaleParam( |
| 855 GURL(chrome::kSyncGoogleDashboardURL), | 865 GURL(chrome::kSyncGoogleDashboardURL), |
| 856 g_browser_process->GetApplicationLocale()) | 866 g_browser_process->GetApplicationLocale()) |
| 857 .spec(); | 867 .spec(); |
| 858 html_source->AddString("syncDashboardUrl", sync_dashboard_url); | 868 html_source->AddString("syncDashboardUrl", sync_dashboard_url); |
| 859 html_source->AddString( | 869 html_source->AddString( |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1201 #endif | 1211 #endif |
| 1202 AddUsersStrings(html_source); | 1212 AddUsersStrings(html_source); |
| 1203 AddWebContentStrings(html_source); | 1213 AddWebContentStrings(html_source); |
| 1204 | 1214 |
| 1205 policy_indicator::AddLocalizedStrings(html_source); | 1215 policy_indicator::AddLocalizedStrings(html_source); |
| 1206 | 1216 |
| 1207 html_source->SetJsonPath(kLocalizedStringsFile); | 1217 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1208 } | 1218 } |
| 1209 | 1219 |
| 1210 } // namespace settings | 1220 } // namespace settings |
| OLD | NEW |