git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Alex Henrie <alexhenrie24@gmail.com>
Cc: git@vger.kernel.org, newren@gmail.com, gitster@pobox.com
Subject: Re: [PATCH] merge-ort: split "distinct types" message into two translatable messages
Date: Mon, 10 May 2021 18:33:19 -0400	[thread overview]
Message-ID: <YJm0r15gK3DjKbbl@coredump.intra.peff.net> (raw)
In-Reply-To: <20210509215250.33215-1-alexhenrie24@gmail.com>

On Sun, May 09, 2021 at 03:52:50PM -0600, Alex Henrie wrote:

> The word "renamed" has two possible translations in many European
> languages depending on whether one thing was renamed or two things were
> renamed. Give translators freedom to alter any part of the message to
> make it sound right in their language.

Makes sense. And in general, I think the advice (e.g., given in
gettext's "Preparing Strings" doc) is to avoid the kind of "lego"
translation structure we saw in the original (where words like "both" or
"none" might need more context than a single %s provides).

> -			path_msg(opt, path, 0,
> -				 _("CONFLICT (distinct types): %s had different "
> -				   "types on each side; renamed %s of them so "
> -				   "each can be recorded somewhere."),
> -				 path,
> -				 (rename_a && rename_b) ? _("both") : _("one"));
> +			if (rename_a && rename_b) {
> +				path_msg(opt, path, 0,
> +					 _("CONFLICT (distinct types): %s had "
> +					   "different types on each side; "
> +					   "renamed both of them so each can "
> +					   "be recorded somewhere."),
> +					 path);
> +			} else {
> +				path_msg(opt, path, 0,
> +					 _("CONFLICT (distinct types): %s had "
> +					   "different types on each side; "
> +					   "renamed one of them so each can be "
> +					   "recorded somewhere."),
> +					 path);
> +			}

I wondered if we could be using the Q_() helper here, which
distinguishes cases based on quantity. But I don't think this is
semantically quite the same thing (it's not "rename" versus "renames",
but rather two distinctly interesting cases).

-Peff

      parent reply	other threads:[~2021-05-10 22:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09 21:52 [PATCH] merge-ort: split "distinct types" message into two translatable messages Alex Henrie
2021-05-10  5:36 ` Bagas Sanjaya
2021-05-10  5:50   ` Bagas Sanjaya
2021-05-10 16:42   ` Alex Henrie
2021-05-10 19:29 ` Elijah Newren
2021-05-10 22:33 ` Jeff King [this message]

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=YJm0r15gK3DjKbbl@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@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.
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).