(wiki.videolan.org/OutOfTreeCompile) - Talking about vlc module :
"If you want gettext translations, you need to setup gettext in the build system and maintain the PO files.
"However, the VLC core is able to load your module text domain into the process automatically. This is required for the plugins cache to operate correctly. You simply need to add one “set_text_domain” line in the module descriptor, e.g.: " […]
ricardo.ecn.wfu.edu/~cottrell/cross-gtk/ - Building GTK apps for MS Windows on Linux (2004)
“If your app is internationalized, you’ll want to make binary message catalogs (.mo) in win32 format. I do this by using msgfmt.exe (available in the GNU gettext package for win32) under wine.”
Not really about cmake, and i’m quite sure the dev’team know all that…
but maybe re-reading basics can help to go higher …?
Of course, now it won’t do anything but French. Something’s got cached somewhere.
Good work pixelgeek!
I think it will be fine if user will choose desired language at installation time. Choosing language at install time will install one-language version, but it’s pretty common situation for Win apps…
Mince (?) , je n’utilise plus windows… !
It’s not me … cached somewhere in your registry…maybe some of yr ducks are preparing a new home ?
But, why is synfig half translated ? look like it’s just windows commons strings ? but not synfig ones…
Some users asked to have an option in Preferences to overwrite the operation system language setting.
I think d.j.a.y called it - it’s using the GTK strings for translation.
I tried seeing how synfig did it on Ubuntu, but [code]chrisn@chrisn-Studio-XPS-435MT:~$ LANG=GB_en synfigstudio
synfig studio – starting up application…
(process:2832): Gtk-WARNING **: Locale not supported by C library.
Using the fallback ‘C’ locale.
I couldn’t get languages to work at all there…
Hi! A believe you should try
$ LANG=en_GB synfigstudio
$ LANG=GB_en synfigstudio
At least I have “$ LANG=ru_RU synfigstudio” working as expected…
Nope. Not en_GB or ru_RU (or even just ru). Same error message. Ubuntu bug?
OK - Given that I can get translations of the GTK strings, I think I’ve got the .mo files in the right place. I’m now wondering if the binary I have is not locale aware. Looking at the Synfig code, it looks like there’s an ‘ENABLE_NLS’ flag that needs to be set (which might also explain why the .mo files aren’t being automatically built). Where would be a good place to set that flag up?
Where exactly do you see at the Synfig code that there is an ‘ENABLE_NLS’ flag that needs to be set?
I think that in any case it should go where gettext.h is included. See this: lists.gnu.org/archive/html/grub- … 00340.html
config.h, generated by configure includes the lines
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
[code]/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
#define (x) dgettext(“synfig”,x)
#define gettext_noop(x) x
#define N(x) gettext_noop(x)
#define dgettext(a,x) (x)
#define (x) (x)
#define N(x) (x)
and definitions.h has
[code]/* === M A C R O S ========================================================= */
#define _(x) gettext(x)
#define _(x) (x)
hummm… smell good win’z cross-language software is baking…!
SO maybe, one day in this thread we could talk about the web site , and this absolutely important question : does multilanguage / cross platform (on even win’z) synfig feature … is or not a feature?
absolutely important question…
Wow, that’s a mess!
In general.h the macro _(x) is defined as dgettext(“synfig”,x) but in definitions.h it is defined as gettext(x), so which is really used?
Also, when ENABLE_NLS is not defined, then the macro _(x) is just replaced by x, so it maybe be one of the reasons why it doesn’t work in Windows.
We need to research how ENABLE_NLS is defined in unix system and do the same in Windows.
Not really, you are making real progress here. Thank you & keep it going!
A crazy idea about this:
@pixelgeek: Why don’t replace one _(“foo bar”) at the code with the corresponding gettext(“foo bar”) to trigger the warning or error messages that might complain about the missing translated string? That could help on debug what’s happening there.
From my point of view, the code is the doc for a developer.
I guess I could remove all the #ifdef ENABLE_NLS lines
It’ll have to wait until I get back from a business trip.