Browse Source

Bugfix on instanciation and infinit grows of translations

Yann Weber 9 years ago
parent
commit
cedf457ee0
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Lodel/utils/mlstring.py

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

10
     ## Instanciate a new string with translation
10
     ## Instanciate a new string with translation
11
     #
11
     #
12
     # @param translations dict: With key = lang and value the translation
12
     # @param translations dict: With key = lang and value the translation
13
-    def __init__(self, translations=dict()):
14
-        self.translations = translations
13
+    def __init__(self, translations=None):
14
+        self.translations = dict() if translations is None else translations
15
     
15
     
16
     ## Return a translation
16
     ## Return a translation
17
     # @param lang str: The lang
17
     # @param lang str: The lang

Loading…
Cancel
Save