diff options
Diffstat (limited to '')
-rwxr-xr-x | v2/src/bin/conf | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/v2/src/bin/conf b/v2/src/bin/conf index e4dba61..3b56dbd 100755 --- a/v2/src/bin/conf +++ b/v2/src/bin/conf @@ -155,17 +155,21 @@ if [ -z "${title:-}" ]; then fi if [ -r "$FILENAME".i18n ]; then - translations="$(cat <<-EOF + translations_head="$(awk -F: -v lang="$lang" '$1 != lang{ + printf " <link rel=\"alternate\" type=\"text/html\" href=\"%s\" hreflang=\"%s\" />\n", + $3, $1 + }' "$FILENAME".i18n)" + translations_body="$(cat <<-EOF <ul class="translation-list"> $(awk -F: '{ - "url-for " $2 | getline url printf " <li><a href=\"%s\">%s</a></li>\n", - url, $1 + $3, $1 }' "$FILENAME".i18n) </ul> EOF )" - printf 'export translations_html="%s"\n' "$(shesc "$translations")" + printf 'export translations_head_html="%s"\n' "$(shesc "$translations_head")" + printf 'export translations_body_html="%s"\n' "$(shesc "$translations_body")" fi if [ -n "${date:-}" ]; then |