. "$_EXEC/tools.sh"
. "$_EXEC/acl.sh"
+_(){ printf %s\\n "$*"; }
+[ "${LANGUAGE}" -a -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh"
+
LIST=true DIFF=
while [ $# -gt 0 ]; do case $1 in
--list)
printf '<div class="macro revisions">\n'
if [ "$REV_PAGES" != true ]; then
- printf '<div class="error">GIT is not available to handle revisioning.</div>'
+ printf '<div class="error">%s</div>' "$(_ GIT is not available to handle revisioning.)"
+ exit 1
fi
if [ "$LIST" = true ]; then
if [ "$DIFF" = true -a "$LANGUAGE_DEFAULT" -a "$page_default" != "$page_abs" ]; then
commit="$(git -C "$_DATA" log --pretty=format:%H -- "pages${page_abs}#page.md" |head -n1)"
- printf '<section class="diff"><h2>Latest changes to original language page</h2>'
+ printf '<section class="diff"><h2>%s</h2>' "$(_ 'Latest changes to the original language page')"
git -C "$_DATA" diff -U3 "$commit" -- "pages${page_default}#page.md" |tail -n+5 \
| while read -r diff; do case $diff in
@@\ *\ @@*)