[Top][All Lists]

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

[Bug-XBoard] [bug #35181] Shortened menunames in tinymode not translated

From: Byrial Jensen
Subject: [Bug-XBoard] [bug #35181] Shortened menunames in tinymode not translated
Date: Tue, 27 Dec 2011 11:58:29 +0000
User-agent: Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0


                 Summary: Shortened menunames in tinymode not translated
                 Project: XBoard
            Submitted by: bjensen
            Submitted on: Tue 27 Dec 2011 11:58:28 AM GMT
                Category: XBoard (X11)
                Severity: 3 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None



The menu names in the menubar will in size tiny be shortened to one letter,
but it will be the first letter of the English name independent of the current
interface language.

The responsible code is in xboard.c:

  j = 0;
  XtSetArg(args[j], XtNmenuName, XtNewString(menuName));  j++;
  if (tinyLayout) {
    char shortName[2];
    shortName[0] = mb->name[0];
    shortName[1] = NULLCHAR;
    XtSetArg(args[j], XtNlabel, XtNewString(shortName)); j++;
  else {
    XtSetArg(args[j], XtNlabel, XtNewString(_(mb->name))); j++;

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?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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