py2.4 fix - thresh

This commit is contained in:
Marcos Pinto 2008-01-03 00:57:36 +00:00
parent 72f49e3557
commit 9a3a96a31f
1 changed files with 7 additions and 7 deletions

View File

@ -16,14 +16,14 @@ for template_dir in template_dirs:
all_strings = []
for filename in files:
with open(filename,'r') as f:
content = f.read()
all_strings += re.findall("_\(\"(.*?)\"\)",content)
all_strings += re.findall("_\(\'(.*?)\'\)",content)
f = open(filename,'r')
content = f.read()
all_strings += re.findall("_\(\"(.*?)\"\)",content)
all_strings += re.findall("_\(\'(.*?)\'\)",content)
all_strings = sorted(set(all_strings))
with open ('./template_strings.py','w') as f:
for value in all_strings:
f.write("_('%s')\n" % value )
f = open ('./template_strings.py','w')
for value in all_strings:
f.write("_('%s')\n" % value )