Просмотр исходного кода

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 лет назад
Родитель
Сommit
eeaaf945d2
3 измененных файлов: 9 добавлений и 2 удалений
  1. 2
    2
      EditorialModel/lib/component.py
  2. 0
    0
      Lodel/utils/__init__.py
  3. 7
    0
      Lodel/utils/mlstring.py

+ 2
- 2
EditorialModel/lib/component.py Просмотреть файл

@@ -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 Просмотреть файл


+ 7
- 0
Lodel/utils/mlstring.py Просмотреть файл

@@ -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

Загрузка…
Отмена
Сохранить