Annotation of kupu/kupu-i18nextract-sa-diff.patch, revision 1.1
1.1 ! dwinter 1: ? kupu-i18nextract-sa-diff.patch
! 2: Index: zope/app/locales/extract.py
! 3: ===================================================================
! 4: RCS file: /cvs/infrae-internal/i18nextract-sa/zope/app/locales/extract.py,v
! 5: retrieving revision 1.2
! 6: diff --unified -r1.2 extract.py
! 7: --- zope/app/locales/extract.py 18 Nov 2004 14:28:27 -0000 1.2
! 8: +++ zope/app/locales/extract.py 3 Aug 2005 14:08:59 -0000
! 9: @@ -289,16 +289,22 @@
! 10: # right sys path until app_dir has run
! 11: from zope.tal.talgettext import POEngine, POTALInterpreter
! 12: from zope.tal.htmltalparser import HTMLTALParser
! 13: + from zope.tal.talparser import TALParser
! 14: engine = POEngine()
! 15:
! 16: class Devnull(object):
! 17: def write(self, s):
! 18: pass
! 19:
! 20: - for filename in find_files(dir, '*.pt'):
! 21: + for filename in (find_files(dir, '*.pt') + find_files(dir, '*.kupu') +
! 22: + find_files(dir, '*.pox') + find_files(dir, '*.xsl')):
! 23: try:
! 24: engine.file = filename
! 25: - p = HTMLTALParser()
! 26: + name, ext = os.path.splitext(filename)
! 27: + if ext in ['.pt', '.html']:
! 28: + p = HTMLTALParser()
! 29: + else:
! 30: + p = TALParser()
! 31: p.parseFile(filename)
! 32: program, macros = p.getCode()
! 33: POTALInterpreter(program, macros, engine, stream=Devnull(),
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>