From: "Rubén Justo" <rjusto@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] advice: omit trailing whitespace
Date: Sun, 31 Mar 2024 09:11:59 +0200 [thread overview]
Message-ID: <0f43cd7b-a366-4ec2-9577-93708e21f2ff@gmail.com> (raw)
In-Reply-To: <xmqqcyraj3z7.fsf@gitster.g>
On Sat, Mar 30, 2024 at 11:43:40PM -0700, Junio C Hamano wrote:
> Rubén Justo <rjusto@gmail.com> writes:
>
> >> > for (cp = buf.buf; *cp; cp = np) {
> >> > np = strchrnul(cp, '\n');
> >> > - fprintf(stderr, _("%shint: %.*s%s\n"),
> >> > + fprintf(stderr, _("%shint:%s%.*s%s\n"),
> >> > advise_get_color(ADVICE_COLOR_HINT),
> >> > + (np == cp) ? "" : " ",
> >> > (int)(np - cp), cp,
> >> > advise_get_color(ADVICE_COLOR_RESET));
> >
> > Thinking again on this I wonder, while we're here, if we could go further
> > and move the "hint" literal to the args, to ease the translation work:
> > - fprintf(stderr, _("%shint:%s%.*s%s\n"),
> > + fprintf(stderr, "%s%s:%s%.*s%s\n",
> > advise_get_color(ADVICE_COLOR_HINT),
> > + _("hint"),
> > (np == cp) ? "" : " ",
> > (int)(np - cp), cp,
> > advise_get_color(ADVICE_COLOR_RESET));
>
> It is not guaranteed that any and all languages want to use a colon
> immediately after translation of "hint"; the current message string
> with or without my patch allows translators adjust that part to the
> target language, but your version will force them to always use only
> a colon there. Is that an improvement? I somehow do not think so.
I was just thinking if leaving the format open to the translation is a
sane option. Maybe we can move the colon to the literal in the args,
too.
In any case, the patch is OK as it is.
next prev parent reply other threads:[~2024-03-31 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 22:57 [PATCH] advice: omit trailing whitespace Junio C Hamano
2024-03-29 23:23 ` Rubén Justo
2024-03-31 6:17 ` Rubén Justo
2024-03-31 6:43 ` Junio C Hamano
2024-03-31 7:11 ` Rubén Justo [this message]
2024-03-31 8:11 ` Rubén Justo
2024-03-31 22:20 ` Junio C Hamano
2024-04-01 20:50 ` Rubén Justo
2024-03-29 23:35 ` Dragan Simic
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f43cd7b-a366-4ec2-9577-93708e21f2ff@gmail.com \
--to=rjusto@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).