Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
79 changes: 10 additions & 69 deletions .github/workflows/sync-with-cpython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ concurrency:
jobs:
sync:
runs-on: ubuntu-latest
env:
CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.7' }}
steps:
- name: Checkout translation repo
uses: actions/checkout@v4
Expand All @@ -38,41 +40,12 @@ jobs:
- name: Install Python dependencies
run: pip install sphinx sphinx-intl

- name: Checkout CPython docs only (sparse)
run: |
git clone \
--depth 1 \
--filter=blob:none \
--sparse \
--branch ${{ github.event.inputs.cpython_tag || 'v3.14.7' }} \
https://github.com/python/cpython.git \
.cpython-src
cd .cpython-src
git sparse-checkout set Doc Include

- name: Install CPython doc dependencies
run: |
python -m venv .cpython-src/Doc/venv
.cpython-src/Doc/venv/bin/pip install \
-r .cpython-src/Doc/requirements.txt

- name: Build .pot templates
run: |
cd .cpython-src/Doc
./venv/bin/sphinx-build \
-b gettext \
. \
../../.pot-templates

- name: Merge .pot into .po files
run: |
find .pot-templates -name "*.pot" | while read f; do
rel="${f#.pot-templates/}"
po="${rel%.pot}.po"
if [ -f "$po" ]; then
msgmerge --update --backup=off --no-location --no-wrap "$po" "$f"
fi
done
# Item 4: fetch/build/merge/validate now all live in one shared
# module (scripts/po_sync.py) instead of inline bash/awk here, so
# this workflow can't drift from update_python_version.py the way
# it did before (missing --no-location --no-wrap on one side).
- name: Sync msgids (fetch, build gettext, merge, validate)
run: python scripts/po_sync.py sync-only "$CPYTHON_TAG"

- name: Ensure translation label exists
env:
Expand All @@ -87,7 +60,6 @@ jobs:
- name: Open issue for fuzzy strings
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.7' }}
run: |
tmpfile=$(mktemp)
while IFS= read -r f; do
Expand Down Expand Up @@ -130,41 +102,11 @@ jobs:
fi
rm -f "$tmpfile"

- name: Validate .po files
run: |
tmpfile=$(mktemp)
find . -name "*.po" \
-not -path "./.git/*" \
-not -path "./.cpython-src/*" \
-not -path "./.pot-templates/*" | while read f; do
msgfmt --check "$f" -o /dev/null || echo "FAIL: $f" >> "$tmpfile"
done
if [ -s "$tmpfile" ]; then
cat "$tmpfile"
rm -f "$tmpfile"
exit 1
fi
rm -f "$tmpfile"

- name: Clean up scratch files
run: rm -rf .cpython-src .pot-templates

- name: Stage changes
run: git add --all

- name: Unstage POT-Creation-Date-only changes
run: |
git diff --staged --name-only | while read f; do
if git diff --staged -U0 -- "$f" \
| grep '^[+-]' \
| grep -v '^[+-][+-][+-]' \
| grep -qv 'POT-Creation-Date'; then
: # has real changes, keep staged
else
git restore --staged "$f"
git restore "$f"
fi
done
run: python scripts/unstage_cosmetic.py

- name: Commit if changed
run: |
Expand All @@ -174,6 +116,5 @@ jobs:
echo "Nothing to commit, skipping."
exit 0
fi
git commit -m \
"chore: sync msgids with CPython ${{ github.event.inputs.cpython_tag || 'v3.14.7' }}"
git commit -m "chore: sync msgids with CPython $CPYTHON_TAG"
git push
76 changes: 15 additions & 61 deletions about.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-08-25 20:39+0330\n"
"POT-Creation-Date: 2026-08-26 03:59+0000\n"
"PO-Revision-Date: 2021-06-28 00:47+0000\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n"
Expand All @@ -24,78 +24,32 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#: ../../about.rst:3
msgid "About this documentation"
msgstr "دربارهٔ این مستندات"

#: ../../about.rst:6
msgid ""
"Python's documentation is generated from `reStructuredText`_ sources using "
"`Sphinx`_, a documentation generator originally created for Python and now "
"maintained as an independent project."
msgstr ""
"مستندات پایتون از طریق منابع `reStructuredText`_ با استفاده از `Sphinx`_ "
"تولید می‌شوند، که یک تولیدگر مستندات است که در ابتدا برای پایتون ساخته شد و "
"اکنون به‌عنوان یک پروژه مستقل نگهداری می‌شود."
msgid "Python's documentation is generated from `reStructuredText`_ sources using `Sphinx`_, a documentation generator originally created for Python and now maintained as an independent project."
msgstr "مستندات پایتون از طریق منابع `reStructuredText`_ با استفاده از `Sphinx`_ تولید می‌شوند، که یک تولیدگر مستندات است که در ابتدا برای پایتون ساخته شد و اکنون به‌عنوان یک پروژه مستقل نگهداری می‌شود."

