Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mount
Dir : e_modules/mount 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/mount/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 25 Jan 2006 04:19:18 -0000 1.2 +++ Makefile.am 30 Jan 2006 01:13:17 -0000 1.3 @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = data +SUBDIRS = data po # data files for the module filesdir = $(datadir) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mount/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 18 Dec 2005 20:37:17 -0000 1.1 +++ autogen.sh 30 Jan 2006 01:13:17 -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 mount.pot template"; \ +xgettext \ +--output mount.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/mount/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- configure.in 21 Jan 2006 00:36:02 -0000 1.2 +++ configure.in 30 Jan 2006 01:13:17 -0000 1.3 @@ -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") @@ -96,6 +102,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) @@ -204,6 +220,7 @@ e_modules-mount.spec data/Makefile data/themes/Makefile +po/Makefile ],[ ]) =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mount/e_mod_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- e_mod_config.c 22 Jan 2006 14:16:25 -0000 1.7 +++ e_mod_config.c 30 Jan 2006 01:13:17 -0000 1.8 @@ -41,7 +41,7 @@ v->advanced.apply_cfdata = _advanced_apply_data; v->advanced.create_widgets = _advanced_create_widgets; - cfd = e_config_dialog_new(con, _("Mount Configuration"), NULL, 0, v, m); + cfd = e_config_dialog_new(con, D_("Mount Configuration"), NULL, 0, v, m); m->config_dialog = cfd; } @@ -86,15 +86,15 @@ o = e_widget_list_add(evas, 0, 0); of = e_widget_framelist_add(evas, _("General Settings"), 0); - ob = e_widget_check_add(evas, _("Show Labels"), &(cfdata->show_labels)); + ob = e_widget_check_add(evas, D_("Show Labels"), &(cfdata->show_labels)); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, _("Layout Settings"), 0); + of = e_widget_framelist_add(evas, D_("Layout Settings"), 0); rg = e_widget_radio_group_new(&(cfdata->orientation)); - ob = e_widget_radio_add(evas, _("Use Vertical Layout"), MOUNT_ORIENT_VERT, rg); + ob = e_widget_radio_add(evas, D_("Use Vertical Layout"), MOUNT_ORIENT_VERT, rg); e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, _("Use Horizontal Layout"), MOUNT_ORIENT_HORIZ, rg); + ob = e_widget_radio_add(evas, D_("Use Horizontal Layout"), MOUNT_ORIENT_HORIZ, rg); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); @@ -129,19 +129,19 @@ o = e_widget_list_add(evas, 0, 0); of = e_widget_framelist_add(evas, _("General Settings"), 0); - ob = e_widget_check_add(evas, _("Show Labels"), &(cfdata->show_labels)); + ob = e_widget_check_add(evas, D_("Show Labels"), &(cfdata->show_labels)); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, _("Layout Settings"), 0); + of = e_widget_framelist_add(evas, D_("Layout Settings"), 0); rg = e_widget_radio_group_new(&(cfdata->orientation)); - ob = e_widget_radio_add(evas, _("Use Vertical Layout"), MOUNT_ORIENT_VERT, rg); + ob = e_widget_radio_add(evas, D_("Use Vertical Layout"), MOUNT_ORIENT_VERT, rg); e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, _("Use Horizontal Layout"), MOUNT_ORIENT_HORIZ, rg); + ob = e_widget_radio_add(evas, D_("Use Horizontal Layout"), MOUNT_ORIENT_HORIZ, rg); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, _("Icon Size"), 0); + of = e_widget_framelist_add(evas, D_("Icon Size"), 0); ob = e_widget_slider_add(evas, 1, 0, _("%3.0f pixels"), 8.0, 128.0, 1.0, 0, NULL, &(cfdata->iconsize), 200); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mount/e_mod_main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- e_mod_main.c 15 Jan 2006 11:26:39 -0000 1.13 +++ e_mod_main.c 30 Jan 2006 01:13:17 -0000 1.14 @@ -56,6 +56,10 @@ { Mount *mnt; + /* Set up module's message catalogue */ + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + mnt = _mount_new(m); m->config_menu = mnt->config_menu; return mnt; @@ -107,8 +111,8 @@ EAPI int e_modapi_about(E_Module *m) { - e_module_dialog_show(_("Enlightenment Mount Module"), - _("This is a mount module to mount/unmount devices.")); + e_module_dialog_show(D_("Enlightenment Mount Module"), + D_("This is a mount module to mount/unmount devices.")); return 1; } @@ -144,7 +148,7 @@ if ((f = fopen(FSTAB, "r")) == NULL) { - e_module_dialog_show(_("Mount Module"), _("Cannot Parse fstab")); + e_module_dialog_show(D_("Mount Module"), D_("Cannot Parse fstab")); return; } @@ -1103,23 +1107,23 @@ { if (mounted) { - e_module_dialog_show(_("Mount Module"), - _("Unmount Failed !!<br>Perhaps this device is in use or is not mounted.")); + e_module_dialog_show(D_("Mount Module"), + D_("Unmount Failed !!<br>Perhaps this device is in use or is not mounted.")); } } else if (!strcmp(tag, "Mount")) { if (!mounted) { - e_module_dialog_show(_("Mount Module"), - _("Mount Failed !!<br>Please check that media is inserted")); + e_module_dialog_show(D_("Mount Module"), + D_("Mount Failed !!<br>Please check that media is inserted")); } } else if (!strcmp(tag, "Eject")) { if (mounted) { - e_module_dialog_show(_("Mount Module"), _("Eject Failed !!")); + e_module_dialog_show(D_("Mount Module"), D_("Eject Failed !!")); } } return 0; =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mount/e_mod_main.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_mod_main.h 6 Jan 2006 21:51:38 -0000 1.4 +++ e_mod_main.h 30 Jan 2006 01:13:17 -0000 1.5 @@ -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