Skip to content

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

Open
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-03-23T05-53-09-pr-488
Open

🌐 [translation-sync] Add Type Hints section to More Language Features lecture#69
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-03-23T05-53-09-pr-488

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Mar 23, 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 23, 2026

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit c53a5eb
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/69c0d54cfa15b20008fd232c
😎 Deploy Preview https://deploy-preview-69--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 23, 2026

⚠️ Translation Quality Review

Verdict: WARN | Model: claude-sonnet-4-6 | Date: 2026-03-23


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 8/10
Formatting 7/10
Overall 8.5/10

Summary: The translation of the modified and added sections is generally of high quality with natural Persian phrasing and accurate technical content. However, there is a critical structural issue: the frontmatter/preamble content (the anchor label, raw jupyter div, and main heading) is duplicated, which will cause rendering errors. Additionally, 'type hints' is omitted from the Overview's topic list. The translation choice of 'سرنخ‌های نوع' for 'type hints' is understandable but slightly unidiomatic. The Persian numeral usage in the for-loop iterator description section is inconsistent with the rest of the document. These issues should be addressed before merging. The newly added 'Type hints' section and all its subsections are translated accurately and fluently, with clear Persian explanations of concepts like dynamic typing, runtime non-enforcement, and tooling benefits. The heading-map in the YAML frontmatter is comprehensive and correctly maps all new and modified sections including the entire Type hints hierarchy. Technical terminology for decorators, descriptors, generators, and iterators is handled consistently throughout the modified sections, with appropriate use of transliterated terms where no standard Persian equivalent exists. The * and ** operators section is translated with good clarity, correctly distinguishing between positional and keyword argument unpacking in both Persian and technical contexts. Mathematical and code content is fully preserved with no alterations to LaTeX, code cells, or MyST directives in the modified sections.

⚠️ Markdown Syntax Errors (CRITICAL)

  • 🔴 Duplicate content: The preamble/frontmatter contains duplicate sections - both the (python_advanced_features)= label and the raw jupyter div/header block appear twice, followed by two identical '# ویژگی‌های بیشتر زبان' headings. This is a critical structural error.
  • 🔴 Overview section: The translation omits 'type hints' from the list of topics ('موضوعات متنوعی در این سخنرانی بررسی می‌شوند، از جمله iteratorها، decoratorها و descriptorها، و generatorها') - 'type hints' is missing from the Persian enumeration whereas the English source explicitly lists it.

Suggestions:

  • Preamble/Frontmatter: The document contains duplicated header content — the (python_advanced_features)= anchor, the {raw} jupyter div, and the # ویژگی‌های بیشتر زبان heading all appear twice. This must be de-duplicated to avoid rendering errors.
  • Overview section: 'A variety of topics are treated in the lecture, including iterators, type hints, decorators and descriptors, and generators.' → The Persian translation omits 'type hints' (سرنخ‌های نوع): 'موضوعات متنوعی در این سخنرانی بررسی می‌شوند، از جمله iteratorها، سرنخ‌های نوع، decoratorها و descriptorها، و generatorها.'
  • Type hints section: 'Type hints' is translated as 'سرنخ‌های نوع' throughout, but a more established and natural Persian term would be 'راهنماهای نوع' or 'اعلان نوع'. The chosen term 'سرنخ' (clue/hint) is technically correct but less idiomatic in a programming context. Consider 'اعلان نوع' or 'حاشیه‌نویسی نوع' for consistency with common Persian programming terminology.
  • Iterators in for loops section: The English uses numbered list markers '1.' and '2.' but the Persian translation switches to Persian numerals '۱.' and '۱.' for the inline numbered list describing what the interpreter does. This is inconsistent with the rest of the document and may cause MyST rendering issues — the second item also appears to reuse '۱.' instead of '۲.'
  • Type hints::Why use type hints? section: 'LLM-generated code: Large language models frequently produce code with type hints' → translated as 'کد تولیدشده توسط مدل‌های زبانی بزرگ: مدل‌های زبانی بزرگ اغلب کدی با سرنخ‌های نوع تولید می‌کنند'. The heading label 'LLM-generated code' is fully expanded but the abbreviation 'LLM' itself is not mentioned. Consider: 'کد تولیدشده توسط مدل‌های زبانی بزرگ (LLM)' to preserve the technical abbreviation for readers.

🔍 Diff Quality

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

Summary: The heading-map is correctly updated and the new Type hints section is translated and inserted at the right position, but the target document has a critical structural defect — the document preamble (anchor, raw header div, H1 title) is duplicated, and the overview paragraph was not updated to mention type hints.

Issues:

  • The target document 'After' contains a duplicate header block: the (python_advanced_features)= anchor, the raw jupyter div, and # ویژگی‌های بیشتر زبان heading appear twice at the top of the document body.
  • The source 'After' removed the header raw block entirely (it was present in source 'Before'), but the target 'After' kept it and duplicated it, resulting in two occurrences of the notebook header div and the H1 heading.
  • The translated content for the new 'Type hints' section appears to be correctly added, but its placement is disrupted by the duplicate header block above it, breaking the document flow.
  • The overview paragraph in the target 'After' still says 'iteratorها، decoratorها و descriptorها، و generatorها' but the source 'After' added 'type hints' to this list — the translated overview paragraph was not updated to include type hints.
  • The source 'After' changed heading capitalisation (e.g. 'Iterables and Iterators' → 'Iterables and iterators', 'For Loops' → 'for loops', etc.); the heading-map keys are correctly updated, but the actual translated section headings in the body sometimes still use the old capitalisation style inconsistently.

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

@github-actions
Copy link

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