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

Unified Diff: docs/chrome_settings.md

Issue 2887503002: [MD settings] update docs to refer to $i18n (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/chrome_settings.md
diff --git a/docs/chrome_settings.md b/docs/chrome_settings.md
index 5628d56c9225ac4e5d48ab8d99341401203eab36..a4a6eb325b6c61b0f91f9849d51a926edf0f0781 100644
--- a/docs/chrome_settings.md
+++ b/docs/chrome_settings.md
@@ -109,19 +109,18 @@ An example of the form a checkbox should take in html:
<label class="checkbox">
<input id="clear-cookies-on-exit"
pref="profile.clear_site_data_on_exit" type="checkbox">
- <span i18n-content="clearCookiesOnExit"></span>
+ <span>$i18n{clearCookiesOnExit}</span>
</label>
```
Of note:
* the `checkbox` class allows us to style all checkboxes the same via CSS
-* the class and ID are in dash-form * the i18n-content value is in camelCase
+* the class and ID are in dash-form * the $i18n{} value is in camelCase
* the pref attribute matches that which is defined in
`chrome/common/pref_names.cc` and allows the prefs framework to
automatically keep it in sync with the value in C++
-* the `i18n-content` value matches the string we defined in the WebUI handler.
- The `textContent` of the `span` will automatically be set to the associated
- text.
+* the `$i18n{}` value matches the string we defined in the WebUI handler.
+ The `$i18n{}` will automatically be set to the associated text.
In this example, no additional JS or CSS are needed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698