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

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: Fixed broken tests Created 4 years, 6 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 }; 583 };
584 AddLocalizedStringsBulk(html_source, localized_strings, 584 AddLocalizedStringsBulk(html_source, localized_strings,
585 arraysize(localized_strings)); 585 arraysize(localized_strings));
586 } 586 }
587 #endif 587 #endif
588 588
589 void AddLanguagesStrings(content::WebUIDataSource* html_source) { 589 void AddLanguagesStrings(content::WebUIDataSource* html_source) {
590 LocalizedString localized_strings[] = { 590 LocalizedString localized_strings[] = {
591 {"languagesPageTitle", IDS_SETTINGS_LANGUAGES_PAGE_TITLE}, 591 {"languagesPageTitle", IDS_SETTINGS_LANGUAGES_PAGE_TITLE},
592 {"languagesListTitle", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_TITLE}, 592 {"languagesListTitle", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_TITLE},
593 {"orderLanguagesInstructions",
594 IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_ORDERING_INSTRUCTIONS},
595 {"moveUp", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_MOVE_UP},
596 {"moveDown", IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_MOVE_DOWN},
597 {"languageDetail",
598 IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_LANGUAGE_DETAIL},
593 {"manageLanguages", IDS_SETTINGS_LANGUAGES_LANGUAGES_MANAGE}, 599 {"manageLanguages", IDS_SETTINGS_LANGUAGES_LANGUAGES_MANAGE},
594 #if defined(OS_CHROMEOS) 600 #if defined(OS_CHROMEOS)
595 {"inputMethodsListTitle", 601 {"inputMethodsListTitle",
596 IDS_SETTINGS_LANGUAGES_INPUT_METHODS_LIST_TITLE}, 602 IDS_SETTINGS_LANGUAGES_INPUT_METHODS_LIST_TITLE},
597 {"manageInputMethods", IDS_SETTINGS_LANGUAGES_INPUT_METHODS_MANAGE}, 603 {"manageInputMethods", IDS_SETTINGS_LANGUAGES_INPUT_METHODS_MANAGE},
598 {"manageInputMethodsPageTitle", 604 {"manageInputMethodsPageTitle",
599 IDS_SETTINGS_LANGUAGES_MANAGE_INPUT_METHODS_TITLE}, 605 IDS_SETTINGS_LANGUAGES_MANAGE_INPUT_METHODS_TITLE},
600 #endif 606 #endif
601 {"manageLanguagesPageTitle", 607 {"manageLanguagesPageTitle",
602 IDS_SETTINGS_LANGUAGES_MANAGE_LANGUAGES_TITLE}, 608 IDS_SETTINGS_LANGUAGES_MANAGE_LANGUAGES_TITLE},
(...skipping 22 matching lines...) Expand all
625 {"manageSpellCheck", IDS_SETTINGS_LANGUAGES_SPELL_CHECK_MANAGE}, 631 {"manageSpellCheck", IDS_SETTINGS_LANGUAGES_SPELL_CHECK_MANAGE},
626 {"editDictionaryPageTitle", IDS_SETTINGS_LANGUAGES_EDIT_DICTIONARY_TITLE}, 632 {"editDictionaryPageTitle", IDS_SETTINGS_LANGUAGES_EDIT_DICTIONARY_TITLE},
627 {"addDictionaryWordLabel", IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD}, 633 {"addDictionaryWordLabel", IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD},
628 {"addDictionaryWordButton", 634 {"addDictionaryWordButton",
629 IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD_BUTTON}, 635 IDS_SETTINGS_LANGUAGES_ADD_DICTIONARY_WORD_BUTTON},
630 {"customDictionaryWords", IDS_SETTINGS_LANGUAGES_DICTIONARY_WORDS}, 636 {"customDictionaryWords", IDS_SETTINGS_LANGUAGES_DICTIONARY_WORDS},
631 #endif 637 #endif
632 }; 638 };
633 AddLocalizedStringsBulk(html_source, localized_strings, 639 AddLocalizedStringsBulk(html_source, localized_strings,
634 arraysize(localized_strings)); 640 arraysize(localized_strings));
641
642 html_source->AddString(
643 "languagesLearnMoreURL",
644 base::ASCIIToUTF16(chrome::kLanguageSettingsLearnMoreUrl));
michaelpg 2016/06/21 00:34:42 fyi, filed crbug.com/621723
Moe 2016/06/21 20:10:20 Acknowledged.
635 } 645 }
636 646
637 #if defined(OS_CHROMEOS) 647 #if defined(OS_CHROMEOS)
638 void AddMultiProfilesStrings(content::WebUIDataSource* html_source, 648 void AddMultiProfilesStrings(content::WebUIDataSource* html_source,
639 Profile* profile) { 649 Profile* profile) {
640 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 650 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
641 651
642 const user_manager::User* user = 652 const user_manager::User* user =
643 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 653 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
644 std::string primary_user_email = user_manager->GetPrimaryUser()->email(); 654 std::string primary_user_email = user_manager->GetPrimaryUser()->email();
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 #endif 1151 #endif
1142 AddUsersStrings(html_source); 1152 AddUsersStrings(html_source);
1143 AddWebContentStrings(html_source); 1153 AddWebContentStrings(html_source);
1144 1154
1145 policy_indicator::AddLocalizedStrings(html_source); 1155 policy_indicator::AddLocalizedStrings(html_source);
1146 1156
1147 html_source->SetJsonPath(kLocalizedStringsFile); 1157 html_source->SetJsonPath(kLocalizedStringsFile);
1148 } 1158 }
1149 1159
1150 } // namespace settings 1160 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698