Enlightenment CVS committal Author : devilhorns Project : e_modules Module : slideshow
Dir : e_modules/slideshow Modified Files: Makefile.am autogen.sh configure.in e_mod_config.c e_mod_main.c e_mod_main.h Log Message: Add start of intl support for config dialogs. =================================================================== RCS file: /cvsroot/enlightenment/e_modules/slideshow/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 21 Jan 2006 17:18:44 -0000 1.2 +++ Makefile.am 30 Jan 2006 01:14:23 -0000 1.3 @@ -1,3 +1,5 @@ +SUBDIRS = po + MAINTAINERCLEANFILES = Makefile.in EDJE_CC = @edje_cc@ =================================================================== RCS file: /cvsroot/enlightenment/e_modules/slideshow/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 18 Dec 2005 06:07:26 -0000 1.1 +++ autogen.sh 30 Jan 2006 01:14:23 -0000 1.2 @@ -10,6 +10,18 @@ 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 slideshow.pot template"; \ +xgettext \ +--output slideshow.pot \ +--output-dir=po \ +--language=C \ +--add-location \ +--keyword=D_ \ +--indent \ +--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/slideshow/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- configure.in 21 Jan 2006 00:36:02 -0000 1.4 +++ configure.in 30 Jan 2006 01:14:23 -0000 1.5 @@ -18,6 +18,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") @@ -84,6 +90,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) @@ -198,5 +214,6 @@ AC_OUTPUT([ Makefile e_modules-slideshow.spec +po/Makefile ],[ ]) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/slideshow/e_mod_config.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- e_mod_config.c 22 Jan 2006 18:18:34 -0000 1.12 +++ e_mod_config.c 30 Jan 2006 01:14:23 -0000 1.13 @@ -42,7 +42,7 @@ v->basic.create_widgets = _basic_create_widgets; /* create config diaolg */ - cfd = e_config_dialog_new(con, _("Slideshow Configuration"), NULL, 0, v, s); + cfd = e_config_dialog_new(con, D_("Slideshow Configuration"), NULL, 0, v, s); s->config_dialog = cfd; } @@ -86,19 +86,19 @@ _fill_data(s, cfdata); o = e_widget_list_add(evas, 0, 0); - of = e_widget_framelist_add(evas, _("Cycle Time"), 0); - ob = e_widget_check_add(evas, _("Disable Timer"), &(cfdata->disable_timer)); + of = e_widget_framelist_add(evas, D_("Cycle Time"), 0); + ob = e_widget_check_add(evas, D_("Disable Timer"), &(cfdata->disable_timer)); e_widget_framelist_object_append(of, ob); - ob = e_widget_slider_add(evas, 1, 0, _("%3.0f seconds"), 5.0, 600.0, 1.0, 0, &(cfdata->cycle_time), NULL, 200); + ob = e_widget_slider_add(evas, 1, 0, D_("%3.0f seconds"), 5.0, 600.0, 1.0, 0, &(cfdata->cycle_time), NULL, 200); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); #ifdef WANT_OSIRIS - of = e_widget_framelist_add(evas, _("Theme"), 0); + of = e_widget_framelist_add(evas, D_("Theme"), 0); ot = e_widget_table_add(evas, 1); - ob = e_widget_label_add(evas, _("Sub-directory to use for backgrounds")); + ob = e_widget_label_add(evas, D_("Sub-directory to use for backgrounds")); e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 0, 0, 1, 0); - ob = e_widget_label_add(evas, _("Leave blank for none")); + ob = e_widget_label_add(evas, D_("Leave blank for none")); e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add(evas, &cfdata->theme); e_widget_table_object_append(ot, ob, 0, 2, 1, 1, 1, 0, 1, 0); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/slideshow/e_mod_main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- e_mod_main.c 14 Jan 2006 15:56:11 -0000 1.10 +++ e_mod_main.c 30 Jan 2006 01:14:23 -0000 1.11 @@ -44,6 +44,10 @@ { Slide *e; + /* Set up module's message catalogue */ + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + /* actually init slide */ e = _slide_init(m); m->config_menu = e->config_menu; @@ -135,8 +139,8 @@ EAPI int e_modapi_about(E_Module * m) { - e_module_dialog_show(_("Enlightenment Slide Show Module"), - ("This module is VERY simple and is used to cycle desktop backgrounds")); + e_module_dialog_show(D_("Enlightenment Slide Show Module"), + D_("This module is VERY simple and is used to cycle desktop backgrounds")); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e_modules/slideshow/e_mod_main.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_main.h 6 Jan 2006 21:12:54 -0000 1.5 +++ e_mod_main.h 30 Jan 2006 01:14:23 -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: 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