Browse Source

MlString: ensure __str__() will always output same string by ordering the keys

ArnAud 9 years ago
parent
commit
218d1f9afc
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Lodel/utils/mlstring.py

+ 1
- 1
Lodel/utils/mlstring.py View File

@@ -38,7 +38,7 @@ class MlString(object):
38 38
     # @return A json dump of the MlString::translations dict
39 39
     def __str__(self):
40 40
         if self.translations:
41
-            return json.dumps(self.translations)
41
+            return json.dumps(self.translations, sort_keys=True)
42 42
         else:
43 43
             return ""
44 44
 

Loading…
Cancel
Save