diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 7922212f7..e71847c0d 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 with: repository: python/cpython - ref: 3.14 + ref: v3.14.6 - name: Set up Python uses: actions/setup-python@v4 @@ -40,10 +40,6 @@ jobs: uses: actions/checkout@v4 with: path: Doc/locales/fa/LC_MESSAGES - - - name: Pull latest translations - run: git pull - working-directory: ./Doc/locales/fa/LC_MESSAGES - name: Setup problem matcher uses: sphinx-doc/github-problem-matcher@v1.1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d5a713241..ac706acda 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,8 +23,8 @@ jobs: with: python-version: '3.11' - - name: Install sphinx-lint - run: pip install sphinx-lint + - name: Install sphinx-lint and polib + run: pip install sphinx-lint polib - name: Install gettext tools run: sudo apt-get install -y gettext diff --git a/.github/workflows/translation-status.yml b/.github/workflows/translation-status.yml new file mode 100644 index 000000000..ad26bdfe8 --- /dev/null +++ b/.github/workflows/translation-status.yml @@ -0,0 +1,33 @@ +name: Update Translation Status + +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: {} + +permissions: + contents: write + +jobs: + update-status: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: pip install polib + + - run: python3 scripts/generate_status_table.py + + - name: Commit if changed + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add RESOURCE.md + git diff --staged --quiet || git commit -m "Update translation status table" + git push \ No newline at end of file diff --git a/RESOURCE.md b/RESOURCE.md index 2e2c9efda..9ff2e2920 100644 --- a/RESOURCE.md +++ b/RESOURCE.md @@ -1,523 +1,542 @@ -| File | Translated | Reviewed | Proofread | -|:-----|:-----------:|:-----------:|:-----------:| -| about.po | 100.0% | 100.0% | 0.0% | -| bugs.po | 100.0% | 100.0% | 0.0% | -| c-api/abstract.po | 100.0% | 100.0% | 0.0% | -| tutorial/appendix.po | 100.0% | 100.0% | 0.0% | -| tutorial/index.po | 77.0% | 77.0% | 0.0% | -| tutorial/classes.po | 98.9% | 20.6% | 0.0% | -| tutorial/errors.po | 98.9% | 18.8% | 0.0% | -| c-api/allocation.po | 21.0% | 12.1% | 0.0% | -| library/functions.po | 98.1% | 6.9% | 0.0% | -| c-api/dict.po | 1.0% | 0.6% | 0.0% | -| library/json.po | 0.4% | 0.1% | 0.0% | -| tutorial/appetite.po | 100.0% | 0.0% | 0.0% | -| tutorial/datastructures.po | 100.0% | 0.0% | 0.0% | -| tutorial/floatingpoint.po | 100.0% | 0.0% | 0.0% | -| tutorial/whatnow.po | 100.0% | 0.0% | 0.0% | -| tutorial/venv.po | 99.9% | 0.0% | 0.0% | -| tutorial/modules.po | 98.3% | 0.0% | 0.0% | -| tutorial/stdlib.po | 97.7% | 0.0% | 0.0% | -| tutorial/introduction.po | 97.5% | 0.0% | 0.0% | -| tutorial/interpreter.po | 97.4% | 0.0% | 0.0% | -| tutorial/controlflow.po | 97.0% | 0.0% | 0.0% | -| tutorial/inputoutput.po | 96.8% | 0.0% | 0.0% | -| tutorial/stdlib2.po | 94.3% | 0.0% | 0.0% | -| library/stdtypes.po | 92.3% | 0.0% | 0.0% | -| tutorial/interactive.po | 77.2% | 0.0% | 0.0% | -| c-api/apiabiversion.po | 58.4% | 0.0% | 0.0% | -| extending/newtypes_tutorial.po | 4.6% | 0.0% | 0.0% | -| library/datetime.po | 3.3% | 0.0% | 0.0% | -| library/pwd.po | 3.1% | 0.0% | 0.0% | -| c-api/utilities.po | 2.8% | 0.0% | 0.0% | -| library/grp.po | 2.6% | 0.0% | 0.0% | -| c-api/concrete.po | 2.2% | 0.0% | 0.0% | -| whatsnew/3_10.po | 2.1% | 0.0% | 0.0% | -| copyright.po | 2.0% | 0.0% | 0.0% | -| sphinx.po | 2.0% | 0.0% | 0.0% | -| library/fnmatch.po | 2.0% | 0.0% | 0.0% | -| library/zipimport.po | 1.9% | 0.0% | 0.0% | -| library/tomllib.po | 1.9% | 0.0% | 0.0% | -| library/internet.po | 1.8% | 0.0% | 0.0% | -| c-api/exceptions.po | 1.7% | 0.0% | 0.0% | -| reference/toplevel_components.po | 1.6% | 0.0% | 0.0% | -| c-api/method.po | 1.5% | 0.0% | 0.0% | -| c-api/none.po | 1.5% | 0.0% | 0.0% | -| glossary.po | 1.4% | 0.0% | 0.0% | -| c-api/bytearray.po | 1.3% | 0.0% | 0.0% | -| library/array.po | 1.3% | 0.0% | 0.0% | -| library/io.po | 1.3% | 0.0% | 0.0% | -| reference/simple_stmts.po | 1.3% | 0.0% | 0.0% | -| library/linecache.po | 1.2% | 0.0% | 0.0% | -| library/marshal.po | 1.2% | 0.0% | 0.0% | -| c-api/memory.po | 1.1% | 0.0% | 0.0% | -| library/copyreg.po | 1.1% | 0.0% | 0.0% | -| library/glob.po | 1.1% | 0.0% | 0.0% | -| c-api/bytes.po | 1.0% | 0.0% | 0.0% | -| c-api/set.po | 1.0% | 0.0% | 0.0% | -| library/struct.po | 1.0% | 0.0% | 0.0% | -| reference/expressions.po | 1.0% | 0.0% | 0.0% | -| c-api/list.po | 0.9% | 0.0% | 0.0% | -| c-api/unicode.po | 0.9% | 0.0% | 0.0% | -| howto/pyporting.po | 0.8% | 0.0% | 0.0% | -| library/html_entities.po | 0.8% | 0.0% | 0.0% | -| library/string.po | 0.8% | 0.0% | 0.0% | -| c-api/arg.po | 0.7% | 0.0% | 0.0% | -| c-api/mapping.po | 0.7% | 0.0% | 0.0% | -| c-api/memoryview.po | 0.7% | 0.0% | 0.0% | -| library/curses_ascii.po | 0.7% | 0.0% | 0.0% | -| library/site.po | 0.7% | 0.0% | 0.0% | -| library/types.po | 0.7% | 0.0% | 0.0% | -| c-api/code.po | 0.6% | 0.0% | 0.0% | -| c-api/init_config.po | 0.6% | 0.0% | 0.0% | -| c-api/typeobj.po | 0.6% | 0.0% | 0.0% | -| library/asyncio-exceptions.po | 0.6% | 0.0% | 0.0% | -| library/constants.po | 0.6% | 0.0% | 0.0% | -| library/termios.po | 0.6% | 0.0% | 0.0% | -| library/webbrowser.po | 0.6% | 0.0% | 0.0% | -| reference/compound_stmts.po | 0.6% | 0.0% | 0.0% | -| reference/lexical_analysis.po | 0.6% | 0.0% | 0.0% | -| c-api/complex.po | 0.5% | 0.0% | 0.0% | -| c-api/sequence.po | 0.5% | 0.0% | 0.0% | -| library/asyncio-api-index.po | 0.5% | 0.0% | 0.0% | -| library/colorsys.po | 0.5% | 0.0% | 0.0% | -| library/heapq.po | 0.5% | 0.0% | 0.0% | -| library/posix.po | 0.5% | 0.0% | 0.0% | -| library/pprint.po | 0.5% | 0.0% | 0.0% | -| reference/datamodel.po | 0.5% | 0.0% | 0.0% | -| using/unix.po | 0.5% | 0.0% | 0.0% | -| c-api/buffer.po | 0.4% | 0.0% | 0.0% | -| c-api/file.po | 0.4% | 0.0% | 0.0% | -| howto/curses.po | 0.4% | 0.0% | 0.0% | -| library/asyncio-llapi-index.po | 0.4% | 0.0% | 0.0% | -| library/devmode.po | 0.4% | 0.0% | 0.0% | -| library/functools.po | 0.4% | 0.0% | 0.0% | -| library/gettext.po | 0.4% | 0.0% | 0.0% | -| library/http_cookiejar.po | 0.4% | 0.0% | 0.0% | -| library/pyclbr.po | 0.4% | 0.0% | 0.0% | -| library/rlcompleter.po | 0.4% | 0.0% | 0.0% | -| library/selectors.po | 0.4% | 0.0% | 0.0% | -| library/time.po | 0.4% | 0.0% | 0.0% | -| library/winsound.po | 0.4% | 0.0% | 0.0% | -| license.po | 0.3% | 0.0% | 0.0% | -| c-api/float.po | 0.3% | 0.0% | 0.0% | -| c-api/function.po | 0.3% | 0.0% | 0.0% | -| c-api/import.po | 0.3% | 0.0% | 0.0% | -| c-api/init.po | 0.3% | 0.0% | 0.0% | -| c-api/number.po | 0.3% | 0.0% | 0.0% | -| c-api/reflection.po | 0.3% | 0.0% | 0.0% | -| faq/gui.po | 0.3% | 0.0% | 0.0% | -| library/asyncio-queue.po | 0.3% | 0.0% | 0.0% | -| library/contextvars.po | 0.3% | 0.0% | 0.0% | -| library/curses_panel.po | 0.3% | 0.0% | 0.0% | -| library/email_encoders.po | 0.3% | 0.0% | 0.0% | -| library/os_path.po | 0.3% | 0.0% | 0.0% | -| library/plistlib.po | 0.3% | 0.0% | 0.0% | -| library/re.po | 0.3% | 0.0% | 0.0% | -| library/unicodedata.po | 0.3% | 0.0% | 0.0% | -| library/warnings.po | 0.3% | 0.0% | 0.0% | -| reference/executionmodel.po | 0.3% | 0.0% | 0.0% | -| c-api/time.po | 0.3% | 0.0% | 0.0% | -| c-api/contextvars.po | 0.2% | 0.0% | 0.0% | -| c-api/intro.po | 0.2% | 0.0% | 0.0% | -| c-api/object.po | 0.2% | 0.0% | 0.0% | -| c-api/refcounting.po | 0.2% | 0.0% | 0.0% | -| c-api/tuple.po | 0.2% | 0.0% | 0.0% | -| c-api/type.po | 0.2% | 0.0% | 0.0% | -| extending/newtypes.po | 0.2% | 0.0% | 0.0% | -| faq/library.po | 0.2% | 0.0% | 0.0% | -| faq/programming.po | 0.2% | 0.0% | 0.0% | -| howto/descriptor.po | 0.2% | 0.0% | 0.0% | -| howto/instrumentation.po | 0.2% | 0.0% | 0.0% | -| howto/ipaddress.po | 0.2% | 0.0% | 0.0% | -| howto/sorting.po | 0.2% | 0.0% | 0.0% | -| howto/urllib2.po | 0.2% | 0.0% | 0.0% | -| library/asyncio-subprocess.po | 0.2% | 0.0% | 0.0% | -| library/cmath.po | 0.2% | 0.0% | 0.0% | -| library/copy.po | 0.2% | 0.0% | 0.0% | -| library/enum.po | 0.2% | 0.0% | 0.0% | -| library/inspect.po | 0.2% | 0.0% | 0.0% | -| library/operator.po | 0.2% | 0.0% | 0.0% | -| library/os.po | 0.2% | 0.0% | 0.0% | -| library/pty.po | 0.2% | 0.0% | 0.0% | -| library/sched.po | 0.2% | 0.0% | 0.0% | -| library/shelve.po | 0.2% | 0.0% | 0.0% | -| library/symtable.po | 0.2% | 0.0% | 0.0% | -| library/syslog.po | 0.2% | 0.0% | 0.0% | -| library/textwrap.po | 0.2% | 0.0% | 0.0% | -| library/tkinter.po | 0.2% | 0.0% | 0.0% | -| library/tkinter_ttk.po | 0.2% | 0.0% | 0.0% | -| library/tokenize.po | 0.2% | 0.0% | 0.0% | -| library/urllib_parse.po | 0.2% | 0.0% | 0.0% | -| library/uuid.po | 0.2% | 0.0% | 0.0% | -| library/winreg.po | 0.2% | 0.0% | 0.0% | -| library/xml_dom_pulldom.po | 0.2% | 0.0% | 0.0% | -| reference/introduction.po | 0.2% | 0.0% | 0.0% | -| whatsnew/2_1.po | 0.2% | 0.0% | 0.0% | -| whatsnew/3_3.po | 0.2% | 0.0% | 0.0% | -| library/asyncio-runner.po | 0.2% | 0.0% | 0.0% | -| howto/timerfd.po | 0.2% | 0.0% | 0.0% | -| c-api/call.po | 0.1% | 0.0% | 0.0% | -| c-api/capsule.po | 0.1% | 0.0% | 0.0% | -| c-api/long.po | 0.1% | 0.0% | 0.0% | -| c-api/module.po | 0.1% | 0.0% | 0.0% | -| c-api/structures.po | 0.1% | 0.0% | 0.0% | -| extending/embedding.po | 0.1% | 0.0% | 0.0% | -| faq/extending.po | 0.1% | 0.0% | 0.0% | -| faq/general.po | 0.1% | 0.0% | 0.0% | -| faq/windows.po | 0.1% | 0.0% | 0.0% | -| howto/annotations.po | 0.1% | 0.0% | 0.0% | -| howto/argparse.po | 0.1% | 0.0% | 0.0% | -| howto/enum.po | 0.1% | 0.0% | 0.0% | -| howto/functional.po | 0.1% | 0.0% | 0.0% | -| howto/regex.po | 0.1% | 0.0% | 0.0% | -| howto/sockets.po | 0.1% | 0.0% | 0.0% | -| library/_thread.po | 0.1% | 0.0% | 0.0% | -| library/abc.po | 0.1% | 0.0% | 0.0% | -| library/argparse.po | 0.1% | 0.0% | 0.0% | -| library/asyncio-dev.po | 0.1% | 0.0% | 0.0% | -| library/asyncio-protocol.po | 0.1% | 0.0% | 0.0% | -| library/asyncio-stream.po | 0.1% | 0.0% | 0.0% | -| library/asyncio-sync.po | 0.1% | 0.0% | 0.0% | -| library/binascii.po | 0.1% | 0.0% | 0.0% | -| library/bisect.po | 0.1% | 0.0% | 0.0% | -| library/codecs.po | 0.1% | 0.0% | 0.0% | -| library/collections_abc.po | 0.1% | 0.0% | 0.0% | -| library/configparser.po | 0.1% | 0.0% | 0.0% | -| library/contextlib.po | 0.1% | 0.0% | 0.0% | -| library/csv.po | 0.1% | 0.0% | 0.0% | -| library/ctypes.po | 0.1% | 0.0% | 0.0% | -| library/curses.po | 0.1% | 0.0% | 0.0% | -| library/dbm.po | 0.1% | 0.0% | 0.0% | -| library/difflib.po | 0.1% | 0.0% | 0.0% | -| library/dis.po | 0.1% | 0.0% | 0.0% | -| library/doctest.po | 0.1% | 0.0% | 0.0% | -| library/email_contentmanager.po | 0.1% | 0.0% | 0.0% | -| library/email_examples.po | 0.1% | 0.0% | 0.0% | -| library/email_generator.po | 0.1% | 0.0% | 0.0% | -| library/email_headerregistry.po | 0.1% | 0.0% | 0.0% | -| library/email_utils.po | 0.1% | 0.0% | 0.0% | -| library/exceptions.po | 0.1% | 0.0% | 0.0% | -| library/faulthandler.po | 0.1% | 0.0% | 0.0% | -| library/fcntl.po | 0.1% | 0.0% | 0.0% | -| library/ftplib.po | 0.1% | 0.0% | 0.0% | -| library/graphlib.po | 0.1% | 0.0% | 0.0% | -| library/hashlib.po | 0.1% | 0.0% | 0.0% | -| library/html_parser.po | 0.1% | 0.0% | 0.0% | -| library/http_client.po | 0.1% | 0.0% | 0.0% | -| library/http_cookies.po | 0.1% | 0.0% | 0.0% | -| library/http.po | 0.1% | 0.0% | 0.0% | -| library/imaplib.po | 0.1% | 0.0% | 0.0% | -| library/importlib_metadata.po | 0.1% | 0.0% | 0.0% | -| library/importlib.po | 0.1% | 0.0% | 0.0% | -| library/intro.po | 0.1% | 0.0% | 0.0% | -| library/itertools.po | 0.1% | 0.0% | 0.0% | -| library/locale.po | 0.1% | 0.0% | 0.0% | -| library/logging.po | 0.1% | 0.0% | 0.0% | -| library/mailbox.po | 0.1% | 0.0% | 0.0% | -| library/math.po | 0.1% | 0.0% | 0.0% | -| library/mimetypes.po | 0.1% | 0.0% | 0.0% | -| library/multiprocessing_shared_memory.po | 0.1% | 0.0% | 0.0% | -| library/optparse.po | 0.1% | 0.0% | 0.0% | -| library/pathlib.po | 0.1% | 0.0% | 0.0% | -| library/pdb.po | 0.1% | 0.0% | 0.0% | -| library/pickle.po | 0.1% | 0.0% | 0.0% | -| library/pkgutil.po | 0.1% | 0.0% | 0.0% | -| library/platform.po | 0.1% | 0.0% | 0.0% | -| library/poplib.po | 0.1% | 0.0% | 0.0% | -| library/py_compile.po | 0.1% | 0.0% | 0.0% | -| library/pydoc.po | 0.1% | 0.0% | 0.0% | -| library/pyexpat.po | 0.1% | 0.0% | 0.0% | -| library/readline.po | 0.1% | 0.0% | 0.0% | -| library/reprlib.po | 0.1% | 0.0% | 0.0% | -| library/resource.po | 0.1% | 0.0% | 0.0% | -| library/runpy.po | 0.1% | 0.0% | 0.0% | -| library/smtplib.po | 0.1% | 0.0% | 0.0% | -| library/socket.po | 0.1% | 0.0% | 0.0% | -| library/sqlite3.po | 0.1% | 0.0% | 0.0% | -| library/ssl.po | 0.1% | 0.0% | 0.0% | -| library/stat.po | 0.1% | 0.0% | 0.0% | -| library/subprocess.po | 0.1% | 0.0% | 0.0% | -| library/sys.po | 0.1% | 0.0% | 0.0% | -| library/tempfile.po | 0.1% | 0.0% | 0.0% | -| library/threading.po | 0.1% | 0.0% | 0.0% | -| library/timeit.po | 0.1% | 0.0% | 0.0% | -| library/traceback.po | 0.1% | 0.0% | 0.0% | -| library/tracemalloc.po | 0.1% | 0.0% | 0.0% | -| library/turtle.po | 0.1% | 0.0% | 0.0% | -| library/xml_dom_minidom.po | 0.1% | 0.0% | 0.0% | -| library/xml_etree_elementtree.po | 0.1% | 0.0% | 0.0% | -| library/xmlrpc_server.po | 0.1% | 0.0% | 0.0% | -| library/zipapp.po | 0.1% | 0.0% | 0.0% | -| library/zoneinfo.po | 0.1% | 0.0% | 0.0% | -| reference/import.po | 0.1% | 0.0% | 0.0% | -| using/windows.po | 0.1% | 0.0% | 0.0% | -| whatsnew/2_0.po | 0.1% | 0.0% | 0.0% | -| whatsnew/2_3.po | 0.1% | 0.0% | 0.0% | -| whatsnew/2_5.po | 0.1% | 0.0% | 0.0% | -| whatsnew/3_5.po | 0.1% | 0.0% | 0.0% | -| whatsnew/3_6.po | 0.1% | 0.0% | 0.0% | -| whatsnew/3_9.po | 0.1% | 0.0% | 0.0% | -| howto/isolating-extensions.po | 0.1% | 0.0% | 0.0% | -| whatsnew/3_11.po | 0.1% | 0.0% | 0.0% | -| howto/perf_profiling.po | 0.1% | 0.0% | 0.0% | -| howto/gdb_helpers.po | 0.1% | 0.0% | 0.0% | -| howto/mro.po | 0.1% | 0.0% | 0.0% | -| whatsnew/3_13.po | 0.1% | 0.0% | 0.0% | -| howto/free-threading-python.po | 0.1% | 0.0% | 0.0% | -| library/annotationlib.po | 0.1% | 0.0% | 0.0% | -| c-api/lifecycle.po | 0.1% | 0.0% | 0.0% | -| library/compression_zstd.po | 0.1% | 0.0% | 0.0% | -| library/concurrent_interpreters.po | 0.1% | 0.0% | 0.0% | -| contents.po | 0.0% | 0.0% | 0.0% | -| c-api/bool.po | 0.0% | 0.0% | 0.0% | -| c-api/cell.po | 0.0% | 0.0% | 0.0% | -| c-api/codec.po | 0.0% | 0.0% | 0.0% | -| c-api/conversion.po | 0.0% | 0.0% | 0.0% | -| c-api/coro.po | 0.0% | 0.0% | 0.0% | -| c-api/datetime.po | 0.0% | 0.0% | 0.0% | -| c-api/descriptor.po | 0.0% | 0.0% | 0.0% | -| c-api/gcsupport.po | 0.0% | 0.0% | 0.0% | -| c-api/gen.po | 0.0% | 0.0% | 0.0% | -| c-api/index.po | 0.0% | 0.0% | 0.0% | -| c-api/iter.po | 0.0% | 0.0% | 0.0% | -| c-api/iterator.po | 0.0% | 0.0% | 0.0% | -| c-api/marshal.po | 0.0% | 0.0% | 0.0% | -| c-api/objimpl.po | 0.0% | 0.0% | 0.0% | -| c-api/slice.po | 0.0% | 0.0% | 0.0% | -| c-api/stable.po | 0.0% | 0.0% | 0.0% | -| c-api/sys.po | 0.0% | 0.0% | 0.0% | -| c-api/typehints.po | 0.0% | 0.0% | 0.0% | -| c-api/veryhigh.po | 0.0% | 0.0% | 0.0% | -| c-api/weakref.po | 0.0% | 0.0% | 0.0% | -| distributing/index.po | 0.0% | 0.0% | 0.0% | -| extending/building.po | 0.0% | 0.0% | 0.0% | -| extending/extending.po | 0.0% | 0.0% | 0.0% | -| extending/index.po | 0.0% | 0.0% | 0.0% | -| extending/windows.po | 0.0% | 0.0% | 0.0% | -| faq/design.po | 0.0% | 0.0% | 0.0% | -| faq/index.po | 0.0% | 0.0% | 0.0% | -| faq/installed.po | 0.0% | 0.0% | 0.0% | -| howto/clinic.po | 0.0% | 0.0% | 0.0% | -| howto/cporting.po | 0.0% | 0.0% | 0.0% | -| howto/index.po | 0.0% | 0.0% | 0.0% | -| howto/logging-cookbook.po | 0.0% | 0.0% | 0.0% | -| howto/logging.po | 0.0% | 0.0% | 0.0% | -| howto/unicode.po | 0.0% | 0.0% | 0.0% | -| installing/index.po | 0.0% | 0.0% | 0.0% | -| library/__future__.po | 0.0% | 0.0% | 0.0% | -| library/__main__.po | 0.0% | 0.0% | 0.0% | -| library/allos.po | 0.0% | 0.0% | 0.0% | -| library/archiving.po | 0.0% | 0.0% | 0.0% | -| library/ast.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-eventloop.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-future.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-platforms.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-policy.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-task.po | 0.0% | 0.0% | 0.0% | -| library/asyncio.po | 0.0% | 0.0% | 0.0% | -| library/atexit.po | 0.0% | 0.0% | 0.0% | -| library/audit_events.po | 0.0% | 0.0% | 0.0% | -| library/base64.po | 0.0% | 0.0% | 0.0% | -| library/bdb.po | 0.0% | 0.0% | 0.0% | -| library/binary.po | 0.0% | 0.0% | 0.0% | -| library/builtins.po | 0.0% | 0.0% | 0.0% | -| library/bz2.po | 0.0% | 0.0% | 0.0% | -| library/calendar.po | 0.0% | 0.0% | 0.0% | -| library/cmd.po | 0.0% | 0.0% | 0.0% | -| library/code.po | 0.0% | 0.0% | 0.0% | -| library/codeop.po | 0.0% | 0.0% | 0.0% | -| library/collections.po | 0.0% | 0.0% | 0.0% | -| library/compileall.po | 0.0% | 0.0% | 0.0% | -| library/concurrency.po | 0.0% | 0.0% | 0.0% | -| library/concurrent_futures.po | 0.0% | 0.0% | 0.0% | -| library/concurrent.po | 0.0% | 0.0% | 0.0% | -| library/crypto.po | 0.0% | 0.0% | 0.0% | -| library/custominterp.po | 0.0% | 0.0% | 0.0% | -| library/dataclasses.po | 0.0% | 0.0% | 0.0% | -| library/datatypes.po | 0.0% | 0.0% | 0.0% | -| library/debug.po | 0.0% | 0.0% | 0.0% | -| library/decimal.po | 0.0% | 0.0% | 0.0% | -| library/development.po | 0.0% | 0.0% | 0.0% | -| library/dialog.po | 0.0% | 0.0% | 0.0% | -| library/distribution.po | 0.0% | 0.0% | 0.0% | -| library/email_charset.po | 0.0% | 0.0% | 0.0% | -| library/email_compat32-message.po | 0.0% | 0.0% | 0.0% | -| library/email_errors.po | 0.0% | 0.0% | 0.0% | -| library/email_header.po | 0.0% | 0.0% | 0.0% | -| library/email_iterators.po | 0.0% | 0.0% | 0.0% | -| library/email_message.po | 0.0% | 0.0% | 0.0% | -| library/email_mime.po | 0.0% | 0.0% | 0.0% | -| library/email_parser.po | 0.0% | 0.0% | 0.0% | -| library/email_policy.po | 0.0% | 0.0% | 0.0% | -| library/email.po | 0.0% | 0.0% | 0.0% | -| library/ensurepip.po | 0.0% | 0.0% | 0.0% | -| library/errno.po | 0.0% | 0.0% | 0.0% | -| library/filecmp.po | 0.0% | 0.0% | 0.0% | -| library/fileformats.po | 0.0% | 0.0% | 0.0% | -| library/fileinput.po | 0.0% | 0.0% | 0.0% | -| library/filesys.po | 0.0% | 0.0% | 0.0% | -| library/fractions.po | 0.0% | 0.0% | 0.0% | -| library/frameworks.po | 0.0% | 0.0% | 0.0% | -| library/functional.po | 0.0% | 0.0% | 0.0% | -| library/gc.po | 0.0% | 0.0% | 0.0% | -| library/getopt.po | 0.0% | 0.0% | 0.0% | -| library/getpass.po | 0.0% | 0.0% | 0.0% | -| library/gzip.po | 0.0% | 0.0% | 0.0% | -| library/hmac.po | 0.0% | 0.0% | 0.0% | -| library/html.po | 0.0% | 0.0% | 0.0% | -| library/http_server.po | 0.0% | 0.0% | 0.0% | -| library/i18n.po | 0.0% | 0.0% | 0.0% | -| library/idle.po | 0.0% | 0.0% | 0.0% | -| library/index.po | 0.0% | 0.0% | 0.0% | -| library/ipaddress.po | 0.0% | 0.0% | 0.0% | -| library/ipc.po | 0.0% | 0.0% | 0.0% | -| library/keyword.po | 0.0% | 0.0% | 0.0% | -| library/language.po | 0.0% | 0.0% | 0.0% | -| library/logging_config.po | 0.0% | 0.0% | 0.0% | -| library/logging_handlers.po | 0.0% | 0.0% | 0.0% | -| library/lzma.po | 0.0% | 0.0% | 0.0% | -| library/markup.po | 0.0% | 0.0% | 0.0% | -| library/mm.po | 0.0% | 0.0% | 0.0% | -| library/mmap.po | 0.0% | 0.0% | 0.0% | -| library/modulefinder.po | 0.0% | 0.0% | 0.0% | -| library/modules.po | 0.0% | 0.0% | 0.0% | -| library/msvcrt.po | 0.0% | 0.0% | 0.0% | -| library/multiprocessing.po | 0.0% | 0.0% | 0.0% | -| library/netdata.po | 0.0% | 0.0% | 0.0% | -| library/netrc.po | 0.0% | 0.0% | 0.0% | -| library/numbers.po | 0.0% | 0.0% | 0.0% | -| library/numeric.po | 0.0% | 0.0% | 0.0% | -| library/persistence.po | 0.0% | 0.0% | 0.0% | -| library/pickletools.po | 0.0% | 0.0% | 0.0% | -| library/profile.po | 0.0% | 0.0% | 0.0% | -| library/python.po | 0.0% | 0.0% | 0.0% | -| library/queue.po | 0.0% | 0.0% | 0.0% | -| library/quopri.po | 0.0% | 0.0% | 0.0% | -| library/random.po | 0.0% | 0.0% | 0.0% | -| library/secrets.po | 0.0% | 0.0% | 0.0% | -| library/select.po | 0.0% | 0.0% | 0.0% | -| library/shlex.po | 0.0% | 0.0% | 0.0% | -| library/shutil.po | 0.0% | 0.0% | 0.0% | -| library/signal.po | 0.0% | 0.0% | 0.0% | -| library/socketserver.po | 0.0% | 0.0% | 0.0% | -| library/statistics.po | 0.0% | 0.0% | 0.0% | -| library/stringprep.po | 0.0% | 0.0% | 0.0% | -| library/superseded.po | 0.0% | 0.0% | 0.0% | -| library/sysconfig.po | 0.0% | 0.0% | 0.0% | -| library/tabnanny.po | 0.0% | 0.0% | 0.0% | -| library/tarfile.po | 0.0% | 0.0% | 0.0% | -| library/test.po | 0.0% | 0.0% | 0.0% | -| library/text.po | 0.0% | 0.0% | 0.0% | -| library/tk.po | 0.0% | 0.0% | 0.0% | -| library/tkinter_colorchooser.po | 0.0% | 0.0% | 0.0% | -| library/tkinter_dnd.po | 0.0% | 0.0% | 0.0% | -| library/tkinter_font.po | 0.0% | 0.0% | 0.0% | -| library/tkinter_messagebox.po | 0.0% | 0.0% | 0.0% | -| library/tkinter_scrolledtext.po | 0.0% | 0.0% | 0.0% | -| library/token.po | 0.0% | 0.0% | 0.0% | -| library/trace.po | 0.0% | 0.0% | 0.0% | -| library/tty.po | 0.0% | 0.0% | 0.0% | -| library/typing.po | 0.0% | 0.0% | 0.0% | -| library/unittest_mock-examples.po | 0.0% | 0.0% | 0.0% | -| library/unittest_mock.po | 0.0% | 0.0% | 0.0% | -| library/unittest.po | 0.0% | 0.0% | 0.0% | -| library/unix.po | 0.0% | 0.0% | 0.0% | -| library/urllib_error.po | 0.0% | 0.0% | 0.0% | -| library/urllib.po | 0.0% | 0.0% | 0.0% | -| library/urllib_request.po | 0.0% | 0.0% | 0.0% | -| library/urllib_robotparser.po | 0.0% | 0.0% | 0.0% | -| library/venv.po | 0.0% | 0.0% | 0.0% | -| library/wave.po | 0.0% | 0.0% | 0.0% | -| library/weakref.po | 0.0% | 0.0% | 0.0% | -| library/windows.po | 0.0% | 0.0% | 0.0% | -| library/wsgiref.po | 0.0% | 0.0% | 0.0% | -| library/xml_dom.po | 0.0% | 0.0% | 0.0% | -| library/xml.po | 0.0% | 0.0% | 0.0% | -| library/xml_sax_handler.po | 0.0% | 0.0% | 0.0% | -| library/xml_sax.po | 0.0% | 0.0% | 0.0% | -| library/xml_sax_reader.po | 0.0% | 0.0% | 0.0% | -| library/xml_sax_utils.po | 0.0% | 0.0% | 0.0% | -| library/xmlrpc_client.po | 0.0% | 0.0% | 0.0% | -| library/xmlrpc.po | 0.0% | 0.0% | 0.0% | -| library/zipfile.po | 0.0% | 0.0% | 0.0% | -| library/zlib.po | 0.0% | 0.0% | 0.0% | -| reference/grammar.po | 0.0% | 0.0% | 0.0% | -| reference/index.po | 0.0% | 0.0% | 0.0% | -| using/cmdline.po | 0.0% | 0.0% | 0.0% | -| using/configure.po | 0.0% | 0.0% | 0.0% | -| using/editors.po | 0.0% | 0.0% | 0.0% | -| using/index.po | 0.0% | 0.0% | 0.0% | -| using/mac.po | 0.0% | 0.0% | 0.0% | -| whatsnew/2_2.po | 0.0% | 0.0% | 0.0% | -| whatsnew/2_4.po | 0.0% | 0.0% | 0.0% | -| whatsnew/2_6.po | 0.0% | 0.0% | 0.0% | -| whatsnew/2_7.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_0.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_1.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_2.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_4.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_7.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_8.po | 0.0% | 0.0% | 0.0% | -| whatsnew/changelog.po | 0.0% | 0.0% | 0.0% | -| whatsnew/index.po | 0.0% | 0.0% | 0.0% | -| library/security_warnings.po | 0.0% | 0.0% | 0.0% | -| c-api/frame.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-extending.po | 0.0% | 0.0% | 0.0% | -| library/importlib_resources.po | 0.0% | 0.0% | 0.0% | -| library/importlib_resources_abc.po | 0.0% | 0.0% | 0.0% | -| library/sys_path_init.po | 0.0% | 0.0% | 0.0% | -| c-api/perfmaps.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_12.po | 0.0% | 0.0% | 0.0% | -| library/sys_monitoring.po | 0.0% | 0.0% | 0.0% | -| library/cmdline.po | 0.0% | 0.0% | 0.0% | -| c-api/hash.po | 0.0% | 0.0% | 0.0% | -| c-api/monitoring.po | 0.0% | 0.0% | 0.0% | -| using/ios.po | 0.0% | 0.0% | 0.0% | -| howto/free-threading-extensions.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_14.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_15.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_16.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-future.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_13.po | 0.0% | 0.0% | 0.0% | -| deprecations/index.po | 0.0% | 0.0% | 0.0% | -| deprecations/c-api-pending-removal-in-3_14.po | 0.0% | 0.0% | 0.0% | -| deprecations/c-api-pending-removal-in-3_15.po | 0.0% | 0.0% | 0.0% | -| deprecations/c-api-pending-removal-in-future.po | 0.0% | 0.0% | 0.0% | -| using/android.po | 0.0% | 0.0% | 0.0% | -| howto/argparse-optparse.po | 0.0% | 0.0% | 0.0% | -| library/aifc.po | 0.0% | 0.0% | 0.0% | -| library/asynchat.po | 0.0% | 0.0% | 0.0% | -| library/asyncore.po | 0.0% | 0.0% | 0.0% | -| library/audioop.po | 0.0% | 0.0% | 0.0% | -| library/cgi.po | 0.0% | 0.0% | 0.0% | -| library/cgitb.po | 0.0% | 0.0% | 0.0% | -| library/chunk.po | 0.0% | 0.0% | 0.0% | -| library/crypt.po | 0.0% | 0.0% | 0.0% | -| library/distutils.po | 0.0% | 0.0% | 0.0% | -| library/imghdr.po | 0.0% | 0.0% | 0.0% | -| library/imp.po | 0.0% | 0.0% | 0.0% | -| library/mailcap.po | 0.0% | 0.0% | 0.0% | -| library/msilib.po | 0.0% | 0.0% | 0.0% | -| library/nntplib.po | 0.0% | 0.0% | 0.0% | -| library/nis.po | 0.0% | 0.0% | 0.0% | -| library/ossaudiodev.po | 0.0% | 0.0% | 0.0% | -| library/pipes.po | 0.0% | 0.0% | 0.0% | -| library/removed.po | 0.0% | 0.0% | 0.0% | -| library/smtpd.po | 0.0% | 0.0% | 0.0% | -| library/sndhdr.po | 0.0% | 0.0% | 0.0% | -| library/spwd.po | 0.0% | 0.0% | 0.0% | -| library/sunau.po | 0.0% | 0.0% | 0.0% | -| library/telnetlib.po | 0.0% | 0.0% | 0.0% | -| library/uu.po | 0.0% | 0.0% | 0.0% | -| library/xdrlib.po | 0.0% | 0.0% | 0.0% | -| library/cmdlinelibs.po | 0.0% | 0.0% | 0.0% | -| deprecations/c-api-pending-removal-in-3_18.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_17.po | 0.0% | 0.0% | 0.0% | -| deprecations/pending-removal-in-3_19.po | 0.0% | 0.0% | 0.0% | -| howto/remote_debugging.po | 0.0% | 0.0% | 0.0% | -| library/asyncio-graph.po | 0.0% | 0.0% | 0.0% | -| whatsnew/3_14.po | 0.0% | 0.0% | 0.0% | -| library/compression.po | 0.0% | 0.0% | 0.0% | -| c-api/extension-modules.po | 0.0% | 0.0% | 0.0% | -| deprecations/c-api-pending-removal-in-3_16.po | 0.0% | 0.0% | 0.0% | + +### وضعیت ترجمه فایل‌ها +(به‌روزرسانی: 2026-07-25) + +| File | Translated | Fuzzy | +|:-----|:-----------:|:-----------:| +| about.po | 100.0% | 0.0% | +| c-api/abstract.po | 100.0% | 0.0% | +| tutorial/appendix.po | 96.4% | 3.6% | +| bugs.po | 93.5% | 3.2% | +| tutorial/index.po | 66.7% | 11.1% | +| library/functions.po | 22.9% | 0.6% | +| tutorial/errors.po | 21.9% | 0.0% | +| c-api/allocation.po | 20.0% | 2.5% | +| tutorial/classes.po | 18.1% | 0.0% | +| c-api/dict.po | 1.8% | 0.9% | +| library/json.po | 1.1% | 0.0% | +| c-api/apiabiversion.po | 0.0% | 0.0% | +| c-api/arg.po | 0.0% | 0.0% | +| c-api/bool.po | 0.0% | 0.0% | +| c-api/buffer.po | 0.0% | 0.0% | +| c-api/bytearray.po | 0.0% | 0.0% | +| c-api/bytes.po | 0.0% | 0.0% | +| c-api/call.po | 0.0% | 0.0% | +| c-api/capsule.po | 0.0% | 0.0% | +| c-api/cell.po | 0.0% | 0.0% | +| c-api/code.po | 0.0% | 0.0% | +| c-api/codec.po | 0.0% | 0.0% | +| c-api/complex.po | 0.0% | 0.0% | +| c-api/concrete.po | 0.0% | 0.0% | +| c-api/contextvars.po | 0.0% | 0.0% | +| c-api/conversion.po | 0.0% | 0.0% | +| c-api/coro.po | 0.0% | 0.0% | +| c-api/curses.po | 0.0% | 0.0% | +| c-api/datetime.po | 0.0% | 0.0% | +| c-api/descriptor.po | 0.0% | 0.0% | +| c-api/exceptions.po | 0.0% | 0.0% | +| c-api/extension-modules.po | 0.0% | 0.0% | +| c-api/file.po | 0.0% | 0.0% | +| c-api/float.po | 0.0% | 0.0% | +| c-api/frame.po | 0.0% | 0.0% | +| c-api/function.po | 0.0% | 0.0% | +| c-api/gcsupport.po | 0.0% | 0.0% | +| c-api/gen.po | 0.0% | 0.0% | +| c-api/hash.po | 0.0% | 0.0% | +| c-api/import.po | 0.0% | 0.0% | +| c-api/index.po | 0.0% | 0.0% | +| c-api/init.po | 0.0% | 0.0% | +| c-api/init_config.po | 0.0% | 0.0% | +| c-api/interp-lifecycle.po | 0.0% | 0.0% | +| c-api/intro.po | 0.0% | 0.0% | +| c-api/iter.po | 0.0% | 0.0% | +| c-api/iterator.po | 0.0% | 0.0% | +| c-api/lifecycle.po | 0.0% | 0.0% | +| c-api/list.po | 0.0% | 0.0% | +| c-api/long.po | 0.0% | 0.0% | +| c-api/mapping.po | 0.0% | 0.0% | +| c-api/marshal.po | 0.0% | 0.0% | +| c-api/memory.po | 0.0% | 0.0% | +| c-api/memoryview.po | 0.0% | 0.0% | +| c-api/method.po | 0.0% | 0.0% | +| c-api/module.po | 0.0% | 0.0% | +| c-api/monitoring.po | 0.0% | 0.0% | +| c-api/none.po | 0.0% | 0.0% | +| c-api/number.po | 0.0% | 0.0% | +| c-api/object.po | 0.0% | 0.0% | +| c-api/objimpl.po | 0.0% | 0.0% | +| c-api/perfmaps.po | 0.0% | 0.0% | +| c-api/picklebuffer.po | 0.0% | 0.0% | +| c-api/profiling.po | 0.0% | 0.0% | +| c-api/refcounting.po | 0.0% | 0.0% | +| c-api/reflection.po | 0.0% | 0.0% | +| c-api/sequence.po | 0.0% | 0.0% | +| c-api/set.po | 0.0% | 0.0% | +| c-api/slice.po | 0.0% | 0.0% | +| c-api/stable.po | 0.0% | 0.0% | +| c-api/structures.po | 0.0% | 0.0% | +| c-api/subinterpreters.po | 0.0% | 0.0% | +| c-api/synchronization.po | 0.0% | 0.0% | +| c-api/sys.po | 0.0% | 0.0% | +| c-api/threads.po | 0.0% | 0.0% | +| c-api/time.po | 0.0% | 0.0% | +| c-api/tls.po | 0.0% | 0.0% | +| c-api/tuple.po | 0.0% | 0.0% | +| c-api/type.po | 0.0% | 0.0% | +| c-api/typehints.po | 0.0% | 0.0% | +| c-api/typeobj.po | 0.0% | 0.0% | +| c-api/unicode.po | 0.0% | 0.0% | +| c-api/utilities.po | 0.0% | 0.0% | +| c-api/veryhigh.po | 0.0% | 0.0% | +| c-api/weakref.po | 0.0% | 0.0% | +| contents.po | 0.0% | 0.0% | +| copyright.po | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-3.14.po | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-3.15.po | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-3.16.po | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-3.18.po | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-future.po | 0.0% | 0.0% | +| deprecations/index.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.13.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.14.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.15.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.16.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.17.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.18.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-3.19.po | 0.0% | 0.0% | +| deprecations/pending-removal-in-future.po | 0.0% | 0.0% | +| distributing/index.po | 0.0% | 0.0% | +| extending/building.po | 0.0% | 0.0% | +| extending/embedding.po | 0.0% | 0.0% | +| extending/extending.po | 0.0% | 0.0% | +| extending/index.po | 0.0% | 0.0% | +| extending/newtypes.po | 0.0% | 0.0% | +| extending/newtypes_tutorial.po | 0.0% | 0.0% | +| extending/windows.po | 0.0% | 0.0% | +| faq/design.po | 0.0% | 0.0% | +| faq/extending.po | 0.0% | 0.0% | +| faq/general.po | 0.0% | 0.0% | +| faq/gui.po | 0.0% | 0.0% | +| faq/index.po | 0.0% | 0.0% | +| faq/installed.po | 0.0% | 0.0% | +| faq/library.po | 0.0% | 0.0% | +| faq/programming.po | 0.0% | 0.0% | +| faq/windows.po | 0.0% | 0.0% | +| glossary.po | 0.0% | 0.0% | +| howto/a-conceptual-overview-of-asyncio.po | 0.0% | 0.0% | +| howto/annotations.po | 0.0% | 0.0% | +| howto/argparse-optparse.po | 0.0% | 0.0% | +| howto/argparse.po | 0.0% | 0.0% | +| howto/clinic.po | 0.0% | 0.0% | +| howto/cporting.po | 0.0% | 0.0% | +| howto/curses.po | 0.0% | 0.0% | +| howto/descriptor.po | 0.0% | 0.0% | +| howto/enum.po | 0.0% | 0.0% | +| howto/free-threading-extensions.po | 0.0% | 0.0% | +| howto/free-threading-python.po | 0.0% | 0.0% | +| howto/functional.po | 0.0% | 0.0% | +| howto/gdb_helpers.po | 0.0% | 0.0% | +| howto/index.po | 0.0% | 0.0% | +| howto/instrumentation.po | 0.0% | 0.0% | +| howto/ipaddress.po | 0.0% | 0.0% | +| howto/isolating-extensions.po | 0.0% | 0.0% | +| howto/logging-cookbook.po | 0.0% | 0.0% | +| howto/logging.po | 0.0% | 0.0% | +| howto/mro.po | 0.0% | 0.0% | +| howto/perf_profiling.po | 0.0% | 0.0% | +| howto/pyporting.po | 0.0% | 0.0% | +| howto/regex.po | 0.0% | 0.0% | +| howto/remote_debugging.po | 0.0% | 0.0% | +| howto/sockets.po | 0.0% | 0.0% | +| howto/sorting.po | 0.0% | 0.0% | +| howto/timerfd.po | 0.0% | 0.0% | +| howto/unicode.po | 0.0% | 0.0% | +| howto/urllib2.po | 0.0% | 0.0% | +| improve-page-nojs.po | 0.0% | 0.0% | +| improve-page.po | 0.0% | 0.0% | +| installing/index.po | 0.0% | 0.0% | +| library/__future__.po | 0.0% | 0.0% | +| library/__main__.po | 0.0% | 0.0% | +| library/_thread.po | 0.0% | 0.0% | +| library/abc.po | 0.0% | 0.0% | +| library/aifc.po | 0.0% | 0.0% | +| library/allos.po | 0.0% | 0.0% | +| library/annotationlib.po | 0.0% | 0.0% | +| library/archiving.po | 0.0% | 0.0% | +| library/argparse.po | 0.0% | 0.0% | +| library/array.po | 0.0% | 0.0% | +| library/ast.po | 0.0% | 0.0% | +| library/asynchat.po | 0.0% | 0.0% | +| library/asyncio-api-index.po | 0.0% | 0.0% | +| library/asyncio-dev.po | 0.0% | 0.0% | +| library/asyncio-eventloop.po | 0.0% | 0.0% | +| library/asyncio-exceptions.po | 0.0% | 0.0% | +| library/asyncio-extending.po | 0.0% | 0.0% | +| library/asyncio-future.po | 0.0% | 0.0% | +| library/asyncio-graph.po | 0.0% | 0.0% | +| library/asyncio-llapi-index.po | 0.0% | 0.0% | +| library/asyncio-platforms.po | 0.0% | 0.0% | +| library/asyncio-policy.po | 0.0% | 0.0% | +| library/asyncio-protocol.po | 0.0% | 0.0% | +| library/asyncio-queue.po | 0.0% | 0.0% | +| library/asyncio-runner.po | 0.0% | 0.0% | +| library/asyncio-stream.po | 0.0% | 0.0% | +| library/asyncio-subprocess.po | 0.0% | 0.0% | +| library/asyncio-sync.po | 0.0% | 0.0% | +| library/asyncio-task.po | 0.0% | 0.0% | +| library/asyncio.po | 0.0% | 0.0% | +| library/asyncore.po | 0.0% | 0.0% | +| library/atexit.po | 0.0% | 0.0% | +| library/audioop.po | 0.0% | 0.0% | +| library/audit_events.po | 0.0% | 0.0% | +| library/base64.po | 0.0% | 0.0% | +| library/bdb.po | 0.0% | 0.0% | +| library/binary.po | 0.0% | 0.0% | +| library/binascii.po | 0.0% | 0.0% | +| library/bisect.po | 0.0% | 0.0% | +| library/builtins.po | 0.0% | 0.0% | +| library/bz2.po | 0.0% | 0.0% | +| library/calendar.po | 0.0% | 0.0% | +| library/cgi.po | 0.0% | 0.0% | +| library/cgitb.po | 0.0% | 0.0% | +| library/chunk.po | 0.0% | 0.0% | +| library/cmath.po | 0.0% | 0.0% | +| library/cmd.po | 0.0% | 0.0% | +| library/cmdline.po | 0.0% | 0.0% | +| library/cmdlinelibs.po | 0.0% | 0.0% | +| library/code.po | 0.0% | 0.0% | +| library/codecs.po | 0.0% | 0.0% | +| library/codeop.po | 0.0% | 0.0% | +| library/collections.abc.po | 0.0% | 0.0% | +| library/collections.po | 0.0% | 0.0% | +| library/colorsys.po | 0.0% | 0.0% | +| library/compileall.po | 0.0% | 0.0% | +| library/compression.po | 0.0% | 0.0% | +| library/compression.zstd.po | 0.0% | 0.0% | +| library/concurrency.po | 0.0% | 0.0% | +| library/concurrent.futures.po | 0.0% | 0.0% | +| library/concurrent.interpreters.po | 0.0% | 0.0% | +| library/concurrent.po | 0.0% | 0.0% | +| library/configparser.po | 0.0% | 0.0% | +| library/constants.po | 0.0% | 0.0% | +| library/contextlib.po | 0.0% | 0.0% | +| library/contextvars.po | 0.0% | 0.0% | +| library/copy.po | 0.0% | 0.0% | +| library/copyreg.po | 0.0% | 0.0% | +| library/crypt.po | 0.0% | 0.0% | +| library/crypto.po | 0.0% | 0.0% | +| library/csv.po | 0.0% | 0.0% | +| library/ctypes.po | 0.0% | 0.0% | +| library/curses.ascii.po | 0.0% | 0.0% | +| library/curses.panel.po | 0.0% | 0.0% | +| library/curses.po | 0.0% | 0.0% | +| library/custominterp.po | 0.0% | 0.0% | +| library/dataclasses.po | 0.0% | 0.0% | +| library/datatypes.po | 0.0% | 0.0% | +| library/datetime.po | 0.0% | 0.0% | +| library/dbm.po | 0.0% | 0.0% | +| library/debug.po | 0.0% | 0.0% | +| library/decimal.po | 0.0% | 0.0% | +| library/development.po | 0.0% | 0.0% | +| library/devmode.po | 0.0% | 0.0% | +| library/dialog.po | 0.0% | 0.0% | +| library/difflib.po | 0.0% | 0.0% | +| library/dis.po | 0.0% | 0.0% | +| library/distribution.po | 0.0% | 0.0% | +| library/distutils.po | 0.0% | 0.0% | +| library/doctest.po | 0.0% | 0.0% | +| library/email.charset.po | 0.0% | 0.0% | +| library/email.compat32-message.po | 0.0% | 0.0% | +| library/email.contentmanager.po | 0.0% | 0.0% | +| library/email.encoders.po | 0.0% | 0.0% | +| library/email.errors.po | 0.0% | 0.0% | +| library/email.examples.po | 0.0% | 0.0% | +| library/email.generator.po | 0.0% | 0.0% | +| library/email.header.po | 0.0% | 0.0% | +| library/email.headerregistry.po | 0.0% | 0.0% | +| library/email.iterators.po | 0.0% | 0.0% | +| library/email.message.po | 0.0% | 0.0% | +| library/email.mime.po | 0.0% | 0.0% | +| library/email.parser.po | 0.0% | 0.0% | +| library/email.po | 0.0% | 0.0% | +| library/email.policy.po | 0.0% | 0.0% | +| library/email.utils.po | 0.0% | 0.0% | +| library/ensurepip.po | 0.0% | 0.0% | +| library/enum.po | 0.0% | 0.0% | +| library/errno.po | 0.0% | 0.0% | +| library/exceptions.po | 0.0% | 0.0% | +| library/faulthandler.po | 0.0% | 0.0% | +| library/fcntl.po | 0.0% | 0.0% | +| library/filecmp.po | 0.0% | 0.0% | +| library/fileformats.po | 0.0% | 0.0% | +| library/fileinput.po | 0.0% | 0.0% | +| library/filesys.po | 0.0% | 0.0% | +| library/fnmatch.po | 0.0% | 0.0% | +| library/fractions.po | 0.0% | 0.0% | +| library/frameworks.po | 0.0% | 0.0% | +| library/ftplib.po | 0.0% | 0.0% | +| library/functional.po | 0.0% | 0.0% | +| library/functools.po | 0.0% | 0.0% | +| library/gc.po | 0.0% | 0.0% | +| library/getopt.po | 0.0% | 0.0% | +| library/getpass.po | 0.0% | 0.0% | +| library/gettext.po | 0.0% | 0.0% | +| library/glob.po | 0.0% | 0.0% | +| library/graphlib.po | 0.0% | 0.0% | +| library/grp.po | 0.0% | 0.0% | +| library/gzip.po | 0.0% | 0.0% | +| library/hashlib.po | 0.0% | 0.0% | +| library/heapq.po | 0.0% | 0.0% | +| library/hmac.po | 0.0% | 0.0% | +| library/html.entities.po | 0.0% | 0.0% | +| library/html.parser.po | 0.0% | 0.0% | +| library/html.po | 0.0% | 0.0% | +| library/http.client.po | 0.0% | 0.0% | +| library/http.cookiejar.po | 0.0% | 0.0% | +| library/http.cookies.po | 0.0% | 0.0% | +| library/http.po | 0.0% | 0.0% | +| library/http.server.po | 0.0% | 0.0% | +| library/i18n.po | 0.0% | 0.0% | +| library/idle.po | 0.0% | 0.0% | +| library/imaplib.po | 0.0% | 0.0% | +| library/imghdr.po | 0.0% | 0.0% | +| library/imp.po | 0.0% | 0.0% | +| library/importlib.metadata.po | 0.0% | 0.0% | +| library/importlib.po | 0.0% | 0.0% | +| library/importlib.resources.abc.po | 0.0% | 0.0% | +| library/importlib.resources.po | 0.0% | 0.0% | +| library/index.po | 0.0% | 0.0% | +| library/inspect.po | 0.0% | 0.0% | +| library/internet.po | 0.0% | 0.0% | +| library/intro.po | 0.0% | 0.0% | +| library/io.po | 0.0% | 0.0% | +| library/ipaddress.po | 0.0% | 0.0% | +| library/ipc.po | 0.0% | 0.0% | +| library/itertools.po | 0.0% | 0.0% | +| library/keyword.po | 0.0% | 0.0% | +| library/language.po | 0.0% | 0.0% | +| library/linecache.po | 0.0% | 0.0% | +| library/locale.po | 0.0% | 0.0% | +| library/logging.config.po | 0.0% | 0.0% | +| library/logging.handlers.po | 0.0% | 0.0% | +| library/logging.po | 0.0% | 0.0% | +| library/lzma.po | 0.0% | 0.0% | +| library/mailbox.po | 0.0% | 0.0% | +| library/mailcap.po | 0.0% | 0.0% | +| library/markup.po | 0.0% | 0.0% | +| library/marshal.po | 0.0% | 0.0% | +| library/math.po | 0.0% | 0.0% | +| library/mimetypes.po | 0.0% | 0.0% | +| library/mm.po | 0.0% | 0.0% | +| library/mmap.po | 0.0% | 0.0% | +| library/modulefinder.po | 0.0% | 0.0% | +| library/modules.po | 0.0% | 0.0% | +| library/msilib.po | 0.0% | 0.0% | +| library/msvcrt.po | 0.0% | 0.0% | +| library/multiprocessing.po | 0.0% | 0.0% | +| library/multiprocessing.shared_memory.po | 0.0% | 0.0% | +| library/netdata.po | 0.0% | 0.0% | +| library/netrc.po | 0.0% | 0.0% | +| library/nis.po | 0.0% | 0.0% | +| library/nntplib.po | 0.0% | 0.0% | +| library/numbers.po | 0.0% | 0.0% | +| library/numeric.po | 0.0% | 0.0% | +| library/operator.po | 0.0% | 0.0% | +| library/optparse.po | 0.0% | 0.0% | +| library/os.path.po | 0.0% | 0.0% | +| library/os.po | 0.0% | 0.0% | +| library/ossaudiodev.po | 0.0% | 0.0% | +| library/pathlib.po | 0.0% | 0.0% | +| library/pdb.po | 0.0% | 0.0% | +| library/persistence.po | 0.0% | 0.0% | +| library/pickle.po | 0.0% | 0.0% | +| library/pickletools.po | 0.0% | 0.0% | +| library/pipes.po | 0.0% | 0.0% | +| library/pkgutil.po | 0.0% | 0.0% | +| library/platform.po | 0.0% | 0.0% | +| library/plistlib.po | 0.0% | 0.0% | +| library/poplib.po | 0.0% | 0.0% | +| library/posix.po | 0.0% | 0.0% | +| library/pprint.po | 0.0% | 0.0% | +| library/profile.po | 0.0% | 0.0% | +| library/pty.po | 0.0% | 0.0% | +| library/pwd.po | 0.0% | 0.0% | +| library/py_compile.po | 0.0% | 0.0% | +| library/pyclbr.po | 0.0% | 0.0% | +| library/pydoc.po | 0.0% | 0.0% | +| library/pyexpat.po | 0.0% | 0.0% | +| library/python.po | 0.0% | 0.0% | +| library/queue.po | 0.0% | 0.0% | +| library/quopri.po | 0.0% | 0.0% | +| library/random.po | 0.0% | 0.0% | +| library/re.po | 0.0% | 0.0% | +| library/readline.po | 0.0% | 0.0% | +| library/removed.po | 0.0% | 0.0% | +| library/reprlib.po | 0.0% | 0.0% | +| library/resource.po | 0.0% | 0.0% | +| library/rlcompleter.po | 0.0% | 0.0% | +| library/runpy.po | 0.0% | 0.0% | +| library/sched.po | 0.0% | 0.0% | +| library/secrets.po | 0.0% | 0.0% | +| library/security_warnings.po | 0.0% | 0.0% | +| library/select.po | 0.0% | 0.0% | +| library/selectors.po | 0.0% | 0.0% | +| library/shelve.po | 0.0% | 0.0% | +| library/shlex.po | 0.0% | 0.0% | +| library/shutil.po | 0.0% | 0.0% | +| library/signal.po | 0.0% | 0.0% | +| library/site.po | 0.0% | 0.0% | +| library/smtpd.po | 0.0% | 0.0% | +| library/smtplib.po | 0.0% | 0.0% | +| library/sndhdr.po | 0.0% | 0.0% | +| library/socket.po | 0.0% | 0.0% | +| library/socketserver.po | 0.0% | 0.0% | +| library/spwd.po | 0.0% | 0.0% | +| library/sqlite3.po | 0.0% | 0.0% | +| library/ssl.po | 0.0% | 0.0% | +| library/stat.po | 0.0% | 0.0% | +| library/statistics.po | 0.0% | 0.0% | +| library/stdtypes.po | 0.0% | 0.0% | +| library/string.po | 0.0% | 0.0% | +| library/string.templatelib.po | 0.0% | 0.0% | +| library/stringprep.po | 0.0% | 0.0% | +| library/struct.po | 0.0% | 0.0% | +| library/subprocess.po | 0.0% | 0.0% | +| library/sunau.po | 0.0% | 0.0% | +| library/superseded.po | 0.0% | 0.0% | +| library/symtable.po | 0.0% | 0.0% | +| library/sys.monitoring.po | 0.0% | 0.0% | +| library/sys.po | 0.0% | 0.0% | +| library/sys_path_init.po | 0.0% | 0.0% | +| library/sysconfig.po | 0.0% | 0.0% | +| library/syslog.po | 0.0% | 0.0% | +| library/tabnanny.po | 0.0% | 0.0% | +| library/tarfile.po | 0.0% | 0.0% | +| library/telnetlib.po | 0.0% | 0.0% | +| library/tempfile.po | 0.0% | 0.0% | +| library/termios.po | 0.0% | 0.0% | +| library/test.po | 0.0% | 0.0% | +| library/text.po | 0.0% | 0.0% | +| library/textwrap.po | 0.0% | 0.0% | +| library/threading.po | 0.0% | 0.0% | +| library/threadsafety.po | 0.0% | 0.0% | +| library/time.po | 0.0% | 0.0% | +| library/timeit.po | 0.0% | 0.0% | +| library/tk.po | 0.0% | 0.0% | +| library/tkinter.colorchooser.po | 0.0% | 0.0% | +| library/tkinter.dnd.po | 0.0% | 0.0% | +| library/tkinter.font.po | 0.0% | 0.0% | +| library/tkinter.messagebox.po | 0.0% | 0.0% | +| library/tkinter.po | 0.0% | 0.0% | +| library/tkinter.scrolledtext.po | 0.0% | 0.0% | +| library/tkinter.ttk.po | 0.0% | 0.0% | +| library/token.po | 0.0% | 0.0% | +| library/tokenize.po | 0.0% | 0.0% | +| library/tomllib.po | 0.0% | 0.0% | +| library/trace.po | 0.0% | 0.0% | +| library/traceback.po | 0.0% | 0.0% | +| library/tracemalloc.po | 0.0% | 0.0% | +| library/tty.po | 0.0% | 0.0% | +| library/turtle.po | 0.0% | 0.0% | +| library/types.po | 0.0% | 0.0% | +| library/typing.po | 0.0% | 0.0% | +| library/unicodedata.po | 0.0% | 0.0% | +| library/unittest.mock-examples.po | 0.0% | 0.0% | +| library/unittest.mock.po | 0.0% | 0.0% | +| library/unittest.po | 0.0% | 0.0% | +| library/unix.po | 0.0% | 0.0% | +| library/urllib.error.po | 0.0% | 0.0% | +| library/urllib.parse.po | 0.0% | 0.0% | +| library/urllib.po | 0.0% | 0.0% | +| library/urllib.request.po | 0.0% | 0.0% | +| library/urllib.robotparser.po | 0.0% | 0.0% | +| library/uu.po | 0.0% | 0.0% | +| library/uuid.po | 0.0% | 0.0% | +| library/venv.po | 0.0% | 0.0% | +| library/warnings.po | 0.0% | 0.0% | +| library/wave.po | 0.0% | 0.0% | +| library/weakref.po | 0.0% | 0.0% | +| library/webbrowser.po | 0.0% | 0.0% | +| library/windows.po | 0.0% | 0.0% | +| library/winreg.po | 0.0% | 0.0% | +| library/winsound.po | 0.0% | 0.0% | +| library/wsgiref.po | 0.0% | 0.0% | +| library/xdrlib.po | 0.0% | 0.0% | +| library/xml.dom.minidom.po | 0.0% | 0.0% | +| library/xml.dom.po | 0.0% | 0.0% | +| library/xml.dom.pulldom.po | 0.0% | 0.0% | +| library/xml.etree.elementtree.po | 0.0% | 0.0% | +| library/xml.po | 0.0% | 0.0% | +| library/xml.sax.handler.po | 0.0% | 0.0% | +| library/xml.sax.po | 0.0% | 0.0% | +| library/xml.sax.reader.po | 0.0% | 0.0% | +| library/xml.sax.utils.po | 0.0% | 0.0% | +| library/xmlrpc.client.po | 0.0% | 0.0% | +| library/xmlrpc.po | 0.0% | 0.0% | +| library/xmlrpc.server.po | 0.0% | 0.0% | +| library/zipapp.po | 0.0% | 0.0% | +| library/zipfile.po | 0.0% | 0.0% | +| library/zipimport.po | 0.0% | 0.0% | +| library/zlib.po | 0.0% | 0.0% | +| library/zoneinfo.po | 0.0% | 0.0% | +| license.po | 0.0% | 0.0% | +| reference/compound_stmts.po | 0.0% | 0.0% | +| reference/datamodel.po | 0.0% | 0.0% | +| reference/executionmodel.po | 0.0% | 0.0% | +| reference/expressions.po | 0.0% | 0.0% | +| reference/grammar.po | 0.0% | 0.0% | +| reference/import.po | 0.0% | 0.0% | +| reference/index.po | 0.0% | 0.0% | +| reference/introduction.po | 0.0% | 0.0% | +| reference/lexical_analysis.po | 0.0% | 0.0% | +| reference/simple_stmts.po | 0.0% | 0.0% | +| reference/toplevel_components.po | 0.0% | 0.0% | +| sphinx.po | 0.0% | 0.0% | +| tutorial/appetite.po | 0.0% | 0.0% | +| tutorial/controlflow.po | 0.0% | 0.0% | +| tutorial/datastructures.po | 0.0% | 0.0% | +| tutorial/floatingpoint.po | 0.0% | 0.0% | +| tutorial/inputoutput.po | 0.0% | 0.0% | +| tutorial/interactive.po | 0.0% | 0.0% | +| tutorial/interpreter.po | 0.0% | 0.0% | +| tutorial/introduction.po | 0.0% | 0.0% | +| tutorial/modules.po | 0.0% | 0.0% | +| tutorial/stdlib.po | 0.0% | 0.0% | +| tutorial/stdlib2.po | 0.0% | 0.0% | +| tutorial/venv.po | 0.0% | 0.0% | +| tutorial/whatnow.po | 0.0% | 0.0% | +| using/android.po | 0.0% | 0.0% | +| using/cmdline.po | 0.0% | 0.0% | +| using/configure.po | 0.0% | 0.0% | +| using/editors.po | 0.0% | 0.0% | +| using/index.po | 0.0% | 0.0% | +| using/ios.po | 0.0% | 0.0% | +| using/mac.po | 0.0% | 0.0% | +| using/unix.po | 0.0% | 0.0% | +| using/windows.po | 0.0% | 0.0% | +| whatsnew/2.0.po | 0.0% | 0.0% | +| whatsnew/2.1.po | 0.0% | 0.0% | +| whatsnew/2.2.po | 0.0% | 0.0% | +| whatsnew/2.3.po | 0.0% | 0.0% | +| whatsnew/2.4.po | 0.0% | 0.0% | +| whatsnew/2.5.po | 0.0% | 0.0% | +| whatsnew/2.6.po | 0.0% | 0.0% | +| whatsnew/2.7.po | 0.0% | 0.0% | +| whatsnew/3.0.po | 0.0% | 0.0% | +| whatsnew/3.1.po | 0.0% | 0.0% | +| whatsnew/3.10.po | 0.0% | 0.0% | +| whatsnew/3.11.po | 0.0% | 0.0% | +| whatsnew/3.12.po | 0.0% | 0.0% | +| whatsnew/3.13.po | 0.0% | 0.0% | +| whatsnew/3.14.po | 0.0% | 0.0% | +| whatsnew/3.2.po | 0.0% | 0.0% | +| whatsnew/3.3.po | 0.0% | 0.0% | +| whatsnew/3.4.po | 0.0% | 0.0% | +| whatsnew/3.5.po | 0.0% | 0.0% | +| whatsnew/3.6.po | 0.0% | 0.0% | +| whatsnew/3.7.po | 0.0% | 0.0% | +| whatsnew/3.8.po | 0.0% | 0.0% | +| whatsnew/3.9.po | 0.0% | 0.0% | +| whatsnew/changelog.po | 0.0% | 0.0% | +| whatsnew/index.po | 0.0% | 0.0% | + \ No newline at end of file diff --git a/scripts/check_markup.py b/scripts/check_markup.py index 3bdf498fb..65b48f851 100644 --- a/scripts/check_markup.py +++ b/scripts/check_markup.py @@ -7,6 +7,8 @@ common review slip: translating or mangling `:class:`int``-style markup, ``code`` spans, %s/{0} placeholders, or |substitution| refs. +Requires: pip install polib + Usage: python3 scripts/check_markup.py library/functions.po python3 scripts/check_markup.py tutorial/*.po @@ -16,6 +18,8 @@ import sys from pathlib import Path +import polib + PATTERNS = [ ("sphinx role", re.compile(r":(?:\w+:)?[\w.-]+:`.*?`")), ("literal/code span", re.compile(r"``.*?``")), @@ -25,83 +29,24 @@ ] -def unescape(raw: str) -> str: - """Undo PO string escaping (raw includes the surrounding quotes).""" - inner = raw[1:-1] - out = [] - i = 0 - while i < len(inner): - c = inner[i] - if c == "\\" and i + 1 < len(inner): - nxt = inner[i + 1] - out.append({"n": "\n", "t": "\t", '"': '"', "\\": "\\"}.get(nxt, nxt)) - i += 2 - else: - out.append(c) - i += 1 - return "".join(out) - - -def parse_po(path: Path): - """Yield (location, flags, msgid, msgstr) for each entry in a .po file.""" - lines = path.read_text(encoding="utf-8").splitlines() - i, n = 0, len(lines) - - def read_block(keyword_line): - nonlocal i - parts = [unescape(keyword_line.split(" ", 1)[1].strip())] - i += 1 - while i < n and lines[i].strip().startswith('"'): - parts.append(unescape(lines[i].strip())) - i += 1 - return "".join(parts) - - while i < n: - location, flags = "", [] - while i < n and lines[i].startswith("#"): - if lines[i].startswith("#:"): - location = lines[i][2:].strip() - elif lines[i].startswith("#,"): - flags = [f.strip() for f in lines[i][2:].split(",")] - i += 1 - if i >= n or not lines[i].startswith("msgid"): - i += 1 - continue - - msgid = read_block(lines[i]) - msgid_plural = read_block(lines[i]) if i < n and lines[i].startswith("msgid_plural") else None - - if i < n and lines[i].startswith("msgstr["): - msgstrs = {} - while i < n and lines[i].startswith("msgstr["): - idx = int(lines[i][7:lines[i].index("]")]) - msgstrs[idx] = read_block(lines[i]) - yield location, flags, msgid, msgstrs.get(0, "") - if msgid_plural is not None and 1 in msgstrs: - yield location, flags, msgid_plural, msgstrs[1] - continue - - msgstr = read_block(lines[i]) if i < n and lines[i].startswith("msgstr") else "" - yield location, flags, msgid, msgstr - - def check_file(path: Path) -> int: problems = 0 - for location, flags, msgid, msgstr in parse_po(path): - if not msgid or not msgstr: - continue # header entry or still untranslated + po = polib.pofile(str(path)) + for entry in po: + if entry.obsolete or not entry.msgid or not entry.msgstr: + continue # obsolete entry, header, or still untranslated for label, pattern in PATTERNS: - expected = pattern.findall(msgid) + expected = pattern.findall(entry.msgid) if not expected: continue - missing = [tok for tok in expected if tok not in msgstr] + missing = [tok for tok in expected if tok not in entry.msgstr] if missing: problems += 1 - loc = f" ({location})" if location else "" - tag = " [fuzzy]" if "fuzzy" in flags else "" + loc = f" ({entry.occurrences[0][0]}:{entry.occurrences[0][1]})" if entry.occurrences else "" + tag = " [fuzzy]" if entry.fuzzy else "" print(f"{path}{loc}{tag}: missing {label}: {missing}") - print(f" msgid : {msgid[:100]}") - print(f" msgstr: {msgstr[:100]}") + print(f" msgid : {entry.msgid[:100]}") + print(f" msgstr: {entry.msgstr[:100]}") return problems diff --git a/scripts/generate_status_table.py b/scripts/generate_status_table.py new file mode 100644 index 000000000..65b1c83da --- /dev/null +++ b/scripts/generate_status_table.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +""" +scripts/generate_status_table.py + +Regenerate the per-file translation status table between marker comments in +a markdown file (default: RESOURCE.md) from the current state of all .po +files. Meant to run on a schedule so the table never goes stale, replacing +the old Transifex-exported report. + +Requires: pip install polib + +Usage: + python3 scripts/generate_status_table.py + python3 scripts/generate_status_table.py --file RESOURCE.md +""" +import argparse +import re +import sys +from datetime import date +from pathlib import Path + +import polib + +REPO_ROOT = Path(__file__).resolve().parent.parent +START_MARKER = "" +END_MARKER = "" + + +def file_stats(path: Path): + po = polib.pofile(str(path)) + return len(po.translated_entries()), len(po.fuzzy_entries()), len(po.untranslated_entries()) + + +def build_table() -> str: + files = sorted(REPO_ROOT.rglob("*.po")) + rows = [] + for f in files: + if ".cpython-src" in f.parts or ".git" in f.parts: + continue + t, fz, u = file_stats(f) + total = t + fz + u + translated_pct = (t / total * 100) if total else 100.0 + fuzzy_pct = (fz / total * 100) if total else 0.0 + rel = f.relative_to(REPO_ROOT) + rows.append((str(rel), translated_pct, fuzzy_pct)) + + # most-complete files first, matching the old report's ordering + rows.sort(key=lambda r: (-r[1], r[0])) + + lines = [ + "| File | Translated | Fuzzy |", + "|:-----|:-----------:|:-----------:|", + ] + for name, t_pct, f_pct in rows: + lines.append(f"| {name} | {t_pct:.1f}% | {f_pct:.1f}% |") + return "\n".join(lines) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--file", default="RESOURCE.md", + help="Markdown file containing the marker block to update") + args = parser.parse_args() + + target = REPO_ROOT / args.file + text = target.read_text(encoding="utf-8") + + if START_MARKER not in text or END_MARKER not in text: + print(f"Markers {START_MARKER} / {END_MARKER} not found in {args.file}.") + print("Add them around the table you want auto-generated, then re-run.") + sys.exit(1) + + table = build_table() + block = ( + f"{START_MARKER}\n" + f"### وضعیت ترجمه فایل‌ها\n" + f"(به‌روزرسانی: {date.today().isoformat()})\n\n" + f"{table}\n" + f"{END_MARKER}" + ) + + new_text = re.sub( + re.escape(START_MARKER) + r".*?" + re.escape(END_MARKER), + lambda _: block, # avoid backslash-escape surprises from re.sub + text, + flags=re.DOTALL, + ) + target.write_text(new_text, encoding="utf-8") + print(f"Updated {args.file}.") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/scripts/translation_status.py b/scripts/translation_status.py index 89c8a1c95..37c4c95bb 100644 --- a/scripts/translation_status.py +++ b/scripts/translation_status.py @@ -6,6 +6,8 @@ translated, fuzzy, or untranslated per file, plus overall totals. Meant to help a contributor quickly find files that need work. +Requires: pip install polib + Usage: python3 scripts/translation_status.py # whole repo, least-translated first python3 scripts/translation_status.py tutorial/ # just one directory @@ -17,74 +19,12 @@ import sys from pathlib import Path - -def unescape(raw: str) -> str: - """Undo PO string escaping (raw includes the surrounding quotes).""" - inner = raw[1:-1] - out = [] - i = 0 - while i < len(inner): - c = inner[i] - if c == "\\" and i + 1 < len(inner): - nxt = inner[i + 1] - out.append({"n": "\n", "t": "\t", '"': '"', "\\": "\\"}.get(nxt, nxt)) - i += 2 - else: - out.append(c) - i += 1 - return "".join(out) - - -def parse_po_entries(path: Path): - """Yield (flags, msgid, msgstrs) for each entry in a .po file.""" - lines = path.read_text(encoding="utf-8").splitlines() - i, n = 0, len(lines) - - def read_block(keyword_line): - nonlocal i - parts = [unescape(keyword_line.split(" ", 1)[1].strip())] - i += 1 - while i < n and lines[i].strip().startswith('"'): - parts.append(unescape(lines[i].strip())) - i += 1 - return "".join(parts) - - while i < n: - flags = [] - while i < n and lines[i].startswith("#"): - if lines[i].startswith("#,"): - flags = [f.strip() for f in lines[i][2:].split(",")] - i += 1 - if i >= n or not lines[i].startswith("msgid"): - i += 1 - continue - - msgid = read_block(lines[i]) - if i < n and lines[i].startswith("msgid_plural"): - read_block(lines[i]) # plural source not needed for counting - - msgstrs = [] - if i < n and lines[i].startswith("msgstr["): - while i < n and lines[i].startswith("msgstr["): - msgstrs.append(read_block(lines[i])) - elif i < n and lines[i].startswith("msgstr"): - msgstrs.append(read_block(lines[i])) - - yield flags, msgid, msgstrs +import polib def file_stats(path: Path): - translated = fuzzy = untranslated = 0 - for flags, msgid, msgstrs in parse_po_entries(path): - if not msgid: - continue # header entry - if "fuzzy" in flags: - fuzzy += 1 - elif any(m.strip() for m in msgstrs): - translated += 1 - else: - untranslated += 1 - return translated, fuzzy, untranslated + po = polib.pofile(str(path)) + return len(po.translated_entries()), len(po.fuzzy_entries()), len(po.untranslated_entries()) def collect_files(paths):