forked from bartvdbraak/blender
Enable the po&pot update system, simply with two python scripts.
This commit is contained in:
parent
0fc21dde4e
commit
b0cc5b9d4c
1
po/POTFILES.in
Executable file
1
po/POTFILES.in
Executable file
@ -0,0 +1 @@
|
||||
release/scripts/startup/bl_ui/space_info.py
|
42
po/update-po.py
Executable file
42
po/update-po.py
Executable file
@ -0,0 +1,42 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
#update all po files in the LANGS
|
||||
|
||||
import os
|
||||
|
||||
DOMAIN = "blender"
|
||||
LANGS = (
|
||||
"ar",
|
||||
"bg",
|
||||
"ca",
|
||||
"cs",
|
||||
"de",
|
||||
"el",
|
||||
"es",
|
||||
"fi",
|
||||
"fr",
|
||||
"hr",
|
||||
"it",
|
||||
"ja",
|
||||
"ko",
|
||||
"nl",
|
||||
"pl",
|
||||
"pt_BR",
|
||||
"ro",
|
||||
"ru",
|
||||
"sr@Latn",
|
||||
"sr",
|
||||
"sv",
|
||||
"uk",
|
||||
"zh_CN"
|
||||
)
|
||||
#-o %s.new.po
|
||||
for lang in LANGS:
|
||||
# update po file
|
||||
cmd = "msgmerge --update --lang=%s %s.po %s.pot" % (lang, lang, DOMAIN)
|
||||
print(cmd)
|
||||
os.system( cmd )
|
||||
|
||||
# show stats
|
||||
cmd = "msgfmt --statistics %s.po" % lang
|
||||
os.system( cmd )
|
14
po/update-pot.py
Executable file
14
po/update-pot.py
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
#update the pot file according the POTFILES.in
|
||||
|
||||
import os
|
||||
|
||||
GETTEXT_XGETTEXT_EXECUTABLE="xgettext"
|
||||
SOURCE_DIR=".."
|
||||
DOMAIN="blender"
|
||||
|
||||
cmd = "%s --files-from=%s/po/POTFILES.in --keyword=_ --keyword=gettext --directory=%s --output=%s/po/%s.pot" % (
|
||||
GETTEXT_XGETTEXT_EXECUTABLE, SOURCE_DIR, SOURCE_DIR, SOURCE_DIR, DOMAIN)
|
||||
|
||||
os.system( cmd )
|
Loading…
Reference in New Issue
Block a user