sync laguages does now saves a UTF8 file, thanks Guruyaya

This commit is contained in:
Massimo Di Pierro
2012-02-02 16:34:35 -06:00
parent c502acf332
commit bd3c21b2eb
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-01 11:42:36) stable
Version 1.99.4 (2012-02-02 16:34:12) stable
+3 -2
View File
@@ -7,7 +7,7 @@ import sys
import shutil
import os
from gluon.languages import findT
from gluon.languages import findT, utf8_repr
sys.path.insert(0, '.')
@@ -30,11 +30,12 @@ file1 = os.path.join(path, 'languages', '%s.py' % file)
f = open(file1, 'w')
try:
f.write('# coding: utf8\n')
f.write('{\n')
keys = d.keys()
keys.sort()
for key in keys:
f.write('%s:%s,\n' % (repr(key), repr(str(d[key]))))
f.write('%s:%s,\n' % (utf8_repr(key), utf8_repr(str(d[key]))))
f.write('}\n')
finally:
f.close()