commit eab5bcf62fa784eb1f2358db4cadee37e6e03bf9
parent 9372c31b5d3ba7fdb0caace5643d96f0fb7ff6e8
Author: Johann Bauer <bauerj@bauerj.eu>
Date: Fri, 9 Mar 2018 19:13:42 +0100
Find files to translate automatically
Diffstat:
4 files changed, 12 insertions(+), 56 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -16,6 +16,7 @@ env/
.tox/
.buildozer/
bin/
+/app.fil
# tox files
.cache/
diff --git a/MANIFEST.in b/MANIFEST.in
@@ -11,7 +11,6 @@ recursive-include gui *.py
recursive-include plugins *.py
recursive-include packages *.py
recursive-include packages cacert.pem
-include app.fil
include icons.qrc
recursive-include icons *
recursive-include scripts *
diff --git a/app.fil b/app.fil
@@ -1,55 +0,0 @@
-gui/qt/address_dialog.py
-gui/qt/address_list.py
-gui/qt/contact_list.py
-gui/qt/exception_window.py
-gui/qt/fee_slider.py
-gui/qt/history_list.py
-gui/qt/__init__.py
-gui/qt/installwizard.py
-gui/qt/invoice_list.py
-gui/qt/main_window.py
-gui/qt/network_dialog.py
-gui/qt/password_dialog.py
-gui/qt/qrcodewidget.py
-gui/qt/qrtextedit.py
-gui/qt/qrwindow.py
-gui/qt/request_list.py
-gui/qt/seed_dialog.py
-gui/qt/transaction_dialog.py
-gui/qt/util.py
-gui/qt/utxo_list.py
-lib/plot.py
-plugins/audio_modem/__init__.py
-plugins/audio_modem/qt.py
-plugins/cosigner_pool/__init__.py
-plugins/cosigner_pool/qt.py
-plugins/digitalbitbox/digitalbitbox.py
-plugins/digitalbitbox/__init__.py
-plugins/digitalbitbox/qt.py
-plugins/email_requests/__init__.py
-plugins/email_requests/qt.py
-plugins/greenaddress_instant/__init__.py
-plugins/greenaddress_instant/qt.py
-plugins/hw_wallet/plugin.py
-plugins/hw_wallet/qt.py
-plugins/keepkey/clientbase.py
-plugins/keepkey/__init__.py
-plugins/keepkey/plugin.py
-plugins/keepkey/qt_generic.py
-plugins/labels/__init__.py
-plugins/labels/labels.py
-plugins/labels/qt.py
-plugins/ledger/auth2fa.py
-plugins/ledger/__init__.py
-plugins/ledger/ledger.py
-plugins/ledger/qt.py
-plugins/trezor/clientbase.py
-plugins/trezor/__init__.py
-plugins/trezor/qt_generic.py
-plugins/trezor/trezor.py
-plugins/trustedcoin/cmdline.py
-plugins/trustedcoin/__init__.py
-plugins/trustedcoin/qt.py
-plugins/trustedcoin/trustedcoin.py
-plugins/virtualkeyboard/__init__.py
-plugins/virtualkeyboard/qt.py
diff --git a/contrib/make_locale b/contrib/make_locale
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import os
+import subprocess
import io
import zipfile
import requests
@@ -7,6 +8,16 @@ import requests
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('..')
+code_directories = 'lib gui plugins'
+cmd = "grep 'from electrum.i18n import _' {} -rl".format(code_directories)
+
+files = subprocess.check_output(cmd, shell=True)
+
+with open("app.fil", "wb") as f:
+ f.write(files)
+
+print("Found {} files to translate".format(len(files.splitlines())))
+
# Generate fresh translation template
if not os.path.exists('lib/locale'):
os.mkdir('lib/locale')