Use language name for translated releasenotes
Instead of outputting "ja", use "Japanese (ja)" for the links of translated release notes. Use a mapping for languages and include all languages that currently have translated releasenotes plus a few candidates. We can expand this list further if needed. Change-Id: I31f66e35e71e34962005a9e145b473e3327b2905
This commit is contained in:
parent
e9fd2eeb87
commit
c99a24dd04
@ -18,6 +18,17 @@ DIRECTORY=releasenotes
|
||||
|
||||
script_path=/usr/local/jenkins/slave_scripts
|
||||
|
||||
# Mapping of language codes to language names
|
||||
declare -A LANG_NAME=(
|
||||
["de"]="German"
|
||||
["en_AU"]="English (Australian)"
|
||||
["en_GB"]="English (United Kingdom)"
|
||||
["id"]="Indonesian"
|
||||
["ja"]="Japanese"
|
||||
["ko_KR"]="Korean (South Korea)"
|
||||
["zh_CN"]="Chinese (China)"
|
||||
)
|
||||
|
||||
# This file always exists in OpenStack CI jobs, check for it so that
|
||||
# it can be used manually as well.
|
||||
if [ -e "$(pwd)/upper-constraints.txt" ]; then
|
||||
@ -88,7 +99,13 @@ for locale in `find ${DIRECTORY}/source/locale/ -maxdepth 1 -type d` ; do
|
||||
${DIRECTORY}/source/ ${DIRECTORY}/build/html/${language}
|
||||
|
||||
# Reference translated document from index file
|
||||
echo "* \`${language} <${language}/index.html>\`__" >> ${REFERENCES}
|
||||
if [ ${LANG_NAME["${language}"]+_} ] ; then
|
||||
name=${LANG_NAME["${language}"]}
|
||||
name+=" (${language})"
|
||||
echo "* \`$name <${language}/index.html>\`__" >> ${REFERENCES}
|
||||
else
|
||||
echo "* \`${language} <${language}/index.html>\`__" >> ${REFERENCES}
|
||||
fi
|
||||
|
||||
# Remove newly created files
|
||||
git clean -f -q ${DIRECTORY}/source/locale/${language}/LC_MESSAGES/*.po
|
||||
|
Loading…
x
Reference in New Issue
Block a user