X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=macros%2Frevisions;fp=macros%2Frevisions;h=5d7b5893596c8a9b09edf66e81db0a8c332a6aa3;hb=65676ea8331f60d882e3baec99c101382e9fad57;hp=75440d60609fcb070d79dd2a23aaa3278eaf5925;hpb=f8f0f8b5a4745894afc6438f25d68cae249a7014;p=shellwiki diff --git a/macros/revisions b/macros/revisions index 75440d6..5d7b589 100755 --- a/macros/revisions +++ b/macros/revisions @@ -4,6 +4,9 @@ . "$_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) @@ -37,7 +40,8 @@ fi printf '
\n' if [ "$REV_PAGES" != true ]; then - printf '
GIT is not available to handle revisioning.
' + printf '
%s
' "$(_ GIT is not available to handle revisioning.)" + exit 1 fi if [ "$LIST" = true ]; then @@ -57,7 +61,7 @@ fi 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 '

Latest changes to original language page

' + printf '

%s

' "$(_ '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 @@\ *\ @@*)