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

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

Issue 2108813002: Added strings of i18n and made the pin-keyboard work for rtl lang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebased. Created 4 years, 5 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"
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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 arraysize(localized_strings)); 748 arraysize(localized_strings));
747 } 749 }
748 750
749 void AddPeopleStrings(content::WebUIDataSource* html_source) { 751 void AddPeopleStrings(content::WebUIDataSource* html_source) {
750 LocalizedString localized_strings[] = { 752 LocalizedString localized_strings[] = {
751 {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, 753 {"peoplePageTitle", IDS_SETTINGS_PEOPLE},
752 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE}, 754 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE},
753 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS}, 755 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS},
754 #if defined(OS_CHROMEOS) 756 #if defined(OS_CHROMEOS)
755 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK}, 757 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK},
758 {"pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN},
759 {"pinKeyboardPlaceholderPinPassword",
760 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD},
761 {"pinKeyboardClear", IDS_PIN_KEYBOARD_CLEAR},
756 {"quickUnlockTitle", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_TITLE}, 762 {"quickUnlockTitle", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_TITLE},
757 {"quickUnlockConfirmLogin", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIRM_LOGIN}, 763 {"quickUnlockConfirmLogin", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIRM_LOGIN},
758 {"quickUnlockPasswordLabel", 764 {"quickUnlockPasswordLabel",
759 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL}, 765 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL},
760 {"quickUnlockInvalidPassword", 766 {"quickUnlockInvalidPassword",
761 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD}, 767 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD},
762 {"quickUnlockChooseUnlockMethod", 768 {"quickUnlockChooseUnlockMethod",
763 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD}, 769 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD},
764 {"quickUnlockUnlockMethodPassword", 770 {"quickUnlockUnlockMethodPassword",
765 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD}, 771 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD},
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, 857 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER},
852 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, 858 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE},
853 {"personalizeGoogleServicesTitle", 859 {"personalizeGoogleServicesTitle",
854 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, 860 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE},
855 {"personalizeGoogleServicesText", 861 {"personalizeGoogleServicesText",
856 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, 862 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT},
857 }; 863 };
858 AddLocalizedStringsBulk(html_source, localized_strings, 864 AddLocalizedStringsBulk(html_source, localized_strings,
859 arraysize(localized_strings)); 865 arraysize(localized_strings));
860 866
867 // Format numbers to be used on the pin keyboard.
868 for (int j = 0; j <= 9; j++) {
869 html_source->AddString("pinKeyboard" + base::IntToString(j),
870 base::FormatNumber(int64_t{j}));
871 }
872
861 html_source->AddString("autofillHelpURL", autofill::kHelpURL); 873 html_source->AddString("autofillHelpURL", autofill::kHelpURL);
862 html_source->AddString("supervisedUsersUrl", 874 html_source->AddString("supervisedUsersUrl",
863 chrome::kLegacySupervisedUserManagementURL); 875 chrome::kLegacySupervisedUserManagementURL);
864 std::string sync_dashboard_url = 876 std::string sync_dashboard_url =
865 google_util::AppendGoogleLocaleParam( 877 google_util::AppendGoogleLocaleParam(
866 GURL(chrome::kSyncGoogleDashboardURL), 878 GURL(chrome::kSyncGoogleDashboardURL),
867 g_browser_process->GetApplicationLocale()) 879 g_browser_process->GetApplicationLocale())
868 .spec(); 880 .spec();
869 html_source->AddString("syncDashboardUrl", sync_dashboard_url); 881 html_source->AddString("syncDashboardUrl", sync_dashboard_url);
870 html_source->AddString( 882 html_source->AddString(
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 #endif 1220 #endif
1209 AddUsersStrings(html_source); 1221 AddUsersStrings(html_source);
1210 AddWebContentStrings(html_source); 1222 AddWebContentStrings(html_source);
1211 1223
1212 policy_indicator::AddLocalizedStrings(html_source); 1224 policy_indicator::AddLocalizedStrings(html_source);
1213 1225
1214 html_source->SetJsonPath(kLocalizedStringsFile); 1226 html_source->SetJsonPath(kLocalizedStringsFile);
1215 } 1227 }
1216 1228
1217 } // namespace settings 1229 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698