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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 86 additions & 33 deletions library/__future__.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,120 +24,148 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

msgid ":mod:`!__future__` --- Future statement definitions"
msgstr ""
msgstr ":mod:`!__future__` --- تعاریف دستورات آینده"

msgid "**Source code:** :source:`Lib/__future__.py`"
msgstr ""
msgstr "**کد منبع:** :source:`Lib/__future__.py`"

msgid "Imports of the form ``from __future__ import feature`` are called :ref:`future statements <future>`. These are special-cased by the Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard."
msgstr ""
"ایمپورت‌هایی به شکل ``from __future__ import feature``، :ref:"
"`future statements <future>` نامیده می‌شوند. این موارد توسط کامپایلر پایتون به‌صورت ویژه "
"درنظر گرفته می‌شوند تا امکان استفاده از ویژگیهای جدید پایتون را در ماژولهایی "
"که شامل دستور آینده هستند، قبل از نسخه‌ای که آن ویژگی به‌صورت استاندارد درمی‌آید، "
"فراهم کنند."

msgid "While these future statements are given additional special meaning by the Python compiler, they are still executed like any other import statement and the :mod:`!__future__` exists and is handled by the import system the same way any other Python module would be. This design serves three purposes:"
msgstr ""
"اگرچه این دستورات آینده‌نگر توسط کامپایلر پایتون معنای ویژه‌ی اضافی پیدا می‌کنند، "
"اما همچنان مانند هر دستور ایمپورت دیگری اجرا می‌شوند "
"و :mod:`!__future__` وجود دارد و توسط سیستم ایمپورت به همان "
"روشی که هر ماژول پایتون دیگری مدیریت می‌شود، مدیریت می‌گردد. این طراحی سه هدف را دنبال می‌کند:"

msgid "To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing."
msgstr ""
"برای جلوگیری از سردرگمی ابزارهای موجود که دستورات ایمپورت را تحلیل می‌کنند و انتظار "
"دارند که ماژول‌های مورد نظر خود را پیدا کنند."

msgid "To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via importing :mod:`!__future__` and examining its contents."
msgstr ""
"برای مستندسازی زمان معرفی تغییرات ناسازگار و زمانی که "
"--- یا شده‌اند --- اجباری می‌شوند. این نوعی مستندسازی قابل‌اجرا است، "
"و می‌توان آن را به‌صورت برنامه‌نویسی با ایمپورت کردن :mod:`!__future__` و "
"بررسی محتویات آن مشاهده کرد."

msgid "To ensure that :ref:`future statements <future>` run under releases prior to Python 2.1 at least yield runtime exceptions (the import of :mod:`!__future__` will fail, because there was no module of that name prior to 2.1)."
msgstr ""
"برای اطمینان از اینکه :ref:`future statements <future>` در نسخه‌های پیش از "
"پایتون 2.1 حداقل استثناهای زمان اجرا ایجاد می‌کنند (ایمپورت کردن :mod:`!"
"__future__` با شکست مواجه خواهد شد، زیرا هیچ ماژولی با آن نام پیش از "
"نسخه‌ی ۲.۱ وجود نداشته است)."

msgid "Module Contents"
msgstr ""
msgstr "محتویات ماژول"

msgid "No feature description will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:"
msgstr ""
"هیچ توضیح ویژگی‌ای هرگز از :mod:`!__future__` حذف نخواهد شد. از "
"زمان معرفی آن در پایتون ۲.۱، ویژگی‌های زیر راه خود را "
"به این زبان با استفاده از این مکانیزم پیدا کرده‌اند:"

msgid "feature"
msgstr ""
msgstr "ویژگی"

msgid "optional in"
msgstr ""
msgstr "اختیاری در"

msgid "mandatory in"
msgstr ""
msgstr "اجباری در"

msgid "effect"
msgstr ""
msgstr "تأثیر"

msgid "2.1.0b1"
msgstr ""
msgstr "2.1.0b1"

msgid "2.2"
msgstr ""
msgstr "2.2"

msgid ":pep:`227`: *Statically Nested Scopes*"
msgstr ""
msgstr ":pep:`227`: *محدوده‌های تو در تو ایستا*"

msgid "2.2.0a1"
msgstr ""
msgstr "2.2.0a1"

msgid "2.3"
msgstr ""
msgstr "2.3"

msgid ":pep:`255`: *Simple Generators*"
msgstr ""
msgstr ":pep:`255`: *تولید‌کننده‌های ساده*"

msgid "2.2.0a2"
msgstr ""
msgstr "2.2.0a2"

msgid "3.0"
msgstr ""
msgstr "3.0"

msgid ":pep:`238`: *Changing the Division Operator*"
msgstr ""
msgstr ":pep:`238`: *تغییر عملگر تقسیم*"

msgid "2.5.0a1"
msgstr ""
msgstr "2.5.0a1"

msgid ":pep:`328`: *Imports: Multi-Line and Absolute/Relative*"
msgstr ""
msgstr ":pep:`328`: *ایمپورتها: چندخطی و مطلق/نسبی*"

msgid "2.6"
msgstr ""
msgstr "2.6"

msgid ":pep:`343`: *The “with” Statement*"
msgstr ""
msgstr ":pep:`343`: *دستور “with”*"

msgid "2.6.0a2"
msgstr ""
msgstr "2.6.0a2"

msgid ":pep:`3105`: *Make print a function*"
msgstr ""
msgstr ":pep:`3105`: *تبدیل print به یک تابع*"

msgid ":pep:`3112`: *Bytes literals in Python 3000*"
msgstr ""
msgstr ":pep:`3112`: *لیترال‌های بایت در پایتون ۳۰۰۰*"

msgid "3.5.0b1"
msgstr ""
msgstr "3.5.0b1"

msgid "3.7"
msgstr ""
msgstr "3.7"

msgid ":pep:`479`: *StopIteration handling inside generators*"
msgstr ""
msgstr ":pep:`479`: *مدیریت StopIteration درون تولیدگرها*"

msgid "3.7.0b1"
msgstr ""
msgstr "3.7.0b1"

msgid "Never [1]_"
msgstr ""
msgstr "هرگز [1]_"

msgid ":pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred evaluation of annotations using descriptors*"
msgstr ""
":pep:`563`: *ارزیابی به‌تعویق‌افتادهٔ annotationها*، :pep:`649`: *ارزیابی "
"به‌تعویق‌افتادهٔ annotationها با استفاده از توصیفگرها*"

msgid "Each statement in :file:`__future__.py` is of the form::"
msgstr ""
msgstr "هر دستور در :file:`__future__.py` به شکل زیر است::"

msgid ""
"FeatureName = _Feature(OptionalRelease, MandatoryRelease,\n"
" CompilerFlag)"
msgstr ""
"FeatureName = _Feature(OptionalRelease, MandatoryRelease,\n"
" CompilerFlag)"

msgid "where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are 5-tuples of the same form as :data:`sys.version_info`::"
msgstr ""
"که در آن، به‌طور معمول، *OptionalRelease* کوچک‌تر از *MandatoryRelease* است، و هر دو "
"تاپل‌های ۵ عضوی به همان شکل :data:`sys.version_info` هستند::"

msgid ""
"(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int\n"
Expand All @@ -147,33 +175,58 @@ msgid ""
" PY_RELEASE_SERIAL # the 3; an int\n"
")"
msgstr ""
"(PY_MAJOR_VERSION, # عدد 2 در 2.1.0a3؛ یک عدد صحیح\n"
" PY_MINOR_VERSION, # عدد 1؛ یک عدد صحیح\n"
" PY_MICRO_VERSION, # عدد 0؛ یک عدد صحیح\n"
" PY_RELEASE_LEVEL, # \"alpha\"، \"beta\"، \"candidate\" یا \"final\"؛ رشته\n"
" PY_RELEASE_SERIAL # عدد 3؛ یک عدد صحیح\n"
")"

msgid "*OptionalRelease* records the first release in which the feature was accepted."
msgstr ""
"*OptionalRelease* اولین نسخه‌ای را ثبت می‌کند که ویژگی در آن "
"پذیرفته شده است."

msgid "In the case of a *MandatoryRelease* that has not yet occurred, *MandatoryRelease* predicts the release in which the feature will become part of the language."
msgstr ""
"در مورد *MandatoryRelease* که هنوز رخ نداده است، "
"*MandatoryRelease* نسخه‌ای را پیش‌بینی می‌کند که ویژگی در آن "
"بخشی از زبان خواهد شد."

msgid "Else *MandatoryRelease* records when the feature became part of the language; in releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to use such imports."
msgstr ""
"در غیر این صورت، *MandatoryRelease* زمانی را ثبت می‌کند که ویژگی به بخشی از "
"زبان تبدیل شد؛ در نسخه‌های همان یا بعد از آن، ماژول‌ها دیگر برای استفاده از "
"آن ویژگی نیازی به دستور future ندارند، اما می‌توانند به استفاده از چنین "
"ایمپورت‌هایی ادامه دهند."

msgid "*MandatoryRelease* may also be ``None``, meaning that a planned feature got dropped or that it is not yet decided."
msgstr ""
"*MandatoryRelease* همچنین می‌تواند ``None`` باشد، به این معنی که یک ویژگی برنامه‌ریزی‌شده "
"حذف شده است یا اینکه هنوز تصمیمی درباره‌ی آن گرفته نشده است."

