Skip to content

Commit 1276fb1

Browse files
Merge branch '3.14' into Translation_of_the_library/__main__.po_file
2 parents a7c7c61 + 23758d3 commit 1276fb1

553 files changed

Lines changed: 8118 additions & 3498 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: true
22
contact_links:
33
- name: راهنمای مشارکت (CONTRIBUTING.md)
4-
url: https://github.com/revisto/python-docs-fa/blob/3.14/CONTRIBUTING.md
4+
url: https://github.com/python/python-docs-fa/blob/3.14/CONTRIBUTING.md
55
about: پیش از ثبت issue، لطفاً راهنمای مشارکت و README را مطالعه کنید

.github/workflows/build-and-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
repository: python/cpython
28-
ref: v3.14.6
28+
ref: v3.14.7
2929

3030
- name: Set up Python
3131
uses: actions/setup-python@v4

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
repository: python/cpython
22-
ref: v3.14.6
22+
ref: v3.14.7
2323

2424
- name: Set up Python
2525
uses: actions/setup-python@v4

.github/workflows/sync-with-cpython.yml

Lines changed: 12 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66
workflow_dispatch:
77
inputs:
88
cpython_tag:
9-
description: 'CPython tag to sync against (e.g. v3.14.6)'
9+
description: 'CPython tag to sync against (e.g. v3.14.7)'
1010
required: false
11-
default: 'v3.14.6'
11+
default: 'v3.14.7'
1212

1313
permissions:
1414
contents: write
@@ -21,6 +21,8 @@ concurrency:
2121
jobs:
2222
sync:
2323
runs-on: ubuntu-latest
24+
env:
25+
CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.7' }}
2426
steps:
2527
- name: Checkout translation repo
2628
uses: actions/checkout@v4
@@ -38,41 +40,12 @@ jobs:
3840
- name: Install Python dependencies
3941
run: pip install sphinx sphinx-intl
4042

41-
- name: Checkout CPython docs only (sparse)
42-
run: |
43-
git clone \
44-
--depth 1 \
45-
--filter=blob:none \
46-
--sparse \
47-
--branch ${{ github.event.inputs.cpython_tag || 'v3.14.6' }} \
48-
https://github.com/python/cpython.git \
49-
.cpython-src
50-
cd .cpython-src
51-
git sparse-checkout set Doc Include
52-
53-
- name: Install CPython doc dependencies
54-
run: |
55-
python -m venv .cpython-src/Doc/venv
56-
.cpython-src/Doc/venv/bin/pip install \
57-
-r .cpython-src/Doc/requirements.txt
58-
59-
- name: Build .pot templates
60-
run: |
61-
cd .cpython-src/Doc
62-
./venv/bin/sphinx-build \
63-
-b gettext \
64-
. \
65-
../../.pot-templates
66-
67-
- name: Merge .pot into .po files
68-
run: |
69-
find .pot-templates -name "*.pot" | while read f; do
70-
rel="${f#.pot-templates/}"
71-
po="${rel%.pot}.po"
72-
if [ -f "$po" ]; then
73-
msgmerge --update --backup=off --no-location --no-wrap "$po" "$f"
74-
fi
75-
done
43+
# Item 4: fetch/build/merge/validate now all live in one shared
44+
# module (scripts/po_sync.py) instead of inline bash/awk here, so
45+
# this workflow can't drift from update_python_version.py the way
46+
# it did before (missing --no-location --no-wrap on one side).
47+
- name: Sync msgids (fetch, build gettext, merge, validate)
48+
run: python scripts/po_sync.py sync-only "$CPYTHON_TAG"
7649

7750
- name: Ensure translation label exists
7851
env:
@@ -87,7 +60,6 @@ jobs:
8760
- name: Open issue for fuzzy strings
8861
env:
8962
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90-
CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.6' }}
9163
run: |
9264
tmpfile=$(mktemp)
9365
while IFS= read -r f; do
@@ -130,41 +102,11 @@ jobs:
130102
fi
131103
rm -f "$tmpfile"
132104
133-
- name: Validate .po files
134-
run: |
135-
tmpfile=$(mktemp)
136-
find . -name "*.po" \
137-
-not -path "./.git/*" \
138-
-not -path "./.cpython-src/*" \
139-
-not -path "./.pot-templates/*" | while read f; do
140-
msgfmt --check "$f" -o /dev/null || echo "FAIL: $f" >> "$tmpfile"
141-
done
142-
if [ -s "$tmpfile" ]; then
143-
cat "$tmpfile"
144-
rm -f "$tmpfile"
145-
exit 1
146-
fi
147-
rm -f "$tmpfile"
148-
149-
- name: Clean up scratch files
150-
run: rm -rf .cpython-src .pot-templates
151-
152105
- name: Stage changes
153106
run: git add --all
154107

155108
- name: Unstage POT-Creation-Date-only changes
156-
run: |
157-
git diff --staged --name-only | while read f; do
158-
if git diff --staged -U0 -- "$f" \
159-
| grep '^[+-]' \
160-
| grep -v '^[+-][+-][+-]' \
161-
| grep -qv 'POT-Creation-Date'; then
162-
: # has real changes, keep staged
163-
else
164-
git restore --staged "$f"
165-
git restore "$f"
166-
fi
167-
done
109+
run: python scripts/unstage_cosmetic.py
168110

169111
- name: Commit if changed
170112
run: |
@@ -174,6 +116,5 @@ jobs:
174116
echo "Nothing to commit, skipping."
175117
exit 0
176118
fi
177-
git commit -m \
178-
"chore: sync msgids with CPython ${{ github.event.inputs.cpython_tag || 'v3.14.6' }}"
119+
git commit -m "chore: sync msgids with CPython $CPYTHON_TAG"
179120
git push

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build:
2929
fi
3030
echo "Continuing build."
3131
exit 0
32-
- git clone --depth 1 --branch v3.14.6 https://github.com/python/cpython venv/cpython
32+
- git clone --depth 1 --branch v3.14.7 https://github.com/python/cpython venv/cpython
3333
- pip install -r venv/cpython/Doc/requirements.txt
3434
- mkdir -p venv/cpython/Doc/locales/fa/LC_MESSAGES
3535
- cp --parents *.po venv/cpython/Doc/locales/fa/LC_MESSAGES/

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
```bash
1111
git clone https://github.com/<username>/python-docs-fa.git
1212
cd python-docs-fa
13-
git remote add upstream https://github.com/revisto/python-docs-fa.git
13+
git remote add upstream https://github.com/python/python-docs-fa.git
1414
```
1515
2. یک شاخه برای کارتان بسازید (نام شاخه باید گویا باشد، مثلاً `translate-something`):
1616
```bash
@@ -45,7 +45,7 @@
4545
2. فایل `.po` مورد نظر را با [Poedit](https://poedit.net) یا هر ویرایشگر متنی باز کنید.
4646
- در Poedit رشته‌های ترجمه‌نشده یا `fuzzy` را از پنل فیلتر (Filter) پیدا کنید.
4747
3. متن `msgid` را ترجمه کنید و در `msgstr` وارد کنید.
48-
4. **نشانه‌گذاری‌های Sphinx** مثل `` :class:`int` `` ، `` :func:`repr` `` ، `` :ref:`...` `` ، `` ``code`` `` و **جای‌گذارها** مثل `%s` یا `{name}` را دقیقاً بدون تغییر نگه دارید؛ فقط متن اطراف آن‌ها ترجمه می‌شود. ترجمهٔ `target` در `` :term:`text <target>` `` ممنوع است چون لینک را خراب می‌کند.
48+
4. **نشانه‌گذاری‌های Sphinx** مثل `` :class:`int` `` ، `` :func:`repr` `` ، `` :ref:`...` `` ، `` ``code`` `` و **جای‌گذارها** مثل `%s` یا `{name}` را دقیقاً بدون تغییر نگه دارید؛ فقط متن اطراف آن‌ها ترجمه می‌شود. در `` :term:`target` ``، اگر عبارت داخل بک‌تیک با شناسهٔ واژه‌نامه یکی است، می‌توانید آن را به شکل `` :term:`ترجمه <target>` `` بنویسید تا هم متن ترجمه‌شده نمایش داده شود و هم لینک درست کار کند؛ در این حالت فقط بخش نمایشی (پیش از `<`) ترجمه می‌شود و `target` داخل `<>` باید دقیقاً همان شناسهٔ انگلیسی اصلی (بدون تغییر) باقی بماند، چون تغییر آن لینک را خراب می‌کند.
4949
5. داخل کدها (بلوک‌های `code-block`) نام متغیرها، توابع و کلمات کلیدی را ترجمه نکنید؛ فقط رشته‌ها و کامنت‌ها را می‌توانید ترجمه کنید.
5050
6. از [واژه‌نامهٔ پروژه (GLOSSARY.md)](GLOSSARY.md) برای ثابت نگه‌داشتن اصطلاحات استفاده کنید.
5151
7. اگر به اصطلاحی برخوردید که در واژه‌نامه نبود، ترجمه‌ای برای آن انتخاب کنید و به واژه‌نامه اضافه کنید.
@@ -105,7 +105,7 @@ python3 scripts/update_po_headers.py --dry-run
105105

106106
# فقط اصلاح فیلد Language-Team بدون دست‌زدن به اعتبارها
107107
python3 scripts/update_po_headers.py --no-credits \
108-
--language-team "Persian (https://github.com/revisto/python-docs-fa/)" \
108+
--language-team "Persian (https://github.com/python/python-docs-fa/)" \
109109
bugs.po tutorial/
110110

111111
# ادغام نام‌های جدید با فهرست موجود (نام‌های قبلی حذف نمی‌شوند)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@
4444

4545
<!-- STATS_START -->
4646
### مشارکت‌های کاربران
47-
![نمودار مشارکت‌های کاربران؛ Revisto 3984، sepehr-rs 1630، danialbehzadi 677، invincible627 358، khosro_o 63، ParhamF 41، Ariyan_Bolandi 37، nikovinix7878 13، thaghgoo 12، Ramiz_222 10](reports/contributor_stats_latest.png)
48-
(به‌روزرسانی: 2026-08-21)
47+
![نمودار مشارکت‌های کاربران؛ Revisto 3984، sepehr-rs 2210، danialbehzadi 677، invincible627 358، khosro_o 63، ParhamF 41، Ariyan_Bolandi 37، nikovinix7878 13، thaghgoo 12، Ramiz_222 10](reports/contributor_stats_latest.png)
48+
(به‌روزرسانی: 2026-08-27)
4949
<!-- STATS_END -->

0 commit comments

Comments
 (0)