case $PATH_INFO in
*"/[attachment]")
- PAGE_TITLE="${PAGE_TITLE} (Attachments)"
+ PAGE_TITLE="${PAGE_TITLE} ($(_ Attachments))"
;;
*"/[revision]")
- PAGE_TITLE="${PAGE_TITLE} (Revisions)"
+ PAGE_TITLE="${PAGE_TITLE} ($(_ Revisions))"
;;
esac
if [ "$success" -a "$fail" ]; then
printf "%s\r\n" "Status: 500 Internal Server Error"
- theme_page - "Attachment rename" <<-EOF
- <h1 class="rename partial">Some files could not be renamed</h1>
- <h2 class="rename success">Successfully renamed:</h2>
+ theme_page - "$(_ "Attachment rename")" <<-EOF
+ <h1 class="rename partial">$(_ Some files could not be renamed)</h1>
+ <h2 class="rename success">$(_ Successfully renamed:)</h2>
<ul class="rename success">
$(printf %s "$success" |while read html; do
printf '<li><span class=from>%s</span> -> <span class=to>%s</span></li>' \
"${html%%/*}" "${html##*/}"
done)
</ul>
- <h2 class="rename fail">Errors:</h2>
+ <h2 class="rename fail">$(_ Errors:)</h2>
<ul class="rename fail">
$(printf %s "$fail" |while read html; do
printf '<li><span class=from>%s</span> -> <span class=to>%s</span></li>' \
"${html%%/*}" "${html##*/}"
done)
</ul>
- <a class="button rename fail" href="[attachment]">OK</a>
+ <a class="button rename fail" href="[attachment]">$(_ OK)</a>
EOF
exit 0
elif [ "$fail" ]; then
printf "%s\r\n" "Status: 500 Internal Server Error"
- theme_page - "Attachment rename" <<-EOF
- <h1 class="rename fail">Files could not be renamed</h1>
+ theme_page - "$(_ "Attachment rename")" <<-EOF
+ <h1 class="rename fail">$(_ "Files could not be renamed")</h1>
<ul class="rename fail">
$(printf %s "$fail" |while read html; do
printf '<li><span class=from>%s</span> -> <span class=to>%s</span></li>' \
"${html%%/*}" "${html##*/}"
done)
</ul>
- <a class="button rename fail" href="[attachment]">OK</a>
+ <a class="button rename fail" href="[attachment]">$(_ OK)</a>
EOF
exit 0
elif [ "$success" ]; then
printf 'Refresh: %i\r\n' 4
theme_page - "Attachment rename" <<-EOF
- <h1 class="rename success">Files were renamed</h1>
+ <h1 class="rename success">$(_ Files were renamed)</h1>
<ul class="rename success">
$(printf %s "$success" |while read html; do
printf '<li><span class=from>%s</span> -> <span class=to>%s</span></li>' \
"${html%%/*}" "${html##*/}"
done)
</ul>
- <a class="button rename success" href="[attachment]">OK</a>
+ <a class="button rename success" href="[attachment]">$(_ OK)</a>
EOF
exit 0
#!/bin/sh
+l10n_immutablepage >/dev/null \
+|| l10n_immutablepage(){ #TRANSLATION
+ cat <<-EOF
+ <h1>Immutable Page</h1>
+ This is a core page of the wiki system. Its name and position cannot be changed.
+ You may however update this page and you can use ACLs to hide it from various listings.
+ EOF
+}
+
case "${PATH_INFO}" in
*/\[move\]|*/\[rename\]|*/\[delete\])
page="${PATH_INFO%\[*\]}"
theme_page - <<-EOF
<article>
<p class=error>
- <h1>Immutable Page</h1>
- This is a core page of the wiki system. Its name and position cannot be changed.
- You may however update this page and you can use ACLs to hide it from various listings.
+ $(l10n_immutablepage)
</p>
</article>
EOF
*) return 1;;
esac
-if [ "$REQUEST_METHOD" = POST ]; then
- action="$(POST action)"
- newname="$(POST newname |grep -m1 -xE '[^#/]*')"
- newlocation="$(POST newlocation |grep -m1 -xE '/[^#]*')"
-else case "${PATH_INFO}" in
- */\[move\])
- location="${page%/}" location="${location%/*}/"
- theme_page - <<-EOF
- <form method=POST id=movepage>
- <input type=hidden name=session_id value="$SESSION_KEY">
+l10n_movepage >/dev/null \
+|| l10n_movepage(){ # TRANSLATION
+ cat <<-EOF
<h1>Move Page</h1>
<p class="pageid">$(HTML "${page}")</p>
<input name="newlocation" value="$(HTML "$location")" placeholder="New Location">
</ul>
<button type=submit name=action value=move>Move</button>
<button type=submit name=action value=cancel>Cancel</button>
- </form>
EOF
- return 0
- ;;
- */\[rename\])
- name="${page%/}" name="${name##*/}"
- theme_page - <<-EOF
- <form method=POST id=renamepage>
- <input type=hidden name=session_id value="$SESSION_KEY">
+}
+l10n_renamepage >/dev/null \
+|| l10n_renamepage(){ # TRANSLATION
+ cat <<-EOF
<h1>Rename Page</h1>
<p class="pageid">$(HTML "${page}")</p>
<input name="newname" value="$(HTML "$name")" placeholder="New Name">
</ul>
<button type=submit name=action value=rename>Rename</button>
<button type=submit name=action value=cancel>Cancel</button>
- </form>
EOF
- return 0
- ;;
- */\[delete\])
- theme_page - <<-EOF
- <form method=POST id=deletepage>
- <input type=hidden name=session_id value="$SESSION_KEY">
+}
+l10n_deletepage >/dev/null \
+|| l10n_deletepage(){ # TRANSLATION
+ cat <<-EOF
<h1>Delete Page</h1>
<p class="pageid">$(HTML "${page}")</p>
<p>This page and its attachments will be deleted</p>
</ul>
<button type=submit name=action value=delete>Delete</button>
<button type=submit name=action value=cancel>Cancel</button>
+ EOF
+}
+
+if [ "$REQUEST_METHOD" = POST ]; then
+ action="$(POST action)"
+ newname="$(POST newname |grep -m1 -xE '[^#/]*')"
+ newlocation="$(POST newlocation |grep -m1 -xE '/[^#]*')"
+else case "${PATH_INFO}" in
+ */\[move\])
+ location="${page%/}" location="${location%/*}/"
+ theme_page - <<-EOF
+ <form method=POST id=movepage>
+ <input type=hidden name=session_id value="$SESSION_KEY">
+ $(l10n_movepage)
+ </form>
+ EOF
+ return 0
+ ;;
+ */\[rename\])
+ name="${page%/}" name="${name##*/}"
+ theme_page - <<-EOF
+ <form method=POST id=renamepage>
+ <input type=hidden name=session_id value="$SESSION_KEY">
+ $(l10n_renamepage)
+ </form>
+ EOF
+ return 0
+ ;;
+ */\[delete\])
+ theme_page - <<-EOF
+ <form method=POST id=deletepage>
+ <input type=hidden name=session_id value="$SESSION_KEY">
+ $(l10n_deletepage)
</form>
EOF
return 0
'Latest changes to the original language page') printf 'Letzte Änderungen der originalsprachlichen Seite';;
'GIT is not available to handle revisioning.') printf 'GIT steht nicht zur Verfügung um Revisionierung zu handhaben';;
'(never edited)') printf '(nie bearbeitet)';;
+ "Attachment rename") printf "Anhänge umbenennen";;
+ "Errors:") printf "Fehler:";;
+ "Files could not be renamed") printf "Dateien konnten nicht umbenannt werden";;
+ "Files were renamed") printf "Dateien wurden umbenannt";;
+ "OK") printf "OK";;
+ "Some files could not be renamed") printf "Einige Dateien konnten nicht umbenannt werden";;
+ "Successfully renamed:") printf "Erfolgreich umbenannt:";;
*) printf %s\\n "$*";;
esac
}
]
EOF
}
+
+l10n_immutablepage(){ #TRANSLATION
+ cat <<-EOF
+ <h1>Unveränderliche Seite</h1>
+ Dies ist eine Kernseite des Wikisystems. Name und Ort können nicht verändert werden.
+ Sie können jedoch den Inhalt der Seite ändern und Sie können ACLs nutzen um die Seite zu verstecken.
+ EOF
+}
+l10n_movepage(){ # TRANSLATION
+ cat <<-EOF
+ <h1>Seite verschieben</h1>
+ <p class="pageid">$(HTML "${page}")</p>
+ <input name="newlocation" value="$(HTML "$location")" placeholder="Neuer Ort">
+ <ul>
+ <li>Eine Seite mit dem selben Namen darf nicht schon vorhanden sein.</li>
+ <li>Sie müssen die Berechtigung haben, Seiten an diesem Ort anzulegen.</li>
+ <li>Alle Unterseiten werden unter dem neuen Pfad verfügbar gemacht.</li>
+ <li>Unterseiten werden unter ihrem aktuellen Pfad nicht mehr verfügbar sein.</li>
+ </ul>
+ <button type=submit name=action value=move>Verschieben</button>
+ <button type=submit name=action value=cancel>Abbrechen</button>
+ EOF
+}
+l10n_renamepage(){ # TRANSLATION
+ cat <<-EOF
+ <h1>Seite Umbenennen</h1>
+ <p class="pageid">$(HTML "${page}")</p>
+ <input name="newname" value="$(HTML "$name")" placeholder="Neuer Name">
+ <ul>
+ <li>Eine Seite mit dem neuen Namen darf nicht schon vorhanden sein.</li>
+ <li>Sie müssen die Berechtigung haben, Seiten an diesem Ort anzulegen.</li>
+ <li>Alle Unterseiten werden unter dem neuen Pfad verfügbar gemacht.</li>
+ <li>Unterseiten werden unter ihrem aktuellen Pfad nicht mehr verfügbar sein.</li>
+ </ul>
+ <button type=submit name=action value=rename>Umbenennen</button>
+ <button type=submit name=action value=cancel>Abbrechen</button>
+ EOF
+}
+l10n_deletepage(){ # TRANSLATION
+ cat <<-EOF
+ <h1>Seite Löschen</h1>
+ <p class="pageid">$(HTML "${page}")</p>
+ <p>Diese Seite und all ihre Anhänge werden gelöscht.</p>
+ <ul>
+ <li>Vergangene Revisionen der Seitentextes (einschließlich der aktuellen) bleiben verfügbar und können wiederhergestellt werden.</li>
+ <li>Anhänge werden vollständig gelöscht und können nicht wiederhergestellt werden.</li>
+ <li>Unterseiten sind nicht betroffen und bleiben normal verfügbar.</li>
+ </ul>
+ <button type=submit name=action value=delete>Löschen</button>
+ <button type=submit name=action value=cancel>Abbrechen</button>
+ EOF
+}
title="${page%/}"; title="${title##*/}"
if acl_write "$page"; then
- theme_page - "Attachments: $title" <<-EOF
+ theme_page - "$(_ Attachments): $title" <<-EOF
<form class=upload method=POST enctype="multipart/form-data">
<h2>$(_ Upload)</h2>
<input type=hidden name=session_id value="$SESSION_ID">
</form>
EOF
else
- theme_page - "Attachments: $title" <<-EOF
+ theme_page - "$(_ Attachments): $title" <<-EOF
<ul class="attachment list">
$(for file in "$_EXEC/pages/$page/#attachments"/* "$_DATA/pages/$page/#attachments"/*; do
[ "$file" = "$_EXEC/pages/$page/#attachments/${file##*/}" \