msgid "*CompilerFlag* is the (bitfield) flag that should be passed in the fourth argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances."
msgstr ""
"*CompilerFlag* پرچم است که باید در آرگومان چهارم "
"به تابع داخلی :func:`compile` ارسال شود تا ویژگی را در "
"کد کامپایل‌شده‌ی پویا فعال کند. این پرچم در ویژگی :attr:`_Feature."
"compiler_flag` در نمونه‌های :class:`_Feature` ذخیره می‌شود."

msgid "``from __future__ import annotations`` was previously scheduled to become mandatory in Python 3.10, but the change was delayed and ultimately canceled. This feature will eventually be deprecated and removed. See :pep:`649` and :pep:`749`."
msgstr ""
"``from __future__ import annotations`` قبلاً قرار بود در پایتون ۳.۱۰ "
"اجباری شود، اما این تغییر به تعویق افتاد و در نهایت "
"لغو شد. این ویژگی در نهایت منسوخ و حذف خواهد شد. برای اطلاعات بیشتر به :pep:"
"`649` و :pep:`749` مراجعه کنید."

msgid ":ref:`future`"
msgstr ""
msgstr ":ref:`future`"

msgid "How the compiler treats future imports."
msgstr ""
msgstr "نحوه‌ی برخورد کامپایلر با ایمپورت‌های future"

msgid ":pep:`236` - Back to the __future__"
msgstr ""
msgstr ":pep:`236` - بازگشت به __future__"

msgid "The original proposal for the __future__ mechanism."
msgstr ""
msgstr "پیشنهاد اولیه برای مکانیزم __future__."
25 changes: 23 additions & 2 deletions library/__main__.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,60 @@ msgstr ""

msgid "In Python, the special name ``__main__`` is used for two important constructs:"
msgstr ""
"در پایتون، از نام ویژه‌ی ``__main__`` برای دو ساختار مهم "
"استفاده می‌شود:"

msgid "the name of the top-level environment of the program, which can be checked using the ``__name__ == '__main__'`` expression; and"
msgstr ""
"نام محیط سطح بالای برنامه، که می‌توان آن را با استفاده از عبارت "
"``__name__ == '__main__'`` بررسی کرد؛ و"

msgid "the ``__main__.py`` file in Python packages."
msgstr ""
msgstr "فایل ``__main__.py`` در بسته‌های پایتون."

msgid "Both of these mechanisms are related to Python modules; how users interact with them and how they interact with each other. They are explained in detail below. If you're new to Python modules, see the tutorial section :ref:`tut-modules` for an introduction."
msgstr ""
"هر دوی این مکانیزم‌ها به ماژول‌های پایتون مربوط می‌شوند؛ نحوه‌ی تعامل کاربران "
"با آن‌ها و نحوه‌ی تعامل آن‌ها با یکدیگر. این موارد در "
"جزئیات در زیر توضیح داده شده‌اند. اگر با ماژول‌های پایتون تازه‌کار هستید، برای آشنایی به بخش آموزش :"
"ref:`tut-modules` مراجعه کنید."

msgid "``__name__ == '__main__'``"
msgstr ""
msgstr "``__name__ == '__main__'``"

msgid "When a Python module or package is imported, ``__name__`` is set to the module's name. Usually, this is the name of the Python file itself without the ``.py`` extension::"
msgstr ""
"هنگامی که یک ماژول یا بستهٔ پایتون ایمپورت می‌شود، ``__name__`` به "
"نام ماژول تنظیم می‌شود. معمولاً این همان نام فایل پایتون است بدون "
"پسوند ``.py``::"

msgid ""
">>> import configparser\n"
">>> configparser.__name__\n"
"'configparser'"
msgstr ""
">>> import configparser\n"
">>> configparser.__name__\n"
"'configparser'"

msgid "If the file is part of a package, ``__name__`` will also include the parent package's path::"
msgstr ""
"اگر فایل بخشی از یک بسته باشد، ``__name__`` همچنین مسیر بستهٔ والد را "
"شامل خواهد شد::"

msgid ""
">>> from concurrent.futures import process\n"
">>> process.__name__\n"
"'concurrent.futures.process'"
msgstr ""
">>> from concurrent.futures import process\n"
">>> process.__name__\n"
"'concurrent.futures.process'"

msgid "However, if the module is executed in the top-level code environment, its ``__name__`` is set to the string ``'__main__'``."
msgstr ""
"با این حال، اگر ماژول در محیط کد سطح بالا اجرا شود، "
"``__name__`` آن به رشته‌ی ``'__main__'`` تنظیم می‌شود."

msgid "What is the \"top-level code environment\"?"
msgstr ""
Expand Down
Loading