Re: [PATCH] merge-ort: split "distinct types" message into two translatable messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux