]> git.ipfire.org Git - thirdparty/git.git/commit - git-sh-setup.sh
i18n: git-sh-setup.sh: mark strings for translation
authorVasco Almeida <vascomalmeida@sapo.pt>
Fri, 17 Jun 2016 20:21:02 +0000 (20:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jun 2016 22:45:48 +0000 (15:45 -0700)
commitd323c6b6410dee0a8a2471b4dbf6d631cd3c3d4d
treeb5f14560f64709fb35d03e34faeeb80d9ffa9819
parentc9e6ce41daffb707b33f05dc133bb0dd0493f77b
i18n: git-sh-setup.sh: mark strings for translation

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.

Source git-sh-i18n in git-sh-setup.sh for gettext support.
git-sh-setup.sh is a shell library to be sourced by other shell scripts.
In order to avoid other scripts from sourcing git-sh-i18n twice, remove
line that sources it from them.  Not sourcing git-sh-i18n in any script
that uses gettext would lead to failure due to, for instance, gettextln
not being found.

[1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
git-bisect.sh
git-merge-octopus.sh
git-rebase.sh
git-sh-setup.sh
git-stash.sh
git-submodule.sh