Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rename locale_dirs to locales#235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rffontenelle merged 5 commits intomainfromrename-locale-dir
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions.github/workflows/sync.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,12 +38,16 @@ jobs:
repository: 'python/cpython'
ref: ${{ env.PYDOC_VERSION }}
path: cpython

- name: Set language dir variable
run:
echo "LANGUAGE_DIR=cpython/Doc/locales/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES" >> $GITHUB_ENV

- name: Checkout this repository ${{ env.PYDOC_VERSION }}
uses: actions/checkout@v4
with:
ref: ${{ env.PYDOC_VERSION }}
path:cpython/Doc/locale/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES
path: ${{ env.LANGUAGE_DIR }}

- uses: actions/setup-python@v5
with:
Expand DownExpand Up@@ -79,30 +83,30 @@ jobs:
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
run: |
# Clean up obsolete files
findcpython/Doc/locale/$PYDOC_LANGUAGE/LC_MESSAGES -name '*.po' -exec rm {} \;
find./${{ env.LANGUAGE_DIR }} -name '*.po' -exec rm {} \;
./scripts/pull_translations.sh
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}

- name: powrap
if: steps.pull.outcome == 'success'
run: |
cdcpython/Doc/locale/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES
cd./${{ env.LANGUAGE_DIR }}
powrap *.po **/*.po

- name: Update statistics
if: always() && inputs.secrets.TX_TOKEN != 0
run: |
python ./scripts/tx_stats.py >cpython/Doc/locale/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES/stats.json
git -Ccpython/Doc/locale/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES/ diff stats.json
python ./scripts/tx_stats.py >./${{ env.LANGUAGE_DIR }}/stats.json
git -C./${{ env.LANGUAGE_DIR }} diff stats.json
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}

- name: Update potodo.md
if: always()
run: |
./scripts/potodo.sh
git diffcpython/Doc/locale/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES/potodo.md
git diff./${{ env.LANGUAGE_DIR }}/potodo.md

# 4- Commit and push translations

Expand All@@ -112,7 +116,7 @@ jobs:
- name: Push
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
run: |
cdcpython/Doc/locale/${{ env.PYDOC_LANGUAGE}}/LC_MESSAGES
cd./${{ env.LANGUAGE_DIR }}
git push


2 changes: 1 addition & 1 deletionscripts/commit.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsscripts/generate_templates.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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 docslocale directory
cd $(dirname $0)/../cpython/Doc/locale
# Make sure to run all commands from CPython docslocales 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 deletionsscripts/lint.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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

cdlocale/${PYDOC_LANGUAGE}/LC_MESSAGES
cdlocales/${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 deletionscripts/potodo.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionscripts/pull_translations.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionscripts/setup.sh
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp