summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-15 23:31:44 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-15 23:31:44 (EDT)
commit494323ed054ebf06bd9dc1e2be44303bc5b1a917 (patch)
treeab03ebb5142a0e2d157036e58251ca0bd78a8818 /lib
parent237353e4fb482a5b58a037eb6d6d090d1b3c2b6b (diff)
_ob_try_load_messages(): Support running in place
Diffstat (limited to 'lib')
-rw-r--r--lib/locale.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index 1c531df..c5790f6 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -40,8 +40,13 @@ _ob_try_load_messages()
shift 1 || _ob_abort
local ms=
- ms="$(printf "${_OB_LOCALE_PATH}" \
- "${locale}" "${_ob_text_domain}")"
+ if [ x"${OB_EXE_BUILDDIR:+set}" = 'xset' ]; then # Set and not null
+ ms="${OB_EXE_BUILDDIR}"
+ ms="${ms}/locale/${locale}/${_ob_text_domain}.ms"
+ else
+ ms="${LOCALEDIR}"
+ ms="${ms}/${locale}/LC_MESSAGES/${_ob_text_domain}.ms"
+ fi
# POSIX on the dot utility:
# "If no readable file is found, a non-interactive shell shall abort"