UnicodeEncodeError while translation to Russian

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

UnicodeEncodeError while translation to Russian

Post 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).

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post 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.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post 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).

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post 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)?

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post 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?

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post by shypike »

No, you picked the right one.
We won't add Cyrillic support to 0.6.x anyway.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post 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.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post by Acid_Jack »

Ok. I also have enough work.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post 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.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post 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.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post by Acid_Jack »

OK. Just be wating.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post by Acid_Jack »

So still no support for UTF-8 and cyrillic?

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post 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.

Acid_Jack
Newbie
Newbie
Posts: 12
Joined: October 2nd, 2011, 2:35 pm

Re: UnicodeEncodeError while translation to Russian

Post 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)

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: UnicodeEncodeError while translation to Russian

Post by shypike »

"After release 0.7.0" is out means that work will start after we release 0.7.0Final.

Post Reply