Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

po2dtd doesn't cope with removed spaces #183

Closed
dwaynebailey opened this issue Feb 3, 2006 · 3 comments
Closed

po2dtd doesn't cope with removed spaces #183

dwaynebailey opened this issue Feb 3, 2006 · 3 comments

Comments

@dwaynebailey
Copy link
Member

Version: 0.8rc6

Bug #79 solved the compaction of pretty printed spaces. However merging back
seems to be a problem now:

Here is a traceback:

[dwayne@laptop-wifi convert]$ python po2dtd.py -t incompatible.dtd
incompatible.dtd.po incompatible.dtd.tn —errorlevel=traceback
processing 1 files…

po2dtd.py: warning: Error processing: input incompatible.dtd.po, output
incompatible.dtd.tn, template incompatible.dtd: Traceback (most recent call last):

File “/usr/lib/python2.4/site-packages/translate/misc/optrecurse.py”, line

418, in recursiveprocess
success = self.processfile(fileprocessor, options, fullinputpath,
fulloutputpath, fulltemplatepath)

File “/usr/lib/python2.4/site-packages/translate/misc/optrecurse.py”, line

471, in processfile
if fileprocessor(inputfile, outputfile, templatefile, **passthroughoptions):

File “po2dtd.py”, line 262, in convertdtd outputdtdsrc = str(outputdtd) File “/usr/lib/python2.4/site-packages/translate/storage/dtd.py”, line 276, in

str
source = self.getsource()

File “/usr/lib/python2.4/site-packages/translate/storage/dtd.py”, line 283, in

getsource
sources = [str(dtd) for dtd in self.dtdelements]

File “/usr/lib/python2.4/site-packages/translate/storage/dtd.py”, line 209, in

str
source = self.getsource()

File “/usr/lib/python2.4/site-packages/translate/storage/dtd.py”, line 220, in

getsource
raise StopIteration()

StopIteration

@dwaynebailey
Copy link
Member Author

Created [attachment 43](http://bugs.locamotion.org/attachment.cgi?id=43)

A dtd with pretty printed lines

@dwaynebailey
Copy link
Member Author

OK doesn’t seem to want to upload any more file. Who nows.

I have a Tswana translation of this file. Just shout if you need it.

@davidfraser
Copy link

I’m pretty sure I fixed this one, that StopIteration was old code leftover from
when tolines was a generator, and I’ve removed it in the new getsource method

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants