← 输入框|github.com|刷新
Skip to content

🔍 Translation review needed after CPython sync (2026-11-29) #151

Backlog

Description

@github-actions

Summary

  • 🔍 21 newly fuzzy strings in 12 files
  • ✏️ 45 new untranslated strings in 14 files

🔍 Newly fuzzy strings

The source text changed slightly, so the existing translation (msgstr) may need updating. - is the old source, + the new.

c-api/import.po (1 new fuzzy)

- Respect the ``lazy`` keyword in source code. This is the default mode.
+ Respect :keyword:`lazy` and :attr:`module.__lazy_modules__`. This is the default mode.
  msgstr: احترام به کلیدواژه‌ی ``lazy`` در کد منبع. این حالت پیش‌فرض است.

glossary.po (1 new fuzzy)

- importer
+ lazy import
  msgstr: ایمپورت‌کننده

library/ast.po (1 new fuzzy)

- Represents ``from x import y``. ``module`` is a raw string of the 'from' name, without any leading dots, or ``None`` for statements such as ``from . import foo…
+ Represents ``from x import y``. ``module`` is a raw string of the 'from' name, without any leading dots, or ``None`` for statements such as ``from . import foo…
  msgstr: نشان‌دهنده‌ی ``from x import y`` است. ``module`` یک رشته خام از نام 'from'، بدون هیچ نقطه‌ی ابتدایی، یا ``None`` برای دستورهایی مانند ``from . import foo`` است…

library/dis.po (1 new fuzzy)

- Imports the module ``co_names[namei]``.  ``STACK[-1]`` and ``STACK[-2]`` are popped and provide the *fromlist* and *level* arguments of :func:`__import__`. The…
+ Imports the module ``co_names[namei >> 2]``. ``STACK[-1]`` and ``STACK[-2]`` supply the *fromlist* and *level* arguments of the import. The instruction removes…
  msgstr: ماژول ``co_names[namei]`` را ایمپورت می‌کند. ``STACK[-1]`` و ``STACK[-2]`` از پشته برداشته می‌شوند و آرگومان‌های *fromlist* و *level* برای :func:`__import__` ر…

library/sys.po (7 new fuzzy)

- ``"all"``: All top-level imports are potentially lazy
+ ``"all"``: Make all eligible module-scope imports potentially lazy.
  msgstr: ``"all"``: تمام ایمپورت‌های سطح بالا به طور بالقوه تنبل هستند

- See also :func:`set_lazy_imports` and :pep:`810`.
+ See also :func:`set_lazy_imports` and :ref:`lazy-imports`.
  msgstr: همچنین نگاه کنید به :func:`set_lazy_imports` و :pep:`810`.

- Sets the global lazy imports mode. The *mode* parameter must be one of the following strings:
+ Set the lazy import mode for the current interpreter. The *mode* parameter must be one of these strings:
  msgstr: حالت سراسری ایمپورت‌های تنبل را تنظیم می‌کند. پارامتر *mode* باید یکی از رشته‌های زیر باشد:

- See also :func:`get_lazy_imports` and :pep:`810`.
+ See also :func:`get_lazy_imports` and :ref:`lazy-imports`.
  msgstr: همچنین نگاه کنید به :func:`get_lazy_imports` و :pep:`810`.

- def filter(importing_module: str, imported_module: str,\n           fromlist: tuple[str, ...] | None) -> bool
+ def filter(importing_module: str | None, imported_module: str,\n           fromlist: tuple[str, ...] | None) -> bool
  msgstr: def filter(importing_module: str, imported_module: str,\n           fromlist: tuple[str, ...] | None) -> bool

- *importing_module* is the name of the module doing the import
+ *importing_module* is the name of the module that executes the import, or ``None`` if its globals do not contain ``__name__``
  msgstr: *importing_module* نام ماژولی است که ایمپورت را انجام می‌دهد

- See also :func:`get_lazy_imports_filter` and :pep:`810`.
+ See also :func:`get_lazy_imports_filter` and :ref:`lazy-imports`.
  msgstr: همچنین نگاه کنید به :func:`get_lazy_imports_filter` و :pep:`810`.

library/tempfile.po (1 new fuzzy)

- >>> import tempfile\n\n# create a temporary file and write some data to it\n>>> fp = tempfile.TemporaryFile()\n>>> fp.write(b'Hello world!')\n# read data from …
+ >>> import tempfile\n\n# create a temporary file and write some data to it\n>>> fp = tempfile.TemporaryFile()\n>>> fp.write(b'Hello world!')\n# read data from …
  msgstr: >>> import tempfile\n\n# create a temporary file and write some data to it\n>>> fp = tempfile.TemporaryFile()\n>>> fp.write(b'Hello world!')\n# read data from …

reference/import.po (2 new fuzzy)

- The :keyword:`import` statement combines two operations; it searches for the named module, then it binds the results of that search to a name in the local scop…
+ An eager :keyword:`import` statement performs two operations. It searches for the named module, then binds the result to a name in the local scope. The search …
  msgstr: دستور :keyword:`import` دو عملیات را ترکیب می‌کند؛ این دستور به دنبال ماژول نام‌برده جست‌وجو می‌کند، سپس نتایج آن جست‌وجو را به یک نام در محدوده محلی مقید می‌ک…

