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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_handler_common.cc

Issue 16025007: Refacotring: fix styles of i18n-content names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix Created 7 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
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/language_hangul_handler.cc ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options/language_options_handler_common.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler_common.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 LanguageOptionsHandlerCommon::LanguageOptionsHandlerCommon() { 37 LanguageOptionsHandlerCommon::LanguageOptionsHandlerCommon() {
38 } 38 }
39 39
40 LanguageOptionsHandlerCommon::~LanguageOptionsHandlerCommon() { 40 LanguageOptionsHandlerCommon::~LanguageOptionsHandlerCommon() {
41 } 41 }
42 42
43 void LanguageOptionsHandlerCommon::GetLocalizedValues( 43 void LanguageOptionsHandlerCommon::GetLocalizedValues(
44 DictionaryValue* localized_strings) { 44 DictionaryValue* localized_strings) {
45 DCHECK(localized_strings); 45 DCHECK(localized_strings);
46 static OptionsStringResource resources[] = { 46 static OptionsStringResource resources[] = {
47 { "add_button", IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_BUTTON }, 47 { "addButton", IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_BUTTON },
48 { "languages", IDS_OPTIONS_SETTINGS_LANGUAGES_LANGUAGES }, 48 { "languages", IDS_OPTIONS_SETTINGS_LANGUAGES_LANGUAGES },
49 { "add_language_instructions", 49 { "addLanguageInstructions",
50 IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_LANGUAGE_INSTRUCTIONS }, 50 IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_LANGUAGE_INSTRUCTIONS },
51 { "cannot_be_displayed_in_this_language", 51 { "cannotBeDisplayedInThisLanguage",
52 IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE, 52 IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE,
53 IDS_PRODUCT_NAME }, 53 IDS_PRODUCT_NAME },
54 { "is_displayed_in_this_language", 54 { "isDisplayedInThisLanguage",
55 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE, 55 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
56 IDS_PRODUCT_NAME }, 56 IDS_PRODUCT_NAME },
57 { "display_in_this_language", 57 { "displayInThisLanguage",
58 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE, 58 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
59 IDS_PRODUCT_NAME }, 59 IDS_PRODUCT_NAME },
60 { "restart_required", IDS_OPTIONS_RELAUNCH_REQUIRED }, 60 { "restartRequired", IDS_OPTIONS_RELAUNCH_REQUIRED },
61 // OS X uses the OS native spellchecker so no need for these strings. 61 // OS X uses the OS native spellchecker so no need for these strings.
62 #if !defined(OS_MACOSX) 62 #if !defined(OS_MACOSX)
63 { "use_this_for_spell_checking", 63 { "useThisForSpellChecking",
64 IDS_OPTIONS_SETTINGS_USE_THIS_FOR_SPELL_CHECKING }, 64 IDS_OPTIONS_SETTINGS_USE_THIS_FOR_SPELL_CHECKING },
65 { "cannot_be_used_for_spell_checking", 65 { "cannotBeUsedForSpellChecking",
66 IDS_OPTIONS_SETTINGS_CANNOT_BE_USED_FOR_SPELL_CHECKING }, 66 IDS_OPTIONS_SETTINGS_CANNOT_BE_USED_FOR_SPELL_CHECKING },
67 { "is_used_for_spell_checking", 67 { "isUsedForSpellChecking",
68 IDS_OPTIONS_SETTINGS_IS_USED_FOR_SPELL_CHECKING }, 68 IDS_OPTIONS_SETTINGS_IS_USED_FOR_SPELL_CHECKING },
69 { "enable_spell_check", IDS_OPTIONS_ENABLE_SPELLCHECK }, 69 { "enableSpellCheck", IDS_OPTIONS_ENABLE_SPELLCHECK },
70 { "enable_auto_spell_correction", 70 { "enableAutoSpellCorrection",
71 IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION }, 71 IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION },
72 { "downloading_dictionary", IDS_OPTIONS_DICTIONARY_DOWNLOADING }, 72 { "downloadingDictionary", IDS_OPTIONS_DICTIONARY_DOWNLOADING },
73 { "download_failed", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAILED }, 73 { "downloadFailed", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAILED },
74 { "retry_button", IDS_OPTIONS_DICTIONARY_DOWNLOAD_RETRY }, 74 { "retryButton", IDS_OPTIONS_DICTIONARY_DOWNLOAD_RETRY },
75 { "download_fail_help", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAIL_HELP }, 75 { "downloadFailHelp", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAIL_HELP },
76 #endif // !OS_MACOSX 76 #endif // !OS_MACOSX
77 { "add_language_title", IDS_OPTIONS_LANGUAGES_ADD_TITLE }, 77 { "addLanguageTitle", IDS_OPTIONS_LANGUAGES_ADD_TITLE },
78 { "add_language_select_label", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL }, 78 { "addLanguageSelectLabel", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL },
79 { "restart_button", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON } 79 { "restartButton", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON }
80 }; 80 };
81 81
82 #if defined(ENABLE_SETTINGS_APP) 82 #if defined(ENABLE_SETTINGS_APP)
83 static OptionsStringResource app_resources[] = { 83 static OptionsStringResource app_resources[] = {
84 { "cannot_be_displayed_in_this_language", 84 { "cannotBeDisplayedInThisLanguage",
85 IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE, 85 IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE,
86 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, 86 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
87 { "is_displayed_in_this_language", 87 { "isDisplayedInThisLanguage",
88 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE, 88 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
89 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, 89 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
90 { "display_in_this_language", 90 { "displayInThisLanguage",
91 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE, 91 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
92 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, 92 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
93 }; 93 };
94 DictionaryValue* app_values = NULL; 94 DictionaryValue* app_values = NULL;
95 CHECK(localized_strings->GetDictionary(kSettingsAppKey, &app_values)); 95 CHECK(localized_strings->GetDictionary(kSettingsAppKey, &app_values));
96 RegisterStrings(app_values, app_resources, arraysize(app_resources)); 96 RegisterStrings(app_values, app_resources, arraysize(app_resources));
97 #endif 97 #endif
98 98
99 RegisterStrings(localized_strings, resources, arraysize(resources)); 99 RegisterStrings(localized_strings, resources, arraysize(resources));
100 100
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 base::WeakPtr<SpellcheckHunspellDictionary>& 234 base::WeakPtr<SpellcheckHunspellDictionary>&
235 LanguageOptionsHandlerCommon::GetHunspellDictionary() { 235 LanguageOptionsHandlerCommon::GetHunspellDictionary() {
236 if (!hunspell_dictionary_.get()) 236 if (!hunspell_dictionary_.get())
237 RefreshHunspellDictionary(); 237 RefreshHunspellDictionary();
238 return hunspell_dictionary_; 238 return hunspell_dictionary_;
239 } 239 }
240 240
241 } // namespace options 241 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/language_hangul_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698