Przeglądaj źródła

Created the class MlString and fixing syntax error

Created the class Lodel.utils.mlstring.MlString needed by EditorialModel.lib.component.EmComponent
The first test pass ! =)
Yann Weber 9 lat temu
rodzic
commit
eeaaf945d2

+ 2
- 2
EditorialModel/lib/component.py Wyświetl plik

@@ -5,7 +5,7 @@
5 5
     @see EmClass, EmType, EmFieldGroup, EmField
6 6
 """
7 7
 
8
-from ml_string import MlString
8
+from Lodel.utils.mlstring import MlString
9 9
 
10 10
 class EmComponent(object):
11 11
 
@@ -18,7 +18,7 @@ class EmComponent(object):
18 18
             raise EnvironmentError('Abstract class')
19 19
         if id_or_name is int:
20 20
             self.id = id_or_name
21
-        else if id_or_name is str:
21
+        elif id_or_name is str:
22 22
             self.name = id_or_name
23 23
             self.populate()
24 24
         else:

+ 0
- 0
Lodel/utils/__init__.py Wyświetl plik


+ 7
- 0
Lodel/utils/mlstring.py Wyświetl plik

@@ -0,0 +1,7 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+class MlString(object):
4
+    """ Handle string with translations """
5
+
6
+    def __init__(self, default_str, translations = dict()):
7
+        pass

Loading…
Anuluj
Zapisz