67
edits
(Added section for viewing translated content) |
(Update EmbedCompatTable section for L10n:CompatTable macro) |
||
Line 11: | Line 11: | ||
== <nowiki>{{EmbedCompatTable}}</nowiki> KumaScript macro == | == <nowiki>{{EmbedCompatTable}}</nowiki> KumaScript macro == | ||
The EmbedCompatTable macro | The EmbedCompatTable macro uses the L10n:CompatTable macro for translated strings: | ||
https://developer.mozilla.org/en-US/docs/Template: | https://developer.mozilla.org/en-US/docs/Template:L10n:CompatTable | ||
The page's locale will be used to lookup strings | The page's locale will be used to lookup strings, and use the locale's variants if available. This includes support text such as "Yes", "No" and "Partial" and feature text such as "Basic Support", "Experimental", and "Non-Standard". | ||
Web/JavaScript/Reference/Global_Objects/Promise is a simple page: | Web/JavaScript/Reference/Global_Objects/Promise is a simple page: | ||
Line 27: | Line 27: | ||
=== Adding a locale === | === Adding a locale === | ||
To add a new locale, | To add a new locale, modify [https://developer.mozilla.org/en-US/docs/Template:L10n:CompatTable L10n:CompatTable] to add your locale's translations. A safe way to do this: | ||
# Copy the latest code from https://developer.mozilla.org/en-US/docs/Template:EmbedCompatTable to https://developer.allizom.org/en-US/docs/Template:EmbedCompatTable (the MDN staging environment) | # Copy the latest code from https://developer.mozilla.org/en-US/docs/Template:EmbedCompatTable and https://developer.mozilla.org/en-US/docs/Template:L10n:CompatTable to https://developer.allizom.org/en-US/docs/Template:EmbedCompatTable and https://developer.allizom.org/en-US/docs/Template:L10n:CompatTable (the MDN staging environment) | ||
# | # Add your locale on the staging copy of L10n:CompatTable | ||
# Try it out on staging, adding the <nowiki>{{EmbedCompatTable}}</nowiki> macro to target pages as needed | |||
# Try it out on staging, adding the <nowiki>{{EmbedCompatTable}}</nowiki> macro as needed | # When it is working, copy it back to the production version | ||
# When it is working, copy it back to the production version | |||
== wiki-compat-table.js == | == wiki-compat-table.js == |
edits