Skip to content

Commit c33641e

Browse files
Rmaawnsepehr-rs
authored andcommitted
Add translations for changelog.po and other files
1 parent e38e4d8 commit c33641e

18 files changed

Lines changed: 8619 additions & 10739 deletions

‎c-api/bytes.po‎

Lines changed: 87 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgstr ""
1515
"Project-Id-Version: Python 3.14\n"
1616
"Report-Msgid-Bugs-To: \n"
1717
"POT-Creation-Date: 2026-10-11 04:18+0000\n"
18-
"PO-Revision-Date: 2026-09-15 13:25+0330\n"
18+
"PO-Revision-Date: 2026-10-11 17:41+0330\n"
1919
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
2020
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
2121
"Language: fa\n"
@@ -397,10 +397,10 @@ msgstr ""
397397
"return (char*)PyBytesWriter_GetData(writer) + pos;"
398398

399399
msgid "Example creating the string ``b'abc'``"
400-
msgstr ""
400+
msgstr "نمونه‌ای برای ساخت رشته‌ی ``b'abc'``"
401401

402402
msgid "Example creating the bytes string ``b\"abc\"``, with a fixed size of 3 bytes::"
403-
msgstr ""
403+
msgstr "نمونه‌ای برای ساخت رشته‌ی بایت ``b\"abc\"``، با اندازه‌ی ثابت ۳ بایت::"
404404

405405
msgid ""
406406
"PyObject* create_abc(void)\n"
@@ -415,9 +415,20 @@ msgid ""
415415
" return PyBytesWriter_Finish(writer);\n"
416416
"}"
417417
msgstr ""
418+
"PyObject* create_abc(void)\n"
419+
"{\n"
420+
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
421+
" if (writer == NULL) {\n"
422+
" return NULL;\n"
423+
" }\n"
424+
"\n"
425+
" char *str = PyBytesWriter_GetData(writer);\n"
426+
" memcpy(str, \"abc\", 3);\n"
427+
" return PyBytesWriter_Finish(writer);\n"
428+
"}"
418429

419430
msgid "Variant using a pointer to compute the final size::"
420-
msgstr ""
431+
msgstr "گونه‌ای که از یک اشاره‌گر برای محاسبه‌ی اندازه‌ی نهایی استفاده می‌کند::"
421432

422433
msgid ""
423434
"PyObject* create_abc_ptr(void)\n"
@@ -433,14 +444,24 @@ msgid ""
433444
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
434445
"}"
435446
msgstr ""
447+
"PyObject* create_abc_ptr(void)\n"
448+
"{\n"
449+
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
450+
" if (writer == NULL) {\n"
451+
" return NULL;\n"
452+
" }\n"
453+
"\n"
454+
" char *str = PyBytesWriter_GetData(writer);\n"
455+
" memcpy(str, \"abc\", 3);\n"
456+
" str += 1;\n"
457+
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
458+
"}"
436459

437460
msgid "Update ``PyBytes_FromStringAndSize()`` code"
438-
msgstr ""
461+
msgstr "به‌روزرسانی کد ``PyBytes_FromStringAndSize()``"
439462

440-
#, fuzzy
441-
#| msgid "Use the :c:type:`PyBytesWriter` API instead of ``PyBytes_FromStringAndSize(NULL, len)``."
442463
msgid "Example of code using the soft deprecated ``PyBytes_FromStringAndSize(NULL, size)`` API::"
443-
msgstr "به جای ``PyBytes_FromStringAndSize(NULL, len)`` از API مربوط به :c:type:`PyBytesWriter` استفاده کنید."
464+
msgstr "نمونه‌ای از کد که از API منسوخ‌شده‌ی نرم ``PyBytes_FromStringAndSize(NULL, size)`` استفاده می‌کند::"
444465

445466
msgid ""
446467
"int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n"
@@ -460,9 +481,25 @@ msgid ""
460481
" return result;\n"
461482
"}"
462483
msgstr ""
484+
"int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n"
485+
"{\n"
486+
" ...\n"
487+
"}\n"
488+
"\n"
489+
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
490+
"{\n"
491+
" PyObject *result = PyBytes_FromStringAndSize(NULL, num_bytes);\n"
492+
" if (result == NULL) {\n"
493+
" return NULL;\n"
494+
" }\n"
495+
" if (copy_bytes(PyBytes_AS_STRING(result), start, num_bytes) < 0) {\n"
496+
" Py_CLEAR(result);\n"
497+
" }\n"
498+
" return result;\n"
499+
"}"
463500

464501
msgid "It can now be updated to::"
465-
msgstr ""
502+
msgstr "اکنون می‌توان آن را به شکل زیر به‌روزرسانی کرد::"
466503

467504
msgid ""
468505
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
@@ -478,12 +515,24 @@ msgid ""
478515
" return PyBytesWriter_Finish(writer);\n"
479516
"}"
480517
msgstr ""
518+
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
519+
"{\n"
520+
" PyBytesWriter *writer = PyBytesWriter_Create(num_bytes);\n"
521+
" if (writer == NULL) {\n"
522+
" return NULL;\n"
523+
" }\n"
524+
" if (copy_bytes(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {\n"
525+
" PyBytesWriter_Discard(writer);\n"
526+
" return NULL;\n"
527+
" }\n"
528+
" return PyBytesWriter_Finish(writer);\n"
529+
"}"
481530

482531
msgid "Update ``_PyBytes_Resize()`` code"
483-
msgstr ""
532+
msgstr "به‌روزرسانی کد ``_PyBytes_Resize()``"
484533

485534
msgid "Example of code using the soft deprecated ``_PyBytes_Resize()`` API::"
486-
msgstr ""
535+
msgstr "نمونه‌ای از کد که از API منسوخ‌شده‌ی نرم ``_PyBytes_Resize()`` استفاده می‌کند::"
487536

488537
msgid ""
489538
"void create_string(Py_ssize_t size)\n"
@@ -502,6 +551,21 @@ msgid ""
502551
" return bytes;\n"
503552
"}"
504553
msgstr ""
554+
"void create_string(Py_ssize_t size)\n"
555+
"{\n"
556+
" PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);\n"
557+
" if (bytes == NULL) {\n"
558+
" return NULL;\n"
559+
" }\n"
560+
" char *str = PyBytes_AS_STRING(bytes);\n"
561+
"\n"
562+
" // ... write data into str ...\n"
563+
"\n"
564+
" if (_PyBytes_Resize(&bytes, (str - PyBytes_AS_STRING(bytes)))) {\n"
565+
" return NULL;\n"
566+
" }\n"
567+
" return bytes;\n"
568+
"}"
505569

506570
msgid ""
507571
"void create_string(Py_ssize_t size)\n"
@@ -517,6 +581,18 @@ msgid ""
517581
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
518582
"}"
519583
msgstr ""
584+
"void create_string(Py_ssize_t size)\n"
585+
"{\n"
586+
" PyBytesWriter *writer = PyBytesWriter_Create(size);\n"
587+
" if (writer == NULL) {\n"
588+
" return NULL;\n"
589+
" }\n"
590+
" char *str = PyBytesWriter_GetData(writer);\n"
591+
"\n"
592+
" // ... write data into str ...\n"
593+
"\n"
594+
" return PyBytesWriter_FinishWithPointer(writer, str;\n"
595+
"}"
520596

521597
msgid "object"
522598
msgstr "شیء"

‎c-api/slice.po‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ msgstr "احتمالاً نمی‌خواهید از این تابع استفاد
5050
msgid "The parameter type for the *slice* parameter was ``PySliceObject*`` before."
5151
msgstr "نوع پارامتر *slice* قبلاً ``PySliceObject*`` بود."
5252

53-
#, fuzzy
54-
#| msgid "Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and step indices from the slice object *slice* assuming a sequence of length *length*, and store the length of the slice in *slicelength*. Out of bounds indices are clipped in a manner consistent with the handling of normal slices."
5553
msgid "Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and step indices from the slice object *slice* assuming a sequence of length *length*, and store the length of the slice in *slicelength*. Out of bounds indices are clipped in a manner consistent with the handling of normal slices. *length* must not be negative."
56-
msgstr "جایگزین قابل استفاده برای :c:func:`PySlice_GetIndices`. شاخص‌های شروع، پایان و گام را از شیء اسلایس *slice* با فرض یک دنباله با طول *length* بازیابی کنید، و طول اسلایس را در *slicelength* ذخیره کنید. شاخص‌های خارج از کران به روشی سازگار با مدیریت اسلایس‌های عادی برش داده می‌شوند."
54+
msgstr "جایگزین قابل استفاده برای :c:func:`PySlice_GetIndices`. شاخص‌های شروع، پایان و گام را از شیء اسلایس *slice* با فرض دنباله‌ای به طول *length* بازیابی کنید و طول اسلایس را در *slicelength* ذخیره کنید. شاخص‌های خارج از کران به روشی سازگار با مدیریت اسلایس‌های عادی برش داده می‌شوند. *length* نباید منفی باشد."
5755

5856
msgid "Return ``0`` on success and ``-1`` on error with an exception set."
5957
msgstr "در صورت موفقیت ``0`` و در صورت خطا ``-1`` به همراه استثنای تنظیم‌شده برمی‌گرداند."

‎howto/abi3t-migration.po‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ msgstr ""
1212
"Project-Id-Version: Python 3.15\n"
1313
"Report-Msgid-Bugs-To: \n"
1414
"POT-Creation-Date: 2026-10-08 09:24+0330\n"
15-
"PO-Revision-Date: 2026-10-01 14:41+0330\n"
15+
"PO-Revision-Date: 2026-10-10 20:55+0330\n"
1616
"Last-Translator: Automatically generated\n"
1717
"Language-Team: none\n"
1818
"Language: fa\n"
1919
"MIME-Version: 1.0\n"
2020
"Content-Type: text/plain; charset=UTF-8\n"
2121
"Content-Transfer-Encoding: 8bit\n"
22+
"X-Generator: Poedit 3.6\n"
2223

2324
msgid "Migrating to Stable ABI for free threading (``abi3t``)"
2425
msgstr "مهاجرت به ABI پایدار برای نخ‌بندی آزاد (``abi3t``)"
@@ -350,7 +351,6 @@ msgstr "همانند نمونه، تابع ``PyModExport_`` شما *فقط* با
350351
msgid "When building for Windows using the Setuptools_ build tool, removing the :samp:`PyInit_{<modname>}` function may result in the linker error :samp:`LINK : error LNK2001: unresolved external symbol PyInit_{<modname>}`. This is caused by Setuptools passing an ``/EXPORT`` linker flag, which is redundant since Python 3.15 (see :gh:`141671`). A workaround is to add a dummy :samp:`PyInit_{<modname>}` function to your code. Python 3.15+ will never call this function if :samp:`PyModExport_{<modname>}` is present, so it can always fail:"
351352
msgstr "هنگام ساخت برای ویندوز با استفاده از ابزار ساخت Setuptools_، حذف کردن تابع :samp:`PyInit_{<modname>}` ممکن است منجر به خطای پیونددهنده‌ی :samp:`LINK : error LNK2001: unresolved external symbol PyInit_{<modname>}` شود. این مشکل به این دلیل رخ می‌دهد که Setuptools یک پرچم پیونددهنده‌ی ``/EXPORT`` را ارسال می‌کند که از پایتون ۳.۱۵ به بعد اضافی است (نگاه کنید به :gh:`141671`). یک راه حل جایگزین این است که یک تابع :samp:`PyInit_{<modname>}` نمایشی (dummy) به کد خود اضافه کنید. پایتون ۳.۱۵ به بعد هرگز این تابع را در صورت وجود :samp:`PyModExport_{<modname>}` فراخوانی نخواهد کرد، بنابراین همیشه می‌تواند با خطا مواجه شود:"
352353

353-
#, fuzzy
354354
msgid ""
355355
"// Workaround for https://github.com/pypa/distutils/issues/387\n"
356356
"PyMODINIT_FUNC\n"

‎library/ast.po‎

Lines changed: 1 addition & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgstr ""
1414
"Project-Id-Version: Python 3.14\n"
1515
"Report-Msgid-Bugs-To: \n"
1616
"POT-Creation-Date: 2026-10-08 09:24+0330\n"
17-
"PO-Revision-Date: 2026-10-06 20:40+0330\n"
17+
"PO-Revision-Date: 2026-10-10 20:54+0330\n"
1818
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
1919
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
2020
"Language: fa\n"
@@ -42,162 +42,6 @@ msgstr "دستور زبان انتزاعی"
4242
msgid "The abstract grammar is currently defined as follows:"
4343
msgstr "دستور زبان انتزاعی در حال حاضر به‌صورت زیر تعریف شده است:"
4444

