diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 21:17:36 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 21:17:36 +0000 |
commit | 3e8d173fa8baad978ccb0e38926d5fed652cdc53 (patch) | |
tree | cbff17441d1fa8b612aff9bed133c4d31f6e91e8 /chrome | |
parent | 5e0339a824ec9cb1bade37fdf6ee210b41671965 (diff) | |
download | chromium_src-3e8d173fa8baad978ccb0e38926d5fed652cdc53.zip chromium_src-3e8d173fa8baad978ccb0e38926d5fed652cdc53.tar.gz chromium_src-3e8d173fa8baad978ccb0e38926d5fed652cdc53.tar.bz2 |
Fix the Spelling UI.
This change updates strings used by the Spelling UI and moves the local suggestion above the one from the Spelling service.
BUG=103840
TEST=right click on a misspelled word.
Review URL: http://codereview.chromium.org/8463008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 16 | ||||
-rw-r--r-- | chrome/browser/tab_contents/spelling_menu_observer.cc | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 9b9b12e..081577d 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -488,10 +488,10 @@ are declared in build/common.gypi. &No spelling suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE" desc="The context-menu item that asks whether to integrate the spelling service of Google to Chrome. This text is also used as the title of a bubble which confirms it."> - Ask Google for spelling suggestions + Ask Google for suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT" desc="The text of a bubble that confirms users allows integrating the spelling service of Google to Chrome."> - Google Chrome can provide even better spell-checking by sending what you type in the browser to Google servers, allowing you to use the same spell-checking technology used by Google search. + Google Chrome can provide smarter spell-checking by sending what you type in the browser to Google servers, allowing you to use the same spell-checking technology used by Google search. </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE" desc="The button text that allows integrating the spelling service of Google."> Enable @@ -500,10 +500,10 @@ are declared in build/common.gypi. No thanks </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_STOP_ASKING_GOOGLE" desc="The context-menu item that stops integrating the spelling service."> - Stop asking Google for spelling suggestions + Stop asking Google for suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_CHECKING" desc="The place-holder message shown while the Spelling service is checking text"> - Loading spelling suggestion + Loading suggestion </message> <message name="IDS_CONTENT_CONTEXT_SPELLCHECK_MENU" desc="The name of the Spellcheck Options submenu in the content area context menu"> &Spell-checker options @@ -700,10 +700,10 @@ are declared in build/common.gypi. &No Spelling Suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE" desc="The context-menu item that asks whether to integrate the spelling service of Google to Chrome. This text is also used as the title of a bubble which confirms it."> - Ask Google for spelling suggestions + Ask Google for suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT" desc="The text of a bubble that confirms users allows integrating the spelling service of Google to Chrome."> - Google Chrome can provide even better spell-checking by sending what you type in the browser to Google servers, allowing you to use the same spell-checking technology used by Google search. + Google Chrome can provide smarter spell-checking by sending what you type in the browser to Google servers, allowing you to use the same spell-checking technology used by Google search. </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE" desc="The button text that allows integrating the spelling service of Google."> Enable @@ -712,10 +712,10 @@ are declared in build/common.gypi. No thanks </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_STOP_ASKING_GOOGLE" desc="The context-menu item that stops integrating the spelling service."> - Stop asking Google for spelling suggestions + Stop asking Google for suggestions </message> <message name="IDS_CONTENT_CONTEXT_SPELLING_CHECKING" desc="The place-holder message shown while the Spelling service is checking text"> - Loading spelling suggestion + Loading suggestion </message> <message name="IDS_CONTENT_CONTEXT_SPELLCHECK_MENU" desc="In Title Case: The name of the Spellcheck Options submenu in the content area context menu"> &Spell-checker Options diff --git a/chrome/browser/tab_contents/spelling_menu_observer.cc b/chrome/browser/tab_contents/spelling_menu_observer.cc index 0a95de4..3537445 100644 --- a/chrome/browser/tab_contents/spelling_menu_observer.cc +++ b/chrome/browser/tab_contents/spelling_menu_observer.cc @@ -55,6 +55,15 @@ void SpellingMenuObserver::InitMenu(const ContextMenuParams& params) { if (!params.is_editable) return; + // Append Dictionary spell check suggestions. + suggestions_ = params.dictionary_suggestions; + for (size_t i = 0; i < params.dictionary_suggestions.size() && + IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST; + ++i) { + proxy_->AddMenuItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i), + params.dictionary_suggestions[i]); + } + Profile* profile = proxy_->GetProfile(); if (!profile || !profile->GetRequestContext()) return; @@ -90,15 +99,6 @@ void SpellingMenuObserver::InitMenu(const ContextMenuParams& params) { pref ? pref->GetString(prefs::kSpellCheckDictionary) : "en-US"; Invoke(text, language, profile->GetRequestContext()); } - - // Append Dictionary spell check suggestions. - suggestions_ = params.dictionary_suggestions; - for (size_t i = 0; i < params.dictionary_suggestions.size() && - IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST; - ++i) { - proxy_->AddMenuItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i), - params.dictionary_suggestions[i]); - } } bool SpellingMenuObserver::IsCommandIdSupported(int command_id) { |