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

Unified Diff: cms/sources.py

Issue 29317015: Issue 2625 - [cms] Crowdin synchronisation script (Closed)
Patch Set: Addressed Wladimir's feedback Created July 2, 2015, 12:29 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
Index: cms/sources.py
diff --git a/cms/sources.py b/cms/sources.py
index 51770027059033470ef3652bb0756ee44370f217..e1504eda0961cf1b42653f5d0084328178b69792 100644
--- a/cms/sources.py
+++ b/cms/sources.py
@@ -16,6 +16,7 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import codecs
+import collections
import ConfigParser
import json
import os
@@ -169,9 +170,9 @@ class Source:
def read_locale(self, locale, page):
default_locale = self.read_config().get("general", "defaultlocale")
if locale == default_locale:
- result = {}
+ result = collections.OrderedDict()
Sebastian Noack 2015/07/08 13:03:20 Nit: This could be simplified a little: result =
kzar 2015/07/11 19:21:18 I think we should leave this unrelated change out
Sebastian Noack 2015/07/14 11:31:04 It's not unrelated if you change the code anyway.
kzar 2015/07/14 12:54:27 Done.
else:
- result = dict(self.read_locale(default_locale, page))
+ result = collections.OrderedDict(self.read_locale(default_locale, page))
if self.has_locale(locale, page):
filedata = self.read_file(self.locale_filename(locale, page))

Powered by Google App Engine
This is Rietveld