diff --git a/library/uuid.po b/library/uuid.po index 468dc3043d..f2b28e52d6 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/uuid.rst:2 msgid ":mod:`uuid` --- UUID objects according to :rfc:`4122`" -msgstr "" +msgstr ":mod:`uuid` --- :rfc:`4122` 定義的 UUID 物件" #: ../../library/uuid.rst:9 msgid "**Source code:** :source:`Lib/uuid.py`" @@ -33,6 +33,9 @@ msgid "" "`uuid5` for generating version 1, 3, 4, and 5 UUIDs as specified in :rfc:" "`4122`." msgstr "" +"這個模組提供了不可變的 :class:`UUID` 物件(:class:`UUID` 類別)和 :func:" +"`uuid1`、:func:`uuid3`、:func:`uuid4`、:func:`uuid5` 等函式,用於生成 :rfc:" +"`4122` 定義的第 1、3、4、5 版本的 UUID。" #: ../../library/uuid.rst:17 msgid "" @@ -41,6 +44,9 @@ msgid "" "creates a UUID containing the computer's network address. :func:`uuid4` " "creates a random UUID." msgstr "" +"如果你只需要一個唯一的 ID,你應該呼叫 :func:`uuid1` 或 :func:`uuid4`。需要注" +"意的是,:func:`uuid1` 可能會危害隱私,因為它會建立一個包含了電腦網路位址的 " +"UUID。而 :func:`uuid4` 則會建立一個隨機的 UUID。" #: ../../library/uuid.rst:22 msgid "" @@ -50,20 +56,24 @@ msgid "" "UUID. All instances of :class:`UUID` have an :attr:`is_safe` attribute " "which relays any information about the UUID's safety, using this enumeration:" msgstr "" +"根據底層平台的支援情況,:func:`uuid1` 可能會也可能不會回傳一個「安全的」" +"UUID。安全的 UUID 是使用同步方法生成的,以確保不會有兩個行程獲取到相同的 " +"UUID。所有 :class:`UUID` 的實例都有一個 :attr:`is_safe` 屬性,該屬性使用下面" +"這個列舉來傳遞有關 UUID 安全性的任何資訊:" #: ../../library/uuid.rst:34 msgid "The UUID was generated by the platform in a multiprocessing-safe way." -msgstr "" +msgstr "該 UUID 是由平台以多行程安全的 (multiprocessing-safe) 方式生成的。" #: ../../library/uuid.rst:38 msgid "The UUID was not generated in a multiprocessing-safe way." -msgstr "" +msgstr "該 UUID 不是以多行程安全的方式生成的。" #: ../../library/uuid.rst:42 msgid "" "The platform does not provide information on whether the UUID was generated " "safely or not." -msgstr "" +msgstr "該平台不提供 UUID 是否為安全生成的資訊。" #: ../../library/uuid.rst:47 msgid "" @@ -76,6 +86,16 @@ msgid "" "string of hex digits is given, curly braces, hyphens, and a URN prefix are " "all optional. For example, these expressions all yield the same UUID::" msgstr "" +"從以下其中一種引數來建立 UUID:由 32 個十六進位的數字組成的字串、以大端順序 " +"(big-endian) 排列的 16 個位元組組成的字串作為 *bytes* 引數、以小端順序 " +"(little-endian) 排列的 16 個位元組組成的字串作為 *bytes_le* 引數、由 6 個整數" +"(32 位元的 *time_low*、16 位元的 *time_mid*、16 位元的 *time_hi_version*、8 " +"位元的 *clock_seq_hi_variant*、8 位元的 *clock_seq_low*、48 位元的 *node*)組" +"成的元組 (tuple) 作為 *fields* 引數,或者是單一的 128 位元整數作為 *int* 引" +"數。當給定由十六進位的數字組成的字串時,大括號、連字符號和 URN 前綴都是可以選" +"用的。例如,以下這些運算式都會產生相同的 UUID:\n" +"\n" +"::" #: ../../library/uuid.rst:66 msgid "" @@ -84,6 +104,10 @@ msgid "" "its variant and version number set according to :rfc:`4122`, overriding bits " "in the given *hex*, *bytes*, *bytes_le*, *fields*, or *int*." msgstr "" +"必須正好給定其中一個引數 *hex*、*bytes*、*bytes_le*、*fields* 或 *int*。" +"*version* 引數是選用的;如果給定了該引數,生成的 UUID 將根據 :rfc:`4122` 設置" +"其變體 (variant) 和版本號,覆蓋掉給定的 *hex*、*bytes*、*bytes_le*、*fields* " +"或 *int* 中的位元。" #: ../../library/uuid.rst:71 msgid "" @@ -91,6 +115,8 @@ msgid "" "int` attributes. Comparison with a non-UUID object raises a :exc:" "`TypeError`." msgstr "" +"UUID 物件之間的比較是透過比較它們的 :attr:`UUID.int` 屬性。與非 UUID 的物件進" +"行比較會引發 :exc:`TypeError`。" #: ../../library/uuid.rst:75 msgid "" @@ -98,28 +124,35 @@ msgid "" "``12345678-1234-5678-1234-567812345678`` where the 32 hexadecimal digits " "represent the UUID." msgstr "" +"``str(uuid)`` 會回傳一個像是 ``12345678-1234-5678-1234-567812345678`` 形式的" +"字串,其中 32 個十六進位的數字代表 UUID。" #: ../../library/uuid.rst:79 msgid ":class:`UUID` instances have these read-only attributes:" -msgstr "" +msgstr ":class:`UUID` 實例有以下唯讀的屬性:" #: ../../library/uuid.rst:83 msgid "" "The UUID as a 16-byte string (containing the six integer fields in big-" "endian byte order)." msgstr "" +"UUID 以 16 位元組的字串表示(包含 6 個整數欄位,按照大端位元組順序排列)。" #: ../../library/uuid.rst:89 msgid "" "The UUID as a 16-byte string (with *time_low*, *time_mid*, and " "*time_hi_version* in little-endian byte order)." msgstr "" +"UUID 以 16 位元組的字串表示(其中 *time_low*、*time_mid* 和 " +"*time_hi_version* 按照小端位元組順序排列)。" #: ../../library/uuid.rst:95 msgid "" "A tuple of the six integer fields of the UUID, which are also available as " "six individual attributes and two derived attributes:" msgstr "" +"UUID 以 6 個整數欄位所組成的元組表示,也可以看作有 6 個個別屬性和 2 個衍生屬" +"性:" #: ../../library/uuid.rst:99 msgid "Field" @@ -135,7 +168,7 @@ msgstr ":attr:`time_low`" #: ../../library/uuid.rst:101 msgid "the first 32 bits of the UUID" -msgstr "" +msgstr "UUID 的前 32 位元" #: ../../library/uuid.rst:103 msgid ":attr:`time_mid`" @@ -143,7 +176,7 @@ msgstr ":attr:`time_mid`" #: ../../library/uuid.rst:103 ../../library/uuid.rst:105 msgid "the next 16 bits of the UUID" -msgstr "" +msgstr "UUID 接下來的 16 位元" #: ../../library/uuid.rst:105 msgid ":attr:`time_hi_version`" @@ -155,7 +188,7 @@ msgstr ":attr:`clock_seq_hi_variant`" #: ../../library/uuid.rst:107 ../../library/uuid.rst:109 msgid "the next 8 bits of the UUID" -msgstr "" +msgstr "UUID 接下來的 8 位元" #: ../../library/uuid.rst:109 msgid ":attr:`clock_seq_low`" @@ -167,7 +200,7 @@ msgstr ":attr:`node`" #: ../../library/uuid.rst:111 msgid "the last 48 bits of the UUID" -msgstr "" +msgstr "UUID 最後的 48 位元" #: ../../library/uuid.rst:113 msgid ":attr:`time`" @@ -175,7 +208,7 @@ msgstr ":attr:`time`" #: ../../library/uuid.rst:113 msgid "the 60-bit timestamp" -msgstr "" +msgstr "60 位元的時間戳" #: ../../library/uuid.rst:115 msgid ":attr:`clock_seq`" @@ -183,19 +216,19 @@ msgstr ":attr:`clock_seq`" #: ../../library/uuid.rst:115 msgid "the 14-bit sequence number" -msgstr "" +msgstr "14 位元的序列號" #: ../../library/uuid.rst:121 msgid "The UUID as a 32-character lowercase hexadecimal string." -msgstr "" +msgstr "UUID 以 32 個小寫十六進位字元組成的字串表示。" #: ../../library/uuid.rst:126 msgid "The UUID as a 128-bit integer." -msgstr "" +msgstr "UUID 以 128 位元的整數表示。" #: ../../library/uuid.rst:131 msgid "The UUID as a URN as specified in :rfc:`4122`." -msgstr "" +msgstr "UUID 以 :rfc:`4122` 中指定的 URN 形式表示。" #: ../../library/uuid.rst:136 msgid "" @@ -203,22 +236,25 @@ msgid "" "will be one of the constants :const:`RESERVED_NCS`, :const:`RFC_4122`, :" "const:`RESERVED_MICROSOFT`, or :const:`RESERVED_FUTURE`." msgstr "" +"UUID 的變體,決定 UUID 內部的佈局 (layout),是 :const:`RESERVED_NCS`、:const:" +"`RFC_4122`、:const:`RESERVED_MICROSOFT` 或 :const:`RESERVED_FUTURE` 其中一個" +"常數。" #: ../../library/uuid.rst:143 msgid "" "The UUID version number (1 through 5, meaningful only when the variant is :" "const:`RFC_4122`)." -msgstr "" +msgstr "UUID 的版本號(1 到 5,只有當變體是 :const:`RFC_4122` 時才有意義)。" #: ../../library/uuid.rst:148 msgid "" "An enumeration of :class:`SafeUUID` which indicates whether the platform " "generated the UUID in a multiprocessing-safe way." -msgstr "" +msgstr ":class:`SafeUUID` 的列舉,表示平台是否以多行程安全的方式產生 UUID。" #: ../../library/uuid.rst:153 msgid "The :mod:`uuid` module defines the following functions:" -msgstr "" +msgstr ":mod:`uuid` 模組定義了以下函式:" #: ../../library/uuid.rst:158 msgid "" @@ -232,6 +268,14 @@ msgid "" "least significant bit of the first octet is *unset*) will be preferred over " "locally administered MAC addresses, but with no other ordering guarantees." msgstr "" +"取得 48 位元正整數形式的硬體位址。第一次執行時,有可能會啟動一個獨立的程式," +"這也許會相當耗時。如果所有獲取硬體位址的嘗試都失敗,我們會根據 :rfc:`4122` 中" +"的建議,使用一個 48 位元的隨機數,其中群播位元 (multicast bit)(第一個八位元" +"組的最低有效位)設置為 1。「硬體位址」指的是網路介面 (network interface) 的 " +"MAC 位址。在具有多個網路介面的機器上,將優先選擇通用管理 (universally " +"administered) 的 MAC 位址(即第一個八位元組的第二個最低有效位是 *未設置的" +"*),而不是本地管理 (locally administered) 的 MAC 位址,除此之外不保證任何選" +"擇的順序。" #: ../../library/uuid.rst:168 msgid "" @@ -239,6 +283,8 @@ msgid "" "administered MAC addresses, since the former are guaranteed to be globally " "unique, while the latter are not." msgstr "" +"通用管理的 MAC 位址優於本地管理的 MAC 位址,因為前者保證是全球唯一的,而後者" +"不是。" #: ../../library/uuid.rst:178 msgid "" @@ -247,6 +293,9 @@ msgid "" "If *clock_seq* is given, it is used as the sequence number; otherwise a " "random 14-bit sequence number is chosen." msgstr "" +"從主機 ID、序列號和當前時間生成 UUID。如果未給定 *node*,將使用 :func:" +"`getnode` 獲取硬體位址。如果給定 *clock_seq*,會將其用作序列號;否則將使用一" +"個隨機 14 位元的序列號。" #: ../../library/uuid.rst:188 msgid "" @@ -254,10 +303,12 @@ msgid "" "UUID) and a name (which is a :class:`bytes` object or a string that will be " "encoded using UTF-8)." msgstr "" +"基於命名空間識別碼 (namespace identifier)(一個 UUID)和名稱(一個 :class:" +"`bytes` 物件或使用 UTF-8 編碼的字串)的 MD5 hash 來生成 UUID。" #: ../../library/uuid.rst:197 msgid "Generate a random UUID." -msgstr "" +msgstr "生成一個隨機的 UUID。" #: ../../library/uuid.rst:204 msgid "" @@ -265,87 +316,98 @@ msgid "" "a UUID) and a name (which is a :class:`bytes` object or a string that will " "be encoded using UTF-8)." msgstr "" +"基於命名空間識別碼(一個 UUID)和名稱(一個 :class:`bytes` 物件或使用 UTF-8 " +"編碼的字串)的 SHA-1 hash 來生成 UUID。" #: ../../library/uuid.rst:210 msgid "" "The :mod:`uuid` module defines the following namespace identifiers for use " "with :func:`uuid3` or :func:`uuid5`." msgstr "" +":mod:`uuid` 模組為 :func:`uuid3` 或 :func:`uuid5` 定義了以下的命名空間識別" +"碼。" #: ../../library/uuid.rst:216 msgid "" "When this namespace is specified, the *name* string is a fully qualified " "domain name." msgstr "" +"當指定這個命名空間時,*name* 字串是一個完整網域名稱 (fully qualified domain " +"name)。" #: ../../library/uuid.rst:222 msgid "When this namespace is specified, the *name* string is a URL." -msgstr "" +msgstr "當指定這個命名空間時,*name* 字串是一個 URL。" #: ../../library/uuid.rst:227 msgid "When this namespace is specified, the *name* string is an ISO OID." -msgstr "" +msgstr "當指定這個命名空間時,*name* 字串是一個 ISO OID。" #: ../../library/uuid.rst:232 msgid "" "When this namespace is specified, the *name* string is an X.500 DN in DER or " "a text output format." msgstr "" +"當指定這個命名空間時,*name* 字串是以 DER 或文字輸出格式表示的 X.500 DN。" #: ../../library/uuid.rst:235 msgid "" "The :mod:`uuid` module defines the following constants for the possible " "values of the :attr:`variant` attribute:" -msgstr "" +msgstr ":mod:`uuid` 模組為 :attr:`variant` 屬性的可能值定義了以下常數:" #: ../../library/uuid.rst:241 msgid "Reserved for NCS compatibility." -msgstr "" +msgstr "保留供 NCS 相容性使用。" #: ../../library/uuid.rst:246 msgid "Specifies the UUID layout given in :rfc:`4122`." -msgstr "" +msgstr "使用在 :rfc:`4122` 中給定的 UUID 佈局。" #: ../../library/uuid.rst:251 msgid "Reserved for Microsoft compatibility." -msgstr "" +msgstr "保留供 Microsoft 相容性使用。" #: ../../library/uuid.rst:256 msgid "Reserved for future definition." -msgstr "" +msgstr "保留供未來定義使用。" #: ../../library/uuid.rst:262 msgid ":rfc:`4122` - A Universally Unique IDentifier (UUID) URN Namespace" msgstr "" +":rfc:`4122` - 通用唯一辨識碼 (UUID, Universally Unique IDentifier) 的 URN 命" +"名空間" #: ../../library/uuid.rst:262 msgid "" "This specification defines a Uniform Resource Name namespace for UUIDs, the " "internal format of UUIDs, and methods of generating UUIDs." msgstr "" +"這個規範定義了 UUID 的統一資源名稱 (Uniform Resource Name) 命名空間、UUID 的" +"內部格式和生成 UUID 的方法。" #: ../../library/uuid.rst:269 msgid "Command-Line Usage" -msgstr "" +msgstr "命令列的用法" #: ../../library/uuid.rst:273 msgid "" "The :mod:`uuid` module can be executed as a script from the command line." -msgstr "" +msgstr ":mod:`uuid` 模組可以在命令列下作為腳本來執行。" #: ../../library/uuid.rst:279 msgid "The following options are accepted:" -msgstr "" +msgstr "可以接受以下選項:" #: ../../library/uuid.rst:285 msgid "Show the help message and exit." -msgstr "" +msgstr "顯示幫助訊息並退出。" #: ../../library/uuid.rst:290 msgid "" "Specify the function name to use to generate the uuid. By default :func:" "`uuid4` is used." -msgstr "" +msgstr "指定要用來生成 UUID 的函式名稱。預設使用 :func:`uuid4`。" #: ../../library/uuid.rst:296 msgid "" @@ -354,12 +416,15 @@ msgid "" "``@oid``, and ``@x500``. Only required for :func:`uuid3` / :func:`uuid5` " "functions." msgstr "" +"該命名空間是一個 ``UUID`` 或 ``@ns``,其中 ``ns`` 是指知名預定義 UUID 的命名" +"空間名稱,例如 ``@dns``、``@url``、``@oid`` 和 ``@x500``。 只有 :func:" +"`uuid3` / :func:`uuid5` 函式會需要。" #: ../../library/uuid.rst:303 msgid "" "The name used as part of generating the uuid. Only required for :func:" "`uuid3` / :func:`uuid5` functions." -msgstr "" +msgstr "用於生成 uuid 的名稱。只有 :func:`uuid3` / :func:`uuid5` 函式會需要。" #: ../../library/uuid.rst:310 msgid "Example" @@ -368,16 +433,19 @@ msgstr "範例" #: ../../library/uuid.rst:312 msgid "Here are some examples of typical usage of the :mod:`uuid` module::" msgstr "" +"以下是一些 :mod:`uuid` 模組的典型使用範例:\n" +"\n" +"::" #: ../../library/uuid.rst:351 msgid "Command-Line Example" -msgstr "" +msgstr "命令列的範例" #: ../../library/uuid.rst:353 msgid "" "Here are some examples of typical usage of the :mod:`uuid` command line " "interface:" -msgstr "" +msgstr "以下是一些 :mod:`uuid` 命令列介面的典型使用範例:" #: ../../library/uuid.rst:173 msgid "getnode"