Ok, I've a looked into fluid code, and the menus are actually translated - but 
in widget constructor or function call.
However this approach does not enable automatic extraction of translation 
strings (ie using xgettext and .po files) - and this is what actually caused 
the loss of translation in my files.

I have modified the fluid (STR with patch 
http://fltk.org/str.php?L2861+P0+S-2+C0+I0+E0+Q2861) to allow definition of 
no-operation macro just to indicate the translation strings. So if user defines 
this (apart from translation function) ie as NOOP , fluid will generate after 
i18n header inclusion

  #ifndef  NOOP
    #define NOOP(a) a
  #endif

and menus are generated as

  Fl_Menu_Item menu[] = {
   {NOOP("Item 1"), ... }
   0
  };

However: I still prefer static initialization. As the macro actually can do 
static initialization too (if defined as calling the real function), I have 
added also a macro wrapper around generated dynamic initialization so user can 
define FL_USE_STATIC_I18N to comment it out and avoid double translation.

I still do not know what king of problems did they had with the initialization 
(maybe they initialize gettext at the beginning of main()  - which is of course 
too late) but I am back in the business, and it would be good if some 
modification (not necessary proposed ones) could some stage go to back to the 
svn tree.

Roman



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to