#: ../../about.rst:16
msgid ""
"Development of the documentation and its toolchain is an entirely volunteer "
"effort, just like Python itself. If you want to contribute, please take a "
"look at the :ref:`reporting-bugs` page for information on how to do so. New "
"volunteers are always welcome!"
msgstr ""
"توسعهٔ مستندات و زنجیرهٔ ابزارهایش، همانند خود پایتون تلاشی کاملاً داوطلبانه "
"است. اگر می‌خواهید مشارکت کنید برای اطّلاعات در مورد چگونگی آن نگاهی به "
"صفحهٔ :ref:`reporting-bugs` بیندازید. همیشه از داوطلبان جدید استقبال می‌شود!"
msgid "Development of the documentation and its toolchain is an entirely volunteer effort, just like Python itself. If you want to contribute, please take a look at the :ref:`reporting-bugs` page for information on how to do so. New volunteers are always welcome!"
msgstr "توسعهٔ مستندات و زنجیرهٔ ابزارهایش، همانند خود پایتون تلاشی کاملاً داوطلبانه است. اگر می‌خواهید مشارکت کنید برای اطّلاعات در مورد چگونگی آن نگاهی به صفحهٔ :ref:`reporting-bugs` بیندازید. همیشه از داوطلبان جدید استقبال می‌شود!"

#: ../../about.rst:21
msgid "Many thanks go to:"
msgstr "سپاس بسیار از:"

#: ../../about.rst:23
msgid ""
"Fred L. Drake, Jr., the creator of the original Python documentation toolset "
"and author of much of the content;"
msgstr ""
"فرد ال. درک جونیور خالق مجموعه ابزارهای اصلی مستندات پایتون و نویسنده بسیاری "
"از محتواها:"
msgid "Fred L. Drake, Jr., the creator of the original Python documentation toolset and author of much of the content;"
msgstr "فرد ال. درک جونیور خالق مجموعه ابزارهای اصلی مستندات پایتون و نویسنده بسیاری از محتواها:"

#: ../../about.rst:25
msgid ""
"the `Docutils <https://docutils.sourceforge.io/>`_ project for creating "
"reStructuredText and the Docutils suite;"
msgstr ""
"پروژه `Docutils <https://docutils.sourceforge.io/>`_ برای ایجاد "
"reStructuredText و مجموعهٔ Docutils؛"
msgid "the `Docutils <https://docutils.sourceforge.io/>`_ project for creating reStructuredText and the Docutils suite;"
msgstr "پروژه `Docutils <https://docutils.sourceforge.io/>`_ برای ایجاد reStructuredText و مجموعهٔ Docutils؛"

#: ../../about.rst:27
msgid ""
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
"got many good ideas."
msgstr ""
"فردریک لوند (Fredrik Lundh) برای پروژه‌ی \"Alternative Python Reference\" "
"(مرجع جایگزین پایتون) که از آن بسیاری از ایده‌های خوب برای Sphinx (اسفینکس) "
"گرفته شد."
msgid "Fredrik Lundh for his Alternative Python Reference project from which Sphinx got many good ideas."
msgstr "فردریک لوند (Fredrik Lundh) برای پروژه‌ی \"Alternative Python Reference\" (مرجع جایگزین پایتون) که از آن بسیاری از ایده‌های خوب برای Sphinx (اسفینکس) گرفته شد."

#: ../../about.rst:32
msgid "Contributors to the Python documentation"
msgstr "مشارکت کنندگان مستندات پایتون"

#: ../../about.rst:34
msgid ""
"Many people have contributed to the Python language, the Python standard "
"library, and the Python documentation. See :source:`Misc/ACKS` in the "
"Python source distribution for a partial list of contributors."
msgstr ""
"افراد زیادی در توسعه زبان پایتون، کتابخانه استاندارد پایتون، و مستندات "
"پایتون مشارکت داشته‌اند. برای مشاهده فهرستی از برخی از این مشارکت‌کنندگان، "
"به :source:`Misc/ACKS` در توزیع سورس پایتون مراجعه کنید."
msgid "Many people have contributed to the Python language, the Python standard library, and the Python documentation. See :source:`Misc/ACKS` in the Python source distribution for a partial list of contributors."
msgstr "افراد زیادی در توسعه زبان پایتون، کتابخانه استاندارد پایتون، و مستندات پایتون مشارکت داشته‌اند. برای مشاهده فهرستی از برخی از این مشارکت‌کنندگان، به :source:`Misc/ACKS` در توزیع سورس پایتون مراجعه کنید."

#: ../../about.rst:38
msgid ""
"It is only with the input and contributions of the Python community that "
"Python has such wonderful documentation -- Thank You!"
msgstr ""
"فقط با مشارکت‌ها و کمک‌های جامعه پایتون است که پایتون چنین مستندات فوق‌العاده‌ای "
"دارد -- سپاس از شما!"
msgid "It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!"
msgstr "فقط با مشارکت‌ها و کمک‌های جامعه پایتون است که پایتون چنین مستندات فوق‌العاده‌ای دارد -- سپاس از شما!"
Loading
Loading