Page 1 of 2

UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 2:51 pm
by Acid_Jack
I'm translating SABnbzd (0.6.9, win) to the Russian and from time to time check my translation.
But after some update I've got error:

Code: Select all

Traceback (most recent call last):
  File "cherrypy\_cprequest.pyo", line 618, in respond
  File "cherrypy\_cpdispatch.pyo", line 25, in __call__
  File "sabnzbd\interface.pyo", line 253, in index
  File "sabnzbd\api.pyo", line 1468, in build_header
  File "gettext.pyo", line 365, in lgettext
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-7: ordinal not in range(256)
I admit that error hides in some of my messages but can't catch/debug it.
Is it possible to find that erroneous character?
I've already translated hundreds of words and it's too complicate for me to check every segment (remove one translated message, compile mo, replace old mo with new one, kill sabnbzd process, start sabnbzd, check output).

Re: UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 3:37 pm
by shypike
Sorry, currently we only support Latin-1.
The code needs substantial and wide-ranging changes for it to support full Unicode.
We've got a Serbian translation waiting for support too :(
It's on the roadmap.
I did make an experimental version for the Serbian translation.
When I recover it, I'll contact you.
I assume you did your translation in Lauchpad.
If not contact me, so that I can import it into Launchpad.

Re: UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 3:45 pm
by Acid_Jack
But i SAW a partially lokalized interface. So it works in some way.
I can continue translation but I need to see a context to get better quality. Or I have to wait new version with full unicode support?

I prefer to work in offline mode in omegaT with testing on a live system. After comprehensive testing i'll can publish my translation (on the Launchpad or here).

Re: UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 4:11 pm
by shypike
I'll see if I can hack together a version with an alternative code page again.
It's not perfect, but should allow you to check on a working system.
Did you base your work on 0.6.x or 0.7.x (or "master" vs. "develop" on github)?

Re: UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 4:16 pm
by Acid_Jack
I'm using pot-files from launchpad for 0.7.x.
Hm... Damn it! Should I use template from 0.6.x branch?

Re: UnicodeEncodeError while translation to Russian

Posted: October 2nd, 2011, 4:29 pm
by shypike
No, you picked the right one.
We won't add Cyrillic support to 0.6.x anyway.

Re: UnicodeEncodeError while translation to Russian

Posted: October 4th, 2011, 3:26 pm
by shypike
Sorry to frustrate your work, but it may take a while before Cyrillic support comes along.
I'm overloaded with work right now.
Think a couple of weeks.

Re: UnicodeEncodeError while translation to Russian

Posted: October 5th, 2011, 1:49 am
by Acid_Jack
Ok. I also have enough work.

Re: UnicodeEncodeError while translation to Russian

Posted: November 28th, 2011, 9:31 am
by Acid_Jack
So I finished Russian translation.
What me to do with it?

I hate Launchpad so I published translated po's on my home page.
Source pot's was taken from github few minutes ago and my files was also updated.

Re: UnicodeEncodeError while translation to Russian

Posted: November 29th, 2011, 3:04 am
by shypike
Have a little more patience so that I can get Cyrillic to work.
I realize that I've been saying this for quite a while.
Currently, I hardly have enough time to finish even 0.6.11.
The best thing would be to make a full Unicode app, but that's simply not feasible in the short run.
I'll see if I can resort to simple codepage switching.

Re: UnicodeEncodeError while translation to Russian

Posted: November 29th, 2011, 3:20 am
by Acid_Jack
OK. Just be wating.

Re: UnicodeEncodeError while translation to Russian

Posted: March 22nd, 2012, 8:12 am
by Acid_Jack
So still no support for UTF-8 and cyrillic?

Re: UnicodeEncodeError while translation to Russian

Posted: March 22nd, 2012, 1:23 pm
by shypike
After release 0.7.0 is out.
The problem with changing the program to Unicode is that it takes up to a thousand
(small) changes spread out over all of the code base.
This cannot be done in parallel to other work because that would result in
a merging nightmare. The work has to be done while nothing else is in development.
It's also a couple of weeks of extremely boring work and subsequent testing.

Re: UnicodeEncodeError while translation to Russian

Posted: April 6th, 2012, 8:21 am
by Acid_Jack
0.7.0 Beta2
Still have problem:

Code: Select all

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-13: ordinal not in range(256)

Re: UnicodeEncodeError while translation to Russian

Posted: April 6th, 2012, 8:29 am
by shypike
"After release 0.7.0" is out means that work will start after we release 0.7.0Final.