GNOME Bugzilla – Bug 789833
Strings in glib-networking need plural forms
Last modified: 2017-11-03 18:26:47 UTC
These two new strings need plural forms support (https://wiki.gnome.org/TranslationProject/DevGuidelines/Plurals): tls/gnutls/gtlsconnection-gnutls.c:995 "Message is too large for DTLS connection; maximum is %u bytes" tls/gnutls/gtlsconnection-gnutls.c:2420 "Message of size %lu bytes is too large for DTLS connection, maximum is %u bytes" The second one probably needs to be split into two, as numbers may differ.
Created attachment 362852 [details] [review] gnutls: Use ngettext where required This looks pretty odd in English, as we know the MTU and message size will never be 0 in these error messages, and so the string will never be singular. But all the world is not English.
I have not tested it, so please sanity-check it. I think it's right.
Review of attachment 362852 [details] [review]: ::: tls/gnutls/gtlsconnection-gnutls.c @@ +995,2 @@ g_set_error (error, G_IO_ERROR, G_IO_ERROR_MESSAGE_TOO_LARGE, + ngettext("Message is too large for DTLS connection; maximum is %u byte", Nitpick: Missing space before `(`. Same below too.
Created attachment 362857 [details] [review] gnutls: Use ngettext where required This looks pretty odd in English, as we know the MTU and message size will never be 0 in these error messages, and so the string will never be singular. But all the world is not English.
Review of attachment 362857 [details] [review]: Looks good to push with this fix. ::: tls/gnutls/gtlsconnection-gnutls.c @@ +2422,3 @@ + message = g_strdup_printf("%s %s", + ngettext ("Message of size %lu byte is too large for DTLS connection", + "Message of size %lu bytes is too large for DTLS connection", mtu), Ah, also the number passed to this ngettext() call should be total_message_size rather than mtu.
Yup... code review is good.
Attachment 362857 [details] pushed as 57f8d06 - gnutls: Use ngettext where required