URL:
<http://savannah.gnu.org/bugs/?35181>
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
_______________________________________________________
Details:
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?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35181>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-XBoard mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-xboard