Skip to content

🌐 [translation-sync] Add Type Hints section to More Language Features lecture#78

Merged
mmcky merged 2 commits intomainfrom
translation-sync-2026-03-25T03-14-33-pr-488
Mar 25, 2026
Merged

🌐 [translation-sync] Add Type Hints section to More Language Features lecture#78
mmcky merged 2 commits intomainfrom
translation-sync-2026-03-25T03-14-33-pr-488

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Mar 25, 2026

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-programming.

Source PR

#488 - Add Type Hints section to More Language Features lecture

Files Updated

  • ✏️ lectures/python_advanced_features.md
  • ✏️ .translate/state/python_advanced_features.md.yml

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-4-6

This PR was created automatically by the translation action.

@netlify
Copy link

netlify bot commented Mar 25, 2026

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 6d01046
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/69c3532464d6fb0008bb20a6
😎 Deploy Preview https://deploy-preview-78--majestic-griffin-10b166.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Mar 25, 2026

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-03-25


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 9/10
Overall 9/10

Summary: This is a high-quality translation of the modified and added sections. The newly added 'Type hints' section is particularly well-translated, with accurate technical content and natural Persian prose. The existing modified sections (iterables/iterators, operators, decorators, generators) are accurately rendered. Minor issues include one awkward neologism ('خوددستنویس') and a slightly literal subsection title ('decoratorها وارد می‌شوند'). Formatting and syntax are clean with no errors. Overall, the translation is ready for publication with only minor stylistic refinements suggested. Excellent preservation of all MyST/Markdown formatting, code blocks, LaTeX math, and directives throughout the modified sections The new 'Type hints' section (entirely added) is translated with high accuracy and natural Persian prose, correctly rendering all technical concepts like 'type annotations', 'runtime enforcement', and 'static typing' Consistent use of English technical terms (iterator, decorator, generator, property) alongside Persian explanations, which is appropriate for a technical audience and follows the style of the source The heading-map in the YAML frontmatter is comprehensive and correctly maps all modified and added sections to their Persian equivalents The translation of the 'Advantages of iterators' and 'Generator functions' sections maintains the pedagogical tone of the original while reading naturally in Persian

Suggestions:

  • Overview section: 'خوددستنویس (self-documenting)' → The term 'self-documenting' is awkwardly rendered as 'خوددستنویس'. A more natural Persian rendering would be 'خودتوضیح‌دهنده' or simply keeping it as 'self-documenting' with a parenthetical explanation, as the current coinage may confuse readers.

  • Type hints > Why use type hints?: 'کد تولیدشده توسط LLM' → The section header translation '4. کد تولیدشده توسط LLM' is acceptable but the explanation 'بنابراین درک نحو به شما کمک می‌کند خروجی آن‌ها را بخوانید و استفاده کنید' omits the nuance of 'read and use their output' — 'استفاده کنید' alone is slightly vague; consider 'بخوانید و از آن‌ها بهره ببرید' for better idiomatic flow.

  • Iterators in for loops: The translation of 'binds x to the result' as 'x را به نتیجه متصل می‌کند' is consistent, but 'اتصال' for 'bind' in a Python context could more precisely be 'نام x را به نتیجه پیوند می‌دهد' to match standard Python terminology used elsewhere in Persian Python documentation.

  • Decorators > Enter decorators: The subsection title 'decoratorها وارد می‌شوند' is a literal translation of 'Enter decorators' which reads slightly awkwardly. A more natural rendering would be 'معرفی decoratorها' or 'آشنایی با decoratorها'.


🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The translation sync is correctly implemented: the new 'Type hints' section with all its subsections is properly inserted between the */** operators section and the Decorators section in the target document, the heading-map is fully updated to reflect all renamed headings (lowercase) and the new Type hints entries, and the document structure is preserved throughout.


This review was generated automatically by action-translation review mode.

@github-actions
Copy link

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-03-25


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 9/10
Overall 9/10

Summary: The translation is of high quality across all modified and added sections. Technical terminology is handled consistently, formatting is well-preserved, and the Persian reads naturally. The newly added 'Type hints' section is particularly well-translated. Minor issues include one slightly awkward hybrid term ('خوددستنویس'), a triple-underscore in the for-loop section (mirrored from source), and a heading style inconsistency in the 'Enter decorators' subsection. No syntax errors were detected. Technical terms (iterator, iterable, generator, decorator, descriptor, type hints) are consistently kept in English with appropriate Persian explanations, following common practice in Persian technical writing The newly added 'Type hints' section is translated with high accuracy and clarity, including the note block and all subsections Mathematical and code content is fully preserved without modification The heading-map in the YAML frontmatter is comprehensive and correctly maps all section headings Persian sentence structure is natural and academic register is maintained throughout, including in the newly added sections

Suggestions:

  • Type hints → 'Why use type hints?' section, point 1: 'خوددستنویس (self-documenting)' → Consider 'خودمستندساز' or 'خودتوضیح' as more natural Persian renderings of 'self-documenting'; the hybrid term is awkward

  • Iterators in for loops: 'iterator.next()' (triple underscore) in the Persian translation mirrors the source's triple underscore, which appears to be a typo in the source (should be double). The translation faithfully reproduces this, but a note or correction would improve accuracy.

  • Decorators → 'Enter decorators' subsection heading translated as 'decoratorها وارد می‌شوند': while understandable, a more idiomatic option might be 'ورود decoratorها' to match the nominal style used in other headings

  • Type hints → 'Hints don't enforce types': 'راهنماها می‌گویند int، اما پایتون با خوشحالی آرگومان‌های float را می‌پذیرد' — 'با خوشحالی' (happily) is a literal translation of 'happily'; while acceptable, 'بدون اعتراض' (without complaint) would be more natural in a technical Persian text


🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The translation sync correctly added the new 'Type hints' section with full Persian translation, updated all heading keys to match the new lowercase English headings, added new heading-map entries, and preserved all existing content and structure.


This review was generated automatically by action-translation review mode.

@github-actions
Copy link

@github-actions github-actions bot temporarily deployed to pull request March 25, 2026 03:20 Inactive
@mmcky mmcky merged commit c679e85 into main Mar 25, 2026
9 checks passed
@mmcky mmcky deleted the translation-sync-2026-03-25T03-14-33-pr-488 branch March 25, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant