From eb1190e7a13ec8847e45ca3bf027deac663707b3 Mon Sep 17 00:00:00 2001 From: rockleona Date: Sat, 12 Aug 2023 20:38:37 +0800 Subject: [PATCH 1/5] Translate rst:71 to rst:152 --- library/csv.po | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/library/csv.po b/library/csv.po index 8ae6c46395..20504176af 100644 --- a/library/csv.po +++ b/library/csv.po @@ -123,6 +123,9 @@ msgid "" "format option is specified (in which case unquoted fields are transformed " "into floats)." msgstr "" +"從 CSV 檔案讀取的每一行會回傳為一個字串列表。除非格式選項 " +"``QUOTE_NONNUMERIC`` 有被指定(在這個情況之下,沒有引號的欄位" +"都會被轉換成浮點數),否則不會進行自動資料型別轉換。" #: ../../library/csv.rst:75 ../../library/csv.rst:105 ../../library/csv.rst:178 #: ../../library/csv.rst:216 @@ -149,6 +152,19 @@ msgid "" "returned from a ``cursor.fetch*`` call. All other non-string data are " "stringified with :func:`str` before being written." msgstr "" +"回傳一個寫入器物件 (writer object),其負責在給予的類檔案物件 (file-like " +"object) 上將使用者的資料轉換為分隔字串 (delimited string)。*csvfile* 可以為" +"具有 :func:`write` method 的任何物件。若 *csvfile* 為一個檔案物件,它應該使用" +" ``newline=''`` 開啟 [1]_ 。*dialect* 為一個可選填的參數,可以用為特定的" +" CSV dialect 定義一組參數。它可能為 :class:`Dialect` 的一個子類別的實例" +"或是由 :func:`list_dialects` 函式回傳的多個字串中的其中之一。" +"另一個可選填的關鍵字引數 *fmtparams* 可以在這個 dialect 中 override" +"獨立的格式化參數。關於 dialect 及格式化參數的完整說明,請見段落" +" :ref:`csv-fmt-params`。為了讓它與實作 DB API 的模組之間的介面 (interface) " +"更容易使用,:const:`None` 值會被寫成空字串。雖然這不是一個可逆的變換,這使得" +"dump (傾印) SQL NULL 資料值到 CSV 檔案上就無需透過 ``cursor.fetch*`` " +"的呼叫以回傳預處理資料 (preprocessing data)。其餘非字串的資料則會在寫入之前" +"用 :func:`str` 函式進行字串化 (stringify)。" #: ../../library/csv.rst:117 msgid "" @@ -158,12 +174,18 @@ msgid "" "parameters of the dialect. For full details about dialects and formatting " "parameters, see section :ref:`csv-fmt-params`." msgstr "" +"將 *dialect* 與 *name* 進行關聯 (associate)。*name* 必須為字串。這個方言可以" +"被特指為 :class:`Dialect` 的子類別;或是關鍵字引數 *fmtparams*;或是以上" +"兩者皆是,並透過關鍵字引數來 override dialect 的參數。關於 dialect 及格式化" +"參數的完整說明,請見段落 :ref:`csv-fmt-params`。" #: ../../library/csv.rst:126 msgid "" "Delete the dialect associated with *name* from the dialect registry. An :" "exc:`Error` is raised if *name* is not a registered dialect name." msgstr "" +"從 dialect 註冊表 (registry) 中,刪除與 *name* 關聯的 dialect。若 *name* 如" +"果不是註冊的 dialect 名稱,則會產生一個 :exc:`Error`。" #: ../../library/csv.rst:132 msgid "" @@ -171,20 +193,24 @@ msgid "" "*name* is not a registered dialect name. This function returns an " "immutable :class:`Dialect`." msgstr "" +"回傳一個與 *name* 關聯的 dialect。若 *name* 如果不是註冊的 dialect 名稱" +",則會產生一個 :exc:`Error`。這個函式會回傳一個 immutable (不可變物件) " +"類別 :class:`Dialect`。" #: ../../library/csv.rst:138 msgid "Return the names of all registered dialects." -msgstr "" +msgstr "回傳所有已註冊的 dialect 名稱。" #: ../../library/csv.rst:143 msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." msgstr "" +"回傳當前的剖析器 (parser) 允許的最大字串大小。" #: ../../library/csv.rst:147 msgid "The :mod:`csv` module defines the following classes:" -msgstr "" +msgstr ":mod:`csv` 模組定義了下列的類別:" #: ../../library/csv.rst:152 msgid "" @@ -192,6 +218,8 @@ msgid "" "information in each row to a :class:`dict` whose keys are given by the " "optional *fieldnames* parameter." msgstr "" +"建立一個物件,其運作上就像一般的讀取器,但可以將每一行資訊 map (對映)" +" 到 :class:`dict` 中,可以透過選填的參數 *fieldnames* 設定 key。" #: ../../library/csv.rst:156 msgid "" From ef073f1388136a183d52dad8ccaf1187301f11d6 Mon Sep 17 00:00:00 2001 From: rockleona Date: Tue, 15 Aug 2023 18:06:41 +0800 Subject: [PATCH 2/5] Update with Reviewer's comment --- library/csv.po | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/library/csv.po b/library/csv.po index 20504176af..628cd6b223 100644 --- a/library/csv.po +++ b/library/csv.po @@ -111,8 +111,8 @@ msgstr "" " [1]_ *dialect* 為一個可選填的參數,可以用為特定的 CSV dialect(方言)" " 定義一組參數。它可能為 :class:`Dialect` 的一個子類別 (subclass) 的實例" "或是由 :func:`list_dialects` 函式回傳的多個字串中的其中之一。" -"另一個可選填的關鍵字引數 *fmtparams* 可以在這個 dialect 中 override(覆寫)" -"獨立的格式化參數 (formatting parameter)。關於 dialect 及格式化參數的完整" +"另一個可選填的關鍵字引數 *fmtparams* 可以在這個 dialect 中覆寫 (override) " +"個別的格式化參數 (formatting parameter)。關於 dialect 及格式化參數的完整" "說明,請見段落 :ref:`csv-fmt-params`。" @@ -158,12 +158,12 @@ msgstr "" " ``newline=''`` 開啟 [1]_ 。*dialect* 為一個可選填的參數,可以用為特定的" " CSV dialect 定義一組參數。它可能為 :class:`Dialect` 的一個子類別的實例" "或是由 :func:`list_dialects` 函式回傳的多個字串中的其中之一。" -"另一個可選填的關鍵字引數 *fmtparams* 可以在這個 dialect 中 override" -"獨立的格式化參數。關於 dialect 及格式化參數的完整說明,請見段落" -" :ref:`csv-fmt-params`。為了讓它與實作 DB API 的模組之間的介面 (interface) " -"更容易使用,:const:`None` 值會被寫成空字串。雖然這不是一個可逆的變換,這使得" -"dump (傾印) SQL NULL 資料值到 CSV 檔案上就無需透過 ``cursor.fetch*`` " -"的呼叫以回傳預處理資料 (preprocessing data)。其餘非字串的資料則會在寫入之前" +"另一個可選填的關鍵字引數 *fmtparams* 可以在這個 dialect 中覆寫" +"個別的格式化參數。關於 dialect 及格式化參數的完整說明,請見段落" +" :ref:`csv-fmt-params`。為了更容易與有實作 DB API 的模組互相接合," +":const:`None` 值會被寫成空字串。雖然這不是一個可逆的變換,這使得" +"dump (傾印) SQL NULL 資料值到 CSV 檔案上就無需讓 ``cursor.fetch*`` " +"呼叫回傳的資料進行預處理 (preprocessing)。其餘非字串的資料則會在寫入之前" "用 :func:`str` 函式進行字串化 (stringify)。" #: ../../library/csv.rst:117 @@ -174,9 +174,9 @@ msgid "" "parameters of the dialect. For full details about dialects and formatting " "parameters, see section :ref:`csv-fmt-params`." msgstr "" -"將 *dialect* 與 *name* 進行關聯 (associate)。*name* 必須為字串。這個方言可以" -"被特指為 :class:`Dialect` 的子類別;或是關鍵字引數 *fmtparams*;或是以上" -"兩者皆是,並透過關鍵字引數來 override dialect 的參數。關於 dialect 及格式化" +"將 *dialect* 與 *name* 進行關聯 (associate)。*name* 必須為字串。這個 dialect " +"可以透過 :class:`Dialect` 的子類別進行指定;或是關鍵字引數 *fmtparams*;或是以上" +"兩者皆是,並透過關鍵字引數來覆寫 dialect 的參數。關於 dialect 及格式化" "參數的完整說明,請見段落 :ref:`csv-fmt-params`。" #: ../../library/csv.rst:126 @@ -195,7 +195,7 @@ msgid "" msgstr "" "回傳一個與 *name* 關聯的 dialect。若 *name* 如果不是註冊的 dialect 名稱" ",則會產生一個 :exc:`Error`。這個函式會回傳一個 immutable (不可變物件) " -"類別 :class:`Dialect`。" +":class:`Dialect`。" #: ../../library/csv.rst:138 msgid "Return the names of all registered dialects." @@ -206,7 +206,8 @@ msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." msgstr "" -"回傳當前的剖析器 (parser) 允許的最大字串大小。" +"回傳當前的剖析器 (parser) 允許的最大字串大小。如果 *new_limit* 被給定," +"則會變成新的最大字串大小。" #: ../../library/csv.rst:147 msgid "The :mod:`csv` module defines the following classes:" @@ -218,7 +219,7 @@ msgid "" "information in each row to a :class:`dict` whose keys are given by the " "optional *fieldnames* parameter." msgstr "" -"建立一個物件,其運作上就像一般的讀取器,但可以將每一行資訊 map (對映)" +"建立一個物件,其運作上就像一般的讀取器,但可以將每一列資訊 map (對映)" " 到 :class:`dict` 中,可以透過選填的參數 *fieldnames* 設定 key。" #: ../../library/csv.rst:156 From 8c6950829110adf662596cd5f59795d54b034a37 Mon Sep 17 00:00:00 2001 From: rockleona Date: Tue, 15 Aug 2023 18:13:14 +0800 Subject: [PATCH 3/5] HOTFIX --- library/csv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/csv.po b/library/csv.po index 628cd6b223..01d45d31b0 100644 --- a/library/csv.po +++ b/library/csv.po @@ -123,7 +123,7 @@ msgid "" "format option is specified (in which case unquoted fields are transformed " "into floats)." msgstr "" -"從 CSV 檔案讀取的每一行會回傳為一個字串列表。除非格式選項 " +"從 CSV 檔案讀取的每一列會回傳為一個字串列表。除非格式選項 " "``QUOTE_NONNUMERIC`` 有被指定(在這個情況之下,沒有引號的欄位" "都會被轉換成浮點數),否則不會進行自動資料型別轉換。" @@ -152,7 +152,7 @@ msgid "" "returned from a ``cursor.fetch*`` call. All other non-string data are " "stringified with :func:`str` before being written." msgstr "" -"回傳一個寫入器物件 (writer object),其負責在給予的類檔案物件 (file-like " +"回傳一個寫入器物件 (writer object),其負責在給定的類檔案物件 (file-like " "object) 上將使用者的資料轉換為分隔字串 (delimited string)。*csvfile* 可以為" "具有 :func:`write` method 的任何物件。若 *csvfile* 為一個檔案物件,它應該使用" " ``newline=''`` 開啟 [1]_ 。*dialect* 為一個可選填的參數,可以用為特定的" From 333849615afe9fe0dac5e80e7a4710fa9d2f7d3f Mon Sep 17 00:00:00 2001 From: rockleona Date: Tue, 15 Aug 2023 20:05:25 +0800 Subject: [PATCH 4/5] Fix Missing Translation --- library/csv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/csv.po b/library/csv.po index 01d45d31b0..be0fd970ad 100644 --- a/library/csv.po +++ b/library/csv.po @@ -175,9 +175,9 @@ msgid "" "parameters, see section :ref:`csv-fmt-params`." msgstr "" "將 *dialect* 與 *name* 進行關聯 (associate)。*name* 必須為字串。這個 dialect " -"可以透過 :class:`Dialect` 的子類別進行指定;或是關鍵字引數 *fmtparams*;或是以上" -"兩者皆是,並透過關鍵字引數來覆寫 dialect 的參數。關於 dialect 及格式化" -"參數的完整說明,請見段落 :ref:`csv-fmt-params`。" +"可以透過 passing(傳遞) :class:`Dialect` 的子類別進行指定;或是關鍵字引數 " +"*fmtparams*;或是以上兩者皆是,並透過關鍵字引數來覆寫 dialect 的參數。" +"關於 dialect 及格式化參數的完整說明,請見段落 :ref:`csv-fmt-params`。" #: ../../library/csv.rst:126 msgid "" From ccb0bde8855057a90388721e0020a02a3cc326a6 Mon Sep 17 00:00:00 2001 From: rockleona Date: Tue, 15 Aug 2023 20:23:03 +0800 Subject: [PATCH 5/5] Updated and Simplfied --- library/csv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/csv.po b/library/csv.po index be0fd970ad..8b742a9fca 100644 --- a/library/csv.po +++ b/library/csv.po @@ -175,7 +175,7 @@ msgid "" "parameters, see section :ref:`csv-fmt-params`." msgstr "" "將 *dialect* 與 *name* 進行關聯 (associate)。*name* 必須為字串。這個 dialect " -"可以透過 passing(傳遞) :class:`Dialect` 的子類別進行指定;或是關鍵字引數 " +"可以透過傳遞 :class:`Dialect` 的子類別進行指定;或是關鍵字引數 " "*fmtparams*;或是以上兩者皆是,並透過關鍵字引數來覆寫 dialect 的參數。" "關於 dialect 及格式化參數的完整說明,請見段落 :ref:`csv-fmt-params`。"