| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,8 @@ concurrency: | |||
| 21 | 21 | jobs: | |
| 22 | 22 | sync: | |
| 23 | 23 | runs-on: ubuntu-latest | |
| 24 | + env: | ||
| 25 | + CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.7' }} | ||
| 24 | 26 | steps: | |
| 25 | 27 | - name: Checkout translation repo | |
| 26 | 28 | uses: actions/checkout@v4 | |
@@ -38,41 +40,12 @@ jobs: | |||
| 38 | 40 | - name: Install Python dependencies | |
| 39 | 41 | run: pip install sphinx sphinx-intl | |
| 40 | 42 | ||
| 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.7' }} \ | ||
| 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" | ||
| 76 | 49 | ||
| 77 | 50 | - name: Ensure translation label exists | |
| 78 | 51 | env: | |
@@ -87,7 +60,6 @@ jobs: | |||
| 87 | 60 | - name: Open issue for fuzzy strings | |
| 88 | 61 | env: | |
| 89 | 62 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 90 | - CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || 'v3.14.7' }} | ||
| 91 | 63 | run: | | |
| 92 | 64 | tmpfile=$(mktemp) | |
| 93 | 65 | while IFS= read -r f; do | |
@@ -130,41 +102,11 @@ jobs: | |||
| 130 | 102 | fi | |
| 131 | 103 | rm -f "$tmpfile" | |
| 132 | 104 | ||
| 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 | - | ||
| 152 | 105 | - name: Stage changes | |
| 153 | 106 | run: git add --all | |
| 154 | 107 | ||
| 155 | 108 | - 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 | ||
| 168 | 110 | ||
| 169 | 111 | - name: Commit if changed | |
| 170 | 112 | run: | | |
@@ -174,6 +116,5 @@ jobs: | |||
| 174 | 116 | echo "Nothing to commit, skipping." | |
| 175 | 117 | exit 0 | |
| 176 | 118 | fi | |
| 177 | - git commit -m \ | ||
| 178 | - "chore: sync msgids with CPython ${{ github.event.inputs.cpython_tag || 'v3.14.7' }}" | ||
| 119 | + git commit -m "chore: sync msgids with CPython $CPYTHON_TAG" | ||
| 179 | 120 | git push | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ msgid "" | |||
| 14 | 14 | msgstr "" | |
| 15 | 15 | "Project-Id-Version: Python 3.14\n" | |
| 16 | 16 | "Report-Msgid-Bugs-To: \n" | |
| 17 | - "POT-Creation-Date: 2026-08-25 20:39+0330\n" | ||
| 17 | + "POT-Creation-Date: 2026-08-26 03:59+0000\n" | ||
| 18 | 18 | "PO-Revision-Date: 2021-06-28 00:47+0000\n" | |
| 19 | 19 | "Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n" | |
| 20 | 20 | "Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n" | |
@@ -24,78 +24,32 @@ msgstr "" | |||
| 24 | 24 | "Content-Transfer-Encoding: 8bit\n" | |
| 25 | 25 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
| 26 | 26 | ||
| 27 | - #: ../../about.rst:3 | ||
| 28 | 27 | msgid "About this documentation" | |
| 29 | 28 | msgstr "دربارهٔ این مستندات" | |
| 30 | 29 | ||
| 31 | - #: ../../about.rst:6 | ||
| 32 | - msgid "" | ||
| 33 | - "Python's documentation is generated from `reStructuredText`_ sources using " | ||
| 34 | - "`Sphinx`_, a documentation generator originally created for Python and now " | ||
| 35 | - "maintained as an independent project." | ||
| 36 | - msgstr "" | ||
| 37 | - "مستندات پایتون از طریق منابع `reStructuredText`_ با استفاده از `Sphinx`_ " | ||
| 38 | - "تولید میشوند، که یک تولیدگر مستندات است که در ابتدا برای پایتون ساخته شد و " | ||
| 39 | - "اکنون بهعنوان یک پروژه مستقل نگهداری میشود." | ||
| 30 | + 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." | ||
| 31 | + msgstr "مستندات پایتون از طریق منابع `reStructuredText`_ با استفاده از `Sphinx`_ تولید میشوند، که یک تولیدگر مستندات است که در ابتدا برای پایتون ساخته شد و اکنون بهعنوان یک پروژه مستقل نگهداری میشود." | ||
| 40 | 32 | ||
| 41 | - #: ../../about.rst:16 | ||
| 42 | - msgid "" | ||
| 43 | - "Development of the documentation and its toolchain is an entirely volunteer " | ||
| 44 | - "effort, just like Python itself. If you want to contribute, please take a " | ||
| 45 | - "look at the :ref:`reporting-bugs` page for information on how to do so. New " | ||
| 46 | - "volunteers are always welcome!" | ||
| 47 | - msgstr "" | ||
| 48 | - "توسعهٔ مستندات و زنجیرهٔ ابزارهایش، همانند خود پایتون تلاشی کاملاً داوطلبانه " | ||
| 49 | - "است. اگر میخواهید مشارکت کنید برای اطّلاعات در مورد چگونگی آن نگاهی به " | ||
| 50 | - "صفحهٔ :ref:`reporting-bugs` بیندازید. همیشه از داوطلبان جدید استقبال میشود!" | ||
| 33 | + 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!" | ||
| 34 | + msgstr "توسعهٔ مستندات و زنجیرهٔ ابزارهایش، همانند خود پایتون تلاشی کاملاً داوطلبانه است. اگر میخواهید مشارکت کنید برای اطّلاعات در مورد چگونگی آن نگاهی به صفحهٔ :ref:`reporting-bugs` بیندازید. همیشه از داوطلبان جدید استقبال میشود!" | ||
| 51 | 35 | ||
| 52 | - #: ../../about.rst:21 | ||
| 53 | 36 | msgid "Many thanks go to:" | |
| 54 | 37 | msgstr "سپاس بسیار از:" | |
| 55 | 38 | ||
| 56 | - #: ../../about.rst:23 | ||
| 57 | - msgid "" | ||
| 58 | - "Fred L. Drake, Jr., the creator of the original Python documentation toolset " | ||
| 59 | - "and author of much of the content;" | ||
| 60 | - msgstr "" | ||
| 61 | - "فرد ال. درک جونیور خالق مجموعه ابزارهای اصلی مستندات پایتون و نویسنده بسیاری " | ||
| 62 | - "از محتواها:" | ||
| 39 | + msgid "Fred L. Drake, Jr., the creator of the original Python documentation toolset and author of much of the content;" | ||
| 40 | + msgstr "فرد ال. درک جونیور خالق مجموعه ابزارهای اصلی مستندات پایتون و نویسنده بسیاری از محتواها:" | ||
| 63 | 41 | ||
| 64 | - #: ../../about.rst:25 | ||
| 65 | - msgid "" | ||
| 66 | - "the `Docutils <https://docutils.sourceforge.io/>`_ project for creating " | ||
| 67 | - "reStructuredText and the Docutils suite;" | ||
| 68 | - msgstr "" | ||
| 69 | - "پروژه `Docutils <https://docutils.sourceforge.io/>`_ برای ایجاد " | ||
| 70 | - "reStructuredText و مجموعهٔ Docutils؛" | ||
| 42 | + msgid "the `Docutils <https://docutils.sourceforge.io/>`_ project for creating reStructuredText and the Docutils suite;" | ||
| 43 | + msgstr "پروژه `Docutils <https://docutils.sourceforge.io/>`_ برای ایجاد reStructuredText و مجموعهٔ Docutils؛" | ||
| 71 | 44 | ||
| 72 | - #: ../../about.rst:27 | ||
| 73 | - msgid "" | ||
| 74 | - "Fredrik Lundh for his Alternative Python Reference project from which Sphinx " | ||
| 75 | - "got many good ideas." | ||
| 76 | - msgstr "" | ||
| 77 | - "فردریک لوند (Fredrik Lundh) برای پروژهی \"Alternative Python Reference\" " | ||
| 78 | - "(مرجع جایگزین پایتون) که از آن بسیاری از ایدههای خوب برای Sphinx (اسفینکس) " | ||
| 79 | - "گرفته شد." | ||
| 45 | + msgid "Fredrik Lundh for his Alternative Python Reference project from which Sphinx got many good ideas." | ||
| 46 | + msgstr "فردریک لوند (Fredrik Lundh) برای پروژهی \"Alternative Python Reference\" (مرجع جایگزین پایتون) که از آن بسیاری از ایدههای خوب برای Sphinx (اسفینکس) گرفته شد." | ||
| 80 | 47 | ||
| 81 | - #: ../../about.rst:32 | ||
| 82 | 48 | msgid "Contributors to the Python documentation" | |
| 83 | 49 | msgstr "مشارکت کنندگان مستندات پایتون" | |
| 84 | 50 | ||
| 85 | - #: ../../about.rst:34 | ||
| 86 | - msgid "" | ||
| 87 | - "Many people have contributed to the Python language, the Python standard " | ||
| 88 | - "library, and the Python documentation. See :source:`Misc/ACKS` in the " | ||
| 89 | - "Python source distribution for a partial list of contributors." | ||
| 90 | - msgstr "" | ||
| 91 | - "افراد زیادی در توسعه زبان پایتون، کتابخانه استاندارد پایتون، و مستندات " | ||
| 92 | - "پایتون مشارکت داشتهاند. برای مشاهده فهرستی از برخی از این مشارکتکنندگان، " | ||
| 93 | - "به :source:`Misc/ACKS` در توزیع سورس پایتون مراجعه کنید." | ||
| 51 | + 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." | ||
| 52 | + msgstr "افراد زیادی در توسعه زبان پایتون، کتابخانه استاندارد پایتون، و مستندات پایتون مشارکت داشتهاند. برای مشاهده فهرستی از برخی از این مشارکتکنندگان، به :source:`Misc/ACKS` در توزیع سورس پایتون مراجعه کنید." | ||
| 94 | 53 | ||
| 95 | - #: ../../about.rst:38 | ||
| 96 | - msgid "" | ||
| 97 | - "It is only with the input and contributions of the Python community that " | ||
| 98 | - "Python has such wonderful documentation -- Thank You!" | ||
| 99 | - msgstr "" | ||
| 100 | - "فقط با مشارکتها و کمکهای جامعه پایتون است که پایتون چنین مستندات فوقالعادهای " | ||
| 101 | - "دارد -- سپاس از شما!" | ||
| 54 | + msgid "It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!" | ||
| 55 | + msgstr "فقط با مشارکتها و کمکهای جامعه پایتون است که پایتون چنین مستندات فوقالعادهای دارد -- سپاس از شما!" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments