On Wed, 2007-04-11 at 08:20 +0200, F Wolff wrote: 
> > 
> > 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)
> 
> I would be very grateful if you can send in the POTree error. I can't
> reproduce this error, and I'd just like to make sure I understand why
> this is not working.
> 

Sure, here it is:

Warning: No information found about language code None
2007-04-11 11:53:32: Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Pootle/users.py", line 229, in
handle
    page = self.getpage(pathwords, session, argdict)
  File "/usr/lib/python2.4/site-packages/Pootle/pootle.py", line 411, in
getpage
    return indexpage.LanguageIndex(self.potree, languagecode, session)
  File "/usr/lib/python2.4/site-packages/Pootle/indexpage.py", line 189,
in __init__
    languageprojects = self.getprojects()
  File "/usr/lib/python2.4/site-packages/Pootle/indexpage.py", line 226,
in getprojects
    projectitems = [self.getprojectitem(projectcode) for projectcode in
projectcodes]
  File "/usr/lib/python2.4/site-packages/Pootle/indexpage.py", line 235,
in getprojectitem
    project = self.potree.getproject(self.languagecode, projectcode)
  File "/usr/lib/python2.4/site-packages/Pootle/potree.py", line 303, in
getproject
    self.projectcache[languagecode, projectcode] =
projects.TranslationProject(languagecode, projectcode, self)
  File "/usr/lib/python2.4/site-packages/Pootle/projects.py", line 102,
in __init__
    self.fileext = self.potree.getprojectlocalfiletype(self.projectcode)
AttributeError: POTree instance has no attribute
'getprojectlocalfiletype'



> 
> > 
> > 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])
> 
> I can't reproduce this problem. Would it be possible for you to explain
> your setup? Do I understand correctly that it is a gnu style project
> (filenames like sr.po) but also a directory structure?
> 
I will try to explain best I can :)

Well, it is mismatch of different translation projects. So to organize
it better, I created a project, and inside of the project I would create
directories to keep different po files. It works fine if all I am doing
is translation. But I wanted to be able to use local SVN repository with
it.

My directory structure looks something like this:

/pootleRootDirectory/projectName/LanguageCode/Subdirectory1/Subdirecotry2/etc...

I have sr.po files in either or all LanguageCode, or Subdirectory1 or
subdirectory2

For example:

Main file for translation would be 
/pootleRootDirectory/projectName/LanguageCode/sr.po
Some related file for translation would be in 
/pootleRootDirectory/projectName/LanguageCode/Subdirectory1/sr.po
/pootleRootDirectory/projectName/LanguageCode/Subdirectory1/someOtherFileName.po
And in some cases I would have related files to Subdirecotry1 in
/pootleRootDirectory/projectName/LanguageCode/Subdirectory1/Subdirecotry2/sr.po

In my case:
PootleRootDirectory -> /pootle
projectName -> either Fedora, Gnome etc.
Subdirectory1 -> for Fedora it would be either Documentation or GUI
Subdirectory2 -> for Fedora/GUI it would be anaconda,
system-config-printer, and all of the other Fedora related application

This is the reason key variable actually has pathToFile/fileName format.
The printout of variable "self" in timecache.py is below:

({'release-notes/devel/sr.po': <Pootle.pootlefile.pootlefile object at
0xa31670c>, 'install-guide/FC-6/sr.po': <Pootle.pootlefile.pootlefile
object at 0xa31bc6c>, 'desktop-user-guide/FC-6/sr.po':
<Pootle.pootlefile.pootlefile object at 0xa316bac>,
'install-guide/devel/sr.po': <Pootle.pootlefile.pootlefile object at
0xa31b28c>}, 'desktop-user-guide/FC-6/sr.po')

So keys are "release-notes/devel/sr.po" ,
"desktop-user-guide/FC-6/sr.po", etc. They include directory names,
usually it would use key "sr.po", which does not exist, or if it does,
it is usually wrong one. 


> Thanks a lot for your testing.
> 
Thank you for good product.

Regards,
Igor

Attachment: 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

Reply via email to