From: Andreas Schwab <schwab@linux-m68k.org>
To: Chris Packham <judge.packham@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Johannes Sixt" <j.sixt@viscovery.net>,
git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [RFC/PATCH] i18n of multi-line messages
Date: Thu, 22 Dec 2011 12:56:36 +0100 [thread overview]
Message-ID: <m2r4zw4y6j.fsf@igel.home> (raw)
In-Reply-To: <4EF30907.8070101@gmail.com> (Chris Packham's message of "Thu, 22 Dec 2011 23:40:07 +1300")
Chris Packham <judge.packham@gmail.com> writes:
> Hi Junio,
>
> On 12/22/2011 08:38 PM, Junio C Hamano wrote:
>> + for (cp = buf.buf; *cp; cp = np) {
>> + np = strchrnul(cp, '\n');
>> + /*
>> + * TRANSLATORS: the format is designed so that in RTL
>> + * languages you could reorder and put the "prefix" at
>> + * the end instead of the beginning of a line if you
>> + * wanted to.
>> + */
>> + strbuf_addf(&line,
>> + _("%s: %.*s\n"),
>> + prefix,
>> + (int)(np - cp), cp);
>> + emit(&line, cb_data);
>> + strbuf_reset(&line);
>> + if (*np)
>> + np++;
>> + }
>
> Forgive my ignorance if I've missed something, but how is this going to
> work for RTL languages? Translators can change the format string but
> they can't change the order of parameters passed to strbuf_addf.
Translations can select the parameters to use with the n$ specification,
eg. "%3$.*2$s: %$1s\n"
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2011-12-22 11:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 23:55 [RFC/PATCH] i18n of multi-line messages Junio C Hamano
2011-12-22 0:14 ` Ævar Arnfjörð Bjarmason
2011-12-22 0:20 ` Junio C Hamano
2011-12-22 17:07 ` Thomas Rast
2011-12-22 6:54 ` Johannes Sixt
2011-12-22 7:00 ` Junio C Hamano
2011-12-22 7:00 ` Junio C Hamano
2011-12-22 7:38 ` Junio C Hamano
2011-12-22 8:19 ` Johannes Sixt
2011-12-22 18:08 ` Junio C Hamano
2011-12-23 6:42 ` Johannes Sixt
2011-12-23 20:54 ` Junio C Hamano
2011-12-22 10:40 ` Chris Packham
2011-12-22 11:56 ` Andreas Schwab [this message]
2011-12-22 21:44 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2r4zw4y6j.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=judge.packham@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.