All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jiang Xin <worldhello.net@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Git List" <git@vger.kernel.org>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Andreas Schwab" <schwab@linux-m68k.org>
Subject: Re: [PATCH 2/2] i18n: Add extra -- to seperate gettext and message
Date: Mon, 04 Jun 2012 09:59:43 -0700	[thread overview]
Message-ID: <7vpq9ft3ls.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CANYiYbFx=Z7TTYUbAhzgHFYB6O_grROWoWHbtuhuABeXdFk4-Q@mail.gmail.com> (Jiang Xin's message of "Mon, 4 Jun 2012 21:55:11 +0800")

Jiang Xin <worldhello.net@gmail.com> writes:

> 2012/6/4 Ævar Arnfjörð Bjarmason <avarab@gmail.com>:
>> I think a better solution to this is to just apply this patch:
>>
>> -               die "$(gettext -- "--cached cannot be used with --files")"
>> +               die "$(gettext "the --cached option is incompatible
>> with the --files option")"
>
> The rewrite message is a bit odd for there are 40 more alike
> messages (extracted from C files) start with "--”, such as:
>
>     msgid "--delete only accepts plain target ref names"
>     msgid "--all and --tags are incompatible"
>     msgid "--all can't be combined with refspecs"
>     msgid "--mirror and --tags are incompatible"
>     msgid "--mirror can't be combined with refspecs"
>
>> I think changing the only message suffering from this
>> issue (or likely to suffer from it) beats a solution where starting a
>> message with -- only works for some of the xgettext
>> commands/functions.
>
> If I had not changed like this, I would not find out there are 27
> marked messages (by gettext wrappers) have not been
> extracted to "po/git.pot". ;-)

I think there is value for having a generic solution than declaring
"No message shall begin with a dash".

I am not convinced that it is ideal for the implementation of
gettext_ln to prepend "--" in front when it calls gettext, though.
Shouldn't the caller of gettext_ln be the one who is responsible for
doing that?  After all, that is the one that knows that the MSGID
argument needs the quoting.

  reply	other threads:[~2012-06-04 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03 23:09 [PATCH 1/2] i18n: Extract msgs marked by sh gettext wrappers Jiang Xin
2012-06-03 23:09 ` [PATCH 2/2] i18n: Add extra -- to seperate gettext and message Jiang Xin
2012-06-04  8:56   ` Ævar Arnfjörð Bjarmason
2012-06-04 13:55     ` Jiang Xin
2012-06-04 16:59       ` Junio C Hamano [this message]
2012-06-15 16:05         ` Jiang Xin
2012-06-15 17:41           ` Jonathan Nieder
2012-06-15 18:13             ` Junio C Hamano

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=7vpq9ft3ls.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=schwab@linux-m68k.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.