/[opental]/opental/PlacelessTranslationService/GettextMessageCatalog.py
ViewVC logotype

Diff of /opental/PlacelessTranslationService/GettextMessageCatalog.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by xiru, Tue Jul 29 16:37:56 2003 UTC revision 1.13 by lalo, Tue Jul 29 21:31:35 2003 UTC
# Line 28  from Persistence import Persistent Line 28  from Persistence import Persistent
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
# Line 120  class GettextMessageCatalog(Persistent, Line 125  class GettextMessageCatalog(Persistent,
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()
# Line 138  class GettextMessageCatalog(Persistent, Line 143  class GettextMessageCatalog(Persistent,
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
# Line 199  class GettextMessageCatalog(Persistent, Line 204  class GettextMessageCatalog(Persistent,
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):

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26