Create locale/ directory when making i18n files.
This commit is contained in:
@@ -32,7 +32,12 @@ cmd = 'xgettext -s --no-wrap -f app.fil --output=locale/messages.pot'
|
|||||||
print cmd
|
print cmd
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
f = open('locale/messages.pot','r')
|
# Make locale directory if doesn't exist
|
||||||
|
try:
|
||||||
|
os.mkdir('locale')
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
f = open(os.path.join('locale', 'messages.pot'),'r')
|
||||||
s = f.read()
|
s = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
s = s.replace('CHARSET', 'utf-8')
|
s = s.replace('CHARSET', 'utf-8')
|
||||||
|
|||||||
Reference in New Issue
Block a user