From: Enlightenment C. <no...@cv...> - 2006-08-26 19:27:50
|
Enlightenment CVS committal Author : maxerba Project : e_modules Module : mail Dir : e_modules/mail Modified Files: Makefile.am autogen.sh configure.in e_mod_config.c e_mod_config_box.c e_mod_main.c Added Files: ABOUT-NLS Log Message: added i18n support and italian localization =================================================================== RCS file: /cvs/e/e_modules/mail/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- Makefile.am 14 Jul 2006 18:53:41 -0000 1.9 +++ Makefile.am 26 Aug 2006 19:27:18 -0000 1.10 @@ -1,5 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in mkinstalldirs +SUBDIRS = po + EDJE_CC = @edje_cc@ EDJE_FLAGS = -v \ -id $(top_srcdir) \ =================================================================== RCS file: /cvs/e/e_modules/mail/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- autogen.sh 7 Jun 2006 19:43:59 -0000 1.1 +++ autogen.sh 26 Aug 2006 19:27:18 -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 mail.pot template"; \ +xgettext \ +--output mail.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: /cvs/e/e_modules/mail/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- configure.in 25 Jul 2006 13:31:57 -0000 1.6 +++ configure.in 26 Aug 2006 19:27:18 -0000 1.7 @@ -18,6 +18,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") @@ -84,6 +90,16 @@ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${libdir}/enlightenment/modules/${PACKAGE}", "Package installed data destination") datadir="${libdir}/enlightenment/modules/${PACKAGE}" fi + +AC_PREFIX_DEFAULT(${HOME}/.e/e) +if test "x$prefix" = "xNONE"; then + datarootdir=${ac_default_prefix} +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) @@ -133,6 +149,7 @@ AC_OUTPUT([ Makefile +po/Makefile ],[ ]) =================================================================== RCS file: /cvs/e/e_modules/mail/e_mod_config.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- e_mod_config.c 14 Aug 2006 21:09:02 -0000 1.16 +++ e_mod_config.c 26 Aug 2006 19:27:18 -0000 1.17 @@ -47,7 +47,7 @@ snprintf (buf, sizeof (buf), "%s/module.eap", e_module_dir_get (mail_config->module)); con = e_container_current_get (e_manager_current_get ()); - cfd = e_config_dialog_new (con, _("Mail Configuration"), "Mail", "_e_modules_mail_config_dialog", buf, 0, v, ci); + cfd = e_config_dialog_new (con, D_("Mail Configuration"), "Mail", "_e_modules_mail_config_dialog", buf, 0, v, ci); mail_config->config_dialog = cfd; } @@ -90,17 +90,17 @@ o = e_widget_list_add (evas, 0, 0); of = e_widget_framelist_add (evas, _("General Settings"), 0); ob = - e_widget_check_add (evas, _("Always Show Labels"), &(cfdata->show_label)); + e_widget_check_add (evas, D_("Always Show Labels"), &(cfdata->show_label)); 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, _("%2.0f minutes"), 1.0, 60.0, 1.0, 0, + e_widget_slider_add (evas, 1, 0, D_("%2.0f minutes"), 1.0, 60.0, 1.0, 0, &(cfdata->check_time), NULL, 100); e_widget_framelist_object_append (of, ob); e_widget_list_object_append (o, of, 1, 1, 0.5); - of = e_widget_frametable_add (evas, _("Mail Boxes"), 0); + of = e_widget_frametable_add (evas, D_("Mail Boxes"), 0); ob = e_widget_ilist_add (evas, 32, 32, NULL); e_widget_ilist_selector_set (ob, 1); cfdata->il = ob; @@ -120,7 +120,7 @@ cfdata->del = ob; e_widget_table_object_append (ot, ob, 0, 1, 1, 1, 1, 1, 1, 0); ob = - e_widget_button_add (evas, _("Configure..."), "widget/config", + e_widget_button_add (evas, D_("Configure..."), "widget/config", _cb_edit_box, cfd, NULL); e_widget_disabled_set (ob, 1); cfdata->configure = ob; =================================================================== RCS file: /cvs/e/e_modules/mail/e_mod_config_box.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- e_mod_config_box.c 14 Aug 2006 21:09:02 -0000 1.13 +++ e_mod_config_box.c 26 Aug 2006 19:27:18 -0000 1.14 @@ -57,7 +57,7 @@ v->basic.create_widgets = _basic_create_widgets; con = e_container_current_get (e_manager_current_get ()); - cfd = e_config_dialog_new (con, _("Mailbox Configuration"), "Mail", "_e_modules_mail_box_config_dialog", NULL, 0, v, cb); + cfd = e_config_dialog_new (con, D_("Mailbox Configuration"), "Mail", "_e_modules_mail_box_config_dialog", NULL, 0, v, cb); } static void @@ -137,12 +137,12 @@ o = e_widget_list_add (evas, 0, 0); of = e_widget_framelist_add (evas, _("General Settings"), 0); ob = - e_widget_check_add (evas, _("Start Program When New Mail Arrives"), + e_widget_check_add (evas, D_("Start Program When New Mail Arrives"), &(cfdata->use_exec)); e_widget_framelist_object_append (of, ob); e_widget_on_change_hook_set (ob, _use_exec_cb_change, cfdata); ot = e_widget_table_add (evas, 1); - cfdata->exec_label = e_widget_label_add (evas, _("Program:")); + cfdata->exec_label = e_widget_label_add (evas, D_("Program:")); e_widget_table_object_append (ot, cfdata->exec_label, 0, 0, 1, 1, 0, 0, 1, 0); cfdata->exec_entry = e_widget_entry_add (evas, &cfdata->exec); @@ -154,59 +154,59 @@ e_widget_disabled_set (cfdata->exec_label, !cfdata->use_exec); e_widget_disabled_set (cfdata->exec_entry, !cfdata->use_exec); - of = e_widget_framelist_add (evas, _("Mailbox Type"), 0); + of = e_widget_framelist_add (evas, D_("Mailbox Type"), 0); rg = e_widget_radio_group_new (&(cfdata->type)); - ob = e_widget_radio_add (evas, _("Pop3"), 0, rg); + ob = e_widget_radio_add (evas, D_("Pop3"), 0, rg); e_widget_on_change_hook_set (ob, _type_cb_change, cfdata); e_widget_framelist_object_append (of, ob); - ob = e_widget_radio_add (evas, _("Imap"), 1, rg); + ob = e_widget_radio_add (evas, D_("Imap"), 1, rg); e_widget_on_change_hook_set (ob, _type_cb_change, cfdata); e_widget_framelist_object_append (of, ob); - ob = e_widget_radio_add (evas, _("Maildir"), 2, rg); + ob = e_widget_radio_add (evas, D_("Maildir"), 2, rg); e_widget_on_change_hook_set (ob, _type_cb_change, cfdata); e_widget_framelist_object_append (of, ob); - ob = e_widget_radio_add (evas, _("Mbox"), 3, rg); + ob = e_widget_radio_add (evas, D_("Mbox"), 3, rg); e_widget_on_change_hook_set (ob, _type_cb_change, cfdata); e_widget_framelist_object_append (of, ob); e_widget_list_object_append (o, of, 1, 1, 0.5); - of = e_widget_frametable_add (evas, _("Port Settings"), 1); + of = e_widget_frametable_add (evas, D_("Port Settings"), 1); - ob = e_widget_label_add (evas, _("Use SSL:")); + ob = e_widget_label_add (evas, D_("Use SSL:")); e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 0, 0, 1, 0); ob = e_widget_check_add (evas, "", &(cfdata->ssl)); e_widget_on_change_hook_set (ob, _type_cb_change, cfdata); e_widget_frametable_object_append (of, ob, 1, 0, 1, 1, 0, 0, 1, 0); - ob = e_widget_label_add (evas, _("Port:")); + ob = e_widget_label_add (evas, D_("Port:")); e_widget_frametable_object_append (of, ob, 0, 1, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add (evas, &cfdata->port); cfdata->port_entry = ob; e_widget_frametable_object_append (of, ob, 1, 1, 1, 1, 0, 0, 1, 0); e_widget_list_object_append (o, of, 1, 1, 0.5); - of = e_widget_frametable_add (evas, _("Mailbox Settings"), 1); - ob = e_widget_label_add (evas, _("Name:")); + of = e_widget_frametable_add (evas, D_("Mailbox Settings"), 1); + ob = e_widget_label_add (evas, D_("Name:")); e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add (evas, &cfdata->name); e_widget_frametable_object_append (of, ob, 1, 0, 1, 1, 0, 0, 1, 0); - ob = e_widget_label_add (evas, _("Mail Host:")); + ob = e_widget_label_add (evas, D_("Mail Host:")); e_widget_frametable_object_append (of, ob, 0, 1, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add (evas, &cfdata->host); e_widget_frametable_object_append (of, ob, 1, 1, 1, 1, 0, 0, 1, 0); - ob = e_widget_label_add (evas, _("Username:")); + ob = e_widget_label_add (evas, D_("Username:")); e_widget_frametable_object_append (of, ob, 0, 2, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add (evas, &cfdata->user); e_widget_frametable_object_append (of, ob, 1, 2, 1, 1, 0, 0, 1, 0); - ob = e_widget_label_add (evas, _("Password:")); + ob = e_widget_label_add (evas, D_("Password:")); e_widget_frametable_object_append (of, ob, 0, 3, 1, 1, 0, 0, 1, 0); ob = e_widget_entry_add (evas, &cfdata->pass); e_widget_frametable_object_append (of, ob, 1, 3, 1, 1, 0, 0, 1, 0); - cfdata->new_path_label = e_widget_label_add (evas, _("New Mail Path:")); + cfdata->new_path_label = e_widget_label_add (evas, D_("New Mail Path:")); e_widget_frametable_object_append (of, cfdata->new_path_label, 0, 4, 1, 1, 0, 0, 1, 0); cfdata->new_path_entry = e_widget_entry_add (evas, &cfdata->new_path); @@ -218,7 +218,7 @@ e_widget_disabled_set (cfdata->new_path_entry, 1); } - cfdata->cur_path_label = e_widget_label_add (evas, _("Current Mail Path:")); + cfdata->cur_path_label = e_widget_label_add (evas, D_("Current Mail Path:")); e_widget_frametable_object_append (of, cfdata->cur_path_label, 0, 5, 1, 1, 0, 0, 1, 0); cfdata->cur_path_entry = e_widget_entry_add (evas, &cfdata->cur_path); @@ -353,7 +353,7 @@ e_widget_disabled_set (cfdata->cur_path_label, 1); e_widget_disabled_set (cfdata->cur_path_entry, 1); e_widget_entry_text_set (cfdata->cur_path_entry, ""); - e_widget_entry_text_set (cfdata->new_path_entry, _("Inbox")); + e_widget_entry_text_set (cfdata->new_path_entry, D_("Inbox")); if (cfdata->ssl) { e_widget_entry_text_set (cfdata->port_entry, "993"); =================================================================== RCS file: /cvs/e/e_modules/mail/e_mod_main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- e_mod_main.c 9 Aug 2006 07:47:27 -0000 1.35 +++ e_mod_main.c 26 Aug 2006 19:27:18 -0000 1.36 @@ -174,7 +174,7 @@ static char * _gc_label (void) { - return D_ ("Mail"); + return D_("Mail"); } static Evas_Object * @@ -220,7 +220,7 @@ snprintf (buf, sizeof (buf), "%s/module.eap", e_module_dir_get (mail_config->module)); mm = e_menu_item_new (mn); - e_menu_item_label_set (mm, _("Mailboxes")); + e_menu_item_label_set (mm, D_("Mailboxes")); e_menu_item_icon_edje_set (mm, buf, "icon"); sn = e_menu_new (); @@ -342,6 +342,9 @@ EAPI void * e_modapi_init (E_Module * m) { + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + conf_box_edd = E_CONFIG_DD_NEW ("Mail_Box_Config", Config_Box); #undef T #undef D @@ -498,9 +501,8 @@ EAPI int e_modapi_about (E_Module * m) { - e_module_dialog_show (m, D_ ("Enlightenment Mail Module"), - D_ - ("This is a module to notify when you have new mail.")); + e_module_dialog_show (m, D_("Enlightenment Mail Module"), + D_("This is a module to notify when you have new mail.")); return 1; } |