[nautilus-sendto] Add gettext_package member for the plugin struct
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] Add gettext_package member for the plugin struct
- Date: Wed, 23 Sep 2009 13:17:49 +0000 (UTC)
commit 30f7af19e789352a7c0b7d4eaa5ca6aa36bd109b
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 23 14:17:06 2009 +0100
Add gettext_package member for the plugin struct
So plugins can be translated in their own modules.
src/nautilus-sendto-command.c | 2 +-
src/nautilus-sendto-plugin.h | 2 ++
src/plugins/bluetooth/bluetooth.c | 1 +
src/plugins/empathy/empathy.c | 1 +
src/plugins/evolution/evolution.c | 1 +
src/plugins/gajim/gajim.c | 1 +
src/plugins/nautilus-burn/nautilus-burn.c | 1 +
src/plugins/pidgin/pidgin.c | 1 +
src/plugins/removable-devices/removable-devices.c | 1 +
src/plugins/upnp/upnp.c | 1 +
10 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index fb493e5..44b9ee6 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -449,7 +449,7 @@ set_model_for_options_combobox (NS_ui *ui)
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
COLUMN_ICON, pixbuf,
- COLUMN_DESCRIPTION, _(p->info->description),
+ COLUMN_DESCRIPTION, dgettext(p->info->gettext_package, p->info->description),
-1);
if (last_used != NULL && !strcmp(last_used, p->info->id)) {
option = i;
diff --git a/src/nautilus-sendto-plugin.h b/src/nautilus-sendto-plugin.h
index bc5c044..5109cf4 100644
--- a/src/nautilus-sendto-plugin.h
+++ b/src/nautilus-sendto-plugin.h
@@ -51,6 +51,7 @@ typedef enum {
* @icon: The icon name for the plugin selection drop-down
* @id: A unique ID representing the plugin
* @description: The label used in the plugin selection drop-down
+ * @gettext_package: The domain to use to translate the description, %NULL if the plugin is part of nautilus-sendto
* @never_unload: Whether to unload the plugin on exit. Enable this if your plugin registers a new #GType
* @capabilities: a bitmask of #NstPluginCapabilities
* @init: Check for dependencies, and return %FALSE if dependencies such as programs are missing.
@@ -66,6 +67,7 @@ struct _NstPluginInfo
gchar *icon;
gchar *id;
gchar *description;
+ gchar *gettext_package;
gboolean never_unload;
NstPluginCapabilities capabilities;
gboolean (*init) (NstPlugin *plugin);
diff --git a/src/plugins/bluetooth/bluetooth.c b/src/plugins/bluetooth/bluetooth.c
index 9cf36a2..972a87b 100644
--- a/src/plugins/bluetooth/bluetooth.c
+++ b/src/plugins/bluetooth/bluetooth.c
@@ -545,6 +545,7 @@ NstPluginInfo plugin_info = {
"bluetooth",
"bluetooth",
N_("Bluetooth (OBEX Push)"),
+ NULL,
FALSE,
NAUTILUS_CAPS_NONE,
init,
diff --git a/src/plugins/empathy/empathy.c b/src/plugins/empathy/empathy.c
index 70f9a8f..f84f789 100644
--- a/src/plugins/empathy/empathy.c
+++ b/src/plugins/empathy/empathy.c
@@ -279,6 +279,7 @@ NstPluginInfo plugin_info = {
"im",
"empathy",
N_("Instant Message (Empathy)"),
+ NULL,
TRUE,
NAUTILUS_CAPS_NONE,
init,
diff --git a/src/plugins/evolution/evolution.c b/src/plugins/evolution/evolution.c
index dbb33b4..8162ebb 100644
--- a/src/plugins/evolution/evolution.c
+++ b/src/plugins/evolution/evolution.c
@@ -364,6 +364,7 @@ NstPluginInfo plugin_info = {
"emblem-mail",
"evolution",
N_("Email"),
+ NULL,
FALSE,
NAUTILUS_CAPS_NONE,
init,
diff --git a/src/plugins/gajim/gajim.c b/src/plugins/gajim/gajim.c
index 8635d0a..247175a 100644
--- a/src/plugins/gajim/gajim.c
+++ b/src/plugins/gajim/gajim.c
@@ -487,6 +487,7 @@ NstPluginInfo plugin_info = {
"im-jabber",
"gajim",
N_("Instant Message (Gajim)"),
+ NULL,
TRUE,
NAUTILUS_CAPS_NONE,
init,
diff --git a/src/plugins/nautilus-burn/nautilus-burn.c b/src/plugins/nautilus-burn/nautilus-burn.c
index 0a904e8..bdc80c1 100644
--- a/src/plugins/nautilus-burn/nautilus-burn.c
+++ b/src/plugins/nautilus-burn/nautilus-burn.c
@@ -176,6 +176,7 @@ NstPluginInfo plugin_info = {
"brasero",
"nautilus-burn",
N_("CD/DVD Creator"),
+ NULL,
FALSE,
NAUTILUS_CAPS_SEND_DIRECTORIES,
init,
diff --git a/src/plugins/pidgin/pidgin.c b/src/plugins/pidgin/pidgin.c
index 6a2187c..f39edfe 100644
--- a/src/plugins/pidgin/pidgin.c
+++ b/src/plugins/pidgin/pidgin.c
@@ -351,6 +351,7 @@ NstPluginInfo plugin_info = {
"im",
"pidgin",
N_("Instant Message (Pidgin)"),
+ NULL,
FALSE,
NAUTILUS_CAPS_NONE,
init,
diff --git a/src/plugins/removable-devices/removable-devices.c b/src/plugins/removable-devices/removable-devices.c
index 6c5aa5c..4a735a3 100644
--- a/src/plugins/removable-devices/removable-devices.c
+++ b/src/plugins/removable-devices/removable-devices.c
@@ -222,6 +222,7 @@ NstPluginInfo plugin_info = {
"folder-remote",
"folder-remote",
N_("Removable disks and shares"),
+ NULL,
FALSE,
NAUTILUS_CAPS_SEND_DIRECTORIES,
init,
diff --git a/src/plugins/upnp/upnp.c b/src/plugins/upnp/upnp.c
index 3381428..da5669e 100644
--- a/src/plugins/upnp/upnp.c
+++ b/src/plugins/upnp/upnp.c
@@ -307,6 +307,7 @@ NstPluginInfo plugin_info = {
"folder-remote",
"upnp",
N_("UPnP Media Server"),
+ NULL,
FALSE,
NAUTILUS_CAPS_NONE,
init,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]