summaryrefslogtreecommitdiff
path: root/src/lib/common.sh.top
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 17:09:11 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 18:50:09 -0500
commit56384e572d419a48439a90b9481a715a13a109c8 (patch)
treefc132badb5cde0ff2e5713d0cdd2725980306120 /src/lib/common.sh.top
parentf5663f08d44091ca16c7f53c492c2594202ba7e5 (diff)
src/lib/: set TEXTDOMAIN differently for internal messages
This allows us to fix the long-standing bug that libremessages forces TEXTDOMAIN=libretools
Diffstat (limited to 'src/lib/common.sh.top')
-rw-r--r--src/lib/common.sh.top8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/common.sh.top b/src/lib/common.sh.top
index 625ea05..9c4ba2e 100644
--- a/src/lib/common.sh.top
+++ b/src/lib/common.sh.top
@@ -18,11 +18,15 @@ shopt -s extglob
if [[ -z ${_INCLUDE_COMMON_SH:-} ]]; then
_INCLUDE_COMMON_SH=true
-export TEXTDOMAIN='libretools'
-export TEXTDOMAINDIR='/usr/share/locale'
+[[ -n ${TEXTDOMAIN:-} ]] || export TEXTDOMAIN='libretools'
+[[ -n ${TEXTDOMAINDIR:-} ]] || export TEXTDOMAINDIR='/usr/share/locale'
if type gettext &>/dev/null; then
_() { gettext "$@"; }
else
_() { echo "$@"; }
fi
+
+_l() {
+ TEXTDOMAIN='librelib' TEXTDOMAINDIR='/usr/share/locale' "$@"
+}