Internationalisation with GTKAda and Glade.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Internationalisation with GTKAda and Glade.

Pascal-68
Hello,
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)



HTH, Pascal.
http://blady.pagesperso-orange.fr



_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada

gtkada_intl.adb (6K) Download Attachment
gtkada_intl.ads (7K) Download Attachment
gtkada_intl.diff (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Internationalisation with GTKAda and Glade.

Emmanuel Briot
> 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
reason.
gtkada-intl.adb is generated from gtkada-intl.gpb

Emmanuel

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: Internationalisation with GTKAda and Glade.

Pascal-68
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 $
 */
#ifndef _LOCALE_H_
#define _LOCALE_H_
#include <_locale.h>
#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 */
__BEGIN_DECLS
char *setlocale(int, const char *);
__END_DECLS
#endif /* _LOCALE_H_ */

HTH, Pascal.
http://blady.pagesperso-orange.fr


Le 3 mars 2014 à 15:44, Emmanuel Briot <[hidden email]> a écrit :

>> 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
> reason.
> gtkada-intl.adb is generated from gtkada-intl.gpb
>
> Emmanuel
>


_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada

gtkada.intl.diff (2K) Download Attachment