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

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

Issue 2500653002: MD Settings: Add import data dialog. (Closed)
Patch Set: Fix bad merge 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
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 html_source->AddString("resetProfileBannerLearnMoreUrl", 669 html_source->AddString("resetProfileBannerLearnMoreUrl",
670 chrome::kAutomaticSettingsResetLearnMoreURL); 670 chrome::kAutomaticSettingsResetLearnMoreURL);
671 #if defined(OS_CHROMEOS) 671 #if defined(OS_CHROMEOS)
672 html_source->AddString( 672 html_source->AddString(
673 "powerwashDescription", 673 "powerwashDescription",
674 l10n_util::GetStringFUTF16(IDS_OPTIONS_FACTORY_RESET_DESCRIPTION, 674 l10n_util::GetStringFUTF16(IDS_OPTIONS_FACTORY_RESET_DESCRIPTION,
675 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 675 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
676 #endif 676 #endif
677 } 677 }
678 678
679 #if !defined(OS_CHROMEOS)
680 void AddImportDataStrings(content::WebUIDataSource* html_source) {
681 LocalizedString localized_strings[] = {
682 {"importTitle", IDS_SETTINGS_IMPORT_SETTINGS_TITLE},
683 {"importFromLabel", IDS_SETTINGS_IMPORT_FROM_LABEL},
684 {"importDescription", IDS_SETTINGS_IMPORT_ITEMS_LABEL},
685 {"importLoading", IDS_SETTINGS_IMPORT_LOADING_PROFILES},
686 {"importHistory", IDS_SETTINGS_IMPORT_HISTORY_CHECKBOX},
687 {"importFavorites", IDS_SETTINGS_IMPORT_FAVORITES_CHECKBOX},
688 {"importPasswords", IDS_SETTINGS_IMPORT_PASSWORDS_CHECKBOX},
689 {"importSearch", IDS_SETTINGS_IMPORT_SEARCH_ENGINES_CHECKBOX},
690 {"importAutofillFormData", IDS_SETTINGS_IMPORT_AUTOFILL_FORM_DATA_CHECKBOX},
691 {"importSucceeded", IDS_SETTINGS_IMPORT_SUCCEEDED},
692 {"importChooseFile", IDS_SETTINGS_IMPORT_CHOOSE_FILE},
693 {"importCommit", IDS_SETTINGS_IMPORT_COMMIT},
694 {"noProfileFound", IDS_SETTINGS_IMPORT_NO_PROFILE_FOUND},
695 {"findYourImportedBookmarks", IDS_SETTINGS_IMPORT_FIND_YOUR_BOOKMARKS},
696 };
697 AddLocalizedStringsBulk(html_source, localized_strings,
698 arraysize(localized_strings));
699 }
700 #endif
701
679 #if defined(OS_CHROMEOS) 702 #if defined(OS_CHROMEOS)
680 void AddDateTimeStrings(content::WebUIDataSource* html_source) { 703 void AddDateTimeStrings(content::WebUIDataSource* html_source) {
681 LocalizedString localized_strings[] = { 704 LocalizedString localized_strings[] = {
682 {"dateTimePageTitle", IDS_SETTINGS_DATE_TIME}, 705 {"dateTimePageTitle", IDS_SETTINGS_DATE_TIME},
683 {"timeZone", IDS_SETTINGS_TIME_ZONE}, 706 {"timeZone", IDS_SETTINGS_TIME_ZONE},
684 {"timeZoneGeolocation", IDS_SETTINGS_TIME_ZONE_GEOLOCATION}, 707 {"timeZoneGeolocation", IDS_SETTINGS_TIME_ZONE_GEOLOCATION},
685 {"use24HourClock", IDS_SETTINGS_USE_24_HOUR_CLOCK}, 708 {"use24HourClock", IDS_SETTINGS_USE_24_HOUR_CLOCK},
686 {"setDateTime", IDS_SETTINGS_SET_DATE_TIME}, 709 {"setDateTime", IDS_SETTINGS_SET_DATE_TIME},
687 }; 710 };
688 AddLocalizedStringsBulk(html_source, localized_strings, 711 AddLocalizedStringsBulk(html_source, localized_strings,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 device_name)); 751 device_name));
729 html_source->AddString( 752 html_source->AddString(
730 "easyUnlockRequireProximityLabel", 753 "easyUnlockRequireProximityLabel",
731 l10n_util::GetStringFUTF16( 754 l10n_util::GetStringFUTF16(
732 IDS_SETTINGS_EASY_UNLOCK_REQUIRE_PROXIMITY_LABEL, device_name)); 755 IDS_SETTINGS_EASY_UNLOCK_REQUIRE_PROXIMITY_LABEL, device_name));
733 756
734 html_source->AddString("easyUnlockLearnMoreURL", 757 html_source->AddString("easyUnlockLearnMoreURL",
735 chrome::kEasyUnlockLearnMoreUrl); 758 chrome::kEasyUnlockLearnMoreUrl);
736 } 759 }
737 760
738 void AddImportDataStrings(content::WebUIDataSource* html_source) {
739 LocalizedString localized_strings[] = {
740 {"importFromLabel", IDS_SETTINGS_IMPORT_FROM_LABEL},
741 {"importDescription", IDS_SETTINGS_IMPORT_ITEMS_LABEL},
742 {"importLoading", IDS_SETTINGS_IMPORT_LOADING_PROFILES},
743 {"importHistory", IDS_SETTINGS_IMPORT_HISTORY_CHECKBOX},
744 {"importFavorites", IDS_SETTINGS_IMPORT_FAVORITES_CHECKBOX},
745 {"importPasswords", IDS_SETTINGS_IMPORT_PASSWORDS_CHECKBOX},
746 {"importSearch", IDS_SETTINGS_IMPORT_SEARCH_ENGINES_CHECKBOX},
747 {"importAutofillFormData", IDS_SETTINGS_IMPORT_AUTOFILL_FORM_DATA_CHECKBOX},
748 {"importSucceeded", IDS_SETTINGS_IMPORT_SUCCEEDED},
749 {"importChooseFile", IDS_SETTINGS_IMPORT_CHOOSE_FILE},
750 {"importCommit", IDS_SETTINGS_IMPORT_COMMIT},
751 {"noProfileFound", IDS_SETTINGS_IMPORT_NO_PROFILE_FOUND},
752 {"findYourImportedBookmarks", IDS_SETTINGS_IMPORT_FIND_YOUR_BOOKMARKS},
753 };
754 AddLocalizedStringsBulk(html_source, localized_strings,
755 arraysize(localized_strings));
756 }
757
758 void AddInternetStrings(content::WebUIDataSource* html_source) { 761 void AddInternetStrings(content::WebUIDataSource* html_source) {
759 LocalizedString localized_strings[] = { 762 LocalizedString localized_strings[] = {
760 {"internetAddConnection", IDS_SETTINGS_INTERNET_ADD_CONNECTION}, 763 {"internetAddConnection", IDS_SETTINGS_INTERNET_ADD_CONNECTION},
761 {"internetAddThirdPartyVPN", IDS_SETTINGS_INTERNET_ADD_THIRD_PARTY_VPN}, 764 {"internetAddThirdPartyVPN", IDS_SETTINGS_INTERNET_ADD_THIRD_PARTY_VPN},
762 {"internetAddConnectionExpandA11yLabel", 765 {"internetAddConnectionExpandA11yLabel",
763 IDS_SETTINGS_INTERNET_ADD_CONNECTION_EXPAND_ACCESSIBILITY_LABEL}, 766 IDS_SETTINGS_INTERNET_ADD_CONNECTION_EXPAND_ACCESSIBILITY_LABEL},
764 {"internetAddVPN", IDS_SETTINGS_INTERNET_ADD_VPN}, 767 {"internetAddVPN", IDS_SETTINGS_INTERNET_ADD_VPN},
765 {"internetAddWiFi", IDS_SETTINGS_INTERNET_ADD_WIFI}, 768 {"internetAddWiFi", IDS_SETTINGS_INTERNET_ADD_WIFI},
766 {"internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL}, 769 {"internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL},
767 {"internetKnownNetworksPageTitle", IDS_SETTINGS_INTERNET_KNOWN_NETWORKS}, 770 {"internetKnownNetworksPageTitle", IDS_SETTINGS_INTERNET_KNOWN_NETWORKS},
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 AddUsersStrings(html_source); 1768 AddUsersStrings(html_source);
1766 AddWebContentStrings(html_source); 1769 AddWebContentStrings(html_source);
1767 1770
1768 #if defined(OS_CHROMEOS) 1771 #if defined(OS_CHROMEOS)
1769 AddAccountUITweaksStrings(html_source, profile); 1772 AddAccountUITweaksStrings(html_source, profile);
1770 AddBluetoothStrings(html_source); 1773 AddBluetoothStrings(html_source);
1771 AddCrNetworkStrings(html_source); 1774 AddCrNetworkStrings(html_source);
1772 AddDateTimeStrings(html_source); 1775 AddDateTimeStrings(html_source);
1773 AddDeviceStrings(html_source); 1776 AddDeviceStrings(html_source);
1774 AddEasyUnlockStrings(html_source); 1777 AddEasyUnlockStrings(html_source);
1775 AddImportDataStrings(html_source);
1776 AddInternetStrings(html_source); 1778 AddInternetStrings(html_source);
1777 AddMultiProfilesStrings(html_source, profile); 1779 AddMultiProfilesStrings(html_source, profile);
1778 #else 1780 #else
1781 AddDefaultBrowserStrings(html_source);
1782 AddImportDataStrings(html_source);
1779 AddSystemStrings(html_source); 1783 AddSystemStrings(html_source);
1780 AddDefaultBrowserStrings(html_source);
1781 #endif 1784 #endif
1782 1785
1783 #if defined(USE_NSS_CERTS) 1786 #if defined(USE_NSS_CERTS)
1784 AddCertificateManagerStrings(html_source); 1787 AddCertificateManagerStrings(html_source);
1785 #endif 1788 #endif
1786 1789
1787 policy_indicator::AddLocalizedStrings(html_source); 1790 policy_indicator::AddLocalizedStrings(html_source);
1788 1791
1789 html_source->SetJsonPath(kLocalizedStringsFile); 1792 html_source->SetJsonPath(kLocalizedStringsFile);
1790 } 1793 }
1791 1794
1792 } // namespace settings 1795 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698