summaryrefslogtreecommitdiff
path: root/gio/gunixconnection.c
diff options
context:
space:
mode:
authorElisabeth Henry <liz.henry@ouvaton.org>2013-04-01 04:11:01 +0200
committerMatthias Clasen <mclasen@redhat.com>2013-05-23 21:48:28 -0400
commit7427e2295812b7512478d76a4424b32ec977523a (patch)
tree2e2caa54f54fbf12d40da53487392c0771010ad7 /gio/gunixconnection.c
parent7fc2ab9493dbb480e2b6815813af9cf8bbfc081e (diff)
downloadglib-7427e2295812b7512478d76a4424b32ec977523a.tar.gz
gunixconnection: added ngettext to support plural forms
While those strings ("Expecting 1 control message, got %d" and "Expecting one fd, but got %d\n") have same singular/plural form in english, it is not necessarily the case in other languages. https://bugzilla.gnome.org/show_bug.cgi?id=695233
Diffstat (limited to 'gio/gunixconnection.c')
-rw-r--r--gio/gunixconnection.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c
index 1c94051bf..b79fdd2cc 100644
--- a/gio/gunixconnection.c
+++ b/gio/gunixconnection.c
@@ -156,7 +156,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
gint i;
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Expecting 1 control message, got %d"), nscm);
+ ngettext("Expecting 1 control message, got %d",
+ "Expecting 1 control message, got %d",
+ nscm),
+ nscm);
for (i = 0; i < nscm; i++)
g_object_unref (scms[i]);
@@ -187,7 +190,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
gint i;
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Expecting one fd, but got %d\n"), nfd);
+ ngettext("Expecting one fd, but got %d\n",
+ "Expecting one fd, but got %d\n",
+ nfd),
+ nfd);
for (i = 0; i < nfd; i++)
close (fds[i]);
@@ -545,7 +551,9 @@ g_unix_connection_receive_credentials (GUnixConnection *connection,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Expecting 1 control message, got %d"),
+ ngettext("Expecting 1 control message, got %d",
+ "Expecting 1 control message, got %d",
+ nscm),
nscm);
goto out;
}