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
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2011-09-29 10:34:58 +0400
committerDalai Felinto <dfelinto@gmail.com>2011-09-29 10:34:58 +0400
commit9701a58fecb7f8a690dacb44c248969c653dbc4b (patch)
tree08dd4a7229d3943ef463ff6917310a7d4257570f /po/update_po.py
parent9465efd401474c40d45b9943111a68f502832f5f (diff)
making PO/POT/... update scripts py3.2 compatible + making it almost win compatible
Adding from codecs import open + the encoding in update_pot.py so it works for python 3.2. Now it should be easier to replace the executable folders in the first lines of the file. It now also works if you are in the same folder as the .po files (i.e. os.path.dirname(__FILE__) is empty) It's still not working for me on Mingw because I need gettext 1.8 and so far I found only the 1.7 (in 1.7 msgmerge --lang is not supported)
Diffstat (limited to 'po/update_po.py')
-rwxr-xr-xpo/update_po.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/po/update_po.py b/po/update_po.py
index 45738363966..978de6ab1e5 100755
--- a/po/update_po.py
+++ b/po/update_po.py
@@ -27,7 +27,8 @@ import subprocess
import os
import sys
-CURRENT_DIR = os.path.dirname(__file__)
+GETTEXT_MSGMERGE_EXECUTABLE = "msgmerge"
+CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
DOMAIN = "blender"
@@ -35,7 +36,7 @@ def process_po(po):
lang = os.path.basename(po)[:-3]
# update po file
- cmd = ("msgmerge",
+ cmd = (GETTEXT_MSGMERGE_EXECUTABLE,
"--update",
"--lang=%s" % lang,
os.path.join(CURRENT_DIR, "%s.po" % lang),