{"thread":{"id":"55654","subject":"[PATCH] merge-ort: split \"distinct types\" message into two translatable messages","startedAt":"2021-05-09T21:54:00Z","lastAt":"2021-05-10T22:33:27Z","messageCount":6,"participants":["Alex Henrie","Bagas Sanjaya","Elijah Newren","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"423981","messageId":"20210509215250.33215-1-alexhenrie24@gmail.com","threadId":"55654","inReplyTo":null,"subject":"[PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2021-05-09T21:52:50Z","receivedAt":"2021-05-09T21:54:00Z","isPatch":true,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"The word \"renamed\" has two possible translations in many European\nlanguages depending on whether one thing was renamed or two things were\nrenamed. Give translators freedom to alter any part of the message to\nmake it sound right in their language.\n\nSigned-off-by: Alex Henrie <alexhenrie24@gmail.com>\n---\n merge-ort.c | 21 +++++++++++++++------\n 1 file changed, 15 insertions(+), 6 deletions(-)\n\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 6c2792b10e..745a844b18 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -3050,12 +3050,21 @@ static void process_entry(struct merge_options *opt,\n \t\t\t\trename_b = 1;\n \t\t\t}\n \n-\t\t\tpath_msg(opt, path, 0,\n-\t\t\t\t _(\"CONFLICT (distinct types): %s had different \"\n-\t\t\t\t   \"types on each side; renamed %s of them so \"\n-\t\t\t\t   \"each can be recorded somewhere.\"),\n-\t\t\t\t path,\n-\t\t\t\t (rename_a && rename_b) ? _(\"both\") : _(\"one\"));\n+\t\t\tif (rename_a && rename_b) {\n+\t\t\t\tpath_msg(opt, path, 0,\n+\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n+\t\t\t\t\t   \"different types on each side; \"\n+\t\t\t\t\t   \"renamed both of them so each can \"\n+\t\t\t\t\t   \"be recorded somewhere.\"),\n+\t\t\t\t\t path);\n+\t\t\t} else {\n+\t\t\t\tpath_msg(opt, path, 0,\n+\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n+\t\t\t\t\t   \"different types on each side; \"\n+\t\t\t\t\t   \"renamed one of them so each can be \"\n+\t\t\t\t\t   \"recorded somewhere.\"),\n+\t\t\t\t\t path);\n+\t\t\t}\n \n \t\t\tci->merged.clean = 0;\n \t\t\tmemcpy(new_ci, ci, sizeof(*new_ci));\n-- \n2.31.1\n\n"},{"id":"423998","messageId":"bb3a3968-f78e-7534-1274-2e6c916b9a8a@gmail.com","threadId":"55654","inReplyTo":"20210509215250.33215-1-alexhenrie24@gmail.com","subject":"Re: [PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-10T05:36:39Z","receivedAt":"2021-05-10T05:36:46Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 10/05/21 04.52, Alex Henrie wrote:\n> The word \"renamed\" has two possible translations in many European\n> languages depending on whether one thing was renamed or two things were\n> renamed. Give translators freedom to alter any part of the message to\n> make it sound right in their language.\n\nWhat are the examples? In French, Spanish, German, Portuguese (pt-PT),\nor even Slavic (like Russian) or even Hungarian, and etc?\n\n> -\t\t\tpath_msg(opt, path, 0,\n> -\t\t\t\t _(\"CONFLICT (distinct types): %s had different \"\n> -\t\t\t\t   \"types on each side; renamed %s of them so \"\n> -\t\t\t\t   \"each can be recorded somewhere.\"),\n> -\t\t\t\t path,\n> -\t\t\t\t (rename_a && rename_b) ? _(\"both\") : _(\"one\"));\n> +\t\t\tif (rename_a && rename_b) {\n> +\t\t\t\tpath_msg(opt, path, 0,\n> +\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n> +\t\t\t\t\t   \"different types on each side; \"\n> +\t\t\t\t\t   \"renamed both of them so each can \"\n> +\t\t\t\t\t   \"be recorded somewhere.\"),\n> +\t\t\t\t\t path);\n> +\t\t\t} else {\n> +\t\t\t\tpath_msg(opt, path, 0,\n> +\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n> +\t\t\t\t\t   \"different types on each side; \"\n> +\t\t\t\t\t   \"renamed one of them so each can be \"\n> +\t\t\t\t\t   \"recorded somewhere.\"),\n> +\t\t\t\t\t path);\n> +\t\t\t}\n\nSeems OK.\n\nFor example, in Indonesian, the first case (both sides are renamed) would be\nsomething like:\n```\n%s punya tipe yang berbeda pada setiap sisi, kedua-duanya dinamai ulang...\n```\nThe second case (only one side) would be something like:\n```\n%s punya tipe yang berbeda pada setiap sisi, salah satunya dinamai ulang...\n```\nBut the status quo (before this patch) would be translated as:\n```\n%s punya tipe yang berbeda pada setiap sisi, (kedua-duanya | satu) dari mereka\ndinamai ulang...\n```\nOn the both sides case of status quo, the personal pronoun `mereka` (they)\nrefers to the conflicted sides, where as on this patch, such conflicted sides\nare instead be referred as `-nya` suffix on the translation.\n\nI personally avoid using `mereka` atau `ia` as personal pronoun that refer\nto things, and instead using `itu`.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"424000","messageId":"4c86452a-81dd-3bb9-a6a8-29cb1a0dd0de@gmail.com","threadId":"55654","inReplyTo":"bb3a3968-f78e-7534-1274-2e6c916b9a8a@gmail.com","subject":"Re: [PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-10T05:50:08Z","receivedAt":"2021-05-10T05:50:14Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 10/05/21 12.36, Bagas Sanjaya wrote:\n> Seems OK.\n> \n> For example, in Indonesian, the first case (both sides are renamed) would be\n> something like:\n> ```\n> %s punya tipe yang berbeda pada setiap sisi, kedua-duanya dinamai ulang...\n> ```\n> The second case (only one side) would be something like:\n> ```\n> %s punya tipe yang berbeda pada setiap sisi, salah satunya dinamai ulang...\n> ```\n> But the status quo (before this patch) would be translated as:\n> ```\n> %s punya tipe yang berbeda pada setiap sisi, (kedua-duanya | satu) dari mereka\n> dinamai ulang...\n> ```\n> On the both sides case of status quo, the personal pronoun `mereka` (they)\n> refers to the conflicted sides, where as on this patch, such conflicted sides\n> are instead be referred as `-nya` suffix on the translation.\n> \n> I personally avoid using `mereka` atau `ia` as personal pronoun that refer\n> to things, and instead using `itu`.\n> \n\nWhat I meant was I use `itu` as personal pronoun that refers to things (not\npeople) instead of `mereka` or `ia` as translation of English pronouns\n\"them\" and \"it\".\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"424057","messageId":"CAMMLpeT7ezjh95rpJ4_MJ=QyEgCpjYBNG5kaQt00RUKGA7Jd9w@mail.gmail.com","threadId":"55654","inReplyTo":"bb3a3968-f78e-7534-1274-2e6c916b9a8a@gmail.com","subject":"Re: [PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2021-05-10T16:42:07Z","receivedAt":"2021-05-10T16:42:27Z","isPatch":true,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"On Sun, May 9, 2021 at 11:36 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:\n>\n> On 10/05/21 04.52, Alex Henrie wrote:\n> > The word \"renamed\" has two possible translations in many European\n> > languages depending on whether one thing was renamed or two things were\n> > renamed. Give translators freedom to alter any part of the message to\n> > make it sound right in their language.\n>\n> What are the examples? In French, Spanish, German, Portuguese (pt-PT),\n> or even Slavic (like Russian) or even Hungarian, and etc?\n\nThe ones I know of are Catalan, German, and Spanish, but I'm sure\nthere are others.\n\n-Alex\n"},{"id":"424072","messageId":"CABPp-BFa484zCeXpzZ36ev2pBfDCH=Kp4wWWF_hZSQvgrf3LYA@mail.gmail.com","threadId":"55654","inReplyTo":"20210509215250.33215-1-alexhenrie24@gmail.com","subject":"Re: [PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-05-10T19:29:45Z","receivedAt":"2021-05-10T19:30:00Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Sun, May 9, 2021 at 2:53 PM Alex Henrie <alexhenrie24@gmail.com> wrote:\n>\n> The word \"renamed\" has two possible translations in many European\n> languages depending on whether one thing was renamed or two things were\n> renamed. Give translators freedom to alter any part of the message to\n> make it sound right in their language.\n>\n> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>\n> ---\n>  merge-ort.c | 21 +++++++++++++++------\n>  1 file changed, 15 insertions(+), 6 deletions(-)\n>\n> diff --git a/merge-ort.c b/merge-ort.c\n> index 6c2792b10e..745a844b18 100644\n> --- a/merge-ort.c\n> +++ b/merge-ort.c\n> @@ -3050,12 +3050,21 @@ static void process_entry(struct merge_options *opt,\n>                                 rename_b = 1;\n>                         }\n>\n> -                       path_msg(opt, path, 0,\n> -                                _(\"CONFLICT (distinct types): %s had different \"\n> -                                  \"types on each side; renamed %s of them so \"\n> -                                  \"each can be recorded somewhere.\"),\n> -                                path,\n> -                                (rename_a && rename_b) ? _(\"both\") : _(\"one\"));\n> +                       if (rename_a && rename_b) {\n> +                               path_msg(opt, path, 0,\n> +                                        _(\"CONFLICT (distinct types): %s had \"\n> +                                          \"different types on each side; \"\n> +                                          \"renamed both of them so each can \"\n> +                                          \"be recorded somewhere.\"),\n> +                                        path);\n> +                       } else {\n> +                               path_msg(opt, path, 0,\n> +                                        _(\"CONFLICT (distinct types): %s had \"\n> +                                          \"different types on each side; \"\n> +                                          \"renamed one of them so each can be \"\n> +                                          \"recorded somewhere.\"),\n> +                                        path);\n> +                       }\n>\n>                         ci->merged.clean = 0;\n>                         memcpy(new_ci, ci, sizeof(*new_ci));\n> --\n> 2.31.1\n\nI don't know much on the translation side (thanks for fixing it up for\nme), but looks innocuous and correct from the code side:\n\nAcked-by: Elijah Newren <newren@gmail.com>\n"},{"id":"424081","messageId":"YJm0r15gK3DjKbbl@coredump.intra.peff.net","threadId":"55654","inReplyTo":"20210509215250.33215-1-alexhenrie24@gmail.com","subject":"Re: [PATCH] merge-ort: split \"distinct types\" message into two translatable messages","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-05-10T22:33:19Z","receivedAt":"2021-05-10T22:33:27Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 09, 2021 at 03:52:50PM -0600, Alex Henrie wrote:\n\n> The word \"renamed\" has two possible translations in many European\n> languages depending on whether one thing was renamed or two things were\n> renamed. Give translators freedom to alter any part of the message to\n> make it sound right in their language.\n\nMakes sense. And in general, I think the advice (e.g., given in\ngettext's \"Preparing Strings\" doc) is to avoid the kind of \"lego\"\ntranslation structure we saw in the original (where words like \"both\" or\n\"none\" might need more context than a single %s provides).\n\n> -\t\t\tpath_msg(opt, path, 0,\n> -\t\t\t\t _(\"CONFLICT (distinct types): %s had different \"\n> -\t\t\t\t   \"types on each side; renamed %s of them so \"\n> -\t\t\t\t   \"each can be recorded somewhere.\"),\n> -\t\t\t\t path,\n> -\t\t\t\t (rename_a && rename_b) ? _(\"both\") : _(\"one\"));\n> +\t\t\tif (rename_a && rename_b) {\n> +\t\t\t\tpath_msg(opt, path, 0,\n> +\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n> +\t\t\t\t\t   \"different types on each side; \"\n> +\t\t\t\t\t   \"renamed both of them so each can \"\n> +\t\t\t\t\t   \"be recorded somewhere.\"),\n> +\t\t\t\t\t path);\n> +\t\t\t} else {\n> +\t\t\t\tpath_msg(opt, path, 0,\n> +\t\t\t\t\t _(\"CONFLICT (distinct types): %s had \"\n> +\t\t\t\t\t   \"different types on each side; \"\n> +\t\t\t\t\t   \"renamed one of them so each can be \"\n> +\t\t\t\t\t   \"recorded somewhere.\"),\n> +\t\t\t\t\t path);\n> +\t\t\t}\n\nI wondered if we could be using the Q_() helper here, which\ndistinguishes cases based on quantity. But I don't think this is\nsemantically quite the same thing (it's not \"rename\" versus \"renames\",\nbut rather two distinctly interesting cases).\n\n-Peff\n"}]}