bugXBoard - Bugs: bug #35181, Shortened menunames in tinymode...


bug #35181: Shortened menunames in tinymode not translated

Submitter:  Byrial Jensen <bjensen>
Submitted:  Tue 27 Dec 2011 11:58:28 AM UTC
Category:  XBoard (X11) Severity:  3 - Normal
Item Group:  None Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Sun 22 Jan 2012 01:22:48 AM UTC, comment #1: 

fixed in


by using a fixed width for the menus

Arun Persaud <apersaud>
Project Administrator
Tue 27 Dec 2011 11:58:28 AM UTC, original submission:  

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 xboard.
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?

Byrial Jensen <bjensen>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by apersaud (Posted a comment)
  • -email is unavailable- added by bjensen (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-29 apersaud StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-01-22 apersaud StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.9