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" | 10 #include "base/i18n/number_formatting.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 for (size_t i = 0; i < num_strings; i++) { | 56 for (size_t i = 0; i < num_strings; i++) { |
57 html_source->AddLocalizedString(localized_strings[i].name, | 57 html_source->AddLocalizedString(localized_strings[i].name, |
58 localized_strings[i].id); | 58 localized_strings[i].id); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) { | 62 void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) { |
63 LocalizedString localized_strings[] = { | 63 LocalizedString localized_strings[] = { |
64 {"add", IDS_ADD}, | 64 {"add", IDS_ADD}, |
65 {"cancel", IDS_CANCEL}, | 65 {"cancel", IDS_CANCEL}, |
| 66 {"confirm", IDS_CONFIRM}, |
66 {"disable", IDS_DISABLE}, | 67 {"disable", IDS_DISABLE}, |
67 {"learnMore", IDS_LEARN_MORE}, | 68 {"learnMore", IDS_LEARN_MORE}, |
68 {"ok", IDS_OK}, | 69 {"ok", IDS_OK}, |
69 {"save", IDS_SAVE}, | 70 {"save", IDS_SAVE}, |
70 {"advancedPageTitle", IDS_SETTINGS_ADVANCED}, | 71 {"advancedPageTitle", IDS_SETTINGS_ADVANCED}, |
71 {"basicPageTitle", IDS_SETTINGS_BASIC}, | 72 {"basicPageTitle", IDS_SETTINGS_BASIC}, |
72 {"settings", IDS_SETTINGS_SETTINGS}, | 73 {"settings", IDS_SETTINGS_SETTINGS}, |
73 {"restart", IDS_SETTINGS_RESTART}, | 74 {"restart", IDS_SETTINGS_RESTART}, |
74 }; | 75 }; |
75 AddLocalizedStringsBulk(html_source, localized_strings, | 76 AddLocalizedStringsBulk(html_source, localized_strings, |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 AddLocalizedStringsBulk(html_source, localized_strings, | 836 AddLocalizedStringsBulk(html_source, localized_strings, |
836 arraysize(localized_strings)); | 837 arraysize(localized_strings)); |
837 } | 838 } |
838 | 839 |
839 void AddPeopleStrings(content::WebUIDataSource* html_source) { | 840 void AddPeopleStrings(content::WebUIDataSource* html_source) { |
840 LocalizedString localized_strings[] = { | 841 LocalizedString localized_strings[] = { |
841 {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, | 842 {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, |
842 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE}, | 843 {"manageOtherPeople", IDS_SETTINGS_PEOPLE_MANAGE_OTHER_PEOPLE}, |
843 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS}, | 844 {"manageSupervisedUsers", IDS_SETTINGS_PEOPLE_MANAGE_SUPERVISED_USERS}, |
844 #if defined(OS_CHROMEOS) | 845 #if defined(OS_CHROMEOS) |
| 846 {"configurePinChoosePinTitle", |
| 847 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CHOOSE_PIN_TITLE}, |
| 848 {"configurePinConfirmPinTitle", |
| 849 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONFIRM_PIN_TITLE}, |
| 850 {"configurePinContinueButton", |
| 851 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONTINUE_BUTTON}, |
| 852 {"configurePinMismatched", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_MISMATCHED}, |
| 853 {"configurePinTooShort", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_TOO_SHORT}, |
| 854 {"configurePinWeakPin", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_WEAK_PIN}, |
845 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK}, | 855 {"enableScreenlock", IDS_SETTINGS_PEOPLE_ENABLE_SCREENLOCK}, |
| 856 {"lockScreenChangePinButton", |
| 857 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CHANGE_PIN_BUTTON}, |
| 858 {"lockScreenNone", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NONE}, |
| 859 {"lockScreenPasswordOnly", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PASSWORD_ONLY}, |
| 860 {"lockScreenPinOrPassword", |
| 861 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PIN_OR_PASSWORD}, |
| 862 {"lockScreenSetupPinButton", |
| 863 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_SETUP_PIN_BUTTON}, |
| 864 {"lockScreenTitle", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_TITLE}, |
| 865 {"passwordPromptEnterPassword", |
| 866 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_ENTER_PASSWORD}, |
| 867 {"passwordPromptInvalidPassword", |
| 868 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_INVALID_PASSWORD}, |
| 869 {"passwordPromptPasswordLabel", |
| 870 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_PASSWORD_LABEL}, |
| 871 {"passwordPromptTitle", IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_TITLE}, |
846 {"pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN}, | 872 {"pinKeyboardPlaceholderPin", IDS_PIN_KEYBOARD_HINT_TEXT_PIN}, |
847 {"pinKeyboardPlaceholderPinPassword", | 873 {"pinKeyboardPlaceholderPinPassword", |
848 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD}, | 874 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD}, |
849 {"pinKeyboardClear", IDS_PIN_KEYBOARD_CLEAR}, | 875 {"pinKeyboardClear", IDS_PIN_KEYBOARD_CLEAR}, |
850 {"quickUnlockTitle", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_TITLE}, | |
851 {"quickUnlockConfirmLogin", IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIRM_LOGIN}, | |
852 {"quickUnlockPasswordLabel", | |
853 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_PASSWORD_LABEL}, | |
854 {"quickUnlockInvalidPassword", | |
855 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_INVALID_PASSWORD}, | |
856 {"quickUnlockChooseUnlockMethod", | |
857 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CHOOSE_UNLOCK_METHOD}, | |
858 {"quickUnlockUnlockMethodPassword", | |
859 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PASSWORD}, | |
860 {"quickUnlockUnlockMethodPinAndPassword", | |
861 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_PIN_AND_PASSWORD}, | |
862 {"quickUnlockUnlockMethodNone", | |
863 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_UNLOCK_METHOD_NONE}, | |
864 {"quickUnlockConfigurePinButton", | |
865 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_BUTTON}, | |
866 {"quickUnlockConfigurePinChoosePinTitle", | |
867 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_TITLE}, | |
868 {"quickUnlockConfigurePinChoosePinWeakPinWarning", | |
869 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_WEAK_PIN_WARNING}
, | |
870 {"quickUnlockConfigurePinChoosePinTooShort", | |
871 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CHOOSE_PIN_TOO_SHORT}, | |
872 {"quickUnlockConfigurePinContinueButton", | |
873 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CONTINUE_BUTTON}, | |
874 {"quickUnlockConfigurePinConfirmPinTitle", | |
875 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_CONFIRM_PIN_TITLE}, | |
876 {"quickUnlockConfigurePinMismatchedPins", | |
877 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_MISMATCHED_PINS}, | |
878 {"quickUnlockConfigurePinBackButton", | |
879 IDS_SETTINGS_PEOPLE_QUICK_UNLOCK_CONFIGURE_PIN_BACK_BUTTON}, | |
880 {"changePictureTitle", IDS_SETTINGS_CHANGE_PICTURE_DIALOG_TITLE}, | 876 {"changePictureTitle", IDS_SETTINGS_CHANGE_PICTURE_DIALOG_TITLE}, |
881 {"changePicturePageDescription", IDS_SETTINGS_CHANGE_PICTURE_DIALOG_TEXT}, | 877 {"changePicturePageDescription", IDS_SETTINGS_CHANGE_PICTURE_DIALOG_TEXT}, |
882 {"takePhoto", IDS_SETTINGS_CHANGE_PICTURE_TAKE_PHOTO}, | 878 {"takePhoto", IDS_SETTINGS_CHANGE_PICTURE_TAKE_PHOTO}, |
883 {"discardPhoto", IDS_SETTINGS_CHANGE_PICTURE_DISCARD_PHOTO}, | 879 {"discardPhoto", IDS_SETTINGS_CHANGE_PICTURE_DISCARD_PHOTO}, |
884 {"flipPhoto", IDS_SETTINGS_CHANGE_PICTURE_FLIP_PHOTO}, | 880 {"flipPhoto", IDS_SETTINGS_CHANGE_PICTURE_FLIP_PHOTO}, |
885 {"chooseFile", IDS_SETTINGS_CHANGE_PICTURE_CHOOSE_FILE}, | 881 {"chooseFile", IDS_SETTINGS_CHANGE_PICTURE_CHOOSE_FILE}, |
886 {"profilePhoto", IDS_SETTINGS_CHANGE_PICTURE_PROFILE_PHOTO}, | 882 {"profilePhoto", IDS_SETTINGS_CHANGE_PICTURE_PROFILE_PHOTO}, |
887 {"oldPhoto", IDS_SETTINGS_CHANGE_PICTURE_OLD_PHOTO}, | 883 {"oldPhoto", IDS_SETTINGS_CHANGE_PICTURE_OLD_PHOTO}, |
888 {"profilePhotoLoading", IDS_SETTINGS_CHANGE_PICTURE_PROFILE_LOADING_PHOTO}, | 884 {"profilePhotoLoading", IDS_SETTINGS_CHANGE_PICTURE_PROFILE_LOADING_PHOTO}, |
889 {"previewAltText", IDS_SETTINGS_CHANGE_PICTURE_PREVIEW_ALT}, | 885 {"previewAltText", IDS_SETTINGS_CHANGE_PICTURE_PREVIEW_ALT}, |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 #endif | 1422 #endif |
1427 AddUsersStrings(html_source); | 1423 AddUsersStrings(html_source); |
1428 AddWebContentStrings(html_source); | 1424 AddWebContentStrings(html_source); |
1429 | 1425 |
1430 policy_indicator::AddLocalizedStrings(html_source); | 1426 policy_indicator::AddLocalizedStrings(html_source); |
1431 | 1427 |
1432 html_source->SetJsonPath(kLocalizedStringsFile); | 1428 html_source->SetJsonPath(kLocalizedStringsFile); |
1433 } | 1429 } |
1434 | 1430 |
1435 } // namespace settings | 1431 } // namespace settings |
OLD | NEW |