Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
4275:5ce5b252cdb1 | 4276:32fcf4cf5f80 |
---|---|
943 b->in_room = g_list_insert_sorted(b->in_room, name, insertname); | 943 b->in_room = g_list_insert_sorted(b->in_room, name, insertname); |
944 pos = g_list_index(b->in_room, name); | 944 pos = g_list_index(b->in_room, name); |
945 | 945 |
946 add_chat_buddy_common(b, name, pos); | 946 add_chat_buddy_common(b, name, pos); |
947 | 947 |
948 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), | 948 g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", |
949 g_list_length(b->in_room) == 1 ? "person" : "people"); | 949 g_list_length(b->in_room)), g_list_length(b->in_room)); |
950 gtk_label_set_text(GTK_LABEL(b->count), tmp); | 950 gtk_label_set_text(GTK_LABEL(b->count), tmp); |
951 | 951 |
952 if (b->makesound) | 952 if (b->makesound) |
953 play_sound(SND_CHAT_JOIN); | 953 play_sound(SND_CHAT_JOIN); |
954 | 954 |
1082 | 1082 |
1083 if (!names) | 1083 if (!names) |
1084 return; | 1084 return; |
1085 | 1085 |
1086 /* don't remove them from ignored in case they re-enter */ | 1086 /* don't remove them from ignored in case they re-enter */ |
1087 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(b->in_room), | 1087 g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", |
1088 g_list_length(b->in_room) == 1 ? "person" : "people"); | 1088 g_list_length(b->in_room)), g_list_length(b->in_room)); |
1089 gtk_label_set_text(GTK_LABEL(b->count), tmp); | 1089 gtk_label_set_text(GTK_LABEL(b->count), tmp); |
1090 | 1090 |
1091 if (b->makesound) | 1091 if (b->makesound) |
1092 play_sound(SND_CHAT_LEAVE); | 1092 play_sound(SND_CHAT_LEAVE); |
1093 | 1093 |
1650 gtk_widget_destroy(win); | 1650 gtk_widget_destroy(win); |
1651 | 1651 |
1652 if (c->topic) | 1652 if (c->topic) |
1653 gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); | 1653 gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); |
1654 | 1654 |
1655 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), | 1655 g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", |
1656 g_list_length(c->in_room) == 1 ? "person" : "people"); | 1656 g_list_length(c->in_room)), g_list_length(c->in_room)); |
1657 gtk_label_set_text(GTK_LABEL(c->count), tmp); | 1657 gtk_label_set_text(GTK_LABEL(c->count), tmp); |
1658 | 1658 |
1659 while (r) { | 1659 while (r) { |
1660 char *name = r->data; | 1660 char *name = r->data; |
1661 | 1661 |
1683 c->text = imhtml; | 1683 c->text = imhtml; |
1684 | 1684 |
1685 if (c->topic) | 1685 if (c->topic) |
1686 gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); | 1686 gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); |
1687 | 1687 |
1688 g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), | 1688 g_snprintf(tmp, sizeof(tmp), ngettext("%d person in room", "%d people in room", |
1689 g_list_length(c->in_room) == 1 ? "person" : "people"); | 1689 g_list_length(c->in_room)), g_list_length(c->in_room)); |
1690 gtk_label_set_text(GTK_LABEL(c->count), tmp); | 1690 gtk_label_set_text(GTK_LABEL(c->count), tmp); |
1691 | 1691 |
1692 while (r) { | 1692 while (r) { |
1693 char *name = r->data; | 1693 char *name = r->data; |
1694 | 1694 |