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 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: Fixed patch set 1 errors. 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 {"quickUnlockPasswordLabel", 752 {"quickUnlockPasswordLabel",
751 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL}, 753 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL},
752 {"quickUnlockInvalidPassword", 754 {"quickUnlockInvalidPassword",
753 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD}, 755 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD},
754 {"quickUnlockChooseUnlockMethod", 756 {"quickUnlockChooseUnlockMethod",
755 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD}, 757 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD},
756 {"quickUnlockUnlockMethodPassword", 758 {"quickUnlockUnlockMethodPassword",
757 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD}, 759 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD},
758 {"quickUnlockUnlockMethodPinAndPassword", 760 {"quickUnlockUnlockMethodPinAndPassword",
759 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PIN_AND_PASSWORD}, 761 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PIN_AND_PASSWORD},
762 {"pinKeyboardPlaceholder",
763 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_ENTER_PIN_OR_PASSWORD_PLACEHOLDER},
764 {"pinKeyboardClear", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PIN_KEYBOARD_CLEAR},
760 {"quickUnlockUnlockMethodNone", 765 {"quickUnlockUnlockMethodNone",
761 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_NONE}, 766 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_NONE},
762 {"quickUnlockConfigurePinButton", 767 {"quickUnlockConfigurePinButton",
763 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_BUTTON}, 768 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_BUTTON},
764 {"quickUnlockConfigurePinChoosePinTitle", 769 {"quickUnlockConfigurePinChoosePinTitle",
765 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_TITLE}, 770 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_TITLE},
766 {"quickUnlockConfigurePinChoosePinWeakPinWarning", 771 {"quickUnlockConfigurePinChoosePinWeakPinWarning",
767 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_WEAK_PIN_WARNING} , 772 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_WEAK_PIN_WARNING} ,
768 {"quickUnlockConfigurePinContinueButton", 773 {"quickUnlockConfigurePinContinueButton",
769 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CONTINUE_BUTTON}, 774 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CONTINUE_BUTTON},
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, 845 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER},
841 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, 846 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE},
842 {"personalizeGoogleServicesTitle", 847 {"personalizeGoogleServicesTitle",
843 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, 848 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE},
844 {"personalizeGoogleServicesText", 849 {"personalizeGoogleServicesText",
845 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, 850 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT},
846 }; 851 };
847 AddLocalizedStringsBulk(html_source, localized_strings, 852 AddLocalizedStringsBulk(html_source, localized_strings,
848 arraysize(localized_strings)); 853 arraysize(localized_strings));
849 854
855 // Format numbers to be used on the pin keyboard.
856 for (int j = 0; j <= 9; j++) {
857 html_source->AddString("pinKeyboard" + base::IntToString(j),
858 base::FormatNumber(int64_t{j}));
859 }
860
850 html_source->AddString("autofillHelpURL", autofill::kHelpURL); 861 html_source->AddString("autofillHelpURL", autofill::kHelpURL);
851 html_source->AddString("supervisedUsersUrl", 862 html_source->AddString("supervisedUsersUrl",
852 chrome::kLegacySupervisedUserManagementURL); 863 chrome::kLegacySupervisedUserManagementURL);
853 std::string sync_dashboard_url = 864 std::string sync_dashboard_url =
854 google_util::AppendGoogleLocaleParam( 865 google_util::AppendGoogleLocaleParam(
855 GURL(chrome::kSyncGoogleDashboardURL), 866 GURL(chrome::kSyncGoogleDashboardURL),
856 g_browser_process->GetApplicationLocale()) 867 g_browser_process->GetApplicationLocale())
857 .spec(); 868 .spec();
858 html_source->AddString("syncDashboardUrl", sync_dashboard_url); 869 html_source->AddString("syncDashboardUrl", sync_dashboard_url);
859 html_source->AddString( 870 html_source->AddString(
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 #endif 1212 #endif
1202 AddUsersStrings(html_source); 1213 AddUsersStrings(html_source);
1203 AddWebContentStrings(html_source); 1214 AddWebContentStrings(html_source);
1204 1215
1205 policy_indicator::AddLocalizedStrings(html_source); 1216 policy_indicator::AddLocalizedStrings(html_source);
1206 1217
1207 html_source->SetJsonPath(kLocalizedStringsFile); 1218 html_source->SetJsonPath(kLocalizedStringsFile);
1208 } 1219 }
1209 1220
1210 } // namespace settings 1221 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698