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

Unified Diff: ui/webui/resources/js/i18n_behavior.js

Issue 2146553005: MD Settings: Bluetooth: Add error dialog and messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_602538_bluetooth_fixes_0
Patch Set: Feedback Created 4 years, 5 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
« no previous file with comments | « chrome/test/data/webui/i18n_behavior_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/i18n_behavior.js
diff --git a/ui/webui/resources/js/i18n_behavior.js b/ui/webui/resources/js/i18n_behavior.js
index f8c97ad6bdf4b42cd061d1bc152234d248933d36..56428c9b7e3ec3024506ff9424134f0bf82bee34 100644
--- a/ui/webui/resources/js/i18n_behavior.js
+++ b/ui/webui/resources/js/i18n_behavior.js
@@ -57,4 +57,13 @@ var I18nBehavior = {
return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs)
.firstChild.innerHTML;
},
+
+ /**
+ * Returns true if a translation exists for |id|.
+ * @param {string} id
+ * @return {boolean}
+ */
+ i18nExists: function(id) {
+ return loadTimeData.valueExists(id);
+ },
};
« no previous file with comments | « chrome/test/data/webui/i18n_behavior_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698