Pass all possible files to xgettext
This commit is contained in:
@@ -8,8 +8,8 @@ import requests
|
|||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
|
|
||||||
code_directories = 'lib gui plugins'
|
code_directories = '{gui,plugins}'
|
||||||
cmd = "grep 'from electrum.i18n import _' {} -rl".format(code_directories)
|
cmd = "find {} -type f -name '*.py' -o -name '*.kv'".format(code_directories)
|
||||||
|
|
||||||
files = subprocess.check_output(cmd, shell=True)
|
files = subprocess.check_output(cmd, shell=True)
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ print("Found {} files to translate".format(len(files.splitlines())))
|
|||||||
# Generate fresh translation template
|
# Generate fresh translation template
|
||||||
if not os.path.exists('lib/locale'):
|
if not os.path.exists('lib/locale'):
|
||||||
os.mkdir('lib/locale')
|
os.mkdir('lib/locale')
|
||||||
cmd = 'xgettext -s --from-code UTF-8 --no-wrap -f app.fil --output=lib/locale/messages.pot'
|
cmd = 'xgettext -s --from-code UTF-8 --language Python --no-wrap -f app.fil --output=lib/locale/messages.pot'
|
||||||
print('Generate template')
|
print('Generate template')
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user