summaryrefslogtreecommitdiff
path: root/functions/echo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/echo.sh')
-rwxr-xr-xfunctions/echo.sh65
1 files changed, 55 insertions, 10 deletions
diff --git a/functions/echo.sh b/functions/echo.sh
index 7dbfac4d7..555bc42bb 100755
--- a/functions/echo.sh
+++ b/functions/echo.sh
@@ -1,7 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
-## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
+## Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
##
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
@@ -13,7 +13,12 @@ Echo ()
STRING="${1}"
shift
- printf "${STRING}\n" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf "${STRING}\n" "${@}"
+ else
+ printf "$(eval_gettext "${STRING}")" "${@}"; echo;
+ fi
}
Echo_debug ()
@@ -23,7 +28,12 @@ Echo_debug ()
STRING="${1}"
shift
- printf "D: ${STRING}\n" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf "D: ${STRING}\n" "${@}"
+ else
+ printf "D: $(eval_gettext "${STRING}")" "${@}"; echo;
+ fi
fi
}
@@ -34,7 +44,12 @@ Echo_debug_running ()
STRING="${1}"
shift
- printf "D: ${STRING}" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf "D: ${STRING}" "${@}"
+ else
+ printf "D: $(eval_gettext "${STRING}")" "${@}"
+ fi
if [ "${_COLOR}" = "false" ]
then
@@ -57,7 +72,12 @@ Echo_error ()
printf "${RED}E${NO_COLOR}:"
fi
- printf " ${STRING}\n" "${@}" >&2
+ if [ "${_L10N}" = "false" ]
+ then
+ printf " ${STRING}\n" "${@}" >&2
+ else
+ (printf " $(eval_gettext "${STRING}")" "${@}"; echo;) >&2
+ fi
}
Echo_message ()
@@ -74,7 +94,12 @@ Echo_message ()
printf "${WHITE}P${NO_COLOR}:"
fi
- printf " ${STRING}\n" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf " ${STRING}\n" "${@}"
+ else
+ printf " $(eval_gettext "${STRING}")" "${@}"; echo;
+ fi
fi
}
@@ -92,7 +117,12 @@ Echo_message_running ()
printf "${WHITE}P${NO_COLOR}:"
fi
- printf " ${STRING}" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf " ${STRING}" "${@}"
+ else
+ printf " $(eval_gettext "${STRING}")" "${@}";
+ fi
if [ "${_COLOR}" = "false" ]
then
@@ -110,7 +140,12 @@ Echo_verbose ()
STRING="${1}"
shift
- printf "I: ${STRING}\n" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf "I: ${STRING}\n" "${@}"
+ else
+ printf "I: $(eval_gettext "${STRING}")" "${@}"; echo;
+ fi
fi
}
@@ -121,7 +156,12 @@ Echo_verbose_running ()
STRING="${1}"
shift
- printf "I: ${STRING}" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf "I: ${STRING}" "${@}"
+ else
+ printf "I: $(eval_gettext "${STRING}")" "${@}";
+ fi
if [ "${_COLOR}" = "false" ]
then
@@ -144,7 +184,12 @@ Echo_warning ()
printf "${YELLOW}W${NO_COLOR}:"
fi
- printf " ${STRING}\n" "${@}"
+ if [ "${_L10N}" = "false" ]
+ then
+ printf " ${STRING}\n" "${@}"
+ else
+ printf " $(eval_gettext "${STRING}")" "${@}"; echo;
+ fi
}
Echo_status ()