summaryrefslogtreecommitdiff
path: root/src/chroot-tools/chcleanup
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 10:52:43 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:43:37 -0400
commit7f62d865ae7384f4c4bd489e2682ba52fabb7b62 (patch)
tree46d698d171d551ff412a0843d2ca90dfce7088e3 /src/chroot-tools/chcleanup
parent834db9d400be1795426eb88cf25c9e817141d326 (diff)
chroot-tools: internationalize
Diffstat (limited to 'src/chroot-tools/chcleanup')
-rwxr-xr-xsrc/chroot-tools/chcleanup12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup
index d2d9a70..fa6a572 100755
--- a/src/chroot-tools/chcleanup
+++ b/src/chroot-tools/chcleanup
@@ -12,18 +12,24 @@ DRYRUN=${DRYRUN:-false}
################################################################################
# Define these here to avoid having dependencies on outside files
+if type gettext &>/dev/null; then
+ _() { gettext "$@"; }
+else
+ _() { echo "$@"; }
+fi
+
msg() {
- local mesg=$1; shift
+ local mesg="$(_ "$1")"; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
msg2() {
- local mesg=$1; shift
+ local mesg="$(_ "$1")"; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
error() {
- local mesg=$1; shift
+ local mesg="$(_ "$1")"; shift
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}