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

Unified Diff: cms/converters.py

Issue 29324494: Issue 2935 - Give get_string page parameter a sensible default value (Closed)
Patch Set: Created Aug. 20, 2015, 8:51 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/converters.py
diff --git a/cms/converters.py b/cms/converters.py
index afa4ee4f31ef51cf1d39ffa7453154a5b51a2f9e..3540795075a8df63ee5ca56dd1883fab61d0562e 100644
--- a/cms/converters.py
+++ b/cms/converters.py
@@ -362,7 +362,10 @@ class TemplateConverter(Converter):
self._params["localedata"], html_escapes
))
- def get_string(self, name, page):
+ def get_string(self, name, page=None):
+ if page is None:
+ page = self._params["page"]
+
localedata = self._params["source"].read_locale(self._params["locale"], page)
default = localedata[name]
return jinja2.Markup(self.localize_string(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld