translate tutorial/datastructures.po - #37
Conversation
Cover the chapter intro and the full list of list methods: append, extend, insert, remove, pop, clear, index, count, sort, reverse, copy.
Stack (LIFO) and queue (FIFO) usage with lists and collections.deque.
List comprehension syntax, nested loops inside comprehensions, and equivalent for-loop forms.
Nested comprehensions, matrix transposition example, and zip() as the idiomatic alternative.
The del statement for index- and variable-level deletion, plus tuple packing and sequence unpacking.
Sets (unordered, no duplicates, set comprehensions) and dictionaries (key-value pairs, dict(), dict comprehensions).
items(), enumerate(), zip(), reversed(), sorted(), set() idioms for looping and filtering sequences.
Boolean operators (and/or/not), short-circuit evaluation, and lexicographic comparison of sequences.
cdbeb70 to
2684c3d
Compare
tamnd
left a comment
There was a problem hiding this comment.
Reviewed the full file as a professional Python + Vietnamese translator against GLOSSARY.md. Summary of issues found, from most critical to minor:
Critical — code without >>> prefix was translated as prose. Two plain-code msgids were treated as text and fully translated. These must be identical to their msgid.
Systematic — GLOSSARY terms not applied. Several terms that GLOSSARY.md says to keep in English were translated: list, tuple, set, dict, comprehension, method. And "raises" was rendered as "tăng" (increases) instead of "Gây ra".
Semantic error. "squares" (bình phương, as in x²) was translated as "hình vuông" (geometric square shape) throughout.
Wrong register. "khả năng hiểu chính tả" for "dict comprehensions" is a completely garbled translation — "chính tả" means "spelling/orthography".
Inline comments below point to the exact lines.
| "raises a :exc:`ValueError` if there is no such item." | ||
| msgstr "" | ||
| "Xóa mục đầu tiên khỏi danh sách có giá trị bằng *value*. Nó tăng " | ||
| ":exc:`ValueError` nếu không có phần tử đó." |
There was a problem hiding this comment.
"Nó tăng" không đúng cho "raises". Theo GLOSSARY nên dùng "Gây ra :exc:`ValueError`".
| "Xóa mục ở vị trí nhất định trong danh sách và trả lại. Nếu không có chỉ mục" | ||
| " nào được chỉ định, ``a.pop()`` sẽ xóa và trả về mục cuối cùng trong danh " | ||
| "sách. Nó tăng :exc:`IndexError` nếu danh sách trống hoặc chỉ mục nằm ngoài " | ||
| "phạm vi danh sách." |
There was a problem hiding this comment.
"Nó tăng :exc:`IndexError`" → "Gây ra :exc:`IndexError`". Chỗ này cũng thiếu dấu chấm cuối câu so với bản gốc.
| "Raises a :exc:`ValueError` if there is no such item." | ||
| msgstr "" | ||
| "Trả về chỉ mục dựa trên 0 của lần xuất hiện đầu tiên của *value* trong danh " | ||
| "sách. Tăng :exc:`ValueError` nếu không có phần tử đó." |
There was a problem hiding this comment.
"Tăng :exc:`ValueError`" → "Gây ra :exc:`ValueError`".
| #, fuzzy | ||
| msgid "Return a shallow copy of the list. Similar to ``a[:]``." | ||
| msgstr "" | ||
| msgstr "Trả lại một bản sao nông của danh sách. Tương tự với ``a[:]``" |
There was a problem hiding this comment.
"Trả lại" nghe không tự nhiên lắm, nên dùng "Trả về". Cũng thiếu dấu chấm cuối.
| #, fuzzy | ||
| msgid "List Comprehensions" | ||
| msgstr "" | ||
| msgstr "Danh sách hiểu" |
There was a problem hiding this comment.
"List Comprehensions" dịch thành "Danh sách hiểu" không đúng. GLOSSARY quy định "comprehension" giữ tiếng Anh. Nên để "List comprehension" hoặc "Comprehension danh sách".
| #, fuzzy | ||
| msgid "For example, assume we want to create a list of squares, like::" | ||
| msgstr "" | ||
| msgstr "Ví dụ: giả sử chúng ta muốn tạo một danh sách các hình vuông, như::" |
There was a problem hiding this comment.
"hình vuông" ở đây có nghĩa là bình phương (x^2), không phải hình học. Dùng "bình phương" cho đúng nghĩa.
| #, fuzzy | ||
| msgid "squares = list(map(lambda x: x**2, range(10)))" | ||
| msgstr "" | ||
| msgstr "hình vuông = danh sách(map(lambda x: x**2, range(10)))" |
There was a problem hiding this comment.
Code bị dịch sang tiếng Việt rồi. Dòng này phải giữ nguyên y hệt msgid: squares = list(map(lambda x: x**2, range(10)))
| #, fuzzy | ||
| msgid "squares = [x**2 for x in range(10)]" | ||
| msgstr "" | ||
| msgstr "hình vuông = [x**2 cho x trong phạm vi (10)]" |
There was a problem hiding this comment.
Code bị dịch sang tiếng Việt rồi. Dòng này phải giữ nguyên y hệt msgid: squares = [x**2 for x in range(10)]
| ":keyword:`!if` clauses which follow it. For example, this listcomp combines " | ||
| "the elements of two lists if they are not equal::" | ||
| msgstr "" | ||
| "Việc hiểu danh sách bao gồm các dấu ngoặc chứa một biểu thức theo sau là " |
There was a problem hiding this comment.
"Việc hiểu danh sách" nên là "List comprehension" theo GLOSSARY. Cả đoạn này dùng "comprehension" nhất quán thôi.
| ">>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']\n" | ||
| ">>> [weapon.strip() for weapon in freshfruit]\n" | ||
| "['banana', 'loganberry', 'passion fruit']\n" | ||
| ">>> # tạo danh sách gồm 2 bộ dữ liệu như (số, hình vuông)\n" |
There was a problem hiding this comment.
Comment trong code: "hình vuông" nên là "bình phương". Đây là số bình phương (x^2), không phải hình vuông.
| #, fuzzy | ||
| msgid "Nested List Comprehensions" | ||
| msgstr "" | ||
| msgstr "Hiểu danh sách lồng nhau" |
There was a problem hiding this comment.
"Hiểu danh sách lồng nhau" nên là "List comprehension lồng nhau" theo GLOSSARY.
| #, fuzzy | ||
| msgid "The :keyword:`!del` statement" | ||
| msgstr "" | ||
| msgstr "Tuyên bố :keyword:`!del`" |
There was a problem hiding this comment.
"Tuyên bố" không đúng nghĩa cho "statement". Nên dùng "Câu lệnh :keyword:!del".
| #, fuzzy | ||
| msgid "Tuples and Sequences" | ||
| msgstr "" | ||
| msgstr "Bộ dữ liệu và trình tự" |
There was a problem hiding this comment.
"Bộ dữ liệu và trình tự" không đúng. GLOSSARY: "tuple" giữ tiếng Anh. Nên là "Tuples và Sequences".
| #, fuzzy | ||
| msgid "Sets" | ||
| msgstr "" | ||
| msgstr "bộ" |
There was a problem hiding this comment.
Tiêu đề "bộ" sai hoàn toàn. "Sets" phải giữ tiếng Anh theo GLOSSARY, và chữ hoa đầu câu.
| "Similarly to :ref:`list comprehensions <tut-listcomps>`, set comprehensions " | ||
| "are also supported::" | ||
| msgstr "" | ||
| "Tương tự như :ref:`list comprehensions <tut-listcomps>`, việc hiểu tập hợp " |
There was a problem hiding this comment.
"việc hiểu tập hợp" nên là "set comprehension" theo GLOSSARY (comprehension giữ tiếng Anh).
| "In addition, dict comprehensions can be used to create dictionaries from " | ||
| "arbitrary key and value expressions::" | ||
| msgstr "" | ||
| "Ngoài ra, khả năng hiểu chính tả có thể được sử dụng để tạo từ điển từ các " |
There was a problem hiding this comment.
"khả năng hiểu chính tả" là dịch sai hoàn toàn. "dict comprehension" phải giữ nguyên tiếng Anh theo GLOSSARY.
| "retrieved at the same time using the :meth:`~dict.items` method. ::" | ||
| msgstr "" | ||
| "Khi lặp qua từ điển, khóa và giá trị tương ứng có thể được truy xuất cùng " | ||
| "lúc bằng phương pháp :meth:`~dict.items`. ::" |
There was a problem hiding this comment.
"phương pháp" sai nghĩa. method dịch là "phương thức", không phải "phương pháp".
| "paired with the :func:`zip` function. ::" | ||
| msgstr "" | ||
| "Để lặp qua hai hoặc nhiều chuỗi cùng lúc, các mục có thể được ghép nối với " | ||
| "chức năng :func:`zip`. ::" |
There was a problem hiding this comment.
"chức năng :func:zip" nên là "hàm :func:zip". GLOSSARY: function = hàm.
| #, fuzzy | ||
| msgid "More on Conditions" | ||
| msgstr "" | ||
| msgstr "Thông tin thêm về Điều kiện" |
There was a problem hiding this comment.
Tiêu đề không nhất quán: "Điều kiện" viết hoa không cần thiết. Theo quy tắc sentence case của GLOSSARY thì phải là "Thêm về điều kiện".
| #, fuzzy | ||
| msgid "Comparing Sequences and Other Types" | ||
| msgstr "" | ||
| msgstr "So sánh trình tự và các loại khác" |
There was a problem hiding this comment.
"trình tự" nên giữ là "sequence" theo GLOSSARY. "các loại" nên là "các kiểu" (type = kiểu dữ liệu). Sửa thành "So sánh sequence và các kiểu khác".
| "(1, 2, 3) == (1.0, 2.0, 3.0)\n" | ||
| "(1, 2, ('aa', 'ab')) < (1, 2, ('abc', 'a'), 4)" | ||
| msgstr "" | ||
| "(1, 2, 3) < (1, 2, 4)\n" |
There was a problem hiding this comment.
Định dạng căn lề ở bảng so sánh bị mất. Bản gốc có khoảng trắng để căn thẳng cột, msgstr xóa hết rồi. Cần giữ nguyên.
The 29 tier 1 entries that stopped being passthrough when the identifier rule narrowed were English headings, so they went into the queue as untranslated and this is the run that answered them. 27 calls over server2 and server3 in 0.3h at 91.7 calls per hour, 414 entries accepted, 26 refused and 6 out of rungs. Tier 1 untranslated goes 31 to 4. The 4 are the entries that ran out of rungs there, and A04 names them rather than leaving them silent. The same run cleared batches left queued from earlier sessions in tiers 2 to 6, which is why machine goes 737 to 867 across the corpus and not only in tier 1. L07 goes 687 to 816 because the fleet answered 129 more batches on gpt-5-6-mini, which is issue #37 on the translator repo and not a change here.
Warning
Machine translation. All entries in this PR were produced by automated translation and are marked
fuzzy. Please verify each one against the English source before removing the flag.Translates
tutorial/datastructures.po(126 entries). Base pulled fromtamnd/python-docs-viafter the Transifex run on 2026-04-23.Commits follow the chapter structure so it is easier to review section by section: