X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=macros%2Ferrormessage;h=6227540296fe7f06e1d2195321b94db1ad193833;hb=3c949f9f02cddc9d1cd30174342aae1d58175999;hp=c95688a4acc4081466f16cc57347b3db84466fca;hpb=1b8f9a660793917c33769e345500814f5b5cdd60;p=shellwiki diff --git a/macros/errormessage b/macros/errormessage index c95688a..6227540 100755 --- a/macros/errormessage +++ b/macros/errormessage @@ -1,7 +1,24 @@ #!/bin/sh +# Copyright 2022 - 2023 Paul Hänsch +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED âAS ISâ AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + . "$_EXEC/cgilite/cgilite.sh" +_(){ printf %s\\n "$*"; } +[ "${LANGUAGE}" -a -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh" + if [ "$1" -o "$ERROR_MSG" ]; then - printf '
%s
' "$(HTML "${1:-${ERROR_MSG}}")" + printf '%s
' "$(HTML "$(_ ${1:-${ERROR_MSG}})")" fi