xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] Refactored master


From: h . g . muller
Subject: Re: [XBoard-devel] Refactored master
Date: Tue, 10 Apr 2012 20:43:06 +0200
User-agent: SquirrelMail

> I looked at it some more. It seems that the XT call
> XtSetLanguageProc(NULL, NULL, NULL) also will set the locale, and that's
> why Xboard used to work with NLS without calling setlocale().
>
> However the locale must be set before the call to bindtextdomain(). In
> the refactored master it comes later. That is reason it doesn't work
> there.

OK, thanks, I would never have figured that out myself. This seems to
work. Strange thing is that by mistake I first put the XtSetLanguageProc
immediately behind the bindtextdomain, and that did work too. But not if
it was too far back. (I had moved it back to make it easier to remove all
X11 code completely, for a 'NoBoard' command-line interface to play
engines against each other, that could run on machines that do not support
X.)

Now that internationalization works, I could see that some label widgets
in the Engine Output window got a disastrous height, because they
specified an empty string (which apparently translates to a huge
multi-line thing). This was because they were only there to accomodate an
icon. (Perhaps this is a wrong way of doing it, because I believe that a
single label widget can accommodate both a text and an icon, and that the
text than automatically goes behind the icon, so in principle the
first&second and third&fourth label widget above the text memos in the
Engine-Output window could be combined. But that was not how the old code
did it, and might entail the risk of the text jumping back and forth if
the icon is missing.

Anyway, I fixed that too now, by giving the icon widgets a text of a
single space. (I guess I could have put an explicit test for emptiness
suppressing the translation in the code as well, but this was simpler.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]