[ Return to Bugs & Features | Post Text | Post File | Prev | Next ]
|Status:||5 - New|
|Priority:||4 - High, e.g. key functionality not working|
|Scope:||3 - Applies to all machines and operating systems|
|Summary:||Fl_Menu_Items don't have i18n function in them when spit from fluid|
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
||Current v1.3.3 of fluid does not spit out gettext information for the menus. It later reads and translates the text, but the original text does not have any gettext in it making it impossible to extract it with xgettext. ||
17:00 Mar 07, 2016
|Reassigned high priority - see current discussion in fltk.general titled "xgettext usage for menus". Ref: |
As Greg pointed out we have several related STR's:
1. Subject: Enabling "Extract gettext" on fluid menus +
possibility of static initialization of strings
2. Subject: Fl_Menu_Items don't have i18n function in them
when spit from fluid
Also, perhaps related, here's an STR Matt closed back in 2010 with 1.3:
Subject: "fluid, i18n, untranslated menus"
..and this one, also perhaps related, still open:
17:32 Mar 07, 2016
|Converted the given patch (fix.diff) to uniform diff using git. See attached file fix_v2.diff. Please use patch -p1 to apply. ||
14:40 Mar 08, 2016
|I attached test-xgettext.fl file. I hope it will be usefull. |
There is no external dependencies. The application read "default.mo" file with translations and use them to work. To scan strings from sources and create the .mo file you need xgettext package.
1) scanning of strings
> xgettext.exe -o ./out.pot --from-code=UTF-8 --keyword --keyword=_ test-xgettext.cxx test-xgettext.h
2) merging with previous set of string (if not exists just copy .pot to .po)
> msgmerge.exe -o ./default.po ./out.po ./out.pot
3) insert other language strings (msgstr) to out.po file in any editor, eg:
4) compilation .po to .mo
> msgfmt.exe -o ./default.mo ./default.po
The current Fluid version creates code that can't be correctly scanned by xgettext, so there was no menu strings in .po (and .mo) file at all.
02:53 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.
10:45 Jul 07, 2017
|Hasn't this all been fixed with the "menu_xxx_i18n_done" system at least in 1.4? ||
13:19 Jul 07, 2017
|No, unfortunately not. :-( |
Please see my comment #2, particularly the link to the fltk.general google group, but also the links to several other still open or already closed STR's.
As far as I understand the attempted fix in FLTK 1.3  was considered a regression by some users because there are no longer gettext(..) or _(..) "markers" (function calls) in the code generated by fluid. Hence xgettext can't be used to extract the strings from the code to generate .po(t) and .mo files to localize the code.
AFAICT the attempted fix in FLTK 1.3 was 
I can't tell if this single commit really removed gettext() "markers" from the fluid-generated code, but I assume that this was the case in an attempt to fix startup crashes because of uninitialized static variables (aka "static initialization order fiasco" ). Unfortunately I'm not familiar with fluid internals, so I can't contribute a solution.
 svn r7822, STR #2246 <http://www.fltk.org/str.php?L2246>
[ Return to Bugs & Features | Post Text | Post File ]