Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7cea89

Browse files
Copilotjosix
andcommitted
Address review comments: Update translation consistency
Co-authored-by: josix <[email protected]>
1 parent 13de57f commit a7cea89

File tree

1 file changed

+18
-35
lines changed

1 file changed

+18
-35
lines changed

library/decimal.po

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ msgid ""
155155
"current context with :func:`getcontext` and, if necessary, setting new "
156156
"values for precision, rounding, or enabled traps::"
157157
msgstr ""
158-
"使用 decimal 的通常起始步驟是匯入模組、使用 :func:`getcontext` 檢視目前的上下文,"
158+
"使用 decimal 的通常起始步驟是引入模組、使用 :func:`getcontext` 檢視目前的情境,"
159159
"以及若有必要的話,設定精度、捨入方式或啟用陷阱的新值::"
160160

161161
#: ../../library/decimal.rst:131
@@ -225,31 +225,14 @@ msgstr ""
225225
"Decimal('NaN')\n"
226226
">>> Decimal('-Infinity')\n"
227227
"Decimal('-Infinity')"
228-
">>> getcontext().prec = 28\n"
229-
">>> Decimal(10)\n"
230-
"Decimal('10')\n"
231-
">>> Decimal('3.14')\n"
232-
"Decimal('3.14')\n"
233-
">>> Decimal(3.14)\n"
234-
"Decimal('3.140000000000000124344978758017532527446746826171875')\n"
235-
">>> Decimal((0, (3, 1, 4), -2))\n"
236-
"Decimal('3.14')\n"
237-
">>> Decimal(str(2.0 ** 0.5))\n"
238-
"Decimal('1.4142135623730951')\n"
239-
">>> Decimal(2) ** Decimal('0.5')\n"
240-
"Decimal('1.414213562373095048801688724')\n"
241-
">>> Decimal('NaN')\n"
242-
"Decimal('NaN')\n"
243-
">>> Decimal('-Infinity')\n"
244-
"Decimal('-Infinity')"
245228

246229
#: ../../library/decimal.rst:163
247230
msgid ""
248231
"If the :exc:`FloatOperation` signal is trapped, accidental mixing of "
249232
"decimals and floats in constructors or ordering comparisons raises an "
250233
"exception::"
251234
msgstr ""
252-
"如果 :exc:`FloatOperation` 信號被捕捉,在建構函式或排序比較中意外混用 decimal "
235+
"如果 :exc:`FloatOperation` 訊號被捕捉,在建構函式或排序比較中意外混用 decimal "
253236
"和 float 會引發例外::"
254237

255238
#: ../../library/decimal.rst:167
@@ -286,7 +269,7 @@ msgid ""
286269
"digits input. Context precision and rounding only come into play during "
287270
"arithmetic operations."
288271
msgstr ""
289-
"新 Decimal 的精度僅由輸入的數字位數決定。上下文精度和捨入只會在算術運算期間"
272+
"新 Decimal 的精度僅由輸入的數字位數決定。情境精度和捨入只會在算術運算期間"
290273
"發揮作用。"
291274

292275
#: ../../library/decimal.rst:186
@@ -412,7 +395,7 @@ msgid ""
412395
"and allows the settings to be changed. This approach meets the needs of "
413396
"most applications."
414397
msgstr ""
415-
"如上所示,:func:`getcontext` 函式存取目前的上下文並允許變更設定。這種方法滿足"
398+
"如上所示,:func:`getcontext` 函式存取目前的情境並允許變更設定。這種方法滿足"
416399
"大多數應用程式的需求。"
417400

418401
#: ../../library/decimal.rst:266
@@ -421,8 +404,8 @@ msgid ""
421404
"the Context() constructor. To make an alternate active, use the :func:"
422405
"`setcontext` function."
423406
msgstr ""
424-
"對於更進階的工作,使用 Context() 建構函式建立替代上下文可能會很有用。要使替代"
425-
"上下文作用,請使用 :func:`setcontext` 函式。"
407+
"對於更進階的工作,使用 Context() 建構函式建立替代情境可能會很有用。要使替代"
408+
"情境作用,請使用 :func:`setcontext` 函式。"
426409

427410
#: ../../library/decimal.rst:270
428411
msgid ""
@@ -637,7 +620,7 @@ msgid ""
637620
"is only three."
638621
msgstr ""
639622
"*context* 精度不會影響儲存多少位數。這完全由 *value* 中的位數決定。例如,即使"
640-
"上下文精度只有三位,``Decimal('3.00000')`` 也會記錄所有五個零。"
623+
"情境精度只有三位,``Decimal('3.00000')`` 也會記錄所有五個零。"
641624

642625
#: ../../library/decimal.rst:389
643626
msgid ""
@@ -646,7 +629,7 @@ msgid ""
646629
"exception is raised; otherwise, the constructor returns a new Decimal with "
647630
"the value of ``NaN``."
648631
msgstr ""
649-
"*context* 引數的目的是決定當 *value* 是格式不正確的字串時該怎麼辦。如果上下文"
632+
"*context* 引數的目的是決定當 *value* 是格式不正確的字串時該怎麼辦。如果情境"
650633
"捕捉 :const:`InvalidOperation`,就會引發例外;否則,建構函式會回傳一個值為 "
651634
"``NaN`` 的新 Decimal。"
652635

@@ -1402,24 +1385,24 @@ msgid ""
14021385
"set rules for rounding, determine which signals are treated as exceptions, "
14031386
"and limit the range for exponents."
14041387
msgstr ""
1405-
"Context 是算術運算的環境。它們控制精度、設定捨入規則、決定哪些信號被視為例外,"
1388+
"Context 是算術運算的環境。它們控制精度、設定捨入規則、決定哪些訊號被視為例外,"
14061389
"並限制指數的範圍。"
14071390

14081391
#: ../../library/decimal.rst:968
14091392
msgid ""
14101393
"Each thread has its own current context which is accessed or changed using "
14111394
"the :func:`getcontext` and :func:`setcontext` functions:"
14121395
msgstr ""
1413-
"每個執行緒都有自己的目前上下文,可以使用 :func:`getcontext` 和 :func:"
1396+
"每個執行緒都有自己的目前情境,可以使用 :func:`getcontext` 和 :func:"
14141397
"`setcontext` 函式來存取或變更:"
14151398

14161399
#: ../../library/decimal.rst:974
14171400
msgid "Return the current context for the active thread."
1418-
msgstr "回傳作用中執行緒的目前上下文。"
1401+
msgstr "回傳作用中執行緒的目前情境。"
14191402

14201403
#: ../../library/decimal.rst:979
14211404
msgid "Set the current context for the active thread to *c*."
1422-
msgstr "將作用中執行緒的目前上下文設定為 *c*。"
1405+
msgstr "將作用中執行緒的目前情境設定為 *c*。"
14231406

14241407
#: ../../library/decimal.rst:981
14251408
msgid ""
@@ -2122,14 +2105,14 @@ msgstr ""
21222105

21232106
#: ../../library/decimal.rst:1619
21242107
msgid "Signals"
2125-
msgstr "信號"
2108+
msgstr "訊號"
21262109

21272110
#: ../../library/decimal.rst:1621
21282111
msgid ""
21292112
"Signals represent conditions that arise during computation. Each corresponds "
21302113
"to one context flag and one context trap enabler."
21312114
msgstr ""
2132-
"信號代表在計算過程中產生的條件。每個信號對應一個上下文旗標和一個上下文陷阱"
2115+
"訊號代表在計算過程中產生的條件。每個訊號對應一個情境旗標和一個情境陷阱"
21332116
"啟用器。"
21342117

21352118
#: ../../library/decimal.rst:1624
@@ -2139,7 +2122,7 @@ msgid ""
21392122
"to determine whether a computation was exact). After checking the flags, be "
21402123
"sure to clear all flags before starting the next computation."
21412124
msgstr ""
2142-
"每當遇到條件時,上下文旗標就會被設定。計算後,可以檢查旗標以獲取資訊(例如,"
2125+
"每當遇到條件時,情境旗標就會被設定。計算後,可以檢查旗標以獲取資訊(例如,"
21432126
"確定計算是否精確)。檢查旗標後,請確保在開始下一次計算之前清除所有旗標。"
21442127

21452128
#: ../../library/decimal.rst:1629
@@ -2149,7 +2132,7 @@ msgid ""
21492132
"`DivisionByZero` trap is set, then a :exc:`DivisionByZero` exception is "
21502133
"raised upon encountering the condition."
21512134
msgstr ""
2152-
"如果為信號設定了上下文的陷阱啟用器,那麼條件會導致引發 Python 例外。例如,"
2135+
"如果為訊號設定了情境的陷阱啟用器,那麼條件會導致引發 Python 例外。例如,"
21532136
"如果設定了 :class:`DivisionByZero` 陷阱,那麼在遇到條件時會引發 :exc:"
21542137
"`DivisionByZero` 例外。"
21552138

@@ -2477,7 +2460,7 @@ msgid ""
24772460
"other threads."
24782461
msgstr ""
24792462
":func:`getcontext` 函式為每個執行緒存取不同的 :class:`Context` 物件。擁有獨立"
2480-
"的執行緒上下文意味著執行緒可以進行變更(如 ``getcontext().prec=10``)而不會"
2463+
"的執行緒情境意味著執行緒可以進行變更(如 ``getcontext().prec=10``)而不會"
24812464
"干擾其他執行緒。"
24822465

24832466
#: ../../library/decimal.rst:1879
@@ -2494,7 +2477,7 @@ msgid ""
24942477
"current thread."
24952478
msgstr ""
24962479
"如果在 :func:`getcontext` 之前沒有呼叫 :func:`setcontext`,那麼 :func:"
2497-
"`getcontext` 會自動建立一個新的上下文供目前執行緒使用。"
2480+
"`getcontext` 會自動建立一個新的情境供目前執行緒使用。"
24982481

24992482
#: ../../library/decimal.rst:1886
25002483
msgid ""

0 commit comments

Comments
 (0)