diff --git a/scripts/commit.sh b/scripts/commit.sh index 0b0c6cf3e..5661dfaea 100755 --- a/scripts/commit.sh +++ b/scripts/commit.sh @@ -5,7 +5,7 @@ set -eu -cd $(dirname $0)/../cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES +cd $(dirname $0)/../cpython/Doc/locales/${PYDOC_LANGUAGE}/LC_MESSAGES extra_files=".tx/config stats.json potodo.md" diff --git a/scripts/generate_templates.sh b/scripts/generate_templates.sh index 3db47ef8c..d1878f411 100755 --- a/scripts/generate_templates.sh +++ b/scripts/generate_templates.sh @@ -14,8 +14,8 @@ set -xeu test -n ${PYDOC_TX_PROJECT+x} test -n ${PYDOC_LANGUAGE+x} -# Make sure to run all commands from CPython docs locale directory -cd $(dirname $0)/../cpython/Doc/locale +# Make sure to run all commands from CPython docs locales directory +cd $(dirname $0)/../cpython/Doc/locales # Generate message catalog template (.pot) files # TODO: use `make -C .. gettext` when there are only Python >= 3.12 diff --git a/scripts/lint.sh b/scripts/lint.sh index 27ddfdbb9..fdfbf3479 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -26,9 +26,9 @@ sed -i "/^\s*'literal-block',/s/ '/ #'/" conf.py opts='-E -b gettext -q -D gettext_compact=0 -d build/.doctrees . build/gettext' make build ALLSPHINXOPTS="$opts" # Update translation files with latest POT -sphinx-intl update -d locale -p build/gettext -l ${PYDOC_LANGUAGE} > /dev/null +sphinx-intl update -p build/gettext -l ${PYDOC_LANGUAGE} > /dev/null -cd locale/${PYDOC_LANGUAGE}/LC_MESSAGES +cd locales/${PYDOC_LANGUAGE}/LC_MESSAGES sphinx-lint 2> $(realpath "$rootdir/logs/sphinxlint.txt") # Undo changes to undo literal blocks disabling diff --git a/scripts/potodo.sh b/scripts/potodo.sh index 5b1cc9f05..b7e61802d 100755 --- a/scripts/potodo.sh +++ b/scripts/potodo.sh @@ -11,7 +11,7 @@ test -n ${PYDOC_LANGUAGE+x} rootdir=$(realpath $(dirname $0)/..) -cd "$rootdir"/cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES +cd "$rootdir"/cpython/Doc/locales/${PYDOC_LANGUAGE}/LC_MESSAGES potodo --no-cache > potodo.md diff --git a/scripts/pull_translations.sh b/scripts/pull_translations.sh index ad38e038b..565046c90 100755 --- a/scripts/pull_translations.sh +++ b/scripts/pull_translations.sh @@ -21,7 +21,7 @@ set -xeu test -n ${PYDOC_TX_PROJECT+x} -cd "$(dirname $0)/../cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES/" +cd "$(dirname $0)/../cpython/Doc/locales/${PYDOC_LANGUAGE}/LC_MESSAGES/" # If a PO file is provided as input, convert it into Transifex resource # and add it be pulled (instead of pulling all translations files). diff --git a/scripts/setup.sh b/scripts/setup.sh index 979215d5d..0c5a95adf 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -19,7 +19,7 @@ rm -rf cpython # Check out needed repositories git clone --depth 1 --single-branch --branch ${PYDOC_VERSION} https://github.com/python/cpython cpython -git clone --depth 1 --single-branch --branch ${PYDOC_VERSION} ${PYDOC_REPO} cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES +git clone --depth 1 --single-branch --branch ${PYDOC_VERSION} ${PYDOC_REPO} cpython/Doc/locales/${PYDOC_LANGUAGE}/LC_MESSAGES # Install dependencies; Require being in a VENV or in GitHub Actions set +u