[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18009: {projects} Give the user a hint why mo/po installation might have faile (projects/gettor)
Author: kaner
Date: 2009-01-07 11:11:44 -0500 (Wed, 07 Jan 2009)
New Revision: 18009
Modified:
projects/gettor/gettor.py
Log:
Give the user a hint why mo/po installation might have failed
Modified: projects/gettor/gettor.py
===================================================================
--- projects/gettor/gettor.py 2009-01-07 16:06:27 UTC (rev 18008)
+++ projects/gettor/gettor.py 2009-01-07 16:11:44 UTC (rev 18009)
@@ -94,15 +94,19 @@
def installTrans(config):
hasDirs = None
- localeSrcdir = "i18n"
+ localeSrcdir = "./i18n"
if config is None:
log.error("Bad arg.")
return False
+ if not os.path.isdir(localeSrcdir):
+ print >> sys.stderr, "Not a directory: ", localeSrcdir
+ return False
localeDir = config.getLocaleDir()
if not os.path.isdir(localeDir):
print >> sys.stderr, "Sorry, %s is not a directory." % distDir
return False
+
for root, dirs, files in os.walk(localeSrcdir):
# XXX Python lacks 'depth' featue for os.walk()
if root != localeSrcdir:
@@ -126,8 +130,9 @@
print >> sys.stderr, "Error accessing translation files: ", e
return False
if hasDirs is None:
- print >> sys.stderr, "Empty locale dir: ", locale
+ print >> sys.stderr, "Empty locale dir: ", localeSrcdir
return False
+
return True
def installCron():