Explorar el Código

Bugfix on instanciation and infinit grows of translations

Yann Weber hace 9 años
padre
commit
cedf457ee0
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      Lodel/utils/mlstring.py

+ 2
- 2
Lodel/utils/mlstring.py Ver fichero

@@ -10,8 +10,8 @@ class MlString(object):
10 10
     ## Instanciate a new string with translation
11 11
     #
12 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 16
     ## Return a translation
17 17
     # @param lang str: The lang

Loading…
Cancelar
Guardar