Mercurial > pidgin
diff src/buddy_chat.c @ 4276:32fcf4cf5f80
[gaim-migrate @ 4527]
E'ric Boumaour (zongo_fr) writes:
"This patch enables the use of ngettext for singular and
plural forms of sentences ("%s person in room"/"%s
people in room") cf. gettext documentation.
Some call to g_snprintf have been rewritten to make
strings translatable (like "%s has %s")
The patch is also available at
http://www.frankiz.org/gaim/ starting by i18n-ngettext-
http://www.frankiz.org/gaim/i18n-ngettext-20030110.diff
is the current file, a newer date would be an update.
HTH,
Eric"
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 10 Jan 2003 15:36:48 +0000 |
parents | 709de528927e |
children | 12d3ca8f5b5f |
line wrap: on
line diff
--- a/src/buddy_chat.c Fri Jan 10 07:04:23 2003 +0000 +++ b/src/buddy_chat.c Fri Jan 10 15:36:48 2003 +0000 @@ -945,8 +945,8 @@ add_chat_buddy_common(b, name, pos); - g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), - g_list_length(b->in_room) == 1 ? "person" : "people"); + g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", + g_list_length(b->in_room)), g_list_length(b->in_room)); gtk_label_set_text(GTK_LABEL(b->count), tmp); if (b->makesound) @@ -1084,8 +1084,8 @@ return; /* don't remove them from ignored in case they re-enter */ - g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), - g_list_length(b->in_room) == 1 ? "person" : "people"); + g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", + g_list_length(b->in_room)), g_list_length(b->in_room)); gtk_label_set_text(GTK_LABEL(b->count), tmp); if (b->makesound) @@ -1652,8 +1652,8 @@ if (c->topic) gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); - g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), - g_list_length(c->in_room) == 1 ? "person" : "people"); + g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", + g_list_length(c->in_room)), g_list_length(c->in_room)); gtk_label_set_text(GTK_LABEL(c->count), tmp); while (r) { @@ -1685,8 +1685,8 @@ if (c->topic) gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); - g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), - g_list_length(c->in_room) == 1 ? "person" : "people"); + g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", + g_list_length(c->in_room)), g_list_length(c->in_room)); gtk_label_set_text(GTK_LABEL(c->count), tmp); while (r) {