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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Deprecation 1 # Deprecation
2 2
3 This doc refers to "options", the soon-to-be-deprecated version of 3 This doc refers to "options", the soon-to-be-deprecated version of
4 chrome://settings being replaced by Material Design Settings. 4 chrome://settings being replaced by Material Design Settings.
5 5
6 **Any new features and bug fixes should be contributed to MD Settings, found in 6 **Any new features and bug fixes should be contributed to MD Settings, found in
7 the /settings/ directories (as opposed to the /options/ directories).** 7 the /settings/ directories (as opposed to the /options/ directories).**
8 8
9 See: https://www.chromium.org/developers/updating-webui-for-material-design 9 See: https://www.chromium.org/developers/updating-webui-for-material-design
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 name for the string. 102 name for the string.
103 103
104 ### 4. HTML/CSS/JS 104 ### 4. HTML/CSS/JS
105 105
106 An example of the form a checkbox should take in html: 106 An example of the form a checkbox should take in html:
107 107
108 ```html 108 ```html
109 <label class="checkbox"> 109 <label class="checkbox">
110 <input id="clear-cookies-on-exit" 110 <input id="clear-cookies-on-exit"
111 pref="profile.clear_site_data_on_exit" type="checkbox"> 111 pref="profile.clear_site_data_on_exit" type="checkbox">
112 <span i18n-content="clearCookiesOnExit"></span> 112 <span>$i18n{clearCookiesOnExit}</span>
113 </label> 113 </label>
114 ``` 114 ```
115 115
116 Of note: 116 Of note:
117 117
118 * the `checkbox` class allows us to style all checkboxes the same via CSS 118 * the `checkbox` class allows us to style all checkboxes the same via CSS
119 * the class and ID are in dash-form * the i18n-content value is in camelCase 119 * the class and ID are in dash-form * the $i18n{} value is in camelCase
120 * the pref attribute matches that which is defined in 120 * the pref attribute matches that which is defined in
121 `chrome/common/pref_names.cc` and allows the prefs framework to 121 `chrome/common/pref_names.cc` and allows the prefs framework to
122 automatically keep it in sync with the value in C++ 122 automatically keep it in sync with the value in C++
123 * the `i18n-content` value matches the string we defined in the WebUI handler. 123 * the `$i18n{}` value matches the string we defined in the WebUI handler.
124 The `textContent` of the `span` will automatically be set to the associated 124 The `$i18n{}` will automatically be set to the associated text.
125 text.
126 125
127 In this example, no additional JS or CSS are needed. 126 In this example, no additional JS or CSS are needed.
OLDNEW
« 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