Skip to content

Translate library/xml.po #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 24, 2023
Merged

Translate library/xml.po #604

merged 4 commits into from
Aug 24, 2023

Conversation

mattwang44
Copy link
Collaborator

@mattwang44 mattwang44 commented Aug 20, 2023

resolve #603

Preview image

@mattwang44
Copy link
Collaborator Author

@mindihx 能否請你幫忙 review 這個 PR?

@mindihx
Copy link
Collaborator

mindihx commented Aug 22, 2023

@mindihx 能否請你幫忙 review 這個 PR?

ok~

library/xml.po Outdated

#: ../../library/xml.rst:20
msgid ""
"The XML modules are not secure against erroneous or maliciously constructed "
"data. If you need to parse untrusted or unauthenticated data see the :ref:"
"`xml-vulnerabilities` and :ref:`defusedxml-package` sections."
msgstr ""
"XML 模組不能防止錯誤或惡意建構的資料。如果你需要剖析不受信任或未經身份驗證的"
Copy link
Collaborator

Choose a reason for hiding this comment

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

不能防止感覺沒有表達出不安全的意思,不確定這樣有沒有好一點
XML 模組對於錯誤或惡意建構的資料是不安全的
或者跟下面一樣翻成 無法抵禦

library/xml.po Outdated

#: ../../library/xml.rst:20
msgid ""
"The XML modules are not secure against erroneous or maliciously constructed "
"data. If you need to parse untrusted or unauthenticated data see the :ref:"
"`xml-vulnerabilities` and :ref:`defusedxml-package` sections."
msgstr ""
"XML 模組不能防止錯誤或惡意建構的資料。如果你需要剖析不受信任或未經身份驗證的"
"資料,請參閱 :ref:`xml-vulnerabilities` 和 :ref:`defusedxml-package` 部分。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

這裡的 section 要不要翻成段落

library/xml.po Outdated
@@ -127,51 +137,51 @@ msgstr "xmlrpc"

#: ../../library/xml.rst:66
msgid "billion laughs"
msgstr ""
msgstr "billion laughs"
Copy link
Collaborator

Choose a reason for hiding this comment

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

好奇為什麼只有 billion laughs 沒有翻?

Copy link
Collaborator Author

@mattwang44 mattwang44 Aug 23, 2023

Choose a reason for hiding this comment

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

因為覺得翻譯成「十億笑聲」實在太奇怪了,加上也幾乎找不到繁中簡中文章有探討他的翻譯、樂詞網也沒有這個詞,所以決定此篇文章的 Billion laughs 都不翻譯。

另外想討論的是文章內 table 的標題若是當成 tag/label、統一不翻譯會不會比較好?
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

這次的情況我覺得可以翻然後加上附註原文
(忽然看到解壓縮炸彈要加上附註原文嗎)
不過因為後面又有說明所以這裡先不翻後面再翻好像也可以

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

都先翻譯好了,請再幫忙看看這樣會不會太奇怪 🙏🏽

library/xml.po Outdated

#: ../../library/xml.rst:91
msgid "billion laughs / exponential entity expansion"
msgstr ""
msgstr "billion laughs / 指數實體擴展"
Copy link
Collaborator

Choose a reason for hiding this comment

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

指數實體擴展要附註原文嗎

@mattwang44 mattwang44 requested a review from mindihx August 23, 2023 15:48
@@ -269,3 +300,7 @@ msgid ""
"data. The package also ships with example exploits and extended "
"documentation on more XML exploits such as XPath injection."
msgstr ""
"`defusedxml`_ 是一個純 Python 套件,其中包含所有標準函式庫中 XML 剖析器的修正"
"版本子類別,可防止任何潛在的惡意操作。當伺服器程式會剖析任何不受信任的 XML 資"
"料時建議使用此套件。該套件還附帶了更多有關 XML 漏洞(例如 XPath 注入)的範例"
Copy link
Collaborator

Choose a reason for hiding this comment

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

這邊範例漏洞 改成 漏洞範例 或者範例 會不會比較通順一點?

@@ -269,3 +300,7 @@ msgid ""
"data. The package also ships with example exploits and extended "
"documentation on more XML exploits such as XPath injection."
msgstr ""
"`defusedxml`_ 是一個純 Python 套件,其中包含所有標準函式庫中 XML 剖析器的修正"
Copy link
Collaborator

Choose a reason for hiding this comment

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

好奇問一下,這邊的 defusedxml 和上面的 ZIP bomb 都是用 ``_ 包起來,
那顯示的時候它怎麼知道哪個是要查 wiki 哪個是要連到 pypi?

Copy link
Collaborator Author

@mattwang44 mattwang44 Aug 24, 2023

Choose a reason for hiding this comment

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

這是寫在 CPython 內的 rst 原檔中。rst 的幾種 external link 寫法都跟 markdown 的類似,其中一種寫法是另外註記網址,而這邊的 defusedxml 只是個 tag。(但是在 parse 出該被翻譯的句子時這部分就會被忽略,所以 po 檔裡面沒有網址)

image

@mattwang44 mattwang44 merged commit b77bd3a into python:3.12 Aug 24, 2023
@mattwang44 mattwang44 deleted the library/xml branch August 24, 2023 05:05
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
* translate `library/xml.po`

* Apply suggestions from code review

Co-authored-by: mindihx <ymhuang.ymh@gmail.com>

* fix(library/xml): update based on reviewer's comment

* fix(library/xml): modify based on review comment

---------

Co-authored-by: mindihx <ymhuang.ymh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate library/xml.po
2 participants