[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr...
From: |
Fernando Lalo Martins |
Subject: |
[OpenTAL-checkins] opental/PlacelessTranslationService PlacelessTr... |
Date: |
Mon, 06 Oct 2003 17:51:09 -0400 |
CVSROOT: /cvsroot/opental
Module name: opental
Branch:
Changes by: Fernando Lalo Martins <address@hidden> 03/10/06 17:51:09
Modified files:
PlacelessTranslationService: PlacelessTranslationService.py
Log message:
how ironic, Sidnei's recent fixes broke OpenPT compatibility. This
fixes it.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/PlacelessTranslationService/PlacelessTranslationService.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
Patches:
Index: opental/PlacelessTranslationService/PlacelessTranslationService.py
diff -u opental/PlacelessTranslationService/PlacelessTranslationService.py:1.31
opental/PlacelessTranslationService/PlacelessTranslationService.py:1.32
--- opental/PlacelessTranslationService/PlacelessTranslationService.py:1.31
Mon Oct 6 17:34:38 2003
+++ opental/PlacelessTranslationService/PlacelessTranslationService.py Mon Oct
6 17:51:09 2003
@@ -17,7 +17,7 @@
# 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.31 2003/10/06 21:34:38 lalo Exp $
+$Id: PlacelessTranslationService.py,v 1.32 2003/10/06 21:51:09 lalo Exp $
"""
import sys, re, zLOG, Globals, fnmatch
@@ -247,8 +247,9 @@
# found! negotiate output encodings now
if hasattr(context, 'pt_output_encoding'):
# OpenPT
- if catalog.preferred_encodings:
- context.pt_output_encoding.restrict(catalog,
catalog.preferred_encodings)
+ encodings = catalog._info.get('preferred-encodings',
'').split()
+ if encodings:
+ context.pt_output_encoding.restrict(catalog, encodings)
else:
# ZPT probably
# ask HTTPResponse to encode it for us