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

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

Issue 8879064: Reverting this revert, since it does not seem to have caused the breakage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/options/language_options.js ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE, 57 IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
58 product_name)); 58 product_name));
59 localized_strings->SetString("display_in_this_language", 59 localized_strings->SetString("display_in_this_language",
60 l10n_util::GetStringFUTF16( 60 l10n_util::GetStringFUTF16(
61 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE, 61 IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
62 product_name)); 62 product_name));
63 localized_strings->SetString("this_language_is_currently_in_use", 63 localized_strings->SetString("this_language_is_currently_in_use",
64 l10n_util::GetStringFUTF16( 64 l10n_util::GetStringFUTF16(
65 IDS_OPTIONS_SETTINGS_LANGUAGES_THIS_LANGUAGE_IS_CURRENTLY_IN_USE, 65 IDS_OPTIONS_SETTINGS_LANGUAGES_THIS_LANGUAGE_IS_CURRENTLY_IN_USE,
66 product_name)); 66 product_name));
67 localized_strings->SetString("restart_required",
68 l10n_util::GetStringUTF16(IDS_OPTIONS_RELAUNCH_REQUIRED));
69 // OS X uses the OS native spellchecker so no need for these strings.
70 #if !defined(OS_MACOSX)
67 localized_strings->SetString("use_this_for_spell_checking", 71 localized_strings->SetString("use_this_for_spell_checking",
68 l10n_util::GetStringUTF16( 72 l10n_util::GetStringUTF16(
69 IDS_OPTIONS_SETTINGS_USE_THIS_FOR_SPELL_CHECKING)); 73 IDS_OPTIONS_SETTINGS_USE_THIS_FOR_SPELL_CHECKING));
70 localized_strings->SetString("cannot_be_used_for_spell_checking", 74 localized_strings->SetString("cannot_be_used_for_spell_checking",
71 l10n_util::GetStringUTF16( 75 l10n_util::GetStringUTF16(
72 IDS_OPTIONS_SETTINGS_CANNOT_BE_USED_FOR_SPELL_CHECKING)); 76 IDS_OPTIONS_SETTINGS_CANNOT_BE_USED_FOR_SPELL_CHECKING));
73 localized_strings->SetString("is_used_for_spell_checking", 77 localized_strings->SetString("is_used_for_spell_checking",
74 l10n_util::GetStringUTF16( 78 l10n_util::GetStringUTF16(
75 IDS_OPTIONS_SETTINGS_IS_USED_FOR_SPELL_CHECKING)); 79 IDS_OPTIONS_SETTINGS_IS_USED_FOR_SPELL_CHECKING));
76 localized_strings->SetString("restart_required",
77 l10n_util::GetStringUTF16(IDS_OPTIONS_RELAUNCH_REQUIRED));
78 localized_strings->SetString("enable_spell_check", 80 localized_strings->SetString("enable_spell_check",
79 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SPELLCHECK)); 81 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SPELLCHECK));
80 localized_strings->SetString("enable_auto_spell_correction", 82 localized_strings->SetString("enable_auto_spell_correction",
81 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION)); 83 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION));
84 #endif // !OS_MACOSX
82 localized_strings->SetString("add_language_title", 85 localized_strings->SetString("add_language_title",
83 l10n_util::GetStringUTF16(IDS_OPTIONS_LANGUAGES_ADD_TITLE)); 86 l10n_util::GetStringUTF16(IDS_OPTIONS_LANGUAGES_ADD_TITLE));
84 localized_strings->SetString("add_language_select_label", 87 localized_strings->SetString("add_language_select_label",
85 l10n_util::GetStringUTF16(IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL)); 88 l10n_util::GetStringUTF16(IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL));
86 localized_strings->SetString("restart_button", 89 localized_strings->SetString("restart_button",
87 l10n_util::GetStringUTF16( 90 l10n_util::GetStringUTF16(
88 IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON)); 91 IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON));
89 92
90 // The following are resources, rather than local strings. 93 // The following are resources, rather than local strings.
91 localized_strings->SetString("currentUiLanguageCode", 94 localized_strings->SetString("currentUiLanguageCode",
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 157 }
155 158
156 void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback( 159 void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback(
157 const ListValue* args) { 160 const ListValue* args) {
158 const std::string language_code = UTF16ToASCII(ExtractStringValue(args)); 161 const std::string language_code = UTF16ToASCII(ExtractStringValue(args));
159 CHECK(!language_code.empty()); 162 CHECK(!language_code.empty());
160 const std::string action = base::StringPrintf( 163 const std::string action = base::StringPrintf(
161 "LanguageOptions_SpellCheckLanguageChange_%s", language_code.c_str()); 164 "LanguageOptions_SpellCheckLanguageChange_%s", language_code.c_str());
162 UserMetrics::RecordComputedAction(action); 165 UserMetrics::RecordComputedAction(action);
163 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/language_options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698