On Wed, May 18, 2016 at 11:02 PM, Vasco Almeida <vascomalmeida@xxxxxxx> wrote: > Às 19:28 de 18-05-2016, Eric Sunshine escreveu: >> On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida <vascomalmeida@xxxxxxx> wrote: >>> Mark entire sentences of error message rather than assembling one using >>> placeholders (e.g. "Cannot %s during a %s"). That would facilitate >>> translation work. >>> >>> Signed-off-by: Vasco Almeida <vascomalmeida@xxxxxxx> >>> --- >>> diff --git a/sequencer.c b/sequencer.c >>> @@ -697,9 +697,14 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts * >>> if (action != opts->action) { >>> - const char *action_str; >>> - action_str = action == REPLAY_REVERT ? "revert" : "cherry-pick"; >>> - error(_("Cannot %s during a %s"), action_str, action_name(opts)); >>> + if (action == REPLAY_REVERT) >>> + error((opts->action == REPLAY_REVERT) >>> + ? _("Cannot revert during a another revert.") >>> + : _("Cannot revert during a cherry-pick.")); >>> + else >>> + error((opts->action == REPLAY_REVERT) >>> + ? _("Cannot cherry-pick during a revert.") >>> + : _("Cannot cherry-pick during another cherry-pick.")); >>> return NULL; >>> } >> >> Similar to my comment on patch 3/21, since the "actions" are literal >> git commands, it's not clear why this change is helpful. Perhaps the >> commit message needs to do a better job of persuading the reader? >> > I agree, I should have explained why this way. As I tried to explain on > patch 3/21, it concerns a) we can't assume what and how does the > translator translates into her language, so b) give translations freedom > to choose. For what it's worth I agree with you and disagree with Eric here and Junio in the "[PATCH 03/21] i18n: advice: internationalize message for conflicts" thread. Of course there's a trade-off in source code verbosity when you have to change every occurance of (pseudocode): "our %s failed" # %s can be revert or merge to: if (action == "merge") gettext("our merge failed") elsif (action == "revert") gettext("our revert failed") But forcing the translator to turn every such occurrence that flows naturally in English into "the '%s' command failed" leads to a worse translation. For example, if I ever get around to doing the Icelandic translation which I've had on my backlog I might translate something like this: "You can merge or revert this commit" "To merge run 'git merge $commit', to revert run 'git revert $commit'" # Subsequently "The %s failed" # for %s = merge || revert As: "Þú getur getur framkvæmt samruna á þessari breytingu, eða afturkallað hana" "Til að framkvæma samruna keyrðu 'git merge $commit', til að afturkalla 'git revert $commit'" # Subsequently "Samruninn mistókst þegar við keyrðum 'merge' skipunina". "Afturköllunnin mistókst þegar við keyrðum 'revert' skipunina" I.e. even though you might be running "git merge" or "git revert" the UI is talking about those terms in the translated using native terms for the action of merging or reverting, but referring to the literal command names in English. Not accepting changes like these means you have to translate this sort of stuff like: # Same as the above "Þú getur getur framkvæmt samruna á þessari breytingu, eða afturkallað hana". "Til að framkvæma samruna keyrðu 'git merge $commit', til að afturkalla 'git revert $commit'" # Subsequently "Okkur tókst ekki að keyra 'git %s' skipunina" # %s = merge || revert It just doesn't flow as well, and leads to a more verbose translation. Now instead of referring to the translated verb I'd already established I have to just refer to literal command names. Both this change and the change you submitted in <1463585274-9027-4-git-send-email-vascomalmeida@xxxxxxx> and Junio didn't like in <xmqqd1ojqciz.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx> are actual examples of cases where if I was (finally getting of my ass to) doing the Icelandic translation I'd take advantage of this. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html