Commit 0bb5e6bb authored by Tails developers's avatar Tails developers
Browse files

Make language code extraction more robust.

There are three letter language codes, e.g. fur.
parent 27db6a6d
#!/bin/sh
language_code_from_locale () {
echo "${1}" | sed "s,\(_\|\.\).*$,,"
}
localize_tails_doc_page () {
local page="${1}"
local lang_code="$(echo ${LANG} | head -c 2)"
local lang_code="$(language_code_from_locale "${LANG}")"
local try_page
for locale in "${lang_code}" "en"; do
try_page="${page}.${locale}.html"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment