Enlightenment CVS committal Author : doursse Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: Makefile.am etk_main.c etk_utils.h Log Message: etk can speak french and can learn other languages =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 8 Oct 2005 15:06:04 -0000 1.2 +++ Makefile.am 16 Oct 2005 00:05:57 -0000 1.3 @@ -2,6 +2,11 @@ AUTOMAKE_OPTIONS = 1.4 foreign +# Gettext +datadir = @datadir@ +localedir = $(datadir)/locale +DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ + INCLUDES = \ -I. -I$(top_srcdir)/src/lib -Wall -g \ @ecore_cflags@ @evas_cflags@ @edje_cflags@ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_main.c 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_main.c 16 Oct 2005 00:05:57 -0000 1.2 @@ -6,6 +6,7 @@ #include <Ecore_Evas.h> #include <Evas.h> #include <Edje.h> +#include "config.h" #include "etk_type.h" #include "etk_signal.h" #include "etk_object.h" @@ -42,42 +43,48 @@ if (!evas_init()) { - ETK_WARNING("Evas initialization failed!"); + ETK_WARNING(_("Evas initialization failed!")); return FALSE; } if (!ecore_init()) { - ETK_WARNING("Ecore initialization failed!"); + ETK_WARNING(_("Ecore initialization failed!")); return FALSE; } if (!ecore_evas_init()) { - ETK_WARNING("Ecore_Evas initialization failed!"); + ETK_WARNING(_("Ecore_Evas initialization failed!")); return FALSE; } if (!edje_init()) { - ETK_WARNING("Edje initialization failed!"); + ETK_WARNING(_("Edje initialization failed!")); return FALSE; } if (!etk_type_init()) { - ETK_WARNING("Etk_Type initialization failed!"); + ETK_WARNING(_("Etk_Type initialization failed!")); return FALSE; } if (!etk_signal_init()) { - ETK_WARNING("Etk_Signal initialization failed!"); + ETK_WARNING(_("Etk_Signal initialization failed!")); return FALSE; } if (!etk_object_init()) { - ETK_WARNING("Etk_Object initialization failed!"); + ETK_WARNING(_("Etk_Object initialization failed!")); return FALSE; } _etk_main_toplevel_widgets = ecore_list_new(); _etk_main_initialized = TRUE; + + /* Gettext */ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + return TRUE; } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_utils.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_utils.h 1 Oct 2005 16:29:45 -0000 1.1 +++ etk_utils.h 16 Oct 2005 00:05:57 -0000 1.2 @@ -4,6 +4,12 @@ #include <stdio.h> +/* Gettext */ +#include <libintl.h> +#define _(String) gettext (String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) + /** @brief Gets the max of the two values */ #define ETK_MAX(v1, v2) (((v1) > (v2)) ? (v1) : (v2)) /** @brief Gets the min of the two values */ ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs