On Thu, 2007-04-05 at 17:29 +0200, F Wolff wrote: > Hi list(s) > > We have built a beta2 of the translate toolkit 1.0 and of Pootle 1.0. We > would really like people to help us with the testing.
Hi,
There are two things I had to change for beta2 to make it work for me.
First one is that I defined extension as "po", because for some reason
it could not figure out extension (some POTree error, extra arguments).
+ self.fileext="po"
instead
self.fileext = self.potree.getprojectlocalfiletype(self.projectcode)
Second one is how it stores keys. Since I use sub-directories, keys it
self have sub-directory portion. Without it I would get key error I
reported earlier when I try to commit changes to svn.
+ stats = self.getquickstats([dirname+"/"+pofilename])
All changes are in projects.py file and diff is below.
diff -u /tmp/Pootle-1.0beta2/Pootle/projects.py projects.py
--- /tmp/Pootle-1.0beta2/Pootle/projects.py 2007-04-03
05:35:34.000000000 -0400
+++ projects.py 2007-04-05 17:00:59.000000000 -0400
@@ -98,7 +98,8 @@
self.projectcheckerstyle =
self.potree.getprojectcheckerstyle(self.projectcode)
checkerclasses =
[checks.projectcheckers.get(self.projectcheckerstyle,
checks.StandardChecker), pofilter.StandardPOChecker]
self.checker = pofilter.POTeeChecker(checkerclasses=checkerclasses,
errorhandler=self.filtererrorhandler)
- self.fileext =
self.potree.getprojectlocalfiletype(self.projectcode)
+ self.fileext="po"
+ #self.fileext =
self.potree.getprojectlocalfiletype(self.projectcode)
self.quickstats = {}
# terminology matcher
self.termmatcher = None
@@ -588,7 +589,7 @@
if "commit" not in self.getrights(session):
raise RightsError(session.localize("You do not have rights to
commit files here"))
pathname = self.getuploadpath(dirname, pofilename)
- stats = self.getquickstats([pofilename])
+ stats = self.getquickstats([dirname+"/"+pofilename])
statsstring = "%d of %d messages translated (%d fuzzy)." % \
(stats["translated"], stats["total"], stats["fuzzy"])
versioncontrol.commitfile(pathname, message="Commit from %s by user
%s. %s" %
Igor
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
