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

Diff of /opental/PlacelessTranslationService/PlacelessTranslationService.py

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

revision 1.4 by lalo, Mon Jan 20 23:40:47 2003 UTC revision 1.5 by magnusheino, Sat Jan 25 08:56:59 2003 UTC
# Line 98  class PlacelessTranslationService(Simple Line 98  class PlacelessTranslationService(Simple
98                  langs = [m[0] for m in self._catalogs.keys() if m[1] == domain]                  langs = [m[0] for m in self._catalogs.keys() if m[1] == domain]
99                  target_language = negotiator.getLanguage(langs, context)                  target_language = negotiator.getLanguage(langs, context)
100    
   
101          # Get the translation. Use the specified fallbacks if this fails          # Get the translation. Use the specified fallbacks if this fails
102          catalog_names = self._catalogs.get((target_language, domain), ())          catalog_names = self._catalogs.get((target_language, domain), ())
103          if not catalog_names:          if not catalog_names:
# Line 116  class PlacelessTranslationService(Simple Line 115  class PlacelessTranslationService(Simple
115                  # it's not in this catalog, try the next one                  # it's not in this catalog, try the next one
116                  pass                  pass
117          else:          else:
118              # Did the fallback fail?  Sigh, use the default or msgid              # Did the fallback fail?  Sigh, use the default
119              if default is None:              if default is None:
120                  text = msgid                  # OpenTAL provides a default text.
121                    # TAL doesn't but will use the default
122                    # if None is returned
123                    text = None
124              else:              else:
125                  text = default                  text = default
126    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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