Going on internalisation with GTKAda and Glade, I used xgettext to extra strings to be translated from Glade UI files but xgettext doesn’t support Ada language :-(
Nevertheless, GTKAda brings build_skeleton.pl, a small Perl script which extract, from Ada source files, strings with minus in front of them like -”Quit” .
By the way build_skeleton.pl is only available in GTKAda source archive, it is not installed in binaries.
Well all is fine generating the necessary translation ”.mo” files but nothing works.
I was stuck on my chair when I discovered that gtkada.intl contains only empty bodies.
So I filled them, it works with my small program. I don’t assure that all works as I hasn’t tested all of them.
Here are the modified source files with a diff file:
(I change gtkada.intl to gtkada_intl for testing purpose)
Hello Emmanuel, you were right, here is my configure log:
checking for gettext in libc… no
Effectively I noticed sometimes, gettext is not detected by configure.
Nevertheless, may I bring a patch proposal for gtkada.intl:
Notice that I have kept the SetLocale procedure as it was but It seems to me wrong on LC_ALL value:
LC_ALL : constant Integer := 6; -- from locale.h
here is locale.h from MacOS 10.9 with LC_ALL set to zero:
* @(#)locale.h 8.1 (Berkeley) 6/2/93
* $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MESSAGES 6
#define _LC_LAST 7 /* marks end */
char *setlocale(int, const char *);
#endif /* _LOCALE_H_ */
>> I was stuck on my chair when I discovered that gtkada.intl contains only empty bodies.
> Check the output of 'configure', apparently it did not detect gettext for some
> gtkada-intl.adb is generated from gtkada-intl.gpb