FLTK logo

STR #2246

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #2246

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:3 - Applies to all machines and operating systems
Subsystem:FLUID
Summary:fluid, i18n, untranslated menus
Version:1.3.0
Created By:gry
Assigned To:matt
Fix Version:1.3.0 (SVN: v7822)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 gry
09:02 Sep 03, 2009
fltk-1.3-fluid-i18n-fix.patch
5k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 gry
09:02 Sep 03, 2009
Hi, I'm using fltk-1.3.x and fluid with gettext i18n. If I add Fl_Choice widget to some window in fluid, and then add predefined dropdown menu to that choice widget, then fluid will generate menu as static class member array.

Then this array is used in constructor of window to construct choice widget with it.

This array itself is created before main function executed, therefore before proper locale is set. Thus gettext returns original messages, not translated ones, and all menus in choices left untranslated.

Solution is to add it not like a static class member but local static object in window constructor, just before it gets used. It still be created once, as a static object, but not before main function. I tried to modify generated code this way, it works.

I have fixed this issue as proposed, see attached patch. Please review it and let me know if everything is ok. I have tested it with several fltk applications that uses menus, everything works ok.
 
 
#2 matt
01:42 Apr 05, 2010
I looked at the code and it seems ok. It does not fix all cases, but I guess it is good enough. I really *hate* the stupid menu arrays!  
 
#3 matt
08:06 Nov 12, 2010
Fixed in Subversion repository.

I did not use the patch because I felt that it moves too much code around. This solution will work just as well I hope.
 
 
#4 AlbrechtS
17:24 Mar 07, 2016
Reopened - the solution in svn r7822 might have been suboptimal.

Please see STR #3289 for more info with links to other STR's and current discussion in fltk.general
http://www.fltk.org/str.php?L3289
https://groups.google.com/forum/#!topic/fltkgeneral/uJkEHrargrs

We _might_ consider a better solution or maybe even revert svn r7822 and fix the issue with some glue code that avoids the "static initialization fiasco". Or ... don't know yet.

Note: I DO NOT KNOW whether we really should change the current code.
Reopening this STR is only meant to further the discussion and find a better solution if possible.

    ==========================================================
      Please do not add more comments to this STR right now.
      Discussion should procede in fltk.general, patches and
      more comments preferably be added to STR #3289.
    ==========================================================
 
 
#5 AlbrechtS
02:52 Sep 01, 2016
Bumped to 1.4-feature.

A fix in 1.3.4 would certainly break existing user code.
We hope we can find a better solution in FLTK 1.4.0.
 
 
#6 AlbrechtS
04:07 Sep 01, 2016
Closing this STR again, since its fix is in FLTK 1.3.0 and following 1.3.x versions.

A new STR (#3289) was opened and should be resolved, if possible, in FLTK 1.4.0.
 
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.