Skip to content

Conversation

mindihx
Copy link
Collaborator

@mindihx mindihx commented Dec 30, 2023

issue: #665
html: pathlib.zip

@mattwang44 mattwang44 requested a review from ken71301 December 30, 2023 06:03
Copy link
Collaborator

@ken71301 ken71301 left a comment

Choose a reason for hiding this comment

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

review part 1.
部分語意與翻譯修正

"useful since those simply don't have any OS-accessing operations."
msgstr ""
"你想確保你的程式在操作路徑的時候不會真的存取到 OS。在這個情況下,實例化其中一"
"個純路徑類別可能是有用的,因為它們不會有任何存取 OS 的操作。"
Copy link
Collaborator

@ken71301 ken71301 Dec 30, 2023

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.

對~ 純類別可能會不知道是在講什麼

" :class:`os.PathLike` 介面 (interface) 且 :meth:`~os.PathLike.__fspath__` "
"方法會回傳字串的物件,像是另一個路徑物件: ::"
"*pathsegments* 中的每個元素可以是以下的其中一種:一個表示路徑片段的字串,或一"
"個物件,它實作了 :class:`os.PathLike` 介面且其中 :meth:`~os.PathLike."
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick:

Suggested change
"個物件,它實作了 :class:`os.PathLike` 介面且其中 :meth:`~os.PathLike."
"個物件,它實作了 :class:`os.PathLike` 介面且其中的 :meth:`~os.PathLike."
#: ../../library/pathlib.rst:118
msgid "When *pathsegments* is empty, the current directory is assumed::"
msgstr "當 *pathsegments* 是空的時候,預設使用目前的目錄: ::"
msgstr "當 *pathsegments* 是空的時候,會使用目前的目錄: ::"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
msgstr "當 *pathsegments* 是空的時候,會使用目前的目錄: ::"
msgstr "當 *pathsegments* 是空的時候,會假定使用目前的目錄: ::"

assume的原意比較接近 假設,但這裡直接用假設翻譯也很怪,所以改成假定使用

"路徑物件是不可變 (immutable) :term:`hashable` (可雜湊)的。相同類型的路徑"
"物件可以被比較和排序。這些特性遵守該類型的大小寫規則:"
"路徑物件是不可變 (immutable) 且可雜湊 (:term:`hashable`) 的。相同類型的路徑物"
"件可以被比較和排序。這些屬性遵守該類型的大小寫規則: ::"
Copy link
Collaborator

Choose a reason for hiding this comment

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

於 rst:16 的 semantics 翻譯為 語意,而此處翻譯為規則
而 semantics 於字典中定義 the study of meanings in a language
我想這裡應該翻譯為 這些屬性遵守該類型的大小寫語意規則 (或把規則拿掉,但有規則確實比較順)

#: ../../library/pathlib.rst:273
msgid "A tuple giving access to the path's various components::"
msgstr ""
msgstr "一個可存取路徑的各組成的元組: ::"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
msgstr "一個可存取路徑的各組成的元組: ::"
msgstr "一個可存取路徑的各個部分的元組: ::"

rst : 273 的 components 已被翻譯為 部分

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

我都改成組成好了

"an implementation-defined manner, although more than two leading slashes "
"shall be treated as a single slash.\"*"
msgstr ""
"*「以兩個連續斜線開頭的路徑名稱可以根據實作定義的方式來解讀,然而開頭超過兩個"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"*「以兩個連續斜線開頭的路徑名稱可以根據實作定義的方式來解讀,然而開頭超過兩個"
"*「以兩個連續斜線開頭的路徑名稱可以根據實作定義的方式來解讀,儘管開頭超過兩個"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

英文讀起來會覺得比較像是在強調後者
用儘管的話中文讀起來比較像在強調前者 (只是感覺XD)
我先改成儘管如此

Copy link
Collaborator

Choose a reason for hiding this comment

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

這句超語感的,就這樣吧 :D

#: ../../library/pathlib.rst:448
msgid "The final path component, without its suffix::"
msgstr ""
msgstr "最後的路徑組成,不包括後綴 (suffix): ::"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
msgstr "最後的路徑組成,不包括後綴 (suffix): ::"
msgstr "最後的路徑部分,不包括後綴 (suffix): ::"
"Passing additional arguments is deprecated; if supplied, they are joined "
"with *other*."
msgstr ""
msgstr "已廢棄額外引數的傳入;如果有的話,它們會與 *other* 連接在一起。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
msgstr "已廢棄額外引數的傳入;如果有的話,它們會與 *other* 連接在一起。"
msgstr "額外引數的傳入已棄用;如果有的話,它們會與 *other* 連接在一起。"
"Passing additional positional arguments is deprecated; if supplied, they are "
"joined with *other*."
msgstr ""
msgstr "已廢棄額外位置引數的傳入;如果有的話,它們會與 *other* 連接在一起。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
msgstr "已廢棄額外位置引數的傳入;如果有的話,它們會與 *other* 連接在一起。"
msgstr "額外位置引數的傳入已棄用;如果有的話,它們會與 *other* 連接在一起。"
"this method to pass information to derivative paths, for example::"
msgstr ""
"透過結合給定的 *pathsegments* 建立一個相同類型的新路徑物件,當一個衍生路徑被"
"建立的時候會呼叫這個方法,例如從 :attr:`parent` 和 :meth:`relative_to`。子類"
Copy link
Collaborator

Choose a reason for hiding this comment

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

例如從 :attr:parent 和 :meth:relative_to
這句的中文語意有點斷掉,感覺可以補述,例如
例如從 :attr:parent 和 :meth:relative_to建立的衍生路徑

這裏比較不好翻,不見得要採納我的想法

@mindihx mindihx requested a review from ken71301 December 30, 2023 10:36
@mindihx
Copy link
Collaborator Author

mindihx commented Dec 30, 2023

btw 分享一下我自己的 hard code 單一檔案 build 法XD

BUILDTARGET=library/pathlib VERSION=3.12 make one Makefile: one:	cp $(BUILDTARGET).po $(LC_MESSAGES)/$(BUILDTARGET).po	. $(VENV)/bin/activate; sphinx-build -b html -d $(CPYTHON_CLONE)/Doc/build/doctrees -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0 -A daily=1 -W \ $(CPYTHON_CLONE)/Doc $(CPYTHON_CLONE)/Doc/build/html $(CPYTHON_CLONE)/Doc/$(BUILDTARGET).rst 

之前都是把 cpython/Doc/Makefileautobuild-dev-html command 的參數 -Ea 拿掉
但不知道為什麼這次不 work 了...

Copy link
Collaborator

@ken71301 ken71301 left a comment

Choose a reason for hiding this comment

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

LGTM~

@mattwang44 mattwang44 merged commit 1b481b4 into python:3.12 Dec 31, 2023
@mattwang44
Copy link
Collaborator

btw 分享一下我自己的 hard code 單一檔案 build 法XD

@mindihx 要不要在 channel 分享一下、和大家討論~

@mindihx
Copy link
Collaborator Author

mindihx commented Jan 3, 2024

@mindihx 要不要在 channel 分享一下、和大家討論~

覺得它有點 hard code (e.g. -A daily=1 是從 cpython/Doc/Makefile copy 過來的)
不太適合直接用,比較適合臨時先擋一下而已XD
可能可以看一下有沒有更完善的寫法~ (我看已經有 pr 但是還沒過)

@mindihx mindihx deleted the library_pathlib_part1 branch January 4, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants