Small bugs related to translation

Sergey Starosek sergey.starosek at gmail.com
Sat Feb 2 12:31:26 PST 2013


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.

2) Translating cardinal directions (NSWE) breaks GPS location parsing
functionality.

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


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

Sergey


More information about the subsurface mailing list