From: Paul Hänsch Date: Tue, 19 Sep 2023 12:48:23 +0000 (+0200) Subject: Bugfix: faulty error messages in move/rename/delete X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=4f6786c2be70200b3ff43db68d0f536fcaedad3f;p=shellwiki Bugfix: faulty error messages in move/rename/delete --- diff --git a/handlers/60_move_rename_delete.sh b/handlers/60_move_rename_delete.sh index 84db9e4..d27fb39 100755 --- a/handlers/60_move_rename_delete.sh +++ b/handlers/60_move_rename_delete.sh @@ -138,7 +138,7 @@ if [ "$action" = rename -a "$newname" ]; then if [ -d "$_DATA/pages/$newname" ]; then printf 'Refresh: %i\r\n' 4 - export ERRORMSG="A location of that name already exists." + export ERROR_MSG="A location of that name already exists." theme_error 400 return 0 elif ! acl_write "$oldname" || ! acl_write "$newname"; then @@ -162,12 +162,12 @@ elif [ "$action" = move -a "$newlocation" ]; then if [ -d "$_DATA/pages/$newname" ]; then printf 'Refresh: %i\r\n' 4 - export ERRORMSG="A page of that name already exists at the given location." + export ERROR_MSG="A page of that name already exists at the given location." theme_error 400 return 0 elif [ ! -d "$_DATA/pages/$newlocation" ]; then printf 'Refresh: %i\r\n' 4 - export ERRORMSG="The given location does not exist." + export ERROR_MSG="The given location does not exist." theme_error 400 return 0 elif ! acl_write "$oldname" || ! acl_write "$newname"; then @@ -206,7 +206,7 @@ elif [ "$action" = cancel ]; then REDIRECT ./ elif [ "$action" ]; then printf 'Refresh: %i\r\n' 4 - export ERRORMSG="Missing parameters." + export ERROR_MSG="Missing parameters." theme_error 400 return 0 fi diff --git a/l10n/de.sh b/l10n/de.sh index 39b91b7..ccee2ab 100644 --- a/l10n/de.sh +++ b/l10n/de.sh @@ -52,6 +52,10 @@ case $* in "OK") printf "OK";; "Some files could not be renamed") printf "Einige Dateien konnten nicht umbenannt werden";; "Successfully renamed:") printf "Erfolgreich umbenannt:";; + "A location of that name already exists.") printf "Ein Ort mit diesem Namen existiert bereits.";; +"A page of that name already exists at the given location.") printf "Eine Seite mit diesem namen gibt es schon am angegebenen Ort.";; + "The given location does not exist.") printf "Den angegebenen Ort gibt es nicht.";; + "Missing parameters.") printf "Fehlende Parameter.";; *) printf %s\\n "$*";; esac }