Enlightenment CVS committal Author : e-taro Project : e_modules Module : snow
Dir : e_modules/snow 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: Internationalization support for snow & rain =================================================================== RCS file: /cvsroot/enlightenment/e_modules/snow/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 25 Jan 2006 04:27:49 -0000 1.3 +++ Makefile.am 5 Feb 2006 14:29:59 -0000 1.4 @@ -1,3 +1,5 @@ +SUBDIRS = po + MAINTAINERCLEANFILES = Makefile.in # data files for the module =================================================================== RCS file: /cvsroot/enlightenment/e_modules/snow/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 12 Dec 2005 05:14:17 -0000 1.1 +++ autogen.sh 5 Feb 2006 14:29:59 -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 snow.pot template"; \ +xgettext \ +--output snow.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/snow/configure.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- configure.in 21 Jan 2006 00:36:02 -0000 1.3 +++ configure.in 5 Feb 2006 14:29:59 -0000 1.4 @@ -17,6 +17,12 @@ AM_ENABLE_SHARED AM_PROG_LIBTOOL +ALL_LINGUAS="ja" +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") @@ -83,6 +89,16 @@ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/lib/enlightenment/modules/${PACKAGE}", "Package installed data destination") datadir="${prefix}/lib/enlightenment/modules/${PACKAGE}" fi + +AC_PREFIX_DEFAULT(${HOME}/.e/e) +if test "x$prefix" = "xNONE"; then + datarootdir=${ac_default_prefix} +else + datarootdir=${ac_default_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) @@ -189,6 +205,7 @@ AC_OUTPUT([ Makefile e_modules-snow.spec +po/Makefile ],[ ]) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/snow/e_mod_config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_mod_config.c 30 Jan 2006 19:55:20 -0000 1.14 +++ e_mod_config.c 5 Feb 2006 14:29:59 -0000 1.15 @@ -44,7 +44,7 @@ v->advanced.apply_cfdata = NULL; v->advanced.create_widgets = NULL; - cfd = e_config_dialog_new(con, _("Snow Configuration"), NULL, 0, v, s); + cfd = e_config_dialog_new(con, D_("Snow Configuration"), NULL, 0, v, s); s->config_dialog = cfd; } @@ -101,17 +101,17 @@ o = e_widget_list_add(evas, 0, 0); of = e_widget_framelist_add(evas, _("General Settings"), 0); - ob = e_widget_check_add(evas, _("Show Trees"), &(cfdata->show_trees)); + ob = e_widget_check_add(evas, D_("Show Trees"), &(cfdata->show_trees)); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, _("Snow Density"), 0); + of = e_widget_framelist_add(evas, D_("Snow Density"), 0); rg = e_widget_radio_group_new(&(cfdata->density)); - ob = e_widget_radio_add(evas, _("Sparse"), DENSITY_SPARSE, rg); + ob = e_widget_radio_add(evas, D_("Sparse"), DENSITY_SPARSE, rg); e_widget_framelist_object_append(of, ob); ob = e_widget_radio_add(evas, _("Medium"), DENSITY_MEDIUM, rg); e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, _("Dense"), DENSITY_DENSE, rg); + ob = e_widget_radio_add(evas, D_("Dense"), DENSITY_DENSE, rg); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/snow/e_mod_main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_mod_main.c 30 Jan 2006 19:55:20 -0000 1.14 +++ e_mod_main.c 5 Feb 2006 14:29:59 -0000 1.15 @@ -28,6 +28,10 @@ { Snow *snow; + /* Set up module's message catalogue */ + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + snow = _snow_init(m); m->config_menu = _snow_config_menu_new(snow); return snow; @@ -79,8 +83,8 @@ EAPI int e_modapi_about(E_Module *m) { - e_module_dialog_show(_("Enlightenment Snow Module"), - _("This is a snow module that may replace xsnow.")); + e_module_dialog_show(D_("Enlightenment Snow Module"), + D_("This is a snow module that may replace xsnow.")); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e_modules/snow/e_mod_main.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- e_mod_main.h 30 Jan 2006 19:31:34 -0000 1.7 +++ e_mod_main.h 5 Feb 2006 14:29:59 -0000 1.8 @@ -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: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs