X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=macros%2Fnewpage;h=650908f2ae2fe9227cb22e7f174327de128cd505;hb=35c700335c55a0819e3582a77211e3cb280f48fe;hp=2502b00d285e64acb1ba138c1e7a6e425e95e7eb;hpb=0c40edef15eacda58904ee27760c2309716b65ef;p=shellwiki
diff --git a/macros/newpage b/macros/newpage
index 2502b00..650908f 100755
--- a/macros/newpage
+++ b/macros/newpage
@@ -1,9 +1,26 @@
#!/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"
. "$_EXEC/acl.sh"
. "$_EXEC/tools.sh"
+_(){ printf %s\\n "$*"; }
+[ "${LANGUAGE}" -a -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh"
+
pattern=./%%s
template=''
label='New Page'
@@ -22,7 +39,7 @@ if acl_write "$(page_abs "$pattern")"; then
$([ ! "${pattern##*%%s*}" ] \
- && printf ''
+ && printf '' "$(_ "page name")"
)
EOF