From: <dwa...@us...> - 2008-08-28 06:29:38
|
Revision: 8222 http://translate.svn.sourceforge.net/translate/?rev=8222&view=rev Author: dwaynebailey Date: 2008-08-28 06:29:49 +0000 (Thu, 28 Aug 2008) Log Message: ----------- Do user expansion of input filename to allow ~ expansion to user home directory. Modified Paths: -------------- src/trunk/translate/filters/pofilter.py Modified: src/trunk/translate/filters/pofilter.py =================================================================== --- src/trunk/translate/filters/pofilter.py 2008-08-27 16:18:08 UTC (rev 8221) +++ src/trunk/translate/filters/pofilter.py 2008-08-28 06:29:49 UTC (rev 8222) @@ -119,18 +119,21 @@ checkerclasses = [options.filterclass, checks.StandardUnitChecker] checkerconfig = checks.CheckerConfig(targetlanguage=options.targetlanguage) if options.notranslatefile: + options.notranslatefile = os.path.expanduser(options.notranslatefile) if not os.path.exists(options.notranslatefile): self.error("notranslatefile %r does not exist" % options.notranslatefile) notranslatewords = [line.strip() for line in open(options.notranslatefile).readlines()] notranslatewords = dict.fromkeys([key for key in notranslatewords]) checkerconfig.notranslatewords.update(notranslatewords) if options.musttranslatefile: + options.musttranslatefile = os.path.expanduser(options.musttranslatefile) if not os.path.exists(options.musttranslatefile): self.error("musttranslatefile %r does not exist" % options.musttranslatefile) musttranslatewords = [line.strip() for line in open(options.musttranslatefile).readlines()] musttranslatewords = dict.fromkeys([key for key in musttranslatewords]) checkerconfig.musttranslatewords.update(musttranslatewords) if options.validcharsfile: + options.validcharsfile = os.path.expanduser(options.validcharsfile) if not os.path.exists(options.validcharsfile): self.error("validcharsfile %r does not exist" % options.validcharsfile) validchars = open(options.validcharsfile).read() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |