Skip to content

Commit 0600ad2

Browse files
author
Jürgen Hermann
committed
Added globbing for win32, and sample marking in a 2nd file to test it
1 parent dba1b6c commit 0600ad2

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

roundup/htmltemplate.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: htmltemplate.py,v 1.43 2001-11-21 04:04:43 richard Exp $
18+
# $Id: htmltemplate.py,v 1.44 2001-11-21 23:35:45 jhermann Exp $
1919

2020
import os, re, StringIO, urllib, cgi, errno
2121

@@ -87,7 +87,7 @@ def do_plain(self, property, escape=0):
8787
k = linkcl.labelprop()
8888
value = ', '.join([linkcl.get(i, k) for i in value])
8989
else:
90-
s = 'Plain: bad propclass "%s"'%propclass
90+
s = _('Plain: bad propclass "%(propclass)s"')%locals()
9191
if escape:
9292
value = cgi.escape(value)
9393
return value
@@ -106,7 +106,7 @@ def do_field(self, property, size=None, height=None, showid=0):
106106
to be edited
107107
'''
108108
if not self.nodeid and self.form is None and self.filterspec is None:
109-
return '[Field: not called from item]'
109+
return _('[Field: not called from item]')
110110
propclass = self.properties[property]
111111
if self.nodeid:
112112
value = self.cl.get(self.nodeid, property, None)
@@ -861,6 +861,9 @@ def render(self, form):
861861

862862
#
863863
# $Log: not supported by cvs2svn $
864+
# Revision 1.43 2001/11/21 04:04:43 richard
865+
# *sigh* more missing value handling
866+
#
864867
# Revision 1.42 2001/11/21 03:40:54 richard
865868
# more new property handling
866869
#

tools/pygettext.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,14 @@ class Options:
411411
else:
412412
options.toexclude = []
413413

414+
# on win32, do internal globbing
415+
if sys.platform == 'win32':
416+
import glob
417+
expanded = []
418+
for arg in args:
419+
expanded.extend(glob.glob(arg))
420+
args = expanded
421+
414422
# slurp through all the files
415423
eater = TokenEater(options)
416424
for filename in args:

0 commit comments

Comments
 (0)