[pychess] push by gbtami - Fixed issue #698, Build fails to create English translations on 2012-01-30 22:37 GMT

0 views
Skip to first unread message

pyc...@googlecode.com

unread,
Jan 30, 2012, 5:38:32 PM1/30/12
to pychess...@googlegroups.com
Revision: 6c41ad8b6d35
Author: gbtami
Date: Mon Jan 30 14:37:18 2012
Log: Fixed issue #698, Build fails to create English translations
http://code.google.com/p/pychess/source/detail?r=6c41ad8b6d35

Modified:
/MANIFEST.in
/lib/pychess/Utils/eco.py
/setup.py

=======================================
--- /MANIFEST.in Mon Dec 5 07:49:43 2011
+++ /MANIFEST.in Mon Jan 30 14:37:18 2012
@@ -4,6 +4,6 @@
include sounds/*.ogg
include manpages/pychess.1.gz
include gtksourceview-1.0/language-specs/pgn.lang
-include pychess_book.bin
+include pychess_book.bin eco.db
include pychess.desktop pychess.svg pychess.png
recursive-include lang *.po
=======================================
--- /lib/pychess/Utils/eco.py Mon Jan 2 04:34:24 2012
+++ /lib/pychess/Utils/eco.py Mon Jan 30 14:37:18 2012
@@ -4,7 +4,7 @@
import sqlite3
import struct

-from pychess.System.prefix import addDataPrefix
+from pychess.System.prefix import addDataPrefix, isInstalled

db_path = os.path.join(addDataPrefix("eco.db"))
if os.path.exists(db_path):
@@ -15,7 +15,11 @@
print "Warning: eco.db not find, run pgn2ecodb.sh"
ECO_OK = False

-mofile = gettext.find('pychess', localedir=addDataPrefix("lang"))
+if isInstalled():
+ mofile = gettext.find('pychess')
+else:
+ mofile = gettext.find('pychess', localedir=addDataPrefix("lang"))
+
if mofile is None:
lang = "en"
else:
=======================================
--- /setup.py Mon Dec 5 07:49:43 2011
+++ /setup.py Mon Jan 30 14:37:18 2012
@@ -66,8 +66,11 @@

os.chdir(os.path.abspath(os.path.dirname(__file__)))

+if not isfile("eco.db"):
+ execfile("pgn2ecodb.py")
+
DATA_FILES = [("share/pychess",
-
["README", "AUTHORS", "ARTISTS", "DOCUMENTERS", "LICENSE", "TRANSLATORS", "pychess_book.bin"])]
+
["README", "AUTHORS", "ARTISTS", "DOCUMENTERS", "LICENSE", "TRANSLATORS", "pychess_book.bin", "eco.db"])]

# UI
DATA_FILES += [("share/pychess/glade", glob('glade/*.glade'))]
@@ -97,7 +100,7 @@
sys.path.append(argv0_path + "\\tools\\i18n")
import msgfmt

-for dir in [d for d in listdir("lang") if d.find(".svn") < 0 and
isdir("lang/"+d)]:
+for dir in [d for d in listdir("lang") if d.find(".svn") < 0 and
isdir("lang/"+d) and d != "en"]:
if sys.platform == "win32":
file = "lang/%s/%s" % (dir,pofile)
msgfmt.make(file+".po", file+".mo")

Reply all
Reply to author
Forward
0 new messages