Skip to content

Commit

Permalink
Rename locale_dirs to locales
Browse files Browse the repository at this point in the history
  • Loading branch information
rffontenelle committed Oct 17, 2024
1 parent 68de5ca commit a464c5f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/potodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/pull_translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a464c5f

Please sign in to comment.