]> git.plutz.net Git - webpoll/blobdiff - poll.sh
first attempt of internationalization
[webpoll] / poll.sh
diff --git a/poll.sh b/poll.sh
index 7ab0e9d58dea7414449584d78dc0046e9fcb48b9..240a155d26bc5378b6ef8cfff8a23d87466a8642 100644 (file)
--- a/poll.sh
+++ b/poll.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 . "${_EXEC}/comments.sh"
+. "${_EXEC}/languages.sh"
 
 id="$(checkid "${PATH_INFO#/}")"
 file="${_DATA}/${id}"
@@ -74,6 +75,8 @@ table_poll() {
   local edit="$(GET edit)"
   local time date span name yes no maybe yc nc mc
 
+  table_date="${table_date+"%A <br/> %B %_d, %Y"}"
+
   [ "$timelist" ] || return 1
 
   printf '[table .poll [thead\n'
@@ -84,7 +87,7 @@ table_poll() {
       span=0; for time in $timelist; do case $time in
         ${date}*) span=$((span + 1));;
       esac; done
-      date -d "$date" +"[th colspan=\"${span}\" . %A <br/> %B %_d, %Y]";
+      date -d "$date" +"[th colspan=\"${span}\" . ${table_date}]";
     done
     printf '[th]]\n'
   fi