Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH] i18n of multi-line messages

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:41

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Thu, Dec 22, 2011 at 00:55, Junio C Hamano [off-list ref] wrote:

Nice. Thanks for tackling this. I'll no doubt be submitting some of
these myself once we start getting translations.

This is not a regression, but note that something like this:
quoted
+               fprintf(stderr, "%s%.*s\n", _("hint: "), (int)(np - cp), cp);
Isn't going to cut it for RTL languages like Hebrew and Arabic, since
for them the "hint: " would effectively be at the end of the line.

I think the easiest way to tackle that sort of thing is to just do:

    _("hint: %.*s\n")

And have a TRANSLATORS comment indicating that the format string
should be kept, but that translators can move around the "hint", GNU
gettext also has a msgcheck feature to check that format strings are
compatible in the translations.
Good point. Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help