soc.2010.icq-tlc: db7aee7f: Gettextized the code and rephrased some ...
ivan.komarov at soc.pidgin.im
ivan.komarov at soc.pidgin.im
Thu Jul 1 13:25:57 EDT 2010
----------------------------------------------------------------------
Revision: db7aee7fc078f9073a4f2c545f49ca3200871bb9
Parent: 9bafea8f430b026bb696c351f316515bc13644f2
Author: ivan.komarov at soc.pidgin.im
Date: 07/01/10 13:15:37
Branch: im.pidgin.soc.2010.icq-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/db7aee7fc078f9073a4f2c545f49ca3200871bb9
Changelog:
Gettextized the code and rephrased some of the messages slightly.
Changes against parent 9bafea8f430b026bb696c351f316515bc13644f2
patched libpurple/protocols/oscar/visibility.c
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/visibility.c e593f8e3194761dde30fb0eb70d4962fe400a894
+++ libpurple/protocols/oscar/visibility.c 79b652192c9bfb92c899063ac18d3b91b40e1d7f
@@ -20,6 +20,12 @@
#include "visibility.h"
+/* 4 separate strings are needed in order to ease translators' job */
+#define APPEAR_ONLINE N_("Appear Online")
+#define DONT_APPEAR_ONLINE N_("Don't Appear Online")
+#define APPEAR_OFFLINE N_("Appear Offline")
+#define DONT_APPEAR_OFFLINE N_("Don't Appear Offline")
+
static guint16
get_buddy_list_type(OscarData *od, const char *bname)
{
@@ -54,13 +60,14 @@ create_visibility_menu_item(OscarData *o
PurpleAccount *account = purple_connection_get_account(od->gc);
gboolean invisible = purple_account_is_status_active(account, OSCAR_STATUS_ID_INVISIBLE);
gboolean on_list = is_buddy_on_list(od, bname);
- gchar *label;
- PurpleMenuAction *result;
+ const gchar *label;
- label = g_strdup_printf("%s %s", on_list ? "Don't Appear" : "Appear", invisible ? "Online" : "Offline");
- result = purple_menu_action_new(label, PURPLE_CALLBACK(visibility_cb), NULL, NULL);
- g_free(label);
- return result;
+ if (invisible) {
+ label = on_list ? _(DONT_APPEAR_ONLINE) : _(APPEAR_ONLINE);
+ } else {
+ label = on_list ? _(DONT_APPEAR_OFFLINE) : _(APPEAR_OFFLINE);
+ }
+ return purple_menu_action_new(label, PURPLE_CALLBACK(visibility_cb), NULL, NULL);
}
static void
@@ -88,12 +95,12 @@ show_private_list(PurplePluginAction *ac
g_slist_free(buddies);
filtered_buddies = g_slist_reverse(filtered_buddies);
- text = oscar_format_buddies(filtered_buddies, "you have no buddies on this list");
+ text = oscar_format_buddies(filtered_buddies, _("you have no buddies on this list"));
g_slist_free(filtered_buddies);
- secondary = g_strdup_printf("You can add a buddy to this list "
+ secondary = g_strdup_printf(_("You can add a buddy to this list "
"by right-clicking on them and "
- "selecting \"%s\"", menu_action_name);
+ "selecting \"%s\""), menu_action_name);
purple_notify_formatted(gc, NULL, list_description, secondary, text, NULL, NULL);
g_free(secondary);
g_free(text);
@@ -102,13 +109,14 @@ oscar_show_visible_list(PurplePluginActi
void
oscar_show_visible_list(PurplePluginAction *action)
{
- show_private_list(action, AIM_SSI_TYPE_PERMIT, "These buddies will always see "
- "your status, even when you switch "
- "to \"Invisible\"", "Appear Online");
+ show_private_list(action, AIM_SSI_TYPE_PERMIT, _("These buddies will see "
+ "your status when you switch "
+ "to \"Invisible\""),
+ _(APPEAR_ONLINE));
}
void
oscar_show_invisible_list(PurplePluginAction *action)
{
- show_private_list(action, AIM_SSI_TYPE_DENY, "These buddies will always see you as offline", "Appear Offline");
+ show_private_list(action, AIM_SSI_TYPE_DENY, _("These buddies will always see you as offline"), _(APPEAR_OFFLINE));
}
\ No newline at end of file
More information about the Commits
mailing list