-
-
Notifications
You must be signed in to change notification settings - Fork 214
[UPDATE] Translate library/os.path
#492
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your commit!
這次的翻譯有點多,我沒有每句都很仔細讀,可能會需要更多的時間 review。
先給個初步的回饋給你參考修正。
library/os.path.po
Outdated
|
||
#: ../../library/os.path.rst:280 | ||
msgid "" | ||
"Return ``True`` if *path* refers to an :func:`existing <exists>` directory " | ||
"entry that is a symbolic link. Always ``False`` if symbolic links are not " | ||
"supported by the Python runtime." | ||
msgstr "" | ||
"如果 *path* 是指向\\ :func:`已存在的 <exists>`\\ 目錄項目且為符號連結,則回" | ||
"傳 ``True``。如果 Python 執行時不支持符號連結,則始終回傳 ``False``。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前後一致,這邊請用「支援」。
library/os.path.po
Outdated
@@ -348,10 +375,17 @@ msgid "" | |||
"UNC are always mount points, and for any other path ``GetVolumePathName`` is " | |||
"called to see if it is different from the input path." | |||
msgstr "" | |||
"如果路徑名 *path* 是一個掛載點 (:dfn:`mount point`),則回傳 ``True``。在 " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A point in a file system ..." 這句似乎沒有翻譯到。
library/os.path.po
Outdated
@@ -361,6 +395,9 @@ msgid "" | |||
"temporary build directories, package caches, and other IO-intensive " | |||
"operations." | |||
msgstr "" | |||
"如果路徑名 *path* 位於 Windows Dev 驅動機上,則回傳 ``True``。Dev 驅動機針對" | |||
"開發人員場景進行了優化,提供更快的讀寫檔案性能。建議將其用於原始程式碼、臨時" | |||
"建置目錄、封包緩存和其他 I/O 密集型操作。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache 繁體中文一般譯為 「快取」,或者不翻譯。
library/os.path.po
Outdated
"碟機的平台上返回 ``False``。請參閱 `Windows 文檔 <https://learn.microsoft." | ||
"com/windows/dev-drive/>`_\\ 以了解有關啟用和建立 Dev 驅動機的信息。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document 繁體中文翻譯為「文件」
information 繁體中文翻譯為「資訊」
library/os.path.po
Outdated
@@ -424,13 +479,20 @@ msgid "" | |||
"interpreted in an implementation-defined manner, although more than two " | |||
"leading characters shall be treated as a single character." | |||
msgstr "" | |||
"在 POSIX 系統中,根據 `IEEE Std 1003.1 2013 版; 4.13 Pathname Resolution " | |||
"<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04." | |||
"html#tag_04_13>`_ 標準,如果一個路徑名以確切的兩個斜線開頭,則在前導字元後的" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly two 為恰好兩個之意。
library/os.path.po
Outdated
@@ -414,6 +465,10 @@ msgid "" | |||
"that contains symbolic links. On Windows, it converts forward slashes to " | |||
"backward slashes. To normalize case, use :func:`normcase`." | |||
msgstr "" | |||
"通過合併多餘的分隔符號和上層引用來規範化路徑名,使得 ``A//B``、``A/B/``、" | |||
"``A/./B`` 和 ``A/foo/../B`` 都變成 ``A/B``。這種字串操作可能會改變包含符號連" | |||
"結的路徑的含義。在 Windows 上,它將正斜線轉換為反斜線。要規範化大小寫,請使" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"結的路徑的含義。在 Windows 上,它將正斜線轉換為反斜線。要規範化大小寫,請使" | |
"結的路徑的含義。在 Windows 上,它將正斜線轉換為反斜線。要標準化大小寫,請使" |
library/os.path.po
Outdated
|
||
#: ../../library/os.path.rst:499 | ||
msgid "" | ||
"If the path contains a UNC path, drive will contain the host name and share::" | ||
msgstr "" | ||
"如果路徑包含 UNC 路徑,則驅動機將包含主機名和共享名,不包括第四個分隔符:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文沒有「不包括第四個分隔符」這句。
:: 是特殊符號,表示接下來會有 code block.
"如果路徑包含 UNC 路徑,則驅動機將包含主機名和共享名,不包括第四個分隔符:" | |
"如果路徑包含 UNC 路徑,則驅動機將包含主機名和共享名:\n" | |
"\n" | |
"::" |
library/os.path.po
Outdated
|
||
#: ../../library/os.path.rst:530 | ||
msgid "" | ||
"On Windows, *drive* may be empty, a drive-letter name, a UNC share, or a " | ||
"device name. The *root* may be empty, a forward slash, or a backward slash. " | ||
"For example::" | ||
msgstr "" | ||
"在 Windows 上,*drive* 可能為空,是驅動機名稱,UNC 共享或設備名稱。*root* 可" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"在 Windows 上,*drive* 可能為空,是驅動機名稱,UNC 共享或設備名稱。*root* 可" | |
"在 Windows 上,*drive* 可能為空、驅動機名稱、UNC 共享或是設備名稱。*root* 可" |
library/os.path.po
Outdated
"在 POSIX 系統上,*drive* 始終為空。*root* 可能為空(如果 *path* 是相對路" | ||
"徑),一個斜線(如果 *path* 是絕對路徑),或者兩個斜線(根據 `IEEE Std " | ||
"1003.1-2017; 4.13 Pathname Resolution <https://pubs.opengroup.org/" | ||
"onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>`_ 的實現定義)。例" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>`_ 的實現定義)。例" | |
"onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>`_ 的實作定義)。例" |
library/os.path.po
Outdated
|
||
#: ../../library/os.path.rst:544 | ||
msgid "" | ||
"Split the pathname *path* into a pair ``(root, ext)`` such that ``root + " | ||
"ext == path``, and the extension, *ext*, is empty or begins with a period " | ||
"and contains at most one period." | ||
msgstr "" | ||
"將路徑名 *path* 拆分為一對 ``(root, ext)``,使得 ``root + ext == path``,且副" | ||
"檔名 *ext* 為空或以點開頭且最多包含一個點。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"檔名 *ext* 為空或以點開頭且最多包含一個點。" | |
"檔名 *ext* 為空或以點開頭且最多包含一個點 (period)。" |
「點」在中文上語意很多,建議附上原文讓讀者知道是指英文句子結尾的那個 "."。
@cschan1828 Thanks. I have modified. |
Co-authored-by: cschan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your modification! I've reviewed it. You've made some nice improvements.
There is some minor feedback that needs your attention.
Co-authored-by: cschan <[email protected]>
Co-authored-by: cschan <[email protected]>
@@ -558,42 +651,55 @@ msgid "" | |||
"Pathname Resolution <https://pubs.opengroup.org/onlinepubs/9699919799/" | |||
"basedefs/V1_chap04.html#tag_04_13>`_.) For example::" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto.
你可以在這個 repo 中找到許多類似範例,基本上就是
":\n"
"\n"
"::"
這樣的模式。後續有 ::
的部份我就不一一列出了,請自行找出並修正。
Co-authored-by: cschan <[email protected]>
@cschan1828 I have modified. Please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job done! Just request a small change then this commit is good to merge.
另外一個建議是,遇到 Python 內建的資料結構如 sequence, list, tuple 等,可以不必翻譯,直接比照原文即可。 |
Co-authored-by: cschan <[email protected]>
Co-authored-by: cschan <[email protected]>
@cschan1828 OK. Thanks for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for your efforts.
* [UPDATE] Translate `library/os.path`
#480
有針對上次 review 做更改,包括:
目前維持原先「適用」的翻譯。Drive 目前暫翻驅動機,因為 drive letter (drive name) 在術語列表翻譯為驅動機字母 (驅動機名)