Re: [AD] Untranslated string: ALLEGRO_WINDOW_CLOSE_MESSAGE

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>   - #define XWIN_DEFAULT_WINDOW_TITLE in src/x/xwin.c is never
> translated.

Right. However Xlib doesn't support anything else than ASCII so the
translated strings would be screwed up.

>   - On several places, "mono", "stereo", "signed", and "unsigned" are
> untranslated and sprintf'ed into translated strings (so two languages
> are mixed).

That should be fixed.

>   - I think lines 112-113 and 166-167 in alsamidi are wrong:
>     snprintf(temp, sizeof(temp),
>              "Could not open card/rawmidi device: %s",
>              snd_strerror(err));
>     ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text(temp));
> Probably that string should first be translated, then snprintf'ed, not
> the other way around?

Yes.

> I can make a patch if someone confirms (or even better: someone who knows
> how to test it can write a patch :-)

Successful compilation is enough.

>   - Most drivers seem to have a field called `ascii_name'. This gets
> translated, but is not found by misc/findtext.sh, so chances are that
> nobody ever translates them. I collected a (pretty big) list of such
> strings, in case some translator is interested.

Where does this field get translated ? In the process of filling the 'name'
field ? Could you upload the list anywhere ?

>  > PD: Looks like hard tabs dissappeard from a few source files...
>
> I also noticed that lkeybd.c is screwed up.

IIRC ahack._tx doesn't require TABs, does it ?

>  > allegro_window_close_message =  Warning: forcing program shutdown may
>  > lead to  data loss and unexpected results. It is  preferable to use
>  > the exit command inside the window. Proceed anyway?
>
> With some effort, I can misinterpret 'Proceed anyway' as
> 'Proceed running the program' rather than 'Proceed the action of
> closing the program'. Maybe it's totally unambigous for native
> speakers, but I think it can't hurt to say something like
> 'Really proceed closing the program?'. OK?

This message string spawned a lengthy debate some time ago, and was agreed
upon only after a formal voting. So I don't think we can change it without
another formal voting... and remember Florida ;-)

> One more issue: Isn't it a security problem to feed translated
> strings as the format parameter to sprintf()? An evil cracker
> might add some extra "%s" in order to corrupt memory.

Obviously yes, with sprintf() or usprintf(). Both should be changed into
uszprintf() which does proper bound-checking.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/