bino-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bino-list] Bug: translation of Usage text using UTF-8


From: Alexey Osipov
Subject: Re: [Bino-list] Bug: translation of Usage text using UTF-8
Date: Tue, 19 Apr 2011 11:58:20 +0700

Hi Martin!

В Пнд, 18/04/2011 в 20:45 +0200, Martin Lambers пишет:
> On 17/04/11 20:21, Alexey Osipov wrote:
> > In process of making russian translation for bino, I've found a bug,
> > which makes translated Usage text seem not quite good.
> > 
> > In msg::msg_txt you use 'for' loop to cycle through std::string,
> > representing a text (the Usage text in particular), and count symbols to
> > determine the line length. But if text is in UTF-8 (or other multi-byte
> > encoding), the counting is doing wrong - two-byte character counts for
> > two characters. So the total allowed length of the string becomes less
> > than default 80 columns and hence translated string is wrapped to the
> > next line.
> > 
> > See attached screenshot.
> > 
> > You should use std::wstring or something to count multi-byte characters
> > as one character.
> 
> You are right. This should fix it:
> http://git.savannah.gnu.org/cgit/bino.git/commit/?id=66993854b13c0039d98ce3e7b3e2ec8856236c98
> 
> On systems that have wcwidth(), this should also work with locales where
> one character does not necessarily mean one output column.
> 
> Does this work for you?

Yes, it's good now.

I attach updated russian translation including the update of interactive
controls section (ESC, q).

Alexey.

Attachment: ru.po
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]