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

 
 

bug #35181: Shortened menunames in tinymode not translated

Submitted by:  Byrial Jensen <bjensen>
Submitted on:  Tue 27 Dec 2011 11:58:28 AM UTC  
 
Category: XBoard (X11)Severity: 3 - Normal
Item Group: NoneStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

fixed in

971e8861ca82286fa3d6e850dd80277875cee983
5e9c0cf341ed15642e78dd61bcc8731399bafedb

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 29 Sep 2012 07:43:24 PM UTCapersaudStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun 22 Jan 2012 01:22:48 AM UTCapersaudStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1