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

Unified Diff: chrome/browser/resources/options2/search_engine_manager_engine_list.js

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options2/search_engine_manager_engine_list.js
diff --git a/chrome/browser/resources/options2/search_engine_manager_engine_list.js b/chrome/browser/resources/options2/search_engine_manager_engine_list.js
index f7513b276002442cf4f8054d88242047cf8aef05..9d6b5ae77497290bc3fc0451c51f539ef1d4a2b9 100644
--- a/chrome/browser/resources/options2/search_engine_manager_engine_list.js
+++ b/chrome/browser/resources/options2/search_engine_manager_engine_list.js
@@ -124,7 +124,7 @@ cr.define('options.search_engines', function() {
var makeDefaultButtonEl = this.ownerDocument.createElement('button');
makeDefaultButtonEl.className = 'custom-appearance list-inline-button';
makeDefaultButtonEl.textContent =
- templateData.makeDefaultSearchEngineButton;
+ loadTimeData.getString('makeDefaultSearchEngineButton');
makeDefaultButtonEl.onclick = function(e) {
chrome.send('managerSetDefaultSearchEngine', [engine['modelIndex']]);
};
@@ -147,11 +147,11 @@ cr.define('options.search_engines', function() {
if (this.isPlaceholder) {
this.nameField_.placeholder =
- localStrings.getString('searchEngineTableNamePlaceholder');
+ loadTimeData.getString('searchEngineTableNamePlaceholder');
this.keywordField_.placeholder =
- localStrings.getString('searchEngineTableKeywordPlaceholder');
+ loadTimeData.getString('searchEngineTableKeywordPlaceholder');
this.urlField_.placeholder =
- localStrings.getString('searchEngineTableURLPlaceholder');
+ loadTimeData.getString('searchEngineTableURLPlaceholder');
}
var fields = [this.nameField_, this.keywordField_, this.urlField_];
@@ -248,29 +248,28 @@ cr.define('options.search_engines', function() {
this.waitingForValidation_ = false;
// TODO(stuartmorgan): Implement the full validation UI with
// checkmark/exclamation mark icons and tooltips showing the errors.
- if (validity['name']) {
+ if (validity.name) {
this.nameField_.setCustomValidity('');
} else {
this.nameField_.setCustomValidity(
- templateData.editSearchEngineInvalidTitleToolTip);
+ loadTimeData.getString('editSearchEngineInvalidTitleToolTip'));
}
- if (validity['keyword']) {
+ if (validity.keyword) {
this.keywordField_.setCustomValidity('');
} else {
this.keywordField_.setCustomValidity(
- templateData.editSearchEngineInvalidKeywordToolTip);
+ loadTimeData.getString('editSearchEngineInvalidKeywordToolTip'));
}
- if (validity['url']) {
+ if (validity.url) {
this.urlField_.setCustomValidity('');
} else {
this.urlField_.setCustomValidity(
- templateData.editSearchEngineInvalidURLToolTip);
+ loadTimeData.getString('editSearchEngineInvalidURLToolTip'));
}
- this.currentlyValid_ = validity['name'] && validity['keyword'] &&
- validity['url'];
+ this.currentlyValid_ = validity.name && validity.keyword && validity.url;
},
};
« no previous file with comments | « chrome/browser/resources/options2/search_engine_manager.js ('k') | chrome/browser/resources/options2/search_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698