opental-checkins
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr...


From: Magnus Heino
Subject: [OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr...
Date: Wed, 29 Jan 2003 06:36:34 -0500

CVSROOT:        /cvsroot/opental
Module name:    opental
Changes by:     Magnus Heino <address@hidden>   03/01/29 06:36:34

Modified files:
        PlacelessTranslationService: PlacelessTranslationService.py 

Log message:
        make is possible to set this without hacking the src..

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/PlacelessTranslationService/PlacelessTranslationService.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: opental/PlacelessTranslationService/PlacelessTranslationService.py
diff -u opental/PlacelessTranslationService/PlacelessTranslationService.py:1.7 
opental/PlacelessTranslationService/PlacelessTranslationService.py:1.8
--- opental/PlacelessTranslationService/PlacelessTranslationService.py:1.7      
Sun Jan 26 18:17:07 2003
+++ opental/PlacelessTranslationService/PlacelessTranslationService.py  Wed Jan 
29 06:36:34 2003
@@ -17,13 +17,14 @@
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
 """Placeless Translation Service for providing I18n to file-based code.
 
-$Id: PlacelessTranslationService.py,v 1.7 2003/01/26 23:17:07 lalo Exp $
+$Id: PlacelessTranslationService.py,v 1.8 2003/01/29 11:36:34 magnusheino Exp $
 """
 
 import re, zLOG
 from types import DictType, StringType, UnicodeType
 from Negotiator import negotiator
 from Domain import Domain
+import os
 from pax import XML
 
 def log(msg, severity=zLOG.INFO, detail='', error=None):
@@ -47,7 +48,7 @@
 #
 # Note that these fallbacks are used only to find a catalog.  If a particular
 # message in a catalog is not translated, tough luck, you get the msgid.
-LANGUAGE_FALLBACKS = ['en']
+LANGUAGE_FALLBACKS = list(os.environ.get('LANGUAGE_FALLBACKS', 'en').split(' 
'))
 
 
 class PlacelessTranslationService:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]