From b2302032451e33c92b7063af92e58a69f51cbaab Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 30 Jan 2023 17:28:31 +0000 Subject: [PATCH] contrib/push_locale: mv temp files from project_root to locale/ --- contrib/push_locale | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/push_locale b/contrib/push_locale index 487058e1b..69f49eded 100755 --- a/contrib/push_locale +++ b/contrib/push_locale @@ -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