[Top][All Lists]

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

Re: [Bug-XBoard] [bug #35181] Shortened menunames in tinymode not transl

From: h.g. muller
Subject: Re: [Bug-XBoard] [bug #35181] Shortened menunames in tinymode not translated
Date: Tue, 27 Dec 2011 16:06:28 +0100

I see 3 ways to fix that:
1) Extract the first character from the localized name using mbtowc(). (mbtowc
stands for Multi Byte char TO Wide Char). It is easy to do, but the method may
not be available for all as mbtowc() is a C99 function.
2) Extract the first character from the localized name using some library for
handling multibyte chars. That could be a fallback solution if 1) fails, but
means that the library have to be installed or distributed together with
3) Let the translators translate all the 1 letter abbreviations. Requires no
extra configuration, and let the translators choose something else than the
first letter if that is more appropriate for their language, so this is
probably the best solution, I think.

What do you think?

Actually I remember making patch where the number of characters shown
for each item was dependent on the board width in pixels, and could be different from just 1 or all. I still have to look into itwhythis is notin the master branch now (could beit is a WinBoard-only patch, could also be that it is in the aliennew branch).

The current 'tiny-layout' scheme does not work satifactorily anymore:
1) Now we reorganized the menus, the main menu bar has more items, and is wider
2) Translation can make the meu bar arbitrary wide (e.g. try German on -size middling) 3) It does not take the number of board files into account; in xiangqi, gothic or courier
   the same -size would allow a ider menu bar
4) (I have never sen this, but I think it must be:) the font size is not taken into account,
    while the -messageFont is also used for the menu bar, AFAIK.

So the current scheme is a total mess. I would prefer to replace it by something that takes everything into account. E.g. calculate the width of the menu bar in pixels, taking into account the font used to render it, and then clip the texts to an increasingly shorter number of characters until it is no longer larger than the board. This should be redone
whenever the window width changes.

reply via email to

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