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

Unified Diff: cms/sources.py

Issue 5361415552499712: Issue 2145 - Strings from random locales show up on English pages (Closed)
Patch Set: Created March 13, 2015, 8:56 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/sources.py
===================================================================
--- a/cms/sources.py
+++ b/cms/sources.py
@@ -147,17 +147,17 @@ class Source:
page = config.get("locale_overrides", page)
return self.has_file(self.locale_filename(locale, page))
def read_locale(self, locale, page):
default_locale = self.read_config().get("general", "defaultlocale")
if locale == default_locale:
result = {}
else:
- result = self.read_locale(default_locale, page)
+ result = dict(self.read_locale(default_locale, page))
if self.has_locale(locale, page):
filedata = self.read_file(self.locale_filename(locale, page))
localedata = json.loads(filedata)
for key, value in localedata.iteritems():
result[key] = value["message"]
return result
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld