Small bugs related to translation

Dirk Hohndel dirk at hohndel.org
Sat Feb 2 12:54:40 PST 2013


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

> Hi,
>
> Spotted some minor bugs while updating Russian translation:
>
> 1) "Gas Used" string  has different meaning in planner.c:1144 than in
> other places. Everywhere it means volume of a gas consumed but in
> planner it's name of the gas mix.

Oops - that's bad. I need to go back and check how we can mark them up
differently with context. I know we do this elsewhere but we are heading
out to go diving in a few minutes, so it won't be until much later
today.

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

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

> My guess that there're several reasons:
> - length of some buffer to store localized string
> - hardcoded logic which relies on "air" keyword

I hope that we wouldn't translate anything that's a keyword for XML (I
usually am quite careful with that). That's why I want to see the XML
file.

/D


More information about the subsurface mailing list