#!/usr/bin/python
import urllib2, os
+from lib.version import TRANSLATION_ID
-url = "https://en.bitcoin.it/wiki/Electrum/Translation?action=raw"
+url = "https://en.bitcoin.it/w/index.php?title=Electrum/Translation&oldid=%d&action=raw"%TRANSLATION_ID
f = urllib2.urlopen(url)
lines = f.readlines()
dicts = {}
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')