- When an :keyword:`import` statement is executed, the standard builtin :func:`__import__` function is called. Other mechanisms for invoking the import system (s…
+ When an eager :keyword:`import` statement executes, Python calls the standard built-in :func:`__import__` function. Other mechanisms for invoking the import sy…
  msgstr: هنگامی که یک دستور :keyword:`import` اجرا می‌شود، تابع توکار استاندارد :func:`__import__` فراخوانی می‌شود. سایر سازوکارهای فراخوانی سیستم ایمپورت (مانند :func:…

reference/lexical_analysis.po (1 new fuzzy)

- ``lazy``, when used before an :keyword:`import` statement.
+ ``lazy``, when used before :keyword:`import` or :keyword:`from` in a :ref:`lazy import <lazy-imports>` statement.
  msgstr: ``lazy``، هنگامی که قبل از یک دستور :keyword:`import` استفاده شود.

reference/simple_stmts.po (2 new fuzzy)

- Lazy imports are only permitted at module scope. Using :keyword:`lazy` inside a function, class body, or :keyword:`try`/:keyword:`except`/:keyword:`finally` bl…
+ Lazy imports are only permitted at module scope. Using :keyword:`lazy` inside a function, class body, or :keyword:`try`/:keyword:`except`/:keyword:`finally` bl…
  msgstr: ایمپورت‌های تنبل تنها در محدوده‌ی ماژول مجاز هستند. استفاده از :keyword:`lazy` درون یک تابع، بدنه‌ی کلاس، یا بلوک :keyword:`try`/:keyword:`except`/:keyword:`fi…

- See :pep:`810` for the full specification of lazy imports.
+ :pep:`810` provides the rationale and initial specification for lazy imports.
  msgstr: برای مشخصات کامل ایمپورت‌های تنبل، به :pep:`810` مراجعه کنید.

tutorial/modules.po (1 new fuzzy)

- A module can contain executable statements as well as function definitions. These statements are intended to initialize the module. They are executed only the …
+ A module can contain executable statements as well as function definitions. These statements initialize the module. Python executes them only the *first* time …
  msgstr: یک ماژول می‌تواند علاوه بر تعریف توابع، شامل دستورهای اجرایی نیز باشد. هدف از این دستورها مقداردهی اولیه‌ی ماژول است. این دستورها فقط در *اولین* باری که نام ما…

using/cmdline.po (2 new fuzzy)

- :samp:`-X lazy_imports={all,normal}` controls lazy import behavior. ``all`` makes all imports lazy by default, and ``normal`` (the default) respects the ``lazy…
+ :samp:`-X lazy_imports={all,normal}` controls lazy import behavior. ``all`` makes eligible module-scope imports lazy by default. ``normal`` (the default) respe…
  msgstr: :samp:`-X lazy_imports={all,normal}` رفتار ایمپورت تنبل را کنترل می‌کند. مقدار ``all`` تمام ایمپورت‌ها را به طور پیش‌فرض تنبل می‌کند، و ``normal`` (پیش‌فرض) به…

- Controls lazy import behavior. Accepts two values: ``all`` makes all imports lazy by default, and ``normal`` (the default) respects the ``lazy`` keyword in sou…
+ Control lazy import behavior. The variable accepts two values. ``all`` makes eligible module-scope imports lazy by default. ``normal`` (the default) respects :…
  msgstr: رفتار ایمپورت تنبل را کنترل می‌کند. دو مقدار را می‌پذیرد: ``all`` تمام ایمپورت‌ها را به‌طور پیش‌فرض تنبل می‌کند، و ``normal`` (پیش‌فرض) به کلیدواژه ``lazy`` در…

whatsnew/3.15.po (1 new fuzzy)

- For cases where you want to enable lazy loading globally without modifying source code, Python provides the :option:`-X lazy_imports <-X>` command-line option …
+ For cases where you want to enable lazy loading globally without modifying source code, Python provides the :option:`-X lazy_imports <-X>` command-line option …
  msgstr: برای مواردی که می‌خواهید بارگذاری تنبل را به صورت سراسری و بدون تغییر کد منبع فعال کنید، پایتون گزینه‌ی خط فرمان :option:`-X lazy_imports <-X>` و متغیر محیطی :…

✏️ New untranslated strings

Brand-new source strings with no close match to an existing translation.

builtins/functions.po (2 new untranslated)

Eager :keyword:`import` statements call this function. For :ref:`lazy imports <lazy-imports>`, Python calls this function at resolution.
You can replace :func:`__import__` through an assignment to ``builtins.__import__``.  :ref:`Import hooks <import-hooks>` usually provide a simpler way to custo…

c-api/import.po (2 new untranslated)

Set the lazy import filter for the current interpreter. The *filter* must be a callable, ``NULL``, or :c:data:`Py_None`. Use ``NULL`` or :c:data:`Py_None` to c…
Make eligible module-scope imports lazy by default. See the :ref:`lazy import restrictions <lazy-imports>`.

c-api/init_config.po (1 new untranslated)

A value of ``-1`` selects the default behavior, which respects :keyword:`lazy` and :attr:`module.__lazy_modules__`. A value of ``1`` makes eligible module-scop…

glossary.po (1 new untranslated)

An import that delays module search and execution until the first use of the imported name. A proxy represents the imported object until resolution. See :ref:`…

library/ast.po (3 new untranslated)

An import statement. ``names`` is a list of :class:`alias` nodes. ``is_lazy`` is ``1`` for ``lazy import`` and ``0`` for ``import``. The field records the sour…
Added ``is_lazy`` for :ref:`lazy imports <lazy-imports>`.
The ``is_lazy`` field records the source syntax. It does not reflect runtime controls such as :func:`sys.set_lazy_imports` or :attr:`module.__lazy_modules__`.

library/dis.po (5 new untranslated)

The instruction does not change the current namespace. For ``import spam``, a subsequent store instruction binds the result.
The two lowest bits of *namei* control :ref:`lazy imports <lazy-imports>`. Bit ``0`` marks an explicit lazy import. Bit ``1`` forces an eager import. If both b…
The two lowest bits encode lazy import flags.
For a :class:`lazy import proxy <types.LazyImportType>`, the result can be another proxy that represents the requested attribute.
Added support for lazy import proxies.

library/importlib.po (2 new untranslated)

Use the :keyword:`lazy` keyword for an explicit :ref:`lazy import <lazy-imports>`. Python delays the module search and execution until the first use of the imp…
The :class:`importlib.util.LazyLoader` example below does the module search immediately and delays only module execution. It creates a module object in :data:`…

library/sys.po (3 new untranslated)

``"normal"``: Respect :keyword:`lazy` and :attr:`module.__lazy_modules__`. This is the default mode.
The :ref:`lazy import restrictions <lazy-imports>` also apply in ``"all"`` mode. A mode change applies to subsequent import statements. It does not resolve laz…
The filter runs when the import statement executes, before proxy creation. If the filter raises an exception, the exception propagates from that statement. The…

library/tempfile.po (1 new untranslated)

Reopening the temporary file by name is only safe when the file's directory is trusted. See :cwe:`377` for more information.

library/types.po (7 new untranslated)

The type of :ref:`lazy import proxies <lazy-imports>`. A proxy represents a module or an imported attribute until resolution. You cannot create instances of th…
A direct read of an imported global name resolves its proxy. Access through :func:`globals` or :attr:`module.__dict__` returns the proxy itself::
import types\nlazy import json\n\nisinstance(globals()["json"], types.LazyImportType)  # True\njson.dumps({"key": "value"})  # Resolves the import.\nisinstance…
:ref:`lazy-imports`
Resolve the lazy import and return the imported module or attribute. This method can leave the proxy in its namespace. To replace the proxy explicitly, assign …
lazy import json\njson = globals()["json"].resolve()
Each call to :func:`!resolve` call does a fresh import. The proxy itself does not store :func:`!resolve`'s result, relying on the import mechanism to use :attr…

reference/datamodel.po (1 new untranslated)

Dictionary access does not resolve :ref:`lazy import proxies <lazy-imports>`. This also applies to the dictionary that :func:`globals` returns. See :class:`typ…

reference/import.po (1 new untranslated)

With :ref:`lazy imports <lazy-imports>`, an import statement can bind a proxy before the module search and execution occur. The first use of the imported name …

reference/simple_stmts.po (13 new untranslated)

With ``lazy from ... import``, each imported name can have its own proxy. If the module is already initialized, Python can bind an attribute without a proxy. O…
The sections below describe name resolution and runtime controls.
Resolution and side effects
Python resolves a proxy when code reads the imported name or accesses that name as a module attribute. After resolution, Python replaces the proxy if the names…
Direct access through :func:`globals` or a module's :attr:`~module.__dict__` returns the proxy without resolution. The same applies to dictionary iteration. :f…
The module search occurs at resolution time. Changes to :data:`sys.path` or import hooks before resolution can change which module Python imports. Direct calls…
Module code executes when resolution loads the module. Side effects, such as plugin registration, occur at that time. If a program needs these side effects bef…
An import failure leaves the proxy available for a later attempt. If resolution recursively accesses the same unresolved proxy, Python raises :exc:`ImportCycle…
Runtime controls
The default ``"normal"`` mode respects explicit :keyword:`lazy` statements and :attr:`~module.__lazy_modules__`. The ``"all"`` mode also makes other eligible m…
Set the mode with :option:`-X lazy_imports <-X>`, :envvar:`PYTHON_LAZY_IMPORTS`, or :func:`sys.set_lazy_imports`. :func:`sys.get_lazy_imports` returns the curr…
:func:`sys.set_lazy_imports_filter` supplies a filter that can force any potentially lazy import to be eager. This also applies to explicit :keyword:`lazy` sta…
See also :data:`sys.lazy_modules`.

tutorial/modules.po (3 new untranslated)

A :ref:`lazy import <lazy-imports>` delays this execution until the first use of the imported name. For example, in a new interpreter session::
>>> lazy import fibo\n>>> fibo.fib(10)  # Loads the module, then calls fib().\n0 1 1 2 3 5 8
Lazy imports are permitted only at module scope and outside :keyword:`try`/:keyword:`except`/:keyword:`finally` blocks.

Triggered by sync with 3.15 (commit 5e9d407).

Activity

  1. added
    تغییرات خودکار در ترجمه‌ها
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15تغییرات خودکار در ترجمه‌ها

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions