8000 Translate `c-api/mapping.po` by mattwang44 · Pull Request #897 · python/python-docs-zh-tw · GitHub
[go: up one dir, main page]

Skip to content

Translate c-api/mapping.po #897

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
May 27, 2024
Merged
Changes from all commits
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
40 changes: 32 additions & 8 deletions c-api/mapping.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-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Matt Wang <mattwang44@gmail.com>, 2024
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-03 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:32+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"PO-Revision-Date: 2024-05-11 14:32+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
Expand All @@ -27,6 +27,8 @@ msgid ""
"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:"
"`PyObject_DelItem`."
msgstr ""
"另請參閱 :c:func:`PyObject_GetItem`、:c:func:`PyObject_SetItem` 和 :c:func:"
"`PyObject_DelItem`。"

#: ../../c-api/mapping.rst:14
msgid ""
Expand All @@ -36,88 +38,110 @@ msgid ""
"to determine what type of keys the class supports. This function always "
"succeeds."
msgstr ""
"如果物件有提供對映協定或支援切片 (slicing) 則回傳 ``1``,否則回傳 ``0``。請注"
"意,對於具有 :meth:`~object.__getitem__` 方法的 Python 類別,它會回傳 ``1``,"
"因為通常無法確定該類別支援什麼類型的鍵。這個函式總會是成功的。"

#: ../../c-api/mapping.rst:25
msgid ""
"Returns the number of keys in object *o* on success, and ``-1`` on failure. "
"This is equivalent to the Python expression ``len(o)``."
msgstr ""
"成功時回傳物件 *o* 中的鍵數,失敗時回傳 ``-1``。這相當於 Python 運算式 "
"``len(o)``。"

#: ../../c-api/mapping.rst:31
msgid ""
"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :"
"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
"`PyObject*`."
msgstr ""
"這與 :c:func:`PyObject_GetItem` 相同,但 *key* 被指定為 :c:expr:`const "
"char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"

#: ../../c-api/mapping.rst:38
msgid ""
"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :"
"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
"`PyObject*`."
msgstr ""
"這與 :c:func:`PyObject_SetItem` 相同,但 *key* 被指定為 :c:expr:`const "
"char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"

#: ../../c-api/mapping.rst:45
msgid "This is an alias of :c:func:`PyObject_DelItem`."
msgstr ""
msgstr "這是 :c:func:`PyObject_DelItem` 的別名。"

#: ../../c-api/mapping.rst:50
msgid ""
"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :"
"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
"`PyObject*`."
msgstr ""
"這與 :c:func:`PyObject_DelItem` 相同,但 *key* 被指定為 :c:expr:`const "
"char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"

#: ../../c-api/mapping.rst:57
msgid ""
"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
"This is equivalent to the Python expression ``key in o``. This function "
"always succeeds."
msgstr ""
"如果對映物件具有鍵 *key* 則回傳 ``1``,否則回傳 ``0``。這相當於 Python 運算"
"式 ``key in o``。這個函式總會是成功的。"

#: ../../c-api/mapping.rst:63
msgid ""
"Exceptions which occur when this calls :meth:`~object.__getitem__` method "
"are silently ignored. For proper error handling, use :c:func:"
"`PyObject_GetItem()` instead."
msgstr ""
"當它呼叫 :meth:`~object.__getitem__` 方法時發生的例外將被默默忽略。為了適當地"
"處理錯誤,請改用 :c:func:`PyObject_GetItem()`。"

#: ../../c-api/mapping.rst:70
msgid ""
"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :"
"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
"`PyObject*`."
msgstr ""
"這與 :c:func:`PyMapping_HasKey` 相同,但 *key* 被指定為 :c:expr:`const "
"char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"

#: ../../c-api/mapping.rst:76
msgid ""
"Exceptions that occur when this calls :meth:`~object.__getitem__` method or "
"while creating the temporary :class:`str` object are silently ignored. For "
"proper error handling, use :c:func:`PyMapping_GetItemString` instead."
msgstr ""
"當它呼叫 :meth:`~object.__getitem__` 方法或建立臨時 :class:`str` 物件時發生的"
"例外將被默默忽略。為了適當地處理錯誤,請改用 :c:func:"
"`PyMapping_GetItemString`。"

#: ../../c-api/mapping.rst:84
msgid ""
"On success, return a list of the keys in object *o*. On failure, return "
"``NULL``."
msgstr ""
msgstr "成功時回傳一個物件 *o* 內之鍵的串列,失敗時回傳 ``NULL``。"

#: ../../c-api/mapping.rst:87 ../../c-api/mapping.rst:96
#: ../../c-api/mapping.rst:105
msgid "Previously, the function returned a list or a tuple."
msgstr ""
msgstr "在以前,該函式會回傳串列或元組。"

#: ../../c-api/mapping.rst:93
msgid ""
"On success, return a list of the values in object *o*. On failure, return "
"``NULL``."
msgstr ""
msgstr "成功時回傳物件 *o* 中值的串列。失敗時回傳 ``NULL``。"

#: ../../c-api/mapping.rst:102
msgid ""
"On success, return a list of the items in object *o*, where each item is a "
"tuple containing a key-value pair. On failure, return ``NULL``."
msgstr ""
"成功時回傳物件 *o* 內之項目的串列,其中每個項目都是包含鍵值對的元組。失敗時回"
"傳 ``NULL``。"

#: ../../c-api/mapping.rst:23
msgid "built-in function"
Expand Down
Loading
0