Ralf Thielow <ralf.thie...@gmail.com> writes:

> The outputs in handle_change_delete() contain a lot of placeholders.
> This could end up in confusion to translators. Add a hint for translators
> that they can easily understand it without study the code.
>
> Helped-by: Junio C Hamano <gits...@pobox.com>
> Signed-off-by: Ralf Thielow <ralf.thie...@gmail.com>
> ---
> The first version did only explain the first and the
> fourth placeholder. Junio pointed out that the others
> could still confuse translators. This second version
> explains now all placeholders. It differs to Junio's
> suggestion in a modified header and an optional part
> for the other messages.
>
>  merge-recursive.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 8903a73..ca58dcd 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -1035,6 +1035,20 @@ static void handle_change_delete(struct merge_options 
> *o,
>               update_file(o, 0, o_sha, o_mode, renamed ? renamed : path);
>       } else if (!a_sha) {
>               if (!renamed) {
> +                     /*
> +                      * TRANSLATORS: The next four messages have many
> +                      * placeholders.
> +                      *
> +                      * CONFLICT (
> +                      * %s=<translation of noun "rename" or 
> "modify">/delete):
> +                      * %s=<name of the path being merged> deleted in
> +                      * %s=<name of a branch> and
> +                      * %s=<translation of verb pp "renamed" or "modified"> 
> in
> +                      * %s=<name of a branch>. Version
> +                      * %s=<name of a branch> of
> +                      * %s=<name of the path being merged> left in tree[.][at
> +                      * %s=<name of the path beeing merged was renamed to>.]
> +                      */
>                       output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s "
>                              "and %s in %s. Version %s of %s left in tree."),
>                              change, path, o->branch1, change_past,

In general, it is a poor strategy to carry already translated words
around and insert them into messages to form translated sentences,
so the way the translation is done for this part of the code needs
to be rethought.

But without such a rewrite, I think this would be good enough
band-aid.

People experienced in i18n should look into a longer term solution,
though.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to