Enlightenment CVS committal Author : maiurana Project : e_modules Module : net
Dir : e_modules/net 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/net/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 7 Mar 2006 03:49:36 -0000 1.2 +++ Makefile.am 9 Mar 2006 11:39:09 -0000 1.3 @@ -1,5 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in e_modules-net.spec +SUBDIRS = po + EDJE_CC = @edje_cc@ EDJE_FLAGS = -v EXTRA_DIST=$(files_DATA) eth_dev.png module_icon.png e_modules-net.spec e_modules-net.spec.in =================================================================== RCS file: /cvsroot/enlightenment/e_modules/net/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 19 Feb 2006 18:23:14 -0000 1.1 +++ autogen.sh 9 Mar 2006 11:39:09 -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 net.pot template"; \ +xgettext \ +--output net.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/net/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- configure.in 7 Mar 2006 03:49:36 -0000 1.2 +++ configure.in 9 Mar 2006 11:39:09 -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-net.spec +po/Makefile ],[ ]) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/net/e_mod_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- e_mod_config.c 1 Mar 2006 11:10:35 -0000 1.7 +++ e_mod_config.c 9 Mar 2006 11:39:09 -0000 1.8 @@ -36,7 +36,7 @@ v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - cfd = e_config_dialog_new(nf->con, _("Net Configuration"), NULL, 0, v, nf); + cfd = e_config_dialog_new(nf->con, D_("Net Configuration"), NULL, 0, v, nf); nf->net->cfd = cfd; } @@ -111,14 +111,14 @@ int i; o = e_widget_list_add(evas, 0, 0); - of = e_widget_framelist_add(evas, _("General Settings"), 0); - ob = e_widget_check_add(evas, _("Show Text"), (&(cfdata->show_text))); + of = e_widget_framelist_add(evas, D_("General 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); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, _("Device Settings"), 0); + of = e_widget_framelist_add(evas, D_("Device Settings"), 0); ot = e_widget_table_add(evas, 0); rg = e_widget_radio_group_new(&(cfdata->dev_num)); i = 0; @@ -130,7 +130,7 @@ i++; } i++; - ob = e_widget_label_add(evas, _("Check Interval:")); + ob = e_widget_label_add(evas, D_("Check Interval:")); e_widget_table_object_append(ot, ob, 0, i, 1, 1, 0, 0, 1, 0); i++; ob = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"), 1, 60, 1, 0, NULL, &(cfdata->check_interval), 150); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/net/e_mod_main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_mod_main.c 6 Mar 2006 09:59:46 -0000 1.14 +++ e_mod_main.c 9 Mar 2006 11:39:09 -0000 1.15 @@ -35,7 +35,11 @@ e_modapi_init(E_Module *m) { Net *n; - + + /* Set up module's message catalogue */ + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + n = _net_init(m); if (!n) return NULL; @@ -90,8 +94,8 @@ EAPI int e_modapi_about(E_Module *m) { - e_module_dialog_show(_("Enlightenment Network Monitor Module"), - _("This module is used to monitor a network device.")); + e_module_dialog_show(D_("Enlightenment Network Monitor Module"), + D_("This module is used to monitor a network device.")); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e_modules/net/e_mod_main.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_main.h 1 Mar 2006 11:10:35 -0000 1.5 +++ e_mod_main.h 9 Mar 2006 11:39:09 -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