Skip to content

Commit cc9158c

Browse files
committed
Update
1 parent eaccd60 commit cc9158c

File tree

1 file changed

+80
-25
lines changed

1 file changed

+80
-25
lines changed

library/csv.po

Lines changed: 80 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
11-
"PO-Revision-Date: 2023-09-10 10:26+0800\n"
11+
"PO-Revision-Date: 2023-11-01 17:19+0800\n"
1212
"Last-Translator: RockLeon <therockleona@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.3.2\n"
20+
"X-Generator: Poedit 3.4\n"
2121

2222
#: ../../library/csv.rst:2
2323
msgid ":mod:`csv` --- CSV File Reading and Writing"
@@ -360,7 +360,7 @@ msgid ""
360360
msgstr ""
361361
"分析給定的 *sample* 且回傳一個 :class:`Dialect` 子類別,反應出找到的格式參"
362362
"數。如果給定選填的參數 *delimiters*,它會被解釋為一個字串且含有可能、有效的分"
363-
"隔字符。"
363+
"隔字元。"
364364

365365
#: ../../library/csv.rst:286
366366
msgid ""
@@ -507,15 +507,21 @@ msgid ""
507507
"specify individual formatting parameters, which have the same names as the "
508508
"attributes defined below for the :class:`Dialect` class."
509509
msgstr ""
510+
"為了讓指定輸入及輸出紀錄的格式更方便,特定的格式化參數會被組成 dialect。一個 "
511+
"dialect 是 :class:`Dialect` class 的子類別,其有一組特定的方法及單獨的 :meth:"
512+
"`validate` 方法。當建立 :class:`reader` 或 :class:`writer` 物件時,程式設計師"
513+
"可以指定一個字串或是一個 :class:`Dialect` 的子類別作為 dialect 參數。此外,或"
514+
"是作為替代,在\\ *dialect*\\ 參數中,程式設計師可以指定個別的格式化參數,其"
515+
"與 :class:`Dialect` 類別定義的屬性具有相同的名字。"
510516

511517
#: ../../library/csv.rst:382
512518
msgid "Dialects support the following attributes:"
513-
msgstr ""
519+
msgstr "Dialect 支援下列屬性:"
514520

515521
#: ../../library/csv.rst:387
516522
msgid ""
517523
"A one-character string used to separate fields. It defaults to ``','``."
518-
msgstr ""
524+
msgstr "一個單一字元 (one-character) 的字串可已用來分割欄位。預設為 ``','``。"
519525

520526
#: ../../library/csv.rst:392
521527
msgid ""
@@ -524,12 +530,17 @@ msgid ""
524530
"const:`False`, the *escapechar* is used as a prefix to the *quotechar*. It "
525531
"defaults to :const:`True`."
526532
msgstr ""
533+
"控制\\ *引號*\\ 的實例何時出現在欄位之中,並讓它們自己被放在引號之內。當屬性"
534+
"為 :const:`True`,字元會是雙引號。若為 const:`False`,在\\ *引號*\\ 之前會先"
535+
"使用\\ *逸出字元*\\ 作為前綴字。預設為 :const:`True`。"
527536

528537
#: ../../library/csv.rst:397
529538
msgid ""
530539
"On output, if *doublequote* is :const:`False` and no *escapechar* is set, :"
531540
"exc:`Error` is raised if a *quotechar* is found in a field."
532541
msgstr ""
542+
"在輸出時,若 *doublequote* 是 :const:`False` 且\\ *逸出字元*\\ 沒有被設定,當"
543+
"一個\\ *引號*\\ 在欄位中被發現時,:exc:`Error` 會被引發。"
533544

534545
#: ../../library/csv.rst:403
535546
msgid ""
@@ -539,63 +550,78 @@ msgid ""
539550
"from the following character. It defaults to :const:`None`, which disables "
540551
"escaping."
541552
msgstr ""
553+
"一個會被寫入器使用的單一字元的字串,當 *quoting* 設定為 :const:`QUOTE_NONE` "
554+
"時逸出\\ *分隔符號*\\ ;當 *doublequote* 設定為 :const:`False` 時逸出\\ *引號"
555+
"*\\ 。在讀取時,\\ *逸出字元*\\ 會移除後面的字元以及任何特殊意義。預設為 :"
556+
"const:`None`,表示禁止逸出。"
542557

543558
#: ../../library/csv.rst:408
544559
msgid "An empty *escapechar* is not allowed."
545-
msgstr ""
560+
msgstr "*escapechar* 為空是不被接受的。"
546561

547562
#: ../../library/csv.rst:413
548563
msgid ""
549564
"The string used to terminate lines produced by the :class:`writer`. It "
550565
"defaults to ``'\\r\\n'``."
551-
msgstr ""
566+
msgstr "由 :class:`writer` 產生被用來分行的字串。預設為 ``'\\r\\n'``。"
552567

553568
#: ../../library/csv.rst:418
554569
msgid ""
555570
"The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` "
556571
"as end-of-line, and ignores *lineterminator*. This behavior may change in "
557572
"the future."
558573
msgstr ""
574+
":class:`reader`是 hard-coded 辨別 ``'\\r'`` or ``'\\n'`` 作為行尾 (end-of-"
575+
"line),並忽略\\ *分行符號*\\ 。未來可能會改變這個行為。"
559576

560577
#: ../../library/csv.rst:425
561578
msgid ""
562579
"A one-character string used to quote fields containing special characters, "
563580
"such as the *delimiter* or *quotechar*, or which contain new-line "
564581
"characters. It defaults to ``'\"'``."
565582
msgstr ""
583+
"一個單一字元的字串被用於引用包含特殊字元的欄位,像是\\ *分隔符號*\\\\ *引"
584+
"號*\\ 或是換行字元。預設為 ``'\"'``。"
566585

567586
#: ../../library/csv.rst:429
568587
msgid "An empty *quotechar* is not allowed."
569-
msgstr ""
588+
msgstr "*quotechar* 為空是不被允許的。"
570589

571590
#: ../../library/csv.rst:434
572591
msgid ""
573592
"Controls when quotes should be generated by the writer and recognised by the "
574593
"reader. It can take on any of the :const:`QUOTE_\\*` constants (see "
575594
"section :ref:`csv-contents`) and defaults to :const:`QUOTE_MINIMAL`."
576595
msgstr ""
596+
"控制 writer 何時產生引號,以及 reader 如何辨識引號。他可以使用任何 :const:"
597+
"`QUOTE_\\*` 常數(請見段落 :ref:`csv-contents`)且預設為 :const:"
598+
"`QUOTE_MINIMAL`。"
577599

578600
#: ../../library/csv.rst:441
579601
msgid ""
580602
"When :const:`True`, spaces immediately following the *delimiter* are "
581603
"ignored. The default is :const:`False`."
582604
msgstr ""
605+
"若為 :const:`True`,在緊接著\\ *分隔符號*\\ 後的空格會被忽略。預設為 :const:"
606+
"`False`。"
583607

584608
#: ../../library/csv.rst:447
585609
msgid ""
586610
"When ``True``, raise exception :exc:`Error` on bad CSV input. The default is "
587611
"``False``."
588-
msgstr ""
612+
msgstr "若為 ``True``,若有錯誤的 CSV 輸入則會引發例外。預設為 ``False``。"
589613

590614
#: ../../library/csv.rst:451
591615
msgid "Reader Objects"
592-
msgstr ""
616+
msgstr "讀取器物件"
593617

594618
#: ../../library/csv.rst:453
595619
msgid ""
596620
"Reader objects (:class:`DictReader` instances and objects returned by the :"
597621
"func:`reader` function) have the following public methods:"
598622
msgstr ""
623+
"讀取器物件(:func:`reader` 函式回傳的 :class:`DictReader` 實例與物件)有下列"
624+
"公用方法 (public method):"
599625

600626
#: ../../library/csv.rst:458
601627
msgid ""
@@ -604,34 +630,39 @@ msgid ""
604630
"instance), parsed according to the current :class:`Dialect`. Usually you "
605631
"should call this as ``next(reader)``."
606632
msgstr ""
633+
"回傳一個列表為讀入器的可疊代物件的下一列內容(若該物件是由 :func:`reader` 回"
634+
"傳)或是一個 dict(若為 :class:`DictReader` 實例),會依據當前的 :class:"
635+
"`Dialect` 進行剖析。通常會用 ``next(reader)`` 來進行呼叫。"
607636

608637
#: ../../library/csv.rst:464
609638
msgid "Reader objects have the following public attributes:"
610-
msgstr ""
639+
msgstr "讀取器物件有下列公用屬性 (public attributes):"
611640

612641
#: ../../library/csv.rst:468
613642
msgid "A read-only description of the dialect in use by the parser."
614-
msgstr ""
643+
msgstr "dialect 的唯讀敘述,會被剖析器使用。"
615644

616645
#: ../../library/csv.rst:473
617646
msgid ""
618647
"The number of lines read from the source iterator. This is not the same as "
619648
"the number of records returned, as records can span multiple lines."
620-
msgstr ""
649+
msgstr "來源疊代器所讀取的行數。這與回傳的紀錄數不同,因為可以進行跨行紀錄。"
621650

622651
#: ../../library/csv.rst:477
623652
msgid "DictReader objects have the following public attribute:"
624-
msgstr ""
653+
msgstr "DictReader 物件有下列公用屬性:"
625654

626655
#: ../../library/csv.rst:481
627656
msgid ""
628657
"If not passed as a parameter when creating the object, this attribute is "
629658
"initialized upon first access or when the first record is read from the file."
630659
msgstr ""
660+
"若在建立物件時沒有作為參數傳遞,這個屬性會在第一次存取之前或是第一筆資料被讀"
661+
"取之前進行初始化 (initialize)。"
631662

632663
#: ../../library/csv.rst:488
633664
msgid "Writer Objects"
634-
msgstr ""
665+
msgstr "寫入器物件"
635666

636667
#: ../../library/csv.rst:490
637668
msgid ""
@@ -644,65 +675,80 @@ msgid ""
644675
"problems for other programs which read CSV files (assuming they support "
645676
"complex numbers at all)."
646677
msgstr ""
678+
":class:`Writer` 物件(:func:`writer` 函式回傳的 :class:`DictWriter` 實例與物"
679+
"件)有下列公用方法。對於 :class:`Writer` 物件而言,一個\\ *列*\\ 中必須為一個"
680+
"可疊代的字串或是數字;對於 :class:`DictWriter` 物件而言,則必須為一個 "
681+
"dictionary ,且可以對應欄位標題至字串或數字(會先透過 :func:`str` 進行傳"
682+
"遞)。請注意,在寫入複雜數字 (complex number) 時會用小括號 (parens) 包起來。"
683+
"這可能在其他程式讀取 CSV 檔案時導致某些問題(假設他們完全支援複雜數字)。"
647684

648685
#: ../../library/csv.rst:501
649686
msgid ""
650687
"Write the *row* parameter to the writer's file object, formatted according "
651688
"to the current :class:`Dialect`. Return the return value of the call to the "
652689
"*write* method of the underlying file object."
653690
msgstr ""
691+
"將參數 *row* 寫入至寫入器的檔案物件中,並依照當前的 :class:`Dialect` 進行格式"
692+
"化。回傳下層檔案物件\\ *寫入*\\ 方法的回傳值。"
654693

655694
#: ../../library/csv.rst:505
656695
msgid "Added support of arbitrary iterables."
657-
msgstr "新增對任意 iterable 的支援。"
696+
msgstr "新增對任意疊代 (arbitrary iterables) 的支援。"
658697

659698
#: ../../library/csv.rst:510
660699
msgid ""
661700
"Write all elements in *rows* (an iterable of *row* objects as described "
662701
"above) to the writer's file object, formatted according to the current "
663702
"dialect."
664703
msgstr ""
704+
"將 *rows* 中所有元素(為上述的一個可疊代的 *row* 物件)寫入至寫入器的檔案物件"
705+
"中,並依照當前的 dialect 進行格式化。"
665706

666707
#: ../../library/csv.rst:514
667708
msgid "Writer objects have the following public attribute:"
668-
msgstr ""
709+
msgstr "寫入器物件有下列公用屬性:"
669710

670711
#: ../../library/csv.rst:519
671712
msgid "A read-only description of the dialect in use by the writer."
672-
msgstr ""
713+
msgstr "dialect 的唯讀敘述,會被寫入器使用。"
673714

674715
#: ../../library/csv.rst:522
675716
msgid "DictWriter objects have the following public method:"
676-
msgstr ""
717+
msgstr "DictWriter 物件有下列公用方法:"
677718

678719
#: ../../library/csv.rst:527
679720
msgid ""
680721
"Write a row with the field names (as specified in the constructor) to the "
681722
"writer's file object, formatted according to the current dialect. Return the "
682723
"return value of the :meth:`csvwriter.writerow` call used internally."
683724
msgstr ""
725+
"將具欄位標題的一列(於建構函式 (constructor) 中指定的)寫入至寫入器的檔案物件"
726+
"中,並依照當前的 dialect 進行格式化。回傳內部呼叫 :meth:`csvwriter.writerow` "
727+
"的回傳值。"
684728

685729
#: ../../library/csv.rst:532
686730
msgid ""
687731
":meth:`writeheader` now also returns the value returned by the :meth:"
688732
"`csvwriter.writerow` method it uses internally."
689733
msgstr ""
734+
":meth:`writeheader` 現在也會回傳內部呼叫 :meth:`csvwriter.writerow` 的回傳"
735+
"值。"
690736

691737
#: ../../library/csv.rst:540
692738
msgid "Examples"
693739
msgstr "範例"
694740

695741
#: ../../library/csv.rst:542
696742
msgid "The simplest example of reading a CSV file::"
697-
msgstr ""
743+
msgstr "最簡單的讀取 CSV 檔案範例: ::"
698744

699745
#: ../../library/csv.rst:550
700746
msgid "Reading a file with an alternate format::"
701-
msgstr ""
747+
msgstr "讀取一個其他格式的檔案: ::"
702748

703749
#: ../../library/csv.rst:558
704750
msgid "The corresponding simplest possible writing example is::"
705-
msgstr ""
751+
msgstr "相對最簡單、可行的寫入範例為: ::"
706752

707753
#: ../../library/csv.rst:565
708754
msgid ""
@@ -711,28 +757,33 @@ msgid ""
711757
"`locale.getencoding`). To decode a file using a different encoding, use the "
712758
"``encoding`` argument of open::"
713759
msgstr ""
760+
"當 :func:`open` 被使用於開啟並讀取一個 CSV 檔案,該檔案會預設使用系統預設的編"
761+
"碼格式(請見 :func:`locale.getencoding`),並解碼為 unicode。若要使用不同編碼"
762+
"格式進行檔案解碼,請使用 open 函式的 ``encoding`` 引數: ::"
714763

715764
#: ../../library/csv.rst:576
716765
msgid ""
717766
"The same applies to writing in something other than the system default "
718767
"encoding: specify the encoding argument when opening the output file."
719768
msgstr ""
769+
"同理可以應用到使用不同編碼格式進行寫入:當開啟輸出檔案時,指定 ``encoding`` "
770+
"引數。"
720771

721772
#: ../../library/csv.rst:579
722773
msgid "Registering a new dialect::"
723-
msgstr ""
774+
msgstr "註冊一個新的 dialect : ::"
724775

725776
#: ../../library/csv.rst:586
726777
msgid ""
727778
"A slightly more advanced use of the reader --- catching and reporting "
728779
"errors::"
729-
msgstr ""
780+
msgstr "稍微進階的讀取器用法—擷取及回報錯誤: ::"
730781

731782
#: ../../library/csv.rst:598
732783
msgid ""
733784
"And while the module doesn't directly support parsing strings, it can easily "
734785
"be done::"
735-
msgstr ""
786+
msgstr "而當模組無法直接支援剖析字串時,仍可以輕鬆的解決: ::"
736787

737788
#: ../../library/csv.rst:607
738789
msgid "Footnotes"
@@ -746,6 +797,10 @@ msgid ""
746797
"safe to specify ``newline=''``, since the csv module does its own (:term:"
747798
"`universal <universal newlines>`) newline handling."
748799
msgstr ""
800+
"如果 ``newline=''`` 沒有被指定,則嵌入引號中的換行符號不會被正確解析,使用 "
801+
"``\\r\\n`` 行尾 (linending) 的平台會寫入額外的 ``\\r``。自從 csv 模組有自己的"
802+
"換行處理方式 (:term:`universal <universal newlines>`) ,因此指定 "
803+
"``newline=''`` 會永遠是安全的。"
749804

750805
#: ../../library/csv.rst:11
751806
msgid "csv"

0 commit comments

Comments
 (0)