Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: docs/api/functions.md

Issue 29628724: Issue 5521 - Restructure CMS documentation to make it easier to use and extend (Closed) Base URL: https://hg.adblockplus.org/cms
Left Patch Set: Created Dec. 4, 2017, 9:59 a.m.
Right Patch Set: Add initial API docs Created Dec. 13, 2017, 11:08 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
LEFTRIGHT
(no file at all)
1 # Global functions #
2
3 The following global functions can be used on pages:
4
5 * `get_string(name, page=None)`: retrieves a string from a locale file.
6 Unless a page is specified the locale file matching the name of the current
7 page is used.
8 * `get_page_content(page, locale=None)`: returns a dictionary of the content
9 and params for the given page and locale. Locale defaults to the current one
10 if not specified. Provided keys include `head`, `body`, `available_locales`
11 and `translation_ratio`.
LEFTRIGHT

Powered by Google App Engine
This is Rietveld