merge-ort: split "distinct types" message into two translatable messages
PATCH 1/1 merge-ort: split "distinct types" message into two translatable messages
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.
--- merge-ort.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
merge-ort.c +15 -6
@@ -3050,12 +3050,21 @@ static void process_entry(struct merge_options *opt, rename_b =1 ; } -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); + } ci->merged.clean =0 ;memcpy (new_ci, ci,sizeof (*new_ci));
Signature · 1 line
2.31.1
Quoted 4 lines · Alex Henrie
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.
What are the examples? In French, Spanish, German, Portuguese (pt-PT), or even Slavic (like Russian) or even Hungarian, and etc?
Quoted 11 lines
merge-ort.c +5
-6-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 "
merge-ort.c static void process_entry(struct merge_options *opt, · line 3067
Quoted 10 lines
merge-ort.c +10
-0+ "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); + }
Seems OK.
For example, in Indonesian, the first case (both sides are renamed) would be something like:
``` %s punya tipe yang berbeda pada setiap sisi, kedua-duanya dinamai ulang... ``` The second case (only one side) would be something like: ``` %s punya tipe yang berbeda pada setiap sisi, salah satunya dinamai ulang... ``` But the status quo (before this patch) would be translated as: ``` %s punya tipe yang berbeda pada setiap sisi, (kedua-duanya | satu) dari mereka dinamai ulang... ```
On the both sides case of status quo, the personal pronoun mereka (they) refers to the conflicted sides, where as on this patch, such conflicted sides are instead be referred as -nya suffix on the translation.
I personally avoid using mereka atau ia as personal pronoun that refer to things, and instead using itu.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 16 lines · Bagas Sanjaya
Seems OK.
For example, in Indonesian, the first case (both sides are renamed) would be something like:
``` %s punya tipe yang berbeda pada setiap sisi, kedua-duanya dinamai ulang... ``` The second case (only one side) would be something like: ``` %s punya tipe yang berbeda pada setiap sisi, salah satunya dinamai ulang... ``` But the status quo (before this patch) would be translated as: ``` %s punya tipe yang berbeda pada setiap sisi, (kedua-duanya | satu) dari mereka dinamai ulang... ```
Quoted 7 lines
On the both sides case of status quo, the personal pronoun
mereka(they) refers to the conflicted sides, where as on this patch, such conflicted sides are instead be referred as-nyasuffix on the translation.I personally avoid using
merekaatauiaas personal pronoun that refer to things, and instead usingitu.
What I meant was I use itu as personal pronoun that refers to things (not people) instead of mereka or ia as translation of English pronouns "them" and "it".
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Bagas Sanjaya
Quoted 4 lines · Alex Henrie
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.
What are the examples? In French, Spanish, German, Portuguese (pt-PT), or even Slavic (like Russian) or even Hungarian, and etc?
The ones I know of are Catalan, German, and Spanish, but I'm sure there are others.
-Alex
Quoted 44 lines · Alex Henrie
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.
Signed-off-by Alex Henrie <[email protected]>--- merge-ort.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)merge-ort.c +15
-7@@ -3050,12 +3050,21 @@ static void process_entry(struct merge_options *opt, rename_b =1 ; } -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); + } ci->merged.clean =0 ;memcpy (new_ci, ci,sizeof (*new_ci)); --
Quoted 1 line
2.31.1
I don't know much on the translation side (thanks for fixing it up for me), but looks innocuous and correct from the code side:
Quoted 4 lines · Alex Henrie
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).
Quoted 11 lines
merge-ort.c +5
-6-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 "
merge-ort.c static void process_entry(struct merge_options *opt, · line 3067
Quoted 10 lines
merge-ort.c +10
-0+ "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