[haiku-development] Re: Localization: trailing spaces issue (Was: [haiku-commits] r40476 - haiku/trunk/src/apps/launchbox)

  • From: Jorma Karvonen <karvonen.jorma@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 13 Feb 2011 22:15:16 +0200

OK, I'll try to use it. I have mostly used << notation when it is
already used there previously. I have added only an additional << " "
<< xxx. BTW, I should have changed that on "Free on " in DiskUsage
refactoring patch I just mailed here.

br, Karvjorm

2011/2/13, Adrien Destugues <pulkomandy@xxxxxxxxxxxxxxxxx>:
> Le 13/02/2011 17:23, Jorma Karvonen a écrit :
>> 2011/2/13, Oliver Tappe<zooey@xxxxxxxxxxxxxxx>:
>>> On 2011-02-13 at 13:57:50 [+0100], Siarzhuk Zharski<zharik@xxxxxx>
>>> wrote:
>>> Indeed. Let's fix the tool instead.
>>>
>>> cheers,
>>>     Oliver
>> The problem is that catalog files can be handled also with other tools
>> than HTA. For example, those trailing spaces are not visible in text
>> editor either, I think.
>>
>> Same is with some tools used to handle .po files used with the other
>> translation projects. If you use PoEditor, for example, to edit .po
>> files, trailing spaces are not visible, but if you ask PoEditor to
>> copy msgid to msgstr as a template for translation, then trailing
>> space is copied also and you can notice it, if you move the cursor to
>> the end of string. But translators do not work always by this way and
>> result can be an error.
>>
>> In HTA you don not have any button that copies orginal string to
>> target window. Also, when editing .po files with a usual text editor,
>> trailing spaces are visible, because msgid is within quotes: msgid
>> "Translate this: ". But quotes are not used with Haiku catalogs.
>>
> You should use the ReplaceFirst() method. This way the string is
> "sometext: %value"
> As a result :
>   * the space is visible
>   * the value may be moved before the text if needed in some language.
>
> So just avoid the << operator and use proper localizable methods
> instead. And the tool don't need to be fixed anymore.
>
> --
> Adrien.
>
>

Other related posts: