Re: [RFC/PATCH] i18n of multi-line messages
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 22, 2011, 00:14 UTC
- Message-ID
- <CACBZZX7bgjFz7mvTySPKhR24coqOeVVy8+CsKHVj8Q3LF_-5ww@mail.gmail.com>
- In-Reply-To
- <7vr4zxeaz5.fsf@alter.siamese.dyndns.org>
On Thu, Dec 22, 2011 at 00:55, Junio C Hamano <gitster@pobox.com> 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:
> + 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.