Skip to content
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

Translate the first half of library/signal.po #994

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

mattwang44
Copy link
Collaborator

related issue: #993

@mattwang44 mattwang44 force-pushed the library/signal/first-half branch from cea83ed to 9eacb41 Compare October 28, 2024 08:35
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.

reviewed.

library/signal.po Outdated Show resolved Hide resolved
@@ -80,6 +93,10 @@ msgid ""
"onwards, you can use the :mod:`faulthandler` module to report on synchronous "
"errors."
msgstr ""
"捕捉像 :const:`SIGFPE` 或 :const:`SIGSEGV` 這類由 C 程式碼中無效操作所引起的"
"同步錯誤是沒有意義的。Python 將從訊號處理程式中回傳到 C 程式碼,而 C 程式碼很"
"可能再次引發相同的訊號,導致 Python 明顯掛斷。從 Python 3.3 開始,你可以使"
Copy link
Collaborator

Choose a reason for hiding this comment

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

這邊的 hang 是不是比較是掛不斷的意思(python那端會一直吊著接到C來的觸發)

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
先按照 wikipedia 翻「假當機」

library/signal.po Outdated Show resolved Hide resolved
library/signal.po Outdated Show resolved Hide resolved
library/signal.po Outdated Show resolved Hide resolved
@@ -396,10 +456,14 @@ msgid ""
"alarm is canceled. If the return value is zero, no alarm is currently "
"scheduled."
msgstr ""
"如果 *time* 非零,則此函式會要求在 *time* 秒內傳送 :const:`SIGALRM` 訊號給該"
"行程。任何先前排程 (scheduled) 的警報都會被取消(任何時候都只能排程一個警"
"報)。回傳值是之前設定的警報要傳送的秒數。如果 *time* 為零,則沒有排程任何警"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The returned value 回傳值
is then the number of seconds 以秒表示
before 在後者之前
any previously set alarm was to have been delivered 任何訂好的警報該傳遞而未傳遞
這句好繞
回傳的值是距離任何先前設定的警報被傳遞之前的秒數。

如果照 回傳值是之前設定的警報要傳送的秒數 ,看起來會像是那個警報本身會傳秒數

但這句肯定得多看幾遍的,我花了大概半小時(X

參考資料 https://www.quora.com/Could-you-explain-were-to-have-been-or-was-to-have-been-and-what-term-it-is

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

修兩個地方:

  • in *time* seconds 指的應該是「time 秒後」而不是「time 秒內」
  • was to have been 暗示原本要發生的事情不會發生了。此指前一個 alarm 原本在等幾秒就會被送出,但因為還沒送出前(因為下了新的 signal.alarm())就被 cancel 了所以不會發生。此句改成「回傳值是先前設定的警報原本再等多久就會被傳送的秒數」

library/signal.po Outdated Show resolved Hide resolved
library/signal.po Outdated Show resolved Hide resolved
@mattwang44 mattwang44 requested a review from ken71301 November 12, 2024 03:38
@mattwang44 mattwang44 force-pushed the library/signal/first-half branch from d99da42 to 1867122 Compare November 12, 2024 03:41
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~

@ken71301 ken71301 merged commit bcf2bc8 into python:3.13 Nov 12, 2024
1 check passed
@mattwang44 mattwang44 deleted the library/signal/first-half branch November 12, 2024 07:45
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.

2 participants