Enlightenment CVS committal Author : maiurana Project : e_modules Module : cpu
Dir : e_modules/cpu Modified Files: Makefile.am autogen.sh configure.in e_mod_config.c e_mod_main.c e_mod_main.h Added Files: ABOUT-NLS Log Message: added i18n support and italian localization =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 7 Mar 2006 04:02:54 -0000 1.3 +++ Makefile.am 9 Mar 2006 11:36:10 -0000 1.4 @@ -1,5 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in e_modules-cpu.spec +SUBDIRS = po + EDJE_CC = @edje_cc@ EDJE_FLAGS = -v =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 20 Feb 2006 11:42:55 -0000 1.1 +++ autogen.sh 9 Mar 2006 11:36:10 -0000 1.2 @@ -10,6 +10,17 @@ echo "Running autoconf..." ; autoconf || exit 1 echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 +echo "Generating gettext cpu.pot template"; \ +xgettext \ +--output cpu.pot \ +--output-dir=po \ +--language=C \ +--add-location \ +--keyword=D_ \ +--sort-by-file \ +--copyright-holder="TODO" \ +--foreign-user \ +`find . -name "*.[ch]" -print` || exit 1 if [ -z "$NOCONFIGURE" ]; then ./configure "$@" =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- configure.in 7 Mar 2006 04:02:54 -0000 1.2 +++ configure.in 9 Mar 2006 11:36:10 -0000 1.3 @@ -17,6 +17,12 @@ AM_ENABLE_SHARED AM_PROG_LIBTOOL +ALL_LINGUAS="it" +AC_SUBST(ALL_LINGUAS) + +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION(0.14) + MODULE_ARCH="$host_os-$host_cpu" AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") @@ -90,6 +96,9 @@ else datarootdir=${prefix}/share fi +localedir=${datarootdir}/locale +AC_SUBST(LOCALEDIR, "${localedir}") +AC_DEFINE_UNQUOTED(LOCALEDIR, "${localedir}", [Module Locale Directory]) #AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl) #AC_SUBST(dlopen_libs) @@ -196,6 +205,7 @@ AC_OUTPUT([ Makefile e_modules-cpu.spec +po/Makefile ],[ ]) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/e_mod_config.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_mod_config.c 27 Feb 2006 20:04:57 -0000 1.2 +++ e_mod_config.c 9 Mar 2006 11:36:10 -0000 1.3 @@ -31,7 +31,7 @@ v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - cfd = e_config_dialog_new(con, _("Cpu Configuration"), NULL, 0, v, c); + cfd = e_config_dialog_new(con, D_("Cpu Configuration"), NULL, 0, v, c); c->cfd = cfd; } @@ -74,13 +74,13 @@ c = cfd->data; o = e_widget_list_add(evas, 0, 0); - of = e_widget_framelist_add(evas, _("Cpu Settings"), 0); - ob = e_widget_check_add(evas, _("Show Text"), (&(cfdata->show_text))); + of = e_widget_framelist_add(evas, D_("Cpu Settings"), 0); + ob = e_widget_check_add(evas, D_("Show Text"), (&(cfdata->show_text))); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, _("Show Graph"), (&(cfdata->show_graph))); + ob = e_widget_check_add(evas, D_("Show Graph"), (&(cfdata->show_graph))); e_widget_framelist_object_append(of, ob); - ob = e_widget_label_add(evas, _("Check Interval:")); + ob = e_widget_label_add(evas, D_("Check Interval:")); e_widget_framelist_object_append(of, ob); ob = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"), 1, 60, 1, 0, NULL, &(cfdata->check_interval), 150); e_widget_framelist_object_append(of, ob); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/e_mod_main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- e_mod_main.c 1 Mar 2006 16:26:45 -0000 1.11 +++ e_mod_main.c 9 Mar 2006 11:36:10 -0000 1.12 @@ -33,7 +33,11 @@ e_modapi_init(E_Module *m) { Cpu *c; - + + /* Set up module's message catalogue */ + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + c = _cpu_init(m); if (!c) return NULL; @@ -88,8 +92,8 @@ EAPI int e_modapi_about(E_Module *m) { - e_module_dialog_show(_("Enlightenment Cpu Monitor Module"), - _("This module is used to monitor a cpu.")); + e_module_dialog_show(D_("Enlightenment Cpu Monitor Module"), + D_("This module is used to monitor a cpu.")); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e_modules/cpu/e_mod_main.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_main.h 27 Feb 2006 21:42:31 -0000 1.5 +++ e_mod_main.h 9 Mar 2006 11:36:10 -0000 1.6 @@ -1,3 +1,5 @@ +#define D_(str) dgettext(PACKAGE, str) + #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs