diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100755 index 00000000000..fb0f96cc6ae --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +release/scripts/startup/bl_ui/space_info.py diff --git a/po/update-po.py b/po/update-po.py new file mode 100755 index 00000000000..c824b537a95 --- /dev/null +++ b/po/update-po.py @@ -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 ) diff --git a/po/update-pot.py b/po/update-pot.py new file mode 100755 index 00000000000..4ba918d8de5 --- /dev/null +++ b/po/update-pot.py @@ -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 )