28 |
from Acquisition import Implicit |
from Acquisition import Implicit |
29 |
from App.Management import Tabs |
from App.Management import Tabs |
30 |
from PlacelessTranslationService import log |
from PlacelessTranslationService import log |
31 |
|
try: |
32 |
|
True |
33 |
|
except NameError: |
34 |
|
True=1 |
35 |
|
False=0 |
36 |
|
|
37 |
try: |
try: |
38 |
from Products.OpenPT.OpenPTFile import OpenPTFile as ptFile |
from Products.OpenPT.OpenPTFile import OpenPTFile as ptFile |
125 |
self._v_missing.write(missing_template % {'id':id.replace('"', r'\"')}) |
self._v_missing.write(missing_template % {'id':id.replace('"', r'\"')}) |
126 |
self._v_missing.flush() |
self._v_missing.flush() |
127 |
|
|
128 |
def getMessage(self, id, orig_text=None, testing=0): |
def getMessage(self, id, orig_text=None, testing=False): |
129 |
""" |
""" |
130 |
""" |
""" |
131 |
self._prepareTranslations() |
self._prepareTranslations() |
143 |
""" |
""" |
144 |
""" |
""" |
145 |
try: |
try: |
146 |
return self.getMessage(id, default, testing=1) |
return self.getMessage(id, default, testing=True) |
147 |
except KeyError: |
except KeyError: |
148 |
if default is None: |
if default is None: |
149 |
default = id |
default = id |
204 |
try: |
try: |
205 |
file = open(self._path_to_file, 'rb') |
file = open(self._path_to_file, 'rb') |
206 |
except: |
except: |
207 |
return 0 |
return False |
208 |
return 1 |
return True |
209 |
|
|
210 |
displayInfo__roles__ = __roles__ |
displayInfo__roles__ = __roles__ |
211 |
def displayInfo(self): |
def displayInfo(self): |