Change "translated" → "translations"

I think we might as well to use the word "translations" on this context.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
This commit is contained in:
Suguru Hirahara
2024-12-20 21:26:48 +09:00
parent 36429d8bd3
commit c51e771d1a
5 changed files with 27 additions and 25 deletions

View File

@ -1,10 +1,11 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2024 Slavi Pantaleev <slavi@devture.com>
# SPDX-FileCopyrightText: 2024 Suguru Hirahara <acioustick@noreply.codeberg.org>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# This script builds the translated result (translated project) for a given language in the `translated/<language>/` directory.
# This script builds the translated result (translated project) for a given language in the `translations/<language>/` directory.
set -euxo pipefail
@ -47,14 +48,14 @@ rm -rf ${base_path}/i18n/translated-result-build-${LANGUAGE}/.doctrees
cp -r ${base_path}/docs/assets ${base_path}/i18n/translated-result-build-${LANGUAGE}/docs/assets/
# Remove the old result directory for this language
if [ -d ${base_path}/i18n/translated/${LANGUAGE} ]; then
rm -rf ${base_path}/i18n/translated/${LANGUAGE}
if [ -d ${base_path}/i18n/translations/${LANGUAGE} ]; then
rm -rf ${base_path}/i18n/translations/${LANGUAGE}
fi
# Make sure the `translated/` directory exists
# Make sure the `translations/` directory exists
if [ ! -d ${base_path}/i18n/translated ]; then
mkdir -p ${base_path}/i18n/translated
fi
# Relocate the built result to translated/<language>
mv ${base_path}/i18n/translated-result-build-${LANGUAGE} ${base_path}/i18n/translated/${LANGUAGE}
# Relocate the built result to translations/<language>
mv ${base_path}/i18n/translated-result-build-${LANGUAGE} ${base_path}/i18n/translations/${LANGUAGE}