contrib/push_locale: mv temp files from project_root to locale/
This commit is contained in:
@@ -25,7 +25,7 @@ print("Found {} files to translate".format(len(files.splitlines())))
|
||||
if not os.path.exists('electrum/locale'):
|
||||
os.mkdir('electrum/locale')
|
||||
print('Generating template...')
|
||||
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=messages.pot'
|
||||
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=electrum/locale/messages_gettext.pot'
|
||||
subprocess.check_output(cmd, shell=True)
|
||||
|
||||
|
||||
@@ -33,24 +33,25 @@ subprocess.check_output(cmd, shell=True)
|
||||
cmd = "find electrum/gui/qml -type f -name '*.qml'"
|
||||
files = subprocess.check_output(cmd, shell=True)
|
||||
|
||||
with open("qml.lst", "wb") as f:
|
||||
with open("electrum/locale/qml.lst", "wb") as f:
|
||||
f.write(files)
|
||||
|
||||
print("Found {} QML files to translate".format(len(files.splitlines())))
|
||||
|
||||
cmd = "lupdate @qml.lst -ts qml.ts"
|
||||
cmd = "lupdate @electrum/locale/qml.lst -ts electrum/locale/qml.ts"
|
||||
print('Collecting strings')
|
||||
subprocess.check_output(cmd, shell=True)
|
||||
|
||||
cmd = "lconvert -of po -o qml.pot qml.ts"
|
||||
cmd = "lconvert -of po -o electrum/locale/messages_qml.pot electrum/locale/qml.ts"
|
||||
print('Convert to gettext')
|
||||
subprocess.check_output(cmd, shell=True)
|
||||
|
||||
cmd = "msgcat -u -o electrum/locale/messages.pot messages.pot qml.pot"
|
||||
cmd = "msgcat -u -o electrum/locale/messages.pot electrum/locale/messages_gettext.pot electrum/locale/messages_qml.pot"
|
||||
print('Generate template')
|
||||
subprocess.check_output(cmd, shell=True)
|
||||
|
||||
|
||||
# prepare uploading to crowdin
|
||||
os.chdir(os.path.join(project_root, "electrum"))
|
||||
|
||||
crowdin_api_key = None
|
||||
|
||||
Reference in New Issue
Block a user