py2.4 fix - thresh
This commit is contained in:
parent
72f49e3557
commit
9a3a96a31f
|
@ -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 )
|
||||
|
||||
|
|
Loading…
Reference in New Issue