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

Unified Diff: cms/utils.py

Issue 29317015: Issue 2625 - [cms] Crowdin synchronisation script (Closed)
Patch Set: Give query_params a default value Created July 16, 2015, 12:47 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cms/sources.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/utils.py
diff --git a/cms/utils.py b/cms/utils.py
index 0c7b8bea7e44da7c7b776acf6c4830c4010d927d..66d8498f74582a93b1fff3ccac87879d2877654b 100644
--- a/cms/utils.py
+++ b/cms/utils.py
@@ -17,7 +17,8 @@
from cms.converters import converters, TemplateConverter
-def get_page_params(source, locale, page, format=None, site_url_override=None):
+def get_page_params(source, locale, page, format=None, site_url_override=None,
+ localized_string_callback=None):
# Guess page format if omitted, but default to Markdown for friendlier exceptions
if format is None:
for format in converters.iterkeys():
@@ -33,6 +34,7 @@ def get_page_params(source, locale, page, format=None, site_url_override=None):
"page": page,
"pagedata": source.read_page(page, format),
"config": source.read_config(),
+ "localized_string_callback": localized_string_callback,
}
localefile = page
@@ -77,8 +79,10 @@ def get_page_params(source, locale, page, format=None, site_url_override=None):
return params
-def process_page(source, locale, page, format=None, site_url_override=None):
+def process_page(source, locale, page, format=None, site_url_override=None,
+ localized_string_callback=None):
return TemplateConverter(
- get_page_params(source, locale, page, format, site_url_override),
+ get_page_params(source, locale, page, format,
+ site_url_override, localized_string_callback),
key="templatedata"
)()
« no previous file with comments | « cms/sources.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld