Skip to content

Library/contextvars #1128

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

Open
wants to merge 11 commits into
base: 3.13
Choose a base branch
from
Open

Conversation

husohome
Copy link
Contributor

contextvars.po

註: effective 的翻法:
因為英文中 effective 不一定是指有效的,有時是 in effect 或甚至 in fact 的意思

#: ../../library/contextvars.rst:147
Each thread has its own "effective" stack of :class:!Context objects. The :term:current context is the :class:!Context object at the top of the current thread's stack. All :class:!Context objects in the stacks are considered to be entered.
這裡翻成「目前執行緒堆疊頂端的」是因為這個 effective stack 並不是專有名詞,他就是指實際上正在主控的那個 stack

#: ../../library/contextvars.rst:170
Exiting a context "effectively" reverts any changes made to context variables while the context was entered (if needed, the values can be restored by re-entering the context).
這裡的 effectively 也不是有效的,而是「實際上的效果是」的意思

@mattwang44 mattwang44 requested a review from Dr-XYZ July 17, 2025 15:00
Comment on lines +72 to +73
"當在目前的情境中找不到變數的值時,:meth:`ContextVar.get` 會回傳 *default* 參"
"數的值,此 *default* 參數只能用關鍵字來定義(關鍵字引數)。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

keyword-only 在現有文件較多翻譯成「僅限關鍵字」

Suggested change
"當在目前的情境中找不到變數的值時,:meth:`ContextVar.get` 會回傳 *default* 參"
"數的值,此 *default* 參數只能用關鍵字來定義(關鍵字引數)。"
"當在目前的情境中找不到變數的值時,:meth:`ContextVar.get` 會回傳僅限關鍵字參數 *default*。"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

謝謝指教

我想問一下這一句是不是翻成僅限關鍵字「的」參數,因為如果是我第一次看這個句子的話可能會沒辦法斷句@@


#: ../../library/contextvars.rst:63
msgid ""
"return the default value for the context variable, if it was created with "
"one; or"
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 "回傳情境變數的預設值(如果它在建立時有指定的話);否則"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

想請問這麼建議翻有沒有什麼理由?
因為我會把那個 if it was created with "one" 的 "one" 解釋成 context variable,而且中文語境其實沒有那麼常用「它」,比較常重複「它」所直接指涉的對象,我也不太確定翻成「指定」是不是哪裡的慣例還是?
請大大指教

Copy link
Collaborator

@Dr-XYZ Dr-XYZ Jul 26, 2025

Choose a reason for hiding this comment

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

我覺得那個 one 是指 default value

或許可以參考簡體中文的翻譯來翻

image

husohome and others added 8 commits July 23, 2025 23:03
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
nice! thanks!

Co-authored-by: Dr.XYZ <dr.xyz.tw@gmail.com>
@mattwang44
Copy link
Collaborator

Hi Nick,

提醒一下,還有一些 xyz 的 review comments 還沒處理到 image

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.

3 participants