|
From: Enlightenment S. <no-...@en...> - 2011-11-01 22:28:43
|
Log: fix gettext usage after import from extras Author: raster Date: 2011-11-01 15:28:36 -0700 (Tue, 01 Nov 2011) New Revision: 64622 Trac: http://trac.enlightenment.org/e/changeset/64622 Modified: trunk/e/src/modules/notification/e_mod_box.c trunk/e/src/modules/notification/e_mod_config.c trunk/e/src/modules/notification/e_mod_config_item.c trunk/e/src/modules/notification/e_mod_main.c trunk/e/src/modules/notification/e_mod_main.h Modified: trunk/e/src/modules/notification/e_mod_box.c =================================================================== --- trunk/e/src/modules/notification/e_mod_box.c 2011-11-01 22:08:24 UTC (rev 64621) +++ trunk/e/src/modules/notification/e_mod_box.c 2011-11-01 22:28:36 UTC (rev 64622) @@ -514,7 +514,7 @@ if (notification_cfg->menu) return; m = e_menu_new(); mi = e_menu_item_new(m); - e_menu_item_label_set(mi, D_("Settings")); + e_menu_item_label_set(mi, _("Settings")); e_util_menu_item_theme_icon_set(mi, "preferences-system"); e_menu_item_callback_set(mi, (E_Menu_Cb)_notification_box_cb_menu_configuration, b); @@ -653,7 +653,7 @@ m = e_menu_new(); mi = e_menu_item_new(m); - e_menu_item_label_set(mi, D_("Settings")); + e_menu_item_label_set(mi, _("Settings")); e_util_menu_item_theme_icon_set(mi, "preferences-system"); e_menu_item_callback_set(mi, (E_Menu_Cb)_notification_box_cb_menu_configuration, ic->n_box); Modified: trunk/e/src/modules/notification/e_mod_config.c =================================================================== --- trunk/e/src/modules/notification/e_mod_config.c 2011-11-01 22:08:24 UTC (rev 64621) +++ trunk/e/src/modules/notification/e_mod_config.c 2011-11-01 22:28:36 UTC (rev 64622) @@ -41,7 +41,7 @@ v->basic.apply_cfdata = _basic_apply; snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", notification_mod->dir); - cfd = e_config_dialog_new(con, D_("Notification Settings"), "Notification", + cfd = e_config_dialog_new(con, _("Notification Settings"), "Notification", "extensions/notification", buf, 0, v, NULL); notification_cfg->cfd = cfd; return cfd; @@ -88,56 +88,56 @@ // E_Manager *man; o = e_widget_list_add(evas, 0, 0); - of = e_widget_framelist_add(evas, D_("Urgency"), 0); - ow = e_widget_label_add(evas, D_("Levels of urgency to display:")); + of = e_widget_framelist_add(evas, _("Urgency"), 0); + ow = e_widget_label_add(evas, _("Levels of urgency to display:")); e_widget_framelist_object_append(of, ow); - ow = e_widget_check_add(evas, D_("Low"), &(cfdata->show_low)); + ow = e_widget_check_add(evas, _("Low"), &(cfdata->show_low)); e_widget_framelist_object_append(of, ow); - ow = e_widget_check_add(evas, D_("Normal"), &(cfdata->show_normal)); + ow = e_widget_check_add(evas, _("Normal"), &(cfdata->show_normal)); e_widget_framelist_object_append(of, ow); - ow = e_widget_check_add(evas, D_("Critical"), &(cfdata->show_critical)); + ow = e_widget_check_add(evas, _("Critical"), &(cfdata->show_critical)); e_widget_framelist_object_append(of, ow); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, D_("Default Timeout"), 0); - ow = e_widget_check_add(evas, D_("Force timeout for all notifications"), &(cfdata->force_timeout)); + of = e_widget_framelist_add(evas, _("Default Timeout"), 0); + ow = e_widget_check_add(evas, _("Force timeout for all notifications"), &(cfdata->force_timeout)); e_widget_framelist_object_append(of, ow); - ow = e_widget_slider_add(evas, 1, 0, D_("%.1f seconds"), 0.0, 15.0, 0.1, 0, + ow = e_widget_slider_add(evas, 1, 0, _("%.1f seconds"), 0.0, 15.0, 0.1, 0, &(cfdata->timeout), NULL, 200); e_widget_framelist_object_append(of, ow); e_widget_list_object_append(o, of, 1, 1, 0.5); /* man = e_manager_current_get(); - * of = e_widget_framelist_add(evas, D_("Placement"), 0); - * ow = e_widget_slider_add(evas, 1, 0, D_("%2.0f x"), 0.0, man->w, 1.0, 0, + * of = e_widget_framelist_add(evas, _("Placement"), 0); + * ow = e_widget_slider_add(evas, 1, 0, _("%2.0f x"), 0.0, man->w, 1.0, 0, * NULL, &(cfdata->placement.x), 200); * e_widget_framelist_object_append(of, ow); - * ow = e_widget_slider_add(evas, 1, 0, D_("%2.0f y"), 0.0, man->h, 1.0, 0, + * ow = e_widget_slider_add(evas, 1, 0, _("%2.0f y"), 0.0, man->h, 1.0, 0, * NULL, &(cfdata->placement.y), 200); * e_widget_framelist_object_append(of, ow); * e_widget_list_object_append(o, of, 1, 1, 0.5); */ - of = e_widget_framelist_add(evas, D_("Popup Corner"), 0); + of = e_widget_framelist_add(evas, _("Popup Corner"), 0); rg = e_widget_radio_group_new(&(cfdata->corner)); - ow = e_widget_radio_add(evas, "Top left", CORNER_TL, rg); + ow = e_widget_radio_add(evas, _("Top left"), CORNER_TL, rg); e_widget_framelist_object_append(of, ow); - ow = e_widget_radio_add(evas, "Top right", CORNER_TR, rg); + ow = e_widget_radio_add(evas, _("Top right"), CORNER_TR, rg); e_widget_framelist_object_append(of, ow); - ow = e_widget_radio_add(evas, "Botton left", CORNER_BL, rg); + ow = e_widget_radio_add(evas, _("Botton left"), CORNER_BL, rg); e_widget_framelist_object_append(of, ow); - ow = e_widget_radio_add(evas, "Bottom right", CORNER_BR, rg); + ow = e_widget_radio_add(evas, _("Bottom right"), CORNER_BR, rg); e_widget_framelist_object_append(of, ow); e_widget_list_object_append(o, of, 1, 1, 0.5); - /* of = e_widget_framelist_add(evas, D_("Gap"), 0); - * ow = e_widget_label_add(evas, D_("Size of the gap between two popups : ")); + /* of = e_widget_framelist_add(evas, _("Gap"), 0); + * ow = e_widget_label_add(evas, _("Size of the gap between two popups : ")); * e_widget_framelist_object_append(of, ow); - * ow = e_widget_slider_add(evas, 1, 0, D_("%2.0f pixels"), 0.0, 50, 1.0, 0, + * ow = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0.0, 50, 1.0, 0, * NULL, &(cfdata->gap), 200); * e_widget_framelist_object_append(of, ow); * e_widget_list_object_append(o, of, 1, 1, 0.5); */ - of = e_widget_framelist_add(evas, D_("Miscellaneous"), 0); - ow = e_widget_check_add(evas, D_("Ignore replace ID"), &(cfdata->ignore_replacement)); + of = e_widget_framelist_add(evas, _("Miscellaneous"), 0); + ow = e_widget_check_add(evas, _("Ignore replace ID"), &(cfdata->ignore_replacement)); e_widget_framelist_object_append(of, ow); e_widget_list_object_append(o, of, 1, 1, 0.5); Modified: trunk/e/src/modules/notification/e_mod_config_item.c =================================================================== --- trunk/e/src/modules/notification/e_mod_config_item.c 2011-11-01 22:08:24 UTC (rev 64621) +++ trunk/e/src/modules/notification/e_mod_config_item.c 2011-11-01 22:28:36 UTC (rev 64622) @@ -39,7 +39,7 @@ /* Create The Dialog */ snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", e_module_dir_get(notification_mod)); cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()), - D_("Notification Box Configuration"), + _("Notification Box Configuration"), "E", "_e_mod_notification_box_config_dialog", buf, 0, v, ci); notification_cfg->config_dialog = eina_list_append(notification_cfg->config_dialog, cfd); @@ -86,23 +86,23 @@ o = e_widget_list_add(evas, 0, 0); - of = e_widget_framelist_add(evas, D_("General Settings"), 0); - ob = e_widget_check_add(evas, D_("Show Icon Label"), &(cfdata->show_label)); + of = e_widget_framelist_add(evas, _("General Settings"), 0); + ob = e_widget_check_add(evas, _("Show Icon Label"), &(cfdata->show_label)); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, D_("Show the popup on mouse over"), &(cfdata->show_popup)); + ob = e_widget_check_add(evas, _("Show the popup on mouse over"), &(cfdata->show_popup)); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, D_("Focus the source window when clicking"), &(cfdata->focus_window)); + ob = e_widget_check_add(evas, _("Focus the source window when clicking"), &(cfdata->focus_window)); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - of = e_widget_framelist_add(evas, D_("Urgency"), 0); - ob = e_widget_label_add(evas, D_("Levels of urgency to store:")); + of = e_widget_framelist_add(evas, _("Urgency"), 0); + ob = e_widget_label_add(evas, _("Levels of urgency to store:")); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, D_("Low"), &(cfdata->store_low)); + ob = e_widget_check_add(evas, _("Low"), &(cfdata->store_low)); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, D_("Normal"), &(cfdata->store_normal)); + ob = e_widget_check_add(evas, _("Normal"), &(cfdata->store_normal)); e_widget_framelist_object_append(of, ob); - ob = e_widget_check_add(evas, D_("Critical"), &(cfdata->store_critical)); + ob = e_widget_check_add(evas, _("Critical"), &(cfdata->store_critical)); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); Modified: trunk/e/src/modules/notification/e_mod_main.c =================================================================== --- trunk/e/src/modules/notification/e_mod_main.c 2011-11-01 22:08:24 UTC (rev 64621) +++ trunk/e/src/modules/notification/e_mod_main.c 2011-11-01 22:28:36 UTC (rev 64622) @@ -125,7 +125,7 @@ static char * _gc_label(E_Gadcon_Client_Class *client_class __UNUSED__) { - return D_("Notification Box"); + return _("Notification Box"); } static Evas_Object * @@ -214,17 +214,17 @@ if (enabled) { - summary = D_("Enter Presentation Mode"); - body = D_("Enlightenment is in <b>presentation</b> mode." - "<br>During presentation mode, screen saver, lock and " - "power saving will be disabled so you are not interrupted."); + summary = _("Enter Presentation Mode"); + body = _("Enlightenment is in <b>presentation</b> mode." + "<br>During presentation mode, screen saver, lock and " + "power saving will be disabled so you are not interrupted."); } else { - summary = D_("Exited Presentation Mode"); - body = D_("Presentation mode is over." - "<br>Now screen saver, lock and " - "power saving settings will be restored."); + summary = _("Exited Presentation Mode"); + body = _("Presentation mode is over." + "<br>Now screen saver, lock and " + "power saving settings will be restored."); } _notification_show_common(summary, body, 0); @@ -237,17 +237,17 @@ if (enabled) { - summary = D_("Enter Offline Mode"); - body = D_("Enlightenment is in <b>offline</b> mode.<br>" - "During offline mode, modules that use network will stop " - "polling remote services."); + summary = _("Enter Offline Mode"); + body = _("Enlightenment is in <b>offline</b> mode.<br>" + "During offline mode, modules that use network will stop " + "polling remote services."); } else { - summary = D_("Exited Offline Mode"); - body = D_("Now in <b>online</b> mode.<br>" - "Now modules that use network will " - "resume regular tasks."); + summary = _("Exited Offline Mode"); + body = _("Now in <b>online</b> mode.<br>" + "Now modules that use network will " + "resume regular tasks."); } _notification_show_common(summary, body, 0); @@ -294,15 +294,12 @@ E_Notification_Daemon *d; char buf[PATH_MAX]; - snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m)); - bindtextdomain(PACKAGE, buf); - bind_textdomain_codeset(PACKAGE, "UTF-8"); - snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", m->dir); /* register config panel entry */ - e_configure_registry_category_add("extensions", 90, D_("Extensions"), NULL, + e_configure_registry_category_add("extensions", 90, _("Extensions"), NULL, "preferences-extensions"); - e_configure_registry_item_add("extensions/notification", 30, D_("Notification"), NULL, + e_configure_registry_item_add("extensions/notification", 30, + _("Notification"), NULL, buf, e_int_config_notification_module); conf_item_edd = E_CONFIG_DD_NEW("Notification_Config_Item", Config_Item); @@ -335,7 +332,7 @@ notification_cfg = e_config_domain_load("module.notification", conf_edd); if (notification_cfg && - !(e_util_module_config_check(D_("Notification Module"), + !(e_util_module_config_check(_("Notification Module"), notification_cfg->version, MOD_CFG_FILE_VERSION))) { @@ -354,8 +351,8 @@ { _notification_cfg_free(notification_cfg); notification_cfg = NULL; - e_util_dialog_show(D_("Error During DBus Init!"), - D_("Error during DBus init! Please check if " + e_util_dialog_show(_("Error During DBus Init!"), + _("Error during DBus init! Please check if " "dbus is correctly installed and running.")); return NULL; } Modified: trunk/e/src/modules/notification/e_mod_main.h =================================================================== --- trunk/e/src/modules/notification/e_mod_main.h 2011-11-01 22:08:24 UTC (rev 64621) +++ trunk/e/src/modules/notification/e_mod_main.h 2011-11-01 22:28:36 UTC (rev 64622) @@ -6,19 +6,10 @@ #include <E_Notification_Daemon.h> #include "config.h" -#ifdef ENABLE_NLS -# include <libintl.h> -# define D_(string) dgettext(PACKAGE, string) -#else -# define bindtextdomain(domain,dir) -# define bind_textdomain_codeset(domain,codeset) -# define D_(string) (string) -#endif - #define MOD_CFG_FILE_EPOCH 0x0002 #define MOD_CFG_FILE_GENERATION 0x0005 #define MOD_CFG_FILE_VERSION \ - ((MOD_CFG_FILE_EPOCH << 16) | MOD_CFG_FILE_GENERATION) +((MOD_CFG_FILE_EPOCH << 16) | MOD_CFG_FILE_GENERATION) #undef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) |