Skip to content

Translate c-api/complex.po #561

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

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 41 additions & 17 deletions c-api/complex.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Matt Wang <[email protected]>, 2023
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang <[email protected]>\n"
"Last-Translator: Matt Wang <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
Expand All @@ -20,7 +20,7 @@ msgstr ""

#: ../../c-api/complex.rst:6
msgid "Complex Number Objects"
msgstr ""
msgstr "複數物件"

#: ../../c-api/complex.rst:10
msgid ""
Expand All @@ -29,17 +29,23 @@ msgid ""
"and the other is a C structure which represents the actual complex number "
"value. The API provides functions for working with both."
msgstr ""
"從 C API 來看,Python 的複數物件被實作為兩種不同的型別:一種是公開給 Python "
"程式的 Python 物件,另一種是表示實際複數值的 C 結構。API 提供了與兩者一起作用"
"的函式。"

#: ../../c-api/complex.rst:17
msgid "Complex Numbers as C Structures"
msgstr ""
msgstr "作為 C 結構的複數"

#: ../../c-api/complex.rst:19
msgid ""
"Note that the functions which accept these structures as parameters and "
"return them as results do so *by value* rather than dereferencing them "
"through pointers. This is consistent throughout the API."
msgstr ""
"請注意,接受這些結構作為參數並將它們作為結果回傳的函式是\\ *按值 (by "
"value)*\\ 執行的,而不是透過指標取消參照 (dereference) 它們。這在整個 API 中"
Copy link
Collaborator

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.

不需要XD 我來改掉!

"都是一致的。"

#: ../../c-api/complex.rst:26
msgid ""
Expand All @@ -48,103 +54,116 @@ msgid ""
"objects use structures of this type as input or output values, as "
"appropriate. It is defined as::"
msgstr ""
"相對於 Python 複數物件之數值部分的 C 結構。大多數處理複數物件的函式根據需求會"
"使用這種型別的結構作為輸入或輸出值。它定義為: ::"

#: ../../c-api/complex.rst:39
msgid ""
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數之和。"

#: ../../c-api/complex.rst:45
msgid ""
"Return the difference between two complex numbers, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數間的差。"

#: ../../c-api/complex.rst:51
msgid ""
"Return the negation of the complex number *num*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳複數 *num* 的負數。"

#: ../../c-api/complex.rst:57
msgid ""
"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的乘積。"

#: ../../c-api/complex.rst:63
msgid ""
"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr ""
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的商。"

#: ../../c-api/complex.rst:66
msgid ""
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
"c:macro:`!EDOM`."
msgstr ""
"如果 *divisor* 為 null,則此方法會回傳零並將 :c:data:`errno` 設定為 :c:macro:"
"`!EDOM`。"

#: ../../c-api/complex.rst:72
msgid ""
"Return the exponentiation of *num* by *exp*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
"以 C 的 :c:type:`Py_complex` 表示形式來回傳 *num* 的 *exp* 次方的結果。"

#: ../../c-api/complex.rst:75
msgid ""
"If *num* is null and *exp* is not a positive real number, this method "
"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`."
msgstr ""
"如果 *num* 為 null 且 *exp* 不是正實數,則此方法會回傳零並將 :c:data:`errno` "
"設定為 :c:macro:`!EDOM`。"

#: ../../c-api/complex.rst:80
msgid "Complex Numbers as Python Objects"
msgstr ""
msgstr "作為 Python 物件的複數"

#: ../../c-api/complex.rst:85
msgid ""
"This subtype of :c:type:`PyObject` represents a Python complex number object."
msgstr ""
msgstr "這個 :c:type:`PyObject` 的子型別代表一個 Python 複數物件。"

#: ../../c-api/complex.rst:90
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python complex number "
"type. It is the same object as :class:`complex` in the Python layer."
msgstr ""
"這個 :c:type:`PyTypeObject` 的實例代表 Python 複數型別。它與 Python 層中的 :"
"class:`complex` 是同一個物件。"

#: ../../c-api/complex.rst:96
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
"c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
"如果其引數是一個 :c:type:`PyComplexObject` 或者是 :c:type:`PyComplexObject` "
"的子型別,則會回傳 true。這個函式不會失敗。"

#: ../../c-api/complex.rst:102
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
"subtype of :c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
"如果其引數是一個 :c:type:`PyComplexObject`,但不是 :c:type:`PyComplexObject` "
"的子型別,則會回傳 true。這個函式不會失敗。"

#: ../../c-api/complex.rst:108
msgid ""
"Create a new Python complex number object from a C :c:type:`Py_complex` "
"value."
msgstr ""
msgstr "從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。"

#: ../../c-api/complex.rst:113
msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
msgstr ""
msgstr "從 *real* 和 *imag* 回傳一個新的 :c:type:`PyComplexObject` 物件。"

#: ../../c-api/complex.rst:118
msgid "Return the real part of *op* as a C :c:expr:`double`."
msgstr ""
msgstr "以 C 的 :c:expr:`double` 形式回傳 *op* 的實部。"

#: ../../c-api/complex.rst:123
msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
msgstr ""
msgstr "將 *op* 的虛部作為 C 的 :c:expr:`double` 回傳。"

#: ../../c-api/complex.rst:128
msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
msgstr ""
msgstr "回傳複數 *op* 的 :c:type:`Py_complex` 值。"

#: ../../c-api/complex.rst:130
msgid ""
Expand All @@ -155,6 +174,11 @@ msgid ""
"defined then it falls back to :meth:`~object.__index__`. Upon failure, this "
"method returns ``-1.0`` as a real value."
msgstr ""
"如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
"首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
"未定義,那麼它會回退到 :meth:`~object.__float__`。如果 :meth:`!__float__` 未"
"定義,則它將繼續回退為 :meth:`~object.__index__`。失敗時,此方法回傳 "
"``-1.0`` 作為實部值。"

#: ../../c-api/complex.rst:137
msgid "Use :meth:`~object.__index__` if available."
Expand Down