Skip to content

Commit 04e1c26

Browse files
committed
Translate howto/ipaddress.po
1 parent 4609277 commit 04e1c26

File tree

1 file changed

+75
-19
lines changed

1 file changed

+75
-19
lines changed

howto/ipaddress.po

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-02-19 00:13+0000\n"
11-
"PO-Revision-Date: 2024-07-20 16:09+0800\n"
11+
"PO-Revision-Date: 2025-11-15 01:58-0500\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -17,7 +17,7 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=1; plural=0;\n"
20-
"X-Generator: Poedit 3.4.4\n"
20+
"X-Generator: Poedit 3.8\n"
2121

2222
#: ../../howto/ipaddress.rst:9
2323
msgid "An introduction to the ipaddress module"
@@ -61,10 +61,12 @@ msgid ""
6161
"addresses, the first thing you'll want to do is create some objects. You "
6262
"can use :mod:`ipaddress` to create objects from strings and integers."
6363
msgstr ""
64+
"由於 :mod:ipaddress 是一個用於檢查和操作 IP 位址的模組,你首先會想要做的事情"
65+
"是建立一些物件。你可以使用 :mod:ipaddress 從字串和整數建立物件。"
6466

6567
#: ../../howto/ipaddress.rst:32
6668
msgid "A Note on IP Versions"
67-
msgstr ""
69+
msgstr "關於IP 版本的說明"
6870

6971
#: ../../howto/ipaddress.rst:34
7072
msgid ""
@@ -76,6 +78,10 @@ msgid ""
7678
"given the increasing number of devices with direct connections to the "
7779
"internet."
7880
msgstr ""
81+
"對於不太熟悉 IP 定址的讀者來說,重要的是要知道網際網路協定 (Internet "
82+
"Protocol, IP) 目前正在從協定的第 4 版過渡到第 6 版。這個轉換主要是因為協定的"
83+
"第 4 版無法提供足夠的位址來處理全世界的需求,特別是考慮到直接連接到網際網路的"
84+
"裝置數量不斷增加。"
7985

8086
#: ../../howto/ipaddress.rst:41
8187
msgid ""
@@ -84,10 +90,12 @@ msgid ""
8490
"least be aware that these two versions exist, and it will sometimes be "
8591
"necessary to force the use of one version or the other."
8692
msgstr ""
93+
"解釋這兩個版本協定之間差異的細節超出了本介紹的範圍,但讀者至少需要知道這兩個"
94+
"版本的存在,而且有時候會需要強制使用其中一個版本。"
8795

8896
#: ../../howto/ipaddress.rst:48
8997
msgid "IP Host Addresses"
90-
msgstr ""
98+
msgstr "IP 主機位址"
9199

92100
#: ../../howto/ipaddress.rst:50
93101
msgid ""
@@ -97,12 +105,16 @@ msgid ""
97105
"determines whether to create an IPv4 or IPv6 address based on the passed in "
98106
"value:"
99107
msgstr ""
108+
"位址,通常被稱為「主機位址」,是處理 IP 定址時最基本的單位。建立位址最簡單的"
109+
"方法是使用 :func:ipaddress.ip_address 工廠函式,它會根據傳入的值自動判斷要建"
110+
"立 IPv4 還是 IPv6 位址:"
100111

101112
#: ../../howto/ipaddress.rst:61
102113
msgid ""
103114
"Addresses can also be created directly from integers. Values that will fit "
104115
"within 32 bits are assumed to be IPv4 addresses::"
105116
msgstr ""
117+
"位址也可以直接從整數建立。符合 32 位元以內的值會被假定為 IPv4 位址: ::"
106118

107119
#: ../../howto/ipaddress.rst:64
108120
msgid ""
@@ -122,6 +134,8 @@ msgid ""
122134
"invoked directly. This is particularly useful to force creation of IPv6 "
123135
"addresses for small integers::"
124136
msgstr ""
137+
"要強制使用 IPv4 或 IPv6 位址,可以直接呼叫相關的類別。這對於強制為小整數建立 "
138+
"IPv6 位址特別有用: ::"
125139

126140
#: ../../howto/ipaddress.rst:73
127141
msgid ""
@@ -154,12 +168,17 @@ msgid ""
154168
"whether or not an address is part of the network and the network address "
155169
"defines the expected value of those bits."
156170
msgstr ""
171+
"主機位址通常會被分組到 IP 網路中,因此 :mod:ipaddress 提供了一種建立、檢查和"
172+
"操作網路定義的方法。IP 網路物件是從定義該網路所包含之主機位址範圍的字串建構而"
173+
"成。這些資訊最簡單的形式是「網路位址/網路前綴」配對,其中前綴定義了用於比較的"
174+
"前導位元數量,以判斷位址是否屬於該網路的一部分,而網路位址則定義了這些位元的"
175+
"預期值。"
157176

158177
#: ../../howto/ipaddress.rst:93
159178
msgid ""
160179
"As for addresses, a factory function is provided that determines the correct "
161180
"IP version automatically::"
162-
msgstr ""
181+
msgstr "至於位址,提供了一個工廠函式可以自動判斷正確的 IP 版本: ::"
163182

164183
#: ../../howto/ipaddress.rst:96
165184
msgid ""
@@ -181,6 +200,9 @@ msgid ""
181200
"commonly used to describe network interfaces of a computer on a given "
182201
"network and are described further in the next section."
183202
msgstr ""
203+
"網路物件不能設定任何主機位元。這樣做的實際效果是 192.0.2.1/24 並不描述一個網"
204+
"路。這類定義被稱為介面物件,因為 ip-on-a-network 標記法通常用於描述電腦在給定"
205+
"網路上的網路介面,並將在下一節中進一步說明。"
184206

185207
#: ../../howto/ipaddress.rst:107
186208
msgid ""
@@ -189,6 +211,8 @@ msgid ""
189211
"bits instead be coerced to zero, the flag ``strict=False`` can be passed to "
190212
"the constructor::"
191213
msgstr ""
214+
"預設情況下,嘗試建立帶有主機位元設定的網路物件會導致引發 :exc:ValueError。若"
215+
"要求將額外的位元強制轉換為零,可以在建構子中傳遞旗標 strict=False: ::"
192216

193217
#: ../../howto/ipaddress.rst:112
194218
msgid ""
@@ -213,6 +237,9 @@ msgid ""
213237
"network is considered to contain only the single address identified by the "
214238
"integer, so the network prefix includes the entire network address::"
215239
msgstr ""
240+
"雖然字串形式提供了更大的靈活性,但網路也可以像主機位址一樣使用整數來定義。在"
241+
"這種情況下,網路被認為僅包含由該整數識別的單一位址,因此網路前綴包含了整個網"
242+
"路位址: ::"
216243

217244
#: ../../howto/ipaddress.rst:124
218245
msgid ""
@@ -231,10 +258,12 @@ msgid ""
231258
"As with addresses, creation of a particular kind of network can be forced by "
232259
"calling the class constructor directly instead of using the factory function."
233260
msgstr ""
261+
"與位址一樣,可以透過直接呼叫類別建構子而非使用工廠函式,來強制建立特定類型的"
262+
"網路。"
234263

235264
#: ../../howto/ipaddress.rst:135
236265
msgid "Host Interfaces"
237-
msgstr ""
266+
msgstr "主機介面"
238267

239268
#: ../../howto/ipaddress.rst:137
240269
msgid ""
@@ -248,12 +277,19 @@ msgid ""
248277
"is identical to that for defining network objects, except that the address "
249278
"portion isn't constrained to being a network address."
250279
msgstr ""
280+
"如上所述,如果你需要描述特定網路上的位址,位址類別和網路類別都不足以滿足需"
281+
"求。像 192.0.2.1/24 這樣的標記法通常被網路工程師以及編寫防火牆和路由器工具的"
282+
"人用作「網路 192.0.2.0/24 上的主機 192.0.2.1」的簡寫。因此,:mod:ipaddress 提"
283+
"供了一組混合類別,將位址與特定網路關聯起來。建立介面的方式與定義網路物件相"
284+
"同,只是位址部分不受限於必須是網路位址。"
251285

252286
#: ../../howto/ipaddress.rst:152
253287
msgid ""
254288
"Integer inputs are accepted (as with networks), and use of a particular IP "
255289
"version can be forced by calling the relevant constructor directly."
256290
msgstr ""
291+
"可以接受整數輸入(如同網路一樣),並且可以透過直接呼叫相關的建構子來強制使用"
292+
"特定的 IP 版本。"
257293

258294
#: ../../howto/ipaddress.rst:157
259295
msgid "Inspecting Address/Network/Interface Objects"
@@ -265,10 +301,12 @@ msgid ""
265301
"Interface) object, so you probably want to get information about "
266302
"it. :mod:`ipaddress` tries to make doing this easy and intuitive."
267303
msgstr ""
304+
"你費心建立了 IPv(4|6)(Address|Network|Interface) 物件,所以你可能想要取得關於"
305+
"它的資訊。:mod:ipaddress 試圖讓這件事變得簡單且直觀。"
268306

269307
#: ../../howto/ipaddress.rst:163
270308
msgid "Extracting the IP version::"
271-
msgstr ""
309+
msgstr "提取 IP 版本: ::"
272310

273311
#: ../../howto/ipaddress.rst:165
274312
msgid ""
@@ -288,7 +326,7 @@ msgstr ""
288326

289327
#: ../../howto/ipaddress.rst:172
290328
msgid "Obtaining the network from an interface::"
291-
msgstr ""
329+
msgstr "從介面取得網路: ::"
292330

293331
#: ../../howto/ipaddress.rst:174
294332
msgid ""
@@ -308,7 +346,7 @@ msgstr ""
308346

309347
#: ../../howto/ipaddress.rst:181
310348
msgid "Finding out how many individual addresses are in a network::"
311-
msgstr ""
349+
msgstr "找出網路中有多少個別位址: ::"
312350

313351
#: ../../howto/ipaddress.rst:183
314352
msgid ""
@@ -328,7 +366,7 @@ msgstr ""
328366

329367
#: ../../howto/ipaddress.rst:190
330368
msgid "Iterating through the \"usable\" addresses on a network::"
331-
msgstr ""
369+
msgstr "迭代網路上「可用的」位址: ::"
332370

333371
#: ../../howto/ipaddress.rst:192
334372
msgid ""
@@ -361,10 +399,12 @@ msgid ""
361399
"Obtaining the netmask (i.e. set bits corresponding to the network prefix) or "
362400
"the hostmask (any bits that are not part of the netmask):"
363401
msgstr ""
402+
"取得網路遮罩(即對應於網路前綴的設定位元)或主機遮罩(任何不屬於網路遮罩的位"
403+
"元): ::"
364404

365405
#: ../../howto/ipaddress.rst:220
366406
msgid "Exploding or compressing the address::"
367-
msgstr ""
407+
msgstr "展開或壓縮位址: ::"
368408

369409
#: ../../howto/ipaddress.rst:222
370410
msgid ""
@@ -393,16 +433,19 @@ msgid ""
393433
"easily ensure the most concise or most verbose form is used for IPv6 "
394434
"addresses while still correctly handling IPv4 addresses."
395435
msgstr ""
436+
"雖然 IPv4 不支援展開或壓縮,但相關的物件仍然提供了相關屬性,使得版本中立的程"
437+
"式碼可以輕鬆地確保 IPv6 位址使用最簡潔或最詳細的形式,同時仍能正確處理 IPv4 "
438+
"位址。"
396439

397440
#: ../../howto/ipaddress.rst:238
398441
msgid "Networks as lists of Addresses"
399-
msgstr ""
442+
msgstr "作為位址串列的網路"
400443

401444
#: ../../howto/ipaddress.rst:240
402445
msgid ""
403446
"It's sometimes useful to treat networks as lists. This means it is possible "
404447
"to index them like this::"
405-
msgstr ""
448+
msgstr "有時將網路視為串列是很有用的。這意味著可以像這樣對它們進行索引: ::"
406449

407450
#: ../../howto/ipaddress.rst:243
408451
msgid ""
@@ -428,7 +471,7 @@ msgstr ""
428471
msgid ""
429472
"It also means that network objects lend themselves to using the list "
430473
"membership test syntax like this::"
431-
msgstr ""
474+
msgstr "這也意味著網路物件適合使用串列成員測試語法,像這樣: ::"
432475

433476
#: ../../howto/ipaddress.rst:256
434477
msgid ""
@@ -440,7 +483,7 @@ msgstr ""
440483

441484
#: ../../howto/ipaddress.rst:259
442485
msgid "Containment testing is done efficiently based on the network prefix::"
443-
msgstr ""
486+
msgstr "包含測試是基於網路前綴高效地完成的: ::"
444487

445488
#: ../../howto/ipaddress.rst:261
446489
msgid ""
@@ -465,6 +508,8 @@ msgid ""
465508
":mod:`ipaddress` provides some simple, hopefully intuitive ways to compare "
466509
"objects, where it makes sense::"
467510
msgstr ""
511+
":mod:ipaddress 提供了一些簡單且希望是直觀的方法來比較物件,只要這樣做有道"
512+
"理: ::"
468513

469514
#: ../../howto/ipaddress.rst:274
470515
msgid ""
@@ -478,18 +523,20 @@ msgstr ""
478523
msgid ""
479524
"A :exc:`TypeError` exception is raised if you try to compare objects of "
480525
"different versions or different types."
481-
msgstr ""
526+
msgstr "如果你嘗試比較不同版本或不同類型的物件,會引發 :exc:TypeError 例外。"
482527

483528
#: ../../howto/ipaddress.rst:282
484529
msgid "Using IP Addresses with other modules"
485-
msgstr ""
530+
msgstr "與其他模組一起使用 IP 位址"
486531

487532
#: ../../howto/ipaddress.rst:284
488533
msgid ""
489534
"Other modules that use IP addresses (such as :mod:`socket`) usually won't "
490535
"accept objects from this module directly. Instead, they must be coerced to "
491536
"an integer or string that the other module will accept::"
492537
msgstr ""
538+
"其他使用 IP 位址的模組(例如 :mod:socket)通常不會直接接受來自此模組的物件。"
539+
"相反地,它們必須被強制轉換為其他模組能接受的整數或字串: ::"
493540

494541
#: ../../howto/ipaddress.rst:288
495542
msgid ""
@@ -507,7 +554,7 @@ msgstr ""
507554

508555
#: ../../howto/ipaddress.rst:296
509556
msgid "Getting more detail when instance creation fails"
510-
msgstr ""
557+
msgstr "在實例建立失敗時取得更多細節"
511558

512559
#: ../../howto/ipaddress.rst:298
513560
msgid ""
@@ -518,6 +565,10 @@ msgid ""
518565
"because it's necessary to know whether the value is *supposed* to be IPv4 or "
519566
"IPv6 in order to provide more detail on why it has been rejected."
520567
msgstr ""
568+
"當使用版本無關的工廠函式建立位址/網路/介面物件時,任何錯誤都會"
569+
"以 :exc:ValueError 回報,並附帶一個通用的錯誤訊息,簡單地說明傳入的值未被識別"
570+
"為該類型的物件。缺乏具體錯誤的原因是,為了提供更多關於為何被拒絕的細節,需要"
571+
"知道該值應該是 IPv4 還是 IPv6。"
521572

522573
#: ../../howto/ipaddress.rst:305
523574
msgid ""
@@ -527,12 +578,15 @@ msgid ""
527578
"and :exc:`ipaddress.NetmaskValueError` to indicate exactly which part of the "
528579
"definition failed to parse correctly."
529580
msgstr ""
581+
"為了支援需要存取這些額外細節的使用情境,個別類別建構子實際上會引"
582+
"發 :exc:ValueError 的子類別 :exc:ipaddress.AddressValueError "
583+
"和 :exc:ipaddress.NetmaskValueError,以明確指出定義的哪個部分無法正確解析。"
530584

531585
#: ../../howto/ipaddress.rst:311
532586
msgid ""
533587
"The error messages are significantly more detailed when using the class "
534588
"constructors directly. For example::"
535-
msgstr ""
589+
msgstr "當直接使用類別建構子時,錯誤訊息會詳細得多。例如: ::"
536590

537591
#: ../../howto/ipaddress.rst:314
538592
msgid ""
@@ -580,6 +634,8 @@ msgid ""
580634
"their parent class, so if you're not concerned with the particular type of "
581635
"error, you can still write code like the following::"
582636
msgstr ""
637+
"然而,這兩個模組特定的例外都以 :exc:ValueError 作為它們的父類別,因此如果你不"
638+
"關心特定類型的錯誤,你仍然可以撰寫如下的程式碼: ::"
583639

584640
#: ../../howto/ipaddress.rst:336
585641
msgid ""

0 commit comments

Comments
 (0)