mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
Only build Sphinx po for current langs with live instance
Building for each lang takes several minutes, so saves a lot of build time. More langs will be added as they are more complete and a Read The Docs instance is created for them.
This commit is contained in:
6
build_langs.txt
Normal file
6
build_langs.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
de
|
||||
es
|
||||
fr
|
||||
pt_BR
|
||||
uk
|
||||
zh_CN
|
||||
@@ -8,6 +8,7 @@ SPHINX_TEMPLATES_DIR="sphinx/templates"
|
||||
# This one is manually maintained, see --templates-list switch
|
||||
SPHINX_TEMPLATES=$(sed -e 's@^@'$SPHINX_TEMPLATES_DIR'/@' templates_list.txt)
|
||||
SPHINX_PO_DIR="sphinx/po"
|
||||
SPHINX_BUILD_LANGS=$(cat build_langs.txt)
|
||||
|
||||
WEBLATE_DIR="weblate"
|
||||
WEBLATE_TEMPLATE="$WEBLATE_DIR/docs.pot"
|
||||
@@ -129,9 +130,9 @@ if [ "$update_sphinx_po" = true ]; then
|
||||
# First clean previous folder to take into account potentially removed files
|
||||
rm -rf $SPHINX_PO_DIR
|
||||
mkdir $SPHINX_PO_DIR
|
||||
for po in $WEBLATE_POFILES; do
|
||||
for lang in $SPHINX_BUILD_LANGS; do
|
||||
po=$WEBLATE_DIR"/"$lang".po"
|
||||
echo "Merging $po..."
|
||||
lang=$(basename "$po" .po)
|
||||
langdir="$SPHINX_PO_DIR/$lang/LC_MESSAGES"
|
||||
mkdir -p "$langdir"
|
||||
for template in $SPHINX_TEMPLATES; do
|
||||
|
||||
Reference in New Issue
Block a user