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

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

Issue 2077063002: MD Settings: Allow the user to order the list of languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 }; 591 };
592 AddLocalizedStringsBulk(html_source, localized_strings, 592 AddLocalizedStringsBulk(html_source, localized_strings,
593 arraysize(localized_strings)); 593 arraysize(localized_strings));
594 } 594 }
595 #endif 595 #endif
596 596
597 void AddLanguagesStrings(content::WebUIDataSource* html_source) { 597 void AddLanguagesStrings(content::WebUIDataSource* html_source) {
598 LocalizedString localized_strings[] = { 598 LocalizedString localized_strings[] = {
599 {"languagesPageTitle", IDS_SETTINGS_LANGUAGES_PAGE_TITLE}, 599 {"languagesPageTitle", IDS_SETTINGS_LANGUAGES_PAGE_TITLE},
600 {"languagesListTitle", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_TITLE}, 600 {"languagesListTitle", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_TITLE},
601 {"orderLanguagesInstructions",
602 IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_ORDERING_INSTRUCTIONS},
603 {"moveUp", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_MOVE_UP},
604 {"moveDown", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_MOVE_DOWN},
605 {"languageDetail",
606 IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_LANGUAGE_DETAIL},
601 {"manageLanguages", IDS_SETTINGS_LANGUAGES_LANGUAGES_MANAGE}, 607 {"manageLanguages", IDS_SETTINGS_LANGUAGES_LANGUAGES_MANAGE},
602 #if defined(OS_CHROMEOS) 608 #if defined(OS_CHROMEOS)
603 {"inputMethodsListTitle", 609 {"inputMethodsListTitle",
604 IDS_SETTINGS_LANGUAGES_INPUT_METHODS_LIST_TITLE}, 610 IDS_SETTINGS_LANGUAGES_INPUT_METHODS_LIST_TITLE},
605 {"manageInputMethods", IDS_SETTINGS_LANGUAGES_INPUT_METHODS_MANAGE}, 611 {"manageInputMethods", IDS_SETTINGS_LANGUAGES_INPUT_METHODS_MANAGE},
606 {"manageInputMethodsPageTitle", 612 {"manageInputMethodsPageTitle",
607 IDS_SETTINGS_LANGUAGES_MANAGE_INPUT_METHODS_TITLE}, 613 IDS_SETTINGS_LANGUAGES_MANAGE_INPUT_METHODS_TITLE},
608 #endif 614 #endif
609 {"manageLanguagesPageTitle", 615 {"manageLanguagesPageTitle",
610 IDS_SETTINGS_LANGUAGES_MANAGE_LANGUAGES_TITLE}, 616 IDS_SETTINGS_LANGUAGES_MANAGE_LANGUAGES_TITLE},
(...skipping 22 matching lines...) Expand all
633 {"manageSpellCheck", IDS_SETTINGS_LANGUAGES_SPELL_CHECK_MANAGE}, 639 {"manageSpellCheck", IDS_SETTINGS_LANGUAGES_SPELL_CHECK_MANAGE},
634 {"editDictionaryPageTitle", IDS_SETTINGS_LANGUAGES_EDIT_DICTIONARY_TITLE}, 640 {"editDictionaryPageTitle", IDS_SETTINGS_LANGUAGES_EDIT_DICTIONARY_TITLE},
635 {"addDictionaryWordLabel", IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD}, 641 {"addDictionaryWordLabel", IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD},
636 {"addDictionaryWordButton", 642 {"addDictionaryWordButton",
637 IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD_BUTTON}, 643 IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD_BUTTON},
638 {"customDictionaryWords", IDS_SETTINGS_LANGUAGES_DICTIONARY_WORDS}, 644 {"customDictionaryWords", IDS_SETTINGS_LANGUAGES_DICTIONARY_WORDS},
639 #endif 645 #endif
640 }; 646 };
641 AddLocalizedStringsBulk(html_source, localized_strings, 647 AddLocalizedStringsBulk(html_source, localized_strings,
642 arraysize(localized_strings)); 648 arraysize(localized_strings));
649
650 html_source->AddString(
651 "languagesLearnMoreURL",
652 base::ASCIIToUTF16(chrome::kLanguageSettingsLearnMoreUrl));
643 } 653 }
644 654
645 #if defined(OS_CHROMEOS) 655 #if defined(OS_CHROMEOS)
646 void AddMultiProfilesStrings(content::WebUIDataSource* html_source, 656 void AddMultiProfilesStrings(content::WebUIDataSource* html_source,
647 Profile* profile) { 657 Profile* profile) {
648 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 658 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
649 659
650 const user_manager::User* user = 660 const user_manager::User* user =
651 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 661 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
652 std::string primary_user_email = user_manager->GetPrimaryUser()->email(); 662 std::string primary_user_email = user_manager->GetPrimaryUser()->email();
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 #endif 1200 #endif
1191 AddUsersStrings(html_source); 1201 AddUsersStrings(html_source);
1192 AddWebContentStrings(html_source); 1202 AddWebContentStrings(html_source);
1193 1203
1194 policy_indicator::AddLocalizedStrings(html_source); 1204 policy_indicator::AddLocalizedStrings(html_source);
1195 1205
1196 html_source->SetJsonPath(kLocalizedStringsFile); 1206 html_source->SetJsonPath(kLocalizedStringsFile);
1197 } 1207 }
1198 1208
1199 } // namespace settings 1209 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698