From: Junio C Hamano <gitster@pobox.com>
To: Vasco Almeida <vascomalmeida@sapo.pt>
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 13/39] i18n: git-sh-setup.sh: mark strings for translation
Date: Wed, 01 Jun 2016 11:20:41 -0700 [thread overview]
Message-ID: <xmqqvb1sydmu.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1464799289-7639-14-git-send-email-vascomalmeida@sapo.pt> (Vasco Almeida's message of "Wed, 1 Jun 2016 16:41:03 +0000")
Vasco Almeida <vascomalmeida@sapo.pt> writes:
> Positional arguments, such as $0, $1, etc, need to be stored on shell
> variables for use in translatable strings, according to gettext manual
> [1].
>
> Add git-sh-setup.sh to LOCALIZED_SH variable in Makefile to enable
> extraction of string marked for translation by xgettext.
>
> Although git-sh-setup.sh is a shell library to be sourced by other shell
> scripts, it is necessary to source git-sh-i18n at this point, because
> some scripts don't do it themselves. Not sourcing git-sh-i18n would lead
> to failure due to, for instance, gettextln not being found.
That is correct, but doesn't that hint that the current users of
git-sh-i18n no longer have to (and they probably do not want to)
dot-source it, as they are already dot-sourcing git-sh-setup?
Otherwise they will waste cycles reading the same thing twice
(assuming that git-sh-i18n is safely read twice, that is).
> Source "$(git --exec-path)"/git-sh-i18n instead of simply git-sh-i18n,
That is somewhat strange. "git-rebase.sh" dot-sources both
git-sh-setup and git-sh-i18n with just ". $name". What is so
special about sh-setup dot-sourcing sh-i18n your patch adds?
> because latter case would fail test t2300-cd-to-toplevel.sh.
What is the real cause of this?
". git-sh-setup" is supposed to work because we prepend the
$GIT_EXEC_PATH in "git" itself and git-sh-setup is installed there.
". git-sh-i18n" in "git-rebase.sh" works the same way. If it is
because is t2300 doing something strange, then we should fix that,
not adding $(git --exec-path) on the dot-source line to paper things
over.
next prev parent reply other threads:[~2016-06-01 18:20 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 [this message]
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
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=xmqqvb1sydmu.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.com \
--cc=vascomalmeida@sapo.pt \
--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.