Re: [PATCH 10/22] sequencer: avoid completely different messages for different actions
From: Johannes Schindelin <hidden>
Date: 2016-09-01 07:52:32
Hi Kuba, On Wed, 31 Aug 2016, Jakub Narębski wrote:
CC-ed to Jiang Xin, L10N coordinator. W dniu 29.08.2016 o 10:05, Johannes Schindelin pisze:quoted
Signed-off-by: Johannes Schindelin <redacted> --- sequencer.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)diff --git a/sequencer.c b/sequencer.c index cbdce6d..1b65202 100644 --- a/sequencer.c +++ b/sequencer.c@@ -232,11 +232,8 @@ static int error_dirty_index(struct replay_opts *opts) if (read_cache_unmerged()) return error_resolve_conflict(action_name(opts)); - /* Different translation strings for cherry-pick and revert */ - if (opts->action == REPLAY_PICK) - error(_("Your local changes would be overwritten by cherry-pick.")); - else - error(_("Your local changes would be overwritten by revert.")); + error(_("Your local changes would be overwritten by %s."), + action_name(opts));If I understand it correctly, it would make "revert" or "cherry-pick" untranslated part of error message. You would need to use translation on the result with "_(action_name(opts))", you would have to mark todo_command_strings elements for gettext lexicon with N_(...). I am rather against this change (see also below).
Okay. Unfortunately, I have to focus on the correctness of the code at the moment (and Git for Windows does ship *without* translations for the time being anyway, mostly to save on space, but also because users complained). So I will take care of this after v2.10.0. For the record, how is this supposed to be handled, in particular when I introduce a new action whose action_name(opts) will be "rebase -i"? Do I really need to repeat myself three times? Ciao, Dscho