diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-25 21:05:43 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-25 21:05:43 +0400 |
commit | 8454f2b8b3fc2fc5275773e5d110be98260b7b8e (patch) | |
tree | b5bde8204992bb710a00467b0035ca3781425a11 /po | |
parent | 96bbf550b0471d19d37385f62c1ff2b5b42408cb (diff) |
complete the language-select feature
Diffstat (limited to 'po')
-rwxr-xr-x | po/update_mo.py | 32 | ||||
-rwxr-xr-x | po/update_po.py | 33 |
2 files changed, 9 insertions, 56 deletions
diff --git a/po/update_mo.py b/po/update_mo.py index e361f70d963..c0870f3fbb3 100755 --- a/po/update_mo.py +++ b/po/update_mo.py @@ -5,36 +5,12 @@ import os LOCALE_DIR="../release/bin/.blender/locale" +PO_DIR = "." 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", - "zh_TW" -) -#-o %s.new.po -for lang in LANGS: +for po in os.listdir( PO_DIR ): + if po.endswith(".po"): + lang = po[:-3] # show stats cmd = "msgfmt --statistics %s.po -o %s/%s/LC_MESSAGES/%s.mo" % ( lang, LOCALE_DIR, lang, DOMAIN ) print cmd diff --git a/po/update_po.py b/po/update_po.py index c01c4bdc32d..8a2f61ba46f 100755 --- a/po/update_po.py +++ b/po/update_po.py @@ -4,35 +4,12 @@ import os +PO_DIR = "." 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", - "zh_TW" -) -#-o %s.new.po -for lang in LANGS: + +for po in os.listdir( PO_DIR ): + if po.endswith(".po"): + lang = po[:-3] # update po file cmd = "msgmerge --update --lang=%s %s.po %s.pot" % (lang, lang, DOMAIN) print(cmd) |