Small bugs related to translation

Dirk Hohndel dirk at hohndel.org
Sat Feb 2 13:47:55 PST 2013


Sergey Starosek <sergey.starosek at gmail.com> writes:

> Dirk,
>
> 2013/2/2 Dirk Hohndel <dirk at hohndel.org>:
>>> 2) Translating cardinal directions (NSWE) breaks GPS location parsing
>>> functionality.
>>
>> I was worried about that. What is the usual way of giving GPS
>> coordinates in a Russian locale? Are you using NSWE or are you using
>> localized cardinal directions?
>
> I think it's OK to leave them untranslated. On the other hand some
> people may prefer to see it localized.

I think I'll revert back to that until I understand better how to
correctly localize them...

>>> 3) There are two strings "AIR" and "air" (first is used in planner.c
>>> only). Translating both into russian (6 utf8 chars, 12 bytes) leads to
>>> a lot of errors in console:
>>>
>>> star at narwhal Subsurface $ ./subsurface
>>> (subsurface:13239): Gtk-CRITICAL **: gtk_text_buffer_emit_insert:
>>> assertion `g_utf8_validate (text, len, NULL)' failed
>>> (subsurface:13239): Gtk-CRITICAL **: gtk_text_buffer_emit_insert:
>>> assertion `g_utf8_validate (text, len, NULL)' failed
>>> invalid gas for row 0
>>>
>>> Saving such plan makes XML file invalid:
>>>
>>> star at narwhal Subsurface $ ./subsurface -vvv
>>> /home/star/.subsurface/star.xml:78: parser error : Input is not proper
>>> UTF-8, indicate encoding !
>>> Bytes: 0xD1 0x0A 0xD0 0x9F
>>
>> Can you send me the XML file, please?
>
> Attached. Simple plan with one segment. I think the problem is with
> <notes> element.

Yes - there are incorrectly chopped off UTF-8 characters. Easy to
spot. While I had a big enough buffer for the notes section itself, the
gas text was a puny 12 chars (which is plenty in English, but not if
using UTF-8 in translations). I just pushed a fix. Please test.

/D


More information about the subsurface mailing list