if not l: continue
if l[0] != '*': continue
if l[0:2] == '**':
- lang, translation = l.split(':')
- lang = lang[2:]
+ n = l.find(':')
+ translation = l[n+1:]
+ lang = l[2:n]
if dicts.get(lang) is None: dicts[lang] = {}
dicts[lang][message] = translation.strip()
else:
print 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()
f.close()
s = s.replace('CHARSET', 'utf-8')