git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasco Almeida <vascomalmeida@sapo.pt>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "Jiang Xin" <worldhello.net@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v3 24/39] i18n: bisect: enable l10n of bisect terms in messages
Date: Fri, 3 Jun 2016 12:32:20 +0000	[thread overview]
Message-ID: <575178D4.5@sapo.pt> (raw)
In-Reply-To: <xmqqbn3jv6ka.fsf@gitster.mtv.corp.google.com>

Às 17:33 de 02-06-2016, Junio C Hamano escreveu:
> Vasco Almeida <vascomalmeida@sapo.pt> writes:
> 
>> Às 17:38 de 01-06-2016, Junio C Hamano escreveu:
>>> Vasco Almeida <vascomalmeida@sapo.pt> writes:
>>>
>>>> @@ -739,7 +748,7 @@ static void handle_bad_merge_base(void)
>>>>  			fprintf(stderr, _("The merge base %s is %s.\n"
>>>>  				"This means the first '%s' commit is "
>>>>  				"between %s and [%s].\n"),
>>>> -				bad_hex, term_bad, term_good, bad_hex, good_hex);
>>>> +				bad_hex, _(term_bad), _(term_good), bad_hex, good_hex);
> 
> But this translation still does not make much sense to me.
> 
> If the user did not change term_bad and term_good from the default
> ones (i.e. the four words above), the flow of control would not come
> here; one of the above two !strcmp() lines you changed would trigger.
> 
Hence, marking _(term_bad) and _(term_good) in this instance is both
futile and wrong. Because, at this point of flow, these term were likely
defined by the user, therefore must not be translated.

> On the other hand, if the user did change term_bad and term_good by
> using --term-old=velho --term-new=novo earlier (which is stored in
> BISECT_TERMS and read into these two variables), these are strings
> that Git encounters at runtime; you cannot expect _(term_bad) aka
> _("novo") to be translated by *.po files for the locale.
> 
> And even if it were somehow translatable, you do not want to.
> 
> Imagine a case where there is a Portuguese word the user used in
> place of 'novo' in the example above, and there is an English word
> with the same spelling with a totally different meaning.  And
> further imagine that English word is used elsewhere in Git and has
> translation to Portuguese in your *.po file.  _(term_bad) would
> become a translation of that English word into Portuguese, which
> would be a word totally unrelated to the word the user used
> originally when she did --term-old=<that word in portuguese>.
> 
I thought about this after sending my last email about this topic. It is
something that can happen indeed.

> So I do not think _(term_bad) and _(term_good) is a good idea in the
> last hunk quoted above (it is not just "not a good idea", but
> actually would be harmful), which would make term_names[] and "enum
> term" unnecessary.
> 
I agree with you. I'm going to drop this patch in the next re-roll.
Leaving the previous patch, [PATCH v3 23/39] i18n: bisect: mark strings
for translation, unchanged which just masks the strings for translation
but not anything else.

> There is a case where one of the default four words could seep
> through to the last else clause.  Is that what you are trying to
> address?
> 
No. I was trying to replace the English terms by their translation in
those messages. But we have arrive to conclusion it is a bad idea to pursue.

> That is, when term_bad is left as "bad" but term_good is customized
> to "super", neither "term_bad is 'bad' and term_good is 'good'" nor
> "term_bad is 'new' and term_good is 'old" is true, and we would say
> 
> 	Merge base is BAD.  This means the first SUPER commit is ...
> 
> With your change to mark _(term_bad) and _(term_good), the message
> would translate term_bad to whatever word it is in your language,
> and term_good that comes from the end user will be left as SUPER as
> the user typed.  I am not sure if it is a good thing to translate
> only BAD while leaving SUPER as-is in such a case.

I think this may be confusing for some users. I am positive it is a bad
thing.


If I had thought more about this, I hadn't proposed this patch. I'm
sorry for wasting your time with such nonsense. I'm going to drop it in
the next re-roll.

  reply	other threads:[~2016-06-03 12:58 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 16:40 [PATCH v3 00/39] i18n and test updates Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 01/39] i18n: builtin/remote.c: fix mark for translation Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 02/39] i18n: advice: mark string about detached head " Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 03/39] i18n: advice: internationalize message for conflicts Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 04/39] i18n: transport: mark strings for translation Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 05/39] i18n: sequencer: mark entire sentences " Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 06/39] i18n: sequencer: mark string " Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 07/39] i18n: merge-octopus: mark messages " Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 08/39] merge-octupus: use die shell function from git-sh-setup.sh Vasco Almeida
2016-06-01 16:40 ` [PATCH v3 09/39] i18n: rebase: fix marked string to use eval_gettext variant Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 10/39] i18n: rebase: mark placeholder for translation Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 11/39] i18n: bisect: simplify error message for i18n Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 12/39] t6030: update to use test_i18ncmp Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 13/39] i18n: git-sh-setup.sh: mark strings for translation Vasco Almeida
2016-06-01 18:20   ` Junio C Hamano
2016-06-01 20:30     ` Junio C Hamano
2016-06-02 14:14       ` Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 14/39] i18n: rebase-interactive: " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 15/39] i18n: rebase-interactive: mark here-doc " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 16/39] i18n: rebase-interactive: mark comments of squash " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 17/39] i18n: setup: mark strings " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 18/39] tests: use test_i18n* functions to suppress false positives Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 19/39] tests: unpack-trees: update to use test_i18n* functions Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 20/39] t9003: become resilient to GETTEXT_POISON Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 21/39] t4153: fix negated test_i18ngrep call Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 22/39] t5523: use test_i18ngrep for negation Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 23/39] i18n: bisect: mark strings for translation Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 24/39] i18n: bisect: enable l10n of bisect terms in messages Vasco Almeida
2016-06-01 17:38   ` Junio C Hamano
2016-06-02  9:04     ` Vasco Almeida
2016-06-02 17:33       ` Junio C Hamano
2016-06-03 12:32         ` Vasco Almeida [this message]
2016-06-01 16:41 ` [PATCH v3 25/39] i18n: transport-helper.c: change N_() call to _() Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 26/39] i18n: notes: mark strings for translation Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 27/39] i18n: notes: mark options " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 28/39] i18n: config: unfold error messages marked " Vasco Almeida
2016-06-01 17:43   ` Junio C Hamano
2016-06-02  9:28     ` Vasco Almeida
2016-06-02 17:36       ` Junio C Hamano
2016-06-01 16:41 ` [PATCH v3 29/39] i18n: merge: mark messages " Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 30/39] i18n: merge: change command option help to lowercase Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 31/39] i18n: sequencer: add period to error message Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 32/39] i18n: standardise messages Vasco Almeida
2016-06-01 16:41 ` [PATCH v3 33/39] i18n: remote: mark URL fallback text for translation Vasco Almeida
2016-06-01 18:12 ` [PATCH v3 34/39] i18n: remote: allow translations to reorder message Vasco Almeida
2016-06-01 18:12 ` [PATCH v3 35/39] i18n: init-db: join message pieces Vasco Almeida
2016-06-01 18:13 ` [PATCH v3 36/39] i18n: submodule: join strings marked for translation Vasco Almeida
2016-06-01 18:13 ` [PATCH v3 37/39] i18n: submodule: escape shell variables inside eval_gettext Vasco Almeida
2016-06-01 18:13 ` [PATCH v3 38/39] i18n: unmark die messages for translation Vasco Almeida
2016-06-01 18:13 ` [PATCH v3 39/39] i18n: branch: mark comment when editing branch description " Vasco Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=575178D4.5@sapo.pt \
    --to=vascomalmeida@sapo.pt \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    --cc=worldhello.net@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).