Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
Diffstat (limited to 'po')
-rwxr-xr-xpo/update_mo.py32
-rwxr-xr-xpo/update_po.py33
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)