Peter Wehrfritz, il 18/04/2010 20:14, scrisse:
> In a normal gettext setup you have a macro called N_(). This does not
> translate the string literal, but marks it for the gettext parser so it
> is in the translatable string list (e.g. enlightenment.pot). This is
> useful if you have for example an array of translatable strings:
>
> const char *array[] = { N_("blah"), N_("foo")};
> ...
> set_label(o, gettext(array[0]));
>
> Or in this cases you can call the macro like this:
> EVRY_ACTION_NEW(N_("the name"), ...);
>
> Regards Peter
I see that other modules already uses the N_() macro, so the attached patch
should be enough to reach the goal, shouldn't it?
--
Massimo Maiurana massimo<at>ragusa.linux.it
http://massimo.solira.org GPG keyID #7044D601
Creare l'uomo fu un'idea bizzarra e originale,
ma aggiungere la pecora fu una tautologia.
[Mark Twain]
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything/evry_plug_aggregator.c /mnt/storage/e17_build/apps/e/src/modules/everything/evry_plug_aggregator.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything/evry_plug_aggregator.c 2010-04-18 10:47:37.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything/evry_plug_aggregator.c 2010-04-18 21:17:52.000000000 +0200
@@ -312,7 +312,7 @@
Plugin_Config *pc;
p = E_NEW(Plugin, 1);
- EVRY_PLUGIN_NEW(EVRY_PLUGIN(p), _("All"), 0, "", "",
+ EVRY_PLUGIN_NEW(EVRY_PLUGIN(p), N_("All"), 0, "", "",
NULL, _cleanup, _fetch, _icon_get, _plugin_free);
EVRY_PLUGIN(p)->action = &_action;
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything/evry_plug_clipboard.c /mnt/storage/e17_build/apps/e/src/modules/everything/evry_plug_clipboard.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything/evry_plug_clipboard.c 2010-04-18 10:42:08.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything/evry_plug_clipboard.c 2010-04-18 21:18:11.000000000 +0200
@@ -31,7 +31,7 @@
if (!win) return EINA_FALSE;
//FIXME: Icon name doesnt follow FDO Spec
- act = EVRY_ACTION_NEW(_("Copy to Clipboard"), "TEXT", NULL, "everything-clipboard",
+ act = EVRY_ACTION_NEW(N_("Copy to Clipboard"), "TEXT", NULL, "everything-clipboard",
_action, _check_item);
evry_action_register(act, 10);
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-apps/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-apps/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-apps/e_mod_main.c 2010-04-18 10:41:11.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-apps/e_mod_main.c 2010-04-18 21:19:28.000000000 +0200
@@ -946,12 +946,12 @@
return EINA_FALSE;
p1 = E_NEW(Plugin, 1);
- EVRY_PLUGIN_NEW(EVRY_PLUGIN(p1), _("Applications"), type_subject, "", "APPLICATION",
+ EVRY_PLUGIN_NEW(EVRY_PLUGIN(p1), N_("Applications"), type_subject, "", "APPLICATION",
_begin, _cleanup, _fetch, _icon_get, _free_plugin);
EVRY_PLUGIN(p1)->complete = &_complete;
p2 = E_NEW(Plugin, 1);
- EVRY_PLUGIN_NEW(EVRY_PLUGIN(p2), _("Open With..."), type_action, "FILE", "",
+ EVRY_PLUGIN_NEW(EVRY_PLUGIN(p2), N_("Open With..."), type_action, "FILE", "",
_begin_open_with, _cleanup, _fetch,
_icon_get, _free_plugin);
@@ -960,22 +960,22 @@
evry_plugin_register(EVRY_PLUGIN(p1), 1);
evry_plugin_register(EVRY_PLUGIN(p2), 1);
- act = EVRY_ACTION_NEW(_("Launch"), "APPLICATION", NULL,
+ act = EVRY_ACTION_NEW(N_("Launch"), "APPLICATION", NULL,
"everything-launch", _exec_app_action, _exec_app_check_item);
- act1 = EVRY_ACTION_NEW(_("Open File..."), "APPLICATION", "FILE", "document-open",
+ act1 = EVRY_ACTION_NEW(N_("Open File..."), "APPLICATION", "FILE", "document-open",
_exec_app_action, _exec_app_check_item);
- act2 = EVRY_ACTION_NEW(_("Run in Terminal"), "APPLICATION", NULL, "system-run",
+ act2 = EVRY_ACTION_NEW(N_("Run in Terminal"), "APPLICATION", NULL, "system-run",
_exec_term_action, _exec_term_check_item);
- act3 = EVRY_ACTION_NEW(_("Edit Application Entry"), "APPLICATION", NULL, "everything-launch",
+ act3 = EVRY_ACTION_NEW(N_("Edit Application Entry"), "APPLICATION", NULL, "everything-launch",
_edit_app_action, _edit_app_check_item);
- act4 = EVRY_ACTION_NEW(_("New Application Entry"), "APPLICATION", NULL, "everything-launch",
+ act4 = EVRY_ACTION_NEW(N_("New Application Entry"), "APPLICATION", NULL, "everything-launch",
_new_app_action, _new_app_check_item);
- act5 = EVRY_ACTION_NEW(_("Run with Sudo"), "APPLICATION", NULL, "system-run",
+ act5 = EVRY_ACTION_NEW(N_("Run with Sudo"), "APPLICATION", NULL, "system-run",
_exec_sudo_action, NULL);
evry_action_register(act, 0);
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-aspell/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-aspell/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-aspell/e_mod_main.c 2010-04-18 10:49:19.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-aspell/e_mod_main.c 2010-04-18 21:20:03.000000000 +0200
@@ -339,7 +339,7 @@
p = E_NEW(Plugin, 1);
- EVRY_PLUGIN_NEW(p, _("Spell Checker"), type_subject, "", "TEXT",
+ EVRY_PLUGIN_NEW(p, N_("Spell Checker"), type_subject, "", "TEXT",
NULL, _cleanup, _fetch, NULL, _free_plugin);
EVRY_PLUGIN(p)->aggregate = EINA_FALSE;
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-calc/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-calc/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-calc/e_mod_main.c 2010-04-18 10:51:24.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-calc/e_mod_main.c 2010-04-18 21:20:35.000000000 +0200
@@ -229,7 +229,7 @@
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
- p1 = EVRY_PLUGIN_NEW(NULL, _("Calculator"), type_subject, NULL, "TEXT",
+ p1 = EVRY_PLUGIN_NEW(NULL, N_("Calculator"), type_subject, NULL, "TEXT",
_begin, _cleanup, _fetch, NULL, NULL);
p1->view_mode = VIEW_MODE_LIST;
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-files/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-files/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-files/e_mod_main.c 2010-04-18 10:44:26.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-files/e_mod_main.c 2010-04-18 21:21:12.000000000 +0200
@@ -593,20 +593,20 @@
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
- p1 = EVRY_PLUGIN_NEW(NULL, _("Files"), type_subject, "FILE", "FILE",
+ p1 = EVRY_PLUGIN_NEW(NULL, N_("Files"), type_subject, "FILE", "FILE",
_begin, _cleanup, _fetch, _icon_get, NULL);
- p2 = EVRY_PLUGIN_NEW(NULL, _("Files"), type_object, "FILE", "FILE",
+ p2 = EVRY_PLUGIN_NEW(NULL, N_("Files"), type_object, "FILE", "FILE",
_begin, _cleanup, _fetch, _icon_get, NULL);
evry_plugin_register(p1, 3);
evry_plugin_register(p2, 1);
- act1 = EVRY_ACTION_NEW(_("Open Folder (EFM)"), "FILE", NULL, "folder-open",
+ act1 = EVRY_ACTION_NEW(N_("Open Folder (EFM)"), "FILE", NULL, "folder-open",
_open_folder_action, _open_folder_check);
evry_action_register(act1, 0);
- act2 = EVRY_ACTION_NEW(_("Open Terminal here"), "FILE", NULL, "system-run",
+ act2 = EVRY_ACTION_NEW(N_("Open Terminal here"), "FILE", NULL, "system-run",
_open_term_action, NULL);
evry_action_register(act2, 2);
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-settings/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-settings/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-settings/e_mod_main.c 2010-04-18 10:45:18.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-settings/e_mod_main.c 2010-04-18 21:21:37.000000000 +0200
@@ -123,12 +123,12 @@
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
- p = EVRY_PLUGIN_NEW(NULL, _("Settings"), type_subject, NULL, "E_SETTINGS",
+ p = EVRY_PLUGIN_NEW(NULL, N_("Settings"), type_subject, NULL, "E_SETTINGS",
NULL, _cleanup, _fetch, _item_icon_get, NULL);
evry_plugin_register(p, 10);
- act = EVRY_ACTION_NEW(_("Show Dialog"), "E_SETTINGS", NULL,
+ act = EVRY_ACTION_NEW(N_("Show Dialog"), "E_SETTINGS", NULL,
"preferences-advanced", _action, NULL);
evry_action_register(act, 0);
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-wallpaper/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-wallpaper/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-wallpaper/e_mod_main.c 2010-04-18 10:50:30.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-wallpaper/e_mod_main.c 2010-04-18 21:22:03.000000000 +0200
@@ -205,7 +205,7 @@
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
- _plug = EVRY_PLUGIN_NEW(NULL, _("Wallpaper"), type_action, "FILE", "",
+ _plug = EVRY_PLUGIN_NEW(NULL, N_("Wallpaper"), type_action, "FILE", "",
_begin, _cleanup, _fetch, _icon_get, NULL);
EVRY_PLUGIN(_plug)->icon = "preferences-desktop-wallpaper";
diff -Naur /mnt/storage/e17_svn/trunk/e/src/modules/everything-windows/e_mod_main.c /mnt/storage/e17_build/apps/e/src/modules/everything-windows/e_mod_main.c
--- /mnt/storage/e17_svn/trunk/e/src/modules/everything-windows/e_mod_main.c 2010-04-18 10:52:49.000000000 +0200
+++ /mnt/storage/e17_build/apps/e/src/modules/everything-windows/e_mod_main.c 2010-04-18 21:22:24.000000000 +0200
@@ -486,13 +486,13 @@
if (!evry_api_version_check(EVRY_API_VERSION))
return EINA_FALSE;
- p1 = EVRY_PLUGIN_NEW(NULL, _("Windows"), type_subject, NULL, "BORDER",
+ p1 = EVRY_PLUGIN_NEW(NULL, N_("Windows"), type_subject, NULL, "BORDER",
_begin, _cleanup, _fetch, _item_icon_get, NULL);
p1->transient = EINA_TRUE;
evry_plugin_register(p1, 2);
- p2 = EVRY_PLUGIN_NEW(NULL, _("Window Action"), type_action, "BORDER", NULL,
+ p2 = EVRY_PLUGIN_NEW(NULL, N_("Window Action"), type_action, "BORDER", NULL,
_act_begin, _act_cleanup, _act_fetch, _act_item_icon_get, NULL);
EVRY_PLUGIN(p2)->action = &_act_action;
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
