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

Unified Diff: ui/accessibility/extensions/highcontrast/popup.js

Issue 610453002: Move accessibility extension translations to grd file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: ui/accessibility/extensions/highcontrast/popup.js
diff --git a/ui/accessibility/extensions/highcontrast/popup.js b/ui/accessibility/extensions/highcontrast/popup.js
index b1f5f40aae5fa0cfeceaaa837913948594d1afcc..33fc0df8d94aa4f7766832c1727a1eded65e11d2 100644
--- a/ui/accessibility/extensions/highcontrast/popup.js
+++ b/ui/accessibility/extensions/highcontrast/popup.js
@@ -93,6 +93,13 @@ function addRadioListeners(name) {
}
function init() {
+ var i18nElements = document.querySelectorAll('*[i18n-content]');
+ for (var i = 0; i < i18nElements.length; i++) {
+ var elem = i18nElements[i];
+ var msg = elem.getAttribute('i18n-content');
+ elem.innerHTML = chrome.i18n.getMessage(msg);
+ }
+
addRadioListeners('keyaction');
addRadioListeners('apply');
addRadioListeners('scheme');
« no previous file with comments | « ui/accessibility/extensions/highcontrast/popup.html ('k') | ui/accessibility/extensions/longdesc/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698