1
# Copyright (C) 1995 Free Software Foundation, Inc.
2
# Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2, or (at your option)
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
# Shell script excerpt to be inserted in shell scripts which are intended
19
# to be internationalized using GNU gettext.
22
# ${PACKAGE-IDENT} is the name of one program of the package which
23
# understands the --print-text-domain-dir option
24
# ${PACKAGE-NAME} is the name of the message domain the package uses
25
# ${PATH} should list all directories which should be searched
26
# for either `gettext' or ${PACKAGE-IDENT}.
29
# ${echo} command to use like Un*x echo command which translates
30
# its arguments when a translation is available.
38
if test "${gettext_dir}" = "FAILED" && test -x ${dir}/gettext \
39
&& (${dir}/gettext --version >/dev/null 2>&1)
41
set `${dir}/gettext --version 2>&1`
47
if test "${locale_dir}" = "FAILED" && test -x ${dir}/${PACKAGE-IDENT} \
48
&& (${dir}/${PACKAGE-IDENT} --print-text-domain-dir >/dev/null 2>&1)
50
locale_dir=`${dir}/${PACKAGE-IDENT} --print-text-domain-dir`
54
if test "${locale_dir}" = "FAILED" || test "${gettext_dir}" = "FAILED"
58
TEXTDOMAINDIR=${locale_dir}
60
TEXTDOMAIN=${PACKAGE-NAME}
62
echo="${gettext_dir}/gettext -s"