From d323c6b6410dee0a8a2471b4dbf6d631cd3c3d4d Mon Sep 17 00:00:00 2001 From: Vasco Almeida Date: Fri, 17 Jun 2016 20:21:02 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- git-stash.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'git-stash.sh') diff --git a/git-stash.sh b/git-stash.sh index c7509e8da4..22fb8bcba6 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -15,7 +15,6 @@ SUBDIRECTORY_OK=Yes OPTIONS_SPEC= START_DIR=$(pwd) . git-sh-setup -. git-sh-i18n require_work_tree cd_to_toplevel -- cgit v1.2.3