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:
authorXiao Xiangquan <xiaoxiangquan@gmail.com>2011-06-01 11:57:09 +0400
committerXiao Xiangquan <xiaoxiangquan@gmail.com>2011-06-01 11:57:09 +0400
commitb0cc5b9d4c47625864272654197c4c6ff3f50976 (patch)
tree60a2a40c31db0eaa1a1272972bde754eaaba0795 /po
parent0fc21dde4e0b1bc1188f2bf9024125fcbaec03ee (diff)
Enable the po&pot update system, simply with two python scripts.
Diffstat (limited to 'po')
-rwxr-xr-xpo/POTFILES.in1
-rwxr-xr-xpo/update-po.py42
-rwxr-xr-xpo/update-pot.py14
3 files changed, 57 insertions, 0 deletions
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 )