Skip to content

🌐 [translation-sync] FIX: seven source-side defects in python_by_example, functions, numpy and pandas - #149

Open
mmcky wants to merge 8 commits into
mainfrom
translation-sync-2026-08-05T02-44-40-pr-604
Open

🌐 [translation-sync] FIX: seven source-side defects in python_by_example, functions, numpy and pandas#149
mmcky wants to merge 8 commits into
mainfrom
translation-sync-2026-08-05T02-44-40-pr-604

Conversation

@mmcky

@mmcky mmcky commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#604 - FIX: seven source-side defects in python_by_example, functions, numpy and pandas

Files Updated

  • ✏️ lectures/functions.md
  • ✏️ .translate/state/functions.md.yml
  • ✏️ lectures/numpy.md
  • ✏️ .translate/state/numpy.md.yml
  • ✏️ lectures/pandas.md
  • ✏️ .translate/state/pandas.md.yml
  • ✏️ lectures/python_by_example.md
  • ✏️ .translate/state/python_by_example.md.yml

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

@mmcky
mmcky requested a lite review from Copilot August 5, 2026 02:44
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 5, 2026
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 854f029
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/6a72a3a004434a00083629cc
😎 Deploy Preview https://deploy-preview-149--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

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-05
Routing: editor — 2 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other); accuracy 8 below floor 9; terminology 8 below floor 9
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

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

Summary: The translation of the modified sections (Overview, Random Draws, Recursive Function Calls, Exercises, Creating Arrays, Make Changes in DataFrames, Accessing Data with requests, While Loops) is accurate, fluent, and technically sound. Minor issues are limited to small spacing/typo slips and slightly literal phrasing in a few spots, none of which affect comprehension or build integrity. No syntax errors were found in code blocks, math, or MyST directives within the changed sections. Technical terminology (NumPy, broadcasting, DataFrame, Series, callable, etc.) is consistently kept in English/Latin script alongside accurate Persian explanations, matching the language policy. Code blocks, LaTeX math, and MyST directives (exercise-start/solution-start, code-cell, etc.) are fully preserved without structural corruption across all four changed files. The translation of nuanced concepts like keyword arguments, recursion, and broadcasting rules is accurate and mirrors the logical structure of the English source closely. Persian punctuation and formal academic register are used appropriately throughout the modified sections.

Suggestions:

  • [minor · accuracy] lectures/functions.md — ### Adding Conditions: The English says 'The situation is similar for...' concept is fine, but in the Persian translation of the note about equality testing, the phrase 'عبارت a == 10 با توجه به مقدارa میتواند True یا False ارزیابی شود' is missing a space before 'میتواند' (مقدارa) which is a minor spacing/formatting slip introduced in this changed section. → عبارت a == 10 با توجه به مقدار a می‌تواند True یا False ارزیابی شود.
  • [minor · fluency] lectures/functions.md — ### The Flexibility of Python Functions: The sentence ' در بخش‌های بعدی، با مثال‌هایی نشان خواهیم داد که انتقال یک تابع به یک تابع دیگر تا چه حد ساده است.' has a double space before 'ساده' which is a minor formatting/typo issue in a modified section. → در بخش‌های بعدی، با مثال‌هایی نشان خواهیم داد که انتقال یک تابع به یک تابع دیگر تا چه حد ساده است.
  • [minor · terminology] lectures/pandas.md — ### Accessing Data with requests: In the 'Accessing Data with requests' section, the phrase 'اگر پیام خطایی نباشد، پس فراخوانی موفق بوده است.' is accurate, but the subsequent list translation of causes for errors ('شما به اینترنت متصل نیستید --- امیدوارم که این مورد نباشد.') slightly loses the parenthetical tone of the source ('hopefully, this isn't the case') — acceptable but could be smoother. → شما به اینترنت متصل نیستید --- امیدواریم که این‌طور نباشد.
  • [minor · fluency] lectures/pandas.md — ### Make Changes in DataFrames: The heading translation list maps 'Make Changes in DataFrames' to 'ایجاد تغییرات در DataFrames', which is fine, but within the body text itself the phrase 'رصف‌های/ستون‌ها به عنوان یک کل' vs actual rendered 'سطرها/ستون‌ها به عنوان یک کل' is consistent and correct; no major issue found here besides a slightly literal translation of 'as a whole' which reads acceptably in Persian.

🔍 Diff Quality

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

Summary: All four target files were correctly updated in the same locations as the English source, with translated text and code both properly synced and no unrelated changes.


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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs the Persian (fa) lecture translations with upstream source fixes from QuantEcon/lecture-python-programming#604, correcting several source-side defects and improving consistency in narrative and code examples across multiple chapters.

Changes:

  • Updated translated explanatory text and inline-code formatting for clarity/consistency (e.g., python_by_example, numpy, functions).
  • Adjusted pandas code examples to use more robust type / missing-value checks (isinstance, pd.isna).
  • Refreshed translation sync state metadata to the new upstream source SHA, sync date, model, and tool version.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lectures/functions.md Minor content/wording cleanup (stack LIFO description; spacing).
.translate/state/functions.md.yml Sync metadata updated (source SHA/date/model/tool version).
lectures/numpy.md Corrected class naming reference and standardized “NumPy” spelling in narrative.
.translate/state/numpy.md.yml Sync metadata updated (source SHA/date/model/tool version).
lectures/pandas.md Improved robustness of example code (isinstance, pd.isna) and adjusted narrative around requests usage.
.translate/state/pandas.md.yml Sync metadata updated (source SHA/date/model/tool version).
lectures/python_by_example.md Improved Persian explanation wording and standardized inline-code formatting.
.translate/state/python_by_example.md.yml Sync metadata updated (source SHA/date/model/tool version).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lectures/pandas.md
* مشکل پروکسی خود را با خواندن [مستندات](https://requests.readthedocs.io/en/latest/) حل کنید

با فرض اینکه همه چیز کار می‌کند، اکنون می‌توانید از شیء `source` برگردانده شده توسط فراخوانی `requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')` استفاده کنید
با فرض اینکه همه چیز کار می‌کند، اکنون می‌توانید شیء `source` را از داده‌های برگردانده شده توسط فراخوانی `requests.get(url)` بسازید
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants