mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
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
This commit is contained in:
parent
7fc2ab9493
commit
7427e22958
@ -156,7 +156,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
|
|||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
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++)
|
for (i = 0; i < nscm; i++)
|
||||||
g_object_unref (scms[i]);
|
g_object_unref (scms[i]);
|
||||||
@ -187,7 +190,10 @@ g_unix_connection_receive_fd (GUnixConnection *connection,
|
|||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
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++)
|
for (i = 0; i < nfd; i++)
|
||||||
close (fds[i]);
|
close (fds[i]);
|
||||||
@ -545,7 +551,9 @@ g_unix_connection_receive_credentials (GUnixConnection *connection,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_FAILED,
|
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);
|
nscm);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user