From: Dwayne B. <dwa...@us...> - 2005-04-26 13:35:43
|
Update of /cvsroot/translate/src/Pootle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31022 Modified Files: projects.py potree.py Log Message: Project PO Template files can now be in the "templates" or "pot" directory. Index: potree.py =================================================================== RCS file: /cvsroot/translate/src/Pootle/potree.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- potree.py 26 Apr 2005 13:12:07 -0000 1.2 +++ potree.py 26 Apr 2005 13:35:30 -0000 1.3 @@ -231,7 +231,9 @@ projectdir = os.path.join(self.podirectory, projectcode) templatesdir = os.path.join(projectdir, "templates") if not os.path.exists(templatesdir): - templatesdir = projectdir + templatesdir = os.path.join(projectdir, "pot") + if not os.path.exists(templatesdir): + templatesdir = projectdir potfilenames = [] def addfiles(podir, dirname, fnames): """adds the files to the set of files for this project""" Index: projects.py =================================================================== RCS file: /cvsroot/translate/src/Pootle/projects.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- projects.py 25 Apr 2005 10:56:47 -0000 1.2 +++ projects.py 26 Apr 2005 13:35:30 -0000 1.3 @@ -411,12 +411,14 @@ """creates PO files from the templates""" projectdir = os.path.join(self.potree.podirectory, self.projectcode) templatesdir = os.path.join(projectdir, "templates") + if not os.path.exists(templatesdir): + templatesdir = os.path.join(projectdir, "pot") + if not os.path.exists(templatesdir): + templatesdir = projectdir if self.potree.isgnustyle(self.projectcode): self.filestyle = "gnu" else: self.filestyle = "std" - if not os.path.exists(templatesdir): - templatesdir = projectdir templates = self.potree.gettemplates(self.projectcode) if self.filestyle == "gnu": self.podir = projectdir |