Browse Source

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 years ago
parent
commit
eeaaf945d2
3 changed files with 9 additions and 2 deletions
  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 View File

5
     @see EmClass, EmType, EmFieldGroup, EmField
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
 class EmComponent(object):
10
 class EmComponent(object):
11
 
11
 
18
             raise EnvironmentError('Abstract class')
18
             raise EnvironmentError('Abstract class')
19
         if id_or_name is int:
19
         if id_or_name is int:
20
             self.id = id_or_name
20
             self.id = id_or_name
21
-        else if id_or_name is str:
21
+        elif id_or_name is str:
22
             self.name = id_or_name
22
             self.name = id_or_name
23
             self.populate()
23
             self.populate()
24
         else:
24
         else:

+ 0
- 0
Lodel/utils/__init__.py View File


+ 7
- 0
Lodel/utils/mlstring.py View File

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…
Cancel
Save