dash-docs/_contrib/translate
Saivann 2718222c9b new bitcoin.org
implement multilanguage
new improved clients list page
update history and statistics in the "about" page
add "Some things you need to know" page
add "Support Bitcoin" page
add a contextual presentation for each category of users (individuals, organizations, developers and enthusiasts)
add a short and concise "how it works" page
add a "vocabulary" page for Bitcoin technical words definitions
give more visibility for the foundation
new website design and layout
2013-03-18 14:29:59 -04:00

23 lines
996 B
Bash
Executable file

#!/bin/bash
if [[ -z ${1} || -z ${2} ]]; then
echo 'You must provide language code and language name. Ex : ./_contrib/translate fr "Français"'
exit
fi
cp -R en ${1}
cp _layouts/base-en.html _layouts/base-${1}.html
sed -i "s_layout: base-en_layout: base-${1}_g" ${1}/*.html
sed -i "s_href=\"/en/_href=\"/${1}/_g" ${1}/*.html
sed -i "s_src=\"/en/_src=\"/${1}/_g" ${1}/*.html
sed -i "s_href=\"/en/_href=\"/${1}/_g" _layouts/base-${1}.html
sed -i "s_src=\"/en/_src=\"/${1}/_g" _layouts/base-${1}.html
sed -i "s_langcode: en_langcode: ${1}_g" _layouts/base-${1}.html
sed -i "s_langtext: English_langtext: ${2}_g" _layouts/base-${1}.html
sed -i "s/ALERT_CLASS_en/ALERT_CLASS_${1}/g" _layouts/base-${1}.html
sed -i "s/ALERT_en/ALERT_${1}/g" _layouts/base-${1}.html
sed -i "/langcode: ${1}/d" _config.yml
sed -i "/langtext: ${2}/d" _config.yml
sed -i "/langs:/a - langtext: ${2}" _config.yml
sed -i "/langs:/a - langcode: ${1}" _config.yml
sed -i "s_- langtext: ${2}_ langtext: ${2}_g" _config.yml