45-
#, fuzzy
46-
#| msgid ""
47-
#| "-- ASDL's 4 builtin types are:\n"
48-
#| "-- identifier, int, string, constant\n"
49-
#| "\n"
50-
#| "module Python\n"
51-
#| "{\n"
52-
#| " mod = Module(stmt* body, type_ignore* type_ignores)\n"
53-
#| " | Interactive(stmt* body)\n"
54-
#| " | Expression(expr body)\n"
55-
#| " | FunctionType(expr* argtypes, expr returns)\n"
56-
#| "\n"
57-
#| " stmt = FunctionDef(identifier name, arguments args,\n"
58-
#| " stmt* body, expr* decorator_list, expr? returns,\n"
59-
#| " string? type_comment, type_param* type_params)\n"
60-
#| " | AsyncFunctionDef(identifier name, arguments args,\n"
61-
#| " stmt* body, expr* decorator_list, expr? returns,\n"
62-
#| " string? type_comment, type_param* type_params)\n"
63-
#| "\n"
64-
#| " | ClassDef(identifier name,\n"
65-
#| " expr* bases,\n"
66-
#| " keyword* keywords,\n"
67-
#| " stmt* body,\n"
68-
#| " expr* decorator_list,\n"
69-
#| " type_param* type_params)\n"
70-
#| " | Return(expr? value)\n"
71-
#| "\n"
72-
#| " | Delete(expr* targets)\n"
73-
#| " | Assign(expr* targets, expr value, string? type_comment)\n"
74-
#| " | TypeAlias(expr name, type_param* type_params, expr value)\n"
75-
#| " | AugAssign(expr target, operator op, expr value)\n"
76-
#| " -- 'simple' indicates that we annotate simple name without parens\n"
77-
#| " | AnnAssign(expr target, expr annotation, expr? value, int simple)\n"
78-
#| "\n"
79-
#| " -- use 'orelse' because else is a keyword in target languages\n"
80-
#| " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n"
81-
#| " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n"
82-
#| " | While(expr test, stmt* body, stmt* orelse)\n"
83-
#| " | If(expr test, stmt* body, stmt* orelse)\n"
84-
#| " | With(withitem* items, stmt* body, string? type_comment)\n"
85-
#| " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n"
86-
#| "\n"
87-
#| " | Match(expr subject, match_case* cases)\n"
88-
#| "\n"
89-
#| " | Raise(expr? exc, expr? cause)\n"
90-
#| " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n"
91-
#| " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n"
92-
#| " | Assert(expr test, expr? msg)\n"
93-
#| "\n"
94-
#| " | Import(alias* names)\n"
95-
#| " | ImportFrom(identifier? module, alias* names, int? level)\n"
96-
#| "\n"
97-
#| " | Global(identifier* names)\n"
98-
#| " | Nonlocal(identifier* names)\n"
99-
#| " | Expr(expr value)\n"
100-
#| " | Pass | Break | Continue\n"
101-
#| "\n"
102-
#| " -- col_offset is the byte offset in the utf8 string the parser uses\n"
103-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
104-
#| "\n"
105-
#| " -- BoolOp() can use left & right?\n"
106-
#| " expr = BoolOp(boolop op, expr* values)\n"
107-
#| " | NamedExpr(expr target, expr value)\n"
108-
#| " | BinOp(expr left, operator op, expr right)\n"
109-
#| " | UnaryOp(unaryop op, expr operand)\n"
110-
#| " | Lambda(arguments args, expr body)\n"
111-
#| " | IfExp(expr test, expr body, expr orelse)\n"
112-
#| " | Dict(expr?* keys, expr* values)\n"
113-
#| " | Set(expr* elts)\n"
114-
#| " | ListComp(expr elt, comprehension* generators)\n"
115-
#| " | SetComp(expr elt, comprehension* generators)\n"
116-
#| " | DictComp(expr key, expr value, comprehension* generators)\n"
117-
#| " | GeneratorExp(expr elt, comprehension* generators)\n"
118-
#| " -- the grammar constrains where yield expressions can occur\n"
119-
#| " | Await(expr value)\n"
120-
#| " | Yield(expr? value)\n"
121-
#| " | YieldFrom(expr value)\n"
122-
#| " -- need sequences for compare to distinguish between\n"
123-
#| " -- x < 4 < 3 and (x < 4) < 3\n"
124-
#| " | Compare(expr left, cmpop* ops, expr* comparators)\n"
125-
#| " | Call(expr func, expr* args, keyword* keywords)\n"
126-
#| " | FormattedValue(expr value, int conversion, expr? format_spec)\n"
127-
#| " | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n"
128-
#| " | JoinedStr(expr* values)\n"
129-
#| " | TemplateStr(expr* values)\n"
130-
#| " | Constant(constant value, string? kind)\n"
131-
#| "\n"
132-
#| " -- the following expression can appear in assignment context\n"
133-
#| " | Attribute(expr value, identifier attr, expr_context ctx)\n"
134-
#| " | Subscript(expr value, expr slice, expr_context ctx)\n"
135-
#| " | Starred(expr value, expr_context ctx)\n"
136-
#| " | Name(identifier id, expr_context ctx)\n"
137-
#| " | List(expr* elts, expr_context ctx)\n"
138-
#| " | Tuple(expr* elts, expr_context ctx)\n"
139-
#| "\n"
140-
#| " -- can appear only in Subscript\n"
141-
#| " | Slice(expr? lower, expr? upper, expr? step)\n"
142-
#| "\n"
143-
#| " -- col_offset is the byte offset in the utf8 string the parser uses\n"
144-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
145-
#| "\n"
146-
#| " expr_context = Load | Store | Del\n"
147-
#| "\n"
148-
#| " boolop = And | Or\n"
149-
#| "\n"
150-
#| " operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n"
151-
#| " | RShift | BitOr | BitXor | BitAnd | FloorDiv\n"
152-
#| "\n"
153-
#| " unaryop = Invert | Not | UAdd | USub\n"
154-
#| "\n"
155-
#| " cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n"
156-
#| "\n"
157-
#| " comprehension = (expr target, expr iter, expr* ifs, int is_async)\n"
158-
#| "\n"
159-
#| " excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n"
160-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
161-
#| "\n"
162-
#| " arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n"
163-
#| " expr?* kw_defaults, arg? kwarg, expr* defaults)\n"
164-
#| "\n"
165-
#| " arg = (identifier arg, expr? annotation, string? type_comment)\n"
166-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
167-
#| "\n"
168-
#| " -- keyword arguments supplied to call (NULL identifier for **kwargs)\n"
169-
#| " keyword = (identifier? arg, expr value)\n"
170-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
171-
#| "\n"
172-
#| " -- import name with optional 'as' alias.\n"
173-
#| " alias = (identifier name, identifier? asname)\n"
174-
#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n"
175-
#| "\n"
176-
#| " withitem = (expr context_expr, expr? optional_vars)\n"
177-
#| "\n"
178-
#| " match_case = (pattern pattern, expr? guard, stmt* body)\n"
179-
#| "\n"
180-
#| " pattern = MatchValue(expr value)\n"
181-
#| " | MatchSingleton(constant value)\n"
182-
#| " | MatchSequence(pattern* patterns)\n"
183-
#| " | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n"
184-
#| " | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n"
185-
#| "\n"
186-
#| " | MatchStar(identifier? name)\n"
187-
#| " -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n"
188-
#| "\n"
189-
#| " | MatchAs(pattern? pattern, identifier? name)\n"
190-
#| " | MatchOr(pattern* patterns)\n"
191-
#| "\n"
192-
#| " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n"
193-
#| "\n"
194-
#| " type_ignore = TypeIgnore(int lineno, string tag)\n"
195-
#| "\n"
196-
#| " type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n"
197-
#| " | ParamSpec(identifier name, expr? default_value)\n"
198-
#| " | TypeVarTuple(identifier name, expr? default_value)\n"
199-
#| " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n"
200-
#| "}\n"
20145
msgid ""
20246
"-- ASDL's 4 builtin types are:\n"
20347
"-- identifier, int, string, constant\n"

0 commit comments

Comments
 (0)