From ef517a3c470bf55d8f3bc3651577dbafbebb6c4f Mon Sep 17 00:00:00 2001 From: hector-chin <66636221+hector-chin@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:09:20 +0800 Subject: [PATCH 1/7] Translate rst:595 to rst:702 (#713) --- library/string.po | 57 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/library/string.po b/library/string.po index 349e3c7756..2a6b8596df 100644 --- a/library/string.po +++ b/library/string.po @@ -843,75 +843,100 @@ msgstr "" #: ../../library/string.rst:595 msgid "Format examples" -msgstr "" +msgstr "格式範例" #: ../../library/string.rst:597 msgid "" "This section contains examples of the :meth:`str.format` syntax and " "comparison with the old ``%``-formatting." -msgstr "" +msgstr "本節包含 :meth:`str.format` 語法以及與舊式 ``%`` 格式的比較。" #: ../../library/string.rst:600 msgid "" "In most of the cases the syntax is similar to the old ``%``-formatting, with " "the addition of the ``{}`` and with ``:`` used instead of ``%``. For " "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." -msgstr "" +msgstr "此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 ``%``。" +"例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。" #: ../../library/string.rst:604 msgid "" "The new format syntax also supports new and different options, shown in the " "following examples." -msgstr "" +msgstr "新的語法還支援新的選項,將在以下的範例中說明。" #: ../../library/string.rst:607 msgid "Accessing arguments by position::" -msgstr "" +msgstr "按位置取得引數:\n" +"\n" +"::" #: ../../library/string.rst:620 msgid "Accessing arguments by name::" -msgstr "" +msgstr "按名稱取得引數:\n" +"\n" +"::" #: ../../library/string.rst:628 msgid "Accessing arguments' attributes::" -msgstr "" +msgstr "取得引數的屬性:\n" +"\n" +"::" #: ../../library/string.rst:643 msgid "Accessing arguments' items::" -msgstr "" +msgstr "取得引數的內容:\n" +"\n" +"::" #: ../../library/string.rst:649 msgid "Replacing ``%s`` and ``%r``::" -msgstr "" +msgstr "替換 ``%s`` 和 ``%r``:\n" +"\n" +"::" #: ../../library/string.rst:654 msgid "Aligning the text and specifying a width::" -msgstr "" +msgstr "對齊文字以及指定寬度:\n" +"\n" +"::" #: ../../library/string.rst:665 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" -msgstr "" +msgstr "替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n" +"\n" +"::" #: ../../library/string.rst:674 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" -msgstr "" +msgstr "替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n" +"\n" +"::" #: ../../library/string.rst:683 msgid "Using the comma as a thousands separator::" -msgstr "" +msgstr "使用逗號作為千位分隔符:\n" +"\n" +"::" #: ../../library/string.rst:688 msgid "Expressing a percentage::" -msgstr "" +msgstr "表示為百分比:\n" +"\n" +"::" #: ../../library/string.rst:695 msgid "Using type-specific formatting::" -msgstr "" +msgstr "作為特定類型格式:\n" +"\n" +"::" #: ../../library/string.rst:702 msgid "Nesting arguments and more complex examples::" -msgstr "" +msgstr "巢狀引數及更多複雜範例:\n" +"\n" +"::" #: ../../library/string.rst:736 msgid "Template strings" From 0b8aa79f661bff5842064d3fb14e340d3b0b3b09 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Wed, 6 Dec 2023 16:12:48 +0800 Subject: [PATCH 2/7] Translate one sentence in library/string.po (#714) --- library/string.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/string.po b/library/string.po index 2a6b8596df..3803f6369f 100644 --- a/library/string.po +++ b/library/string.po @@ -113,7 +113,7 @@ msgstr "" #: ../../library/string.rst:90 msgid "The :class:`Formatter` class has the following public methods:" -msgstr "" +msgstr ":class:`Formatter` 類別有以下的公開方法:" #: ../../library/string.rst:94 msgid "" From 94ed702f8a9ad03eeeb8c705f84054cc72cb5231 Mon Sep 17 00:00:00 2001 From: kchsu Date: Sat, 25 Nov 2023 16:16:39 +0800 Subject: [PATCH 3/7] translate string.rst:889-898;910 --- library/string.po | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/library/string.po b/library/string.po index 3803f6369f..296d83a938 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-10-22 20:52+0800\n" +"PO-Revision-Date: 2023-11-25 16:15+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.4.1\n" #: ../../library/string.rst:2 msgid ":mod:`string` --- Common string operations" @@ -1122,25 +1122,30 @@ msgstr "" msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." -msgstr "" +msgstr "*escaped* -- 此群組在預設模式下與跳脫序列匹配,例如 ``$$``。" #: ../../library/string.rst:892 msgid "" "*named* -- This group matches the unbraced placeholder name; it should not " "include the delimiter in capturing group." msgstr "" +"*named* -- 此群組與不帶大括號的占位名稱匹配;它不應包含捕獲組中的分隔符號。" #: ../../library/string.rst:895 msgid "" "*braced* -- This group matches the brace enclosed placeholder name; it " "should not include either the delimiter or braces in the capturing group." msgstr "" +"*braced* -- 此群組與大括號括起來的占位名稱匹配;它不應在捕獲組中包含分隔符號" +"或大括號。" #: ../../library/string.rst:898 msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" +"*invalid* -- 此群組與任何其他分隔符號型樣(通常是單一分隔符)匹配,且它應該出" +"現在正規表示式的最後。" #: ../../library/string.rst:901 msgid "" @@ -1163,6 +1168,10 @@ msgid "" "trailing whitespace are removed, otherwise *sep* is used to split and join " "the words." msgstr "" +"使用 :meth:`str.split` 將引數分割為字詞,使用 :meth:`str.capitalize` 將每個單" +"字大寫,並使用 :meth:`str.join` 將大寫字詞連接起來。如果任選的第二引數 *sep* " +"不存在或為 “None”,則連續的空白字元將替換為單一空格,並且刪除前導和尾隨空白;" +"在其他情況下則使用 *sep* 來分割和連接單字。" #: ../../library/string.rst:195 msgid "{} (curly brackets)" From 2b7853625aacfc3ba9fcf43eb925c858adbcea48 Mon Sep 17 00:00:00 2001 From: kchsu Date: Sat, 25 Nov 2023 16:44:14 +0800 Subject: [PATCH 4/7] fix inappropriate translations --- library/string.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/string.po b/library/string.po index 296d83a938..ecd83f9802 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-11-25 16:15+0800\n" +"PO-Revision-Date: 2023-11-25 16:42+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -1122,30 +1122,30 @@ msgstr "" msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." -msgstr "*escaped* -- 此群組在預設模式下與跳脫序列匹配,例如 ``$$``。" +msgstr "*escaped* -- 此群組在預設模式下與溢出序列匹配,例如 ``$$``。" #: ../../library/string.rst:892 msgid "" "*named* -- This group matches the unbraced placeholder name; it should not " "include the delimiter in capturing group." msgstr "" -"*named* -- 此群組與不帶大括號的占位名稱匹配;它不應包含捕獲組中的分隔符號。" +"*named* -- 此群組與不帶大括號的佔位符號匹配;它不應包含擷取群組中的分隔符號。" #: ../../library/string.rst:895 msgid "" "*braced* -- This group matches the brace enclosed placeholder name; it " "should not include either the delimiter or braces in the capturing group." msgstr "" -"*braced* -- 此群組與大括號括起來的占位名稱匹配;它不應在捕獲組中包含分隔符號" -"或大括號。" +"*braced* -- 此群組與大括號括起來的佔位符號匹配;它不應在擷取群組中包含分隔符" +"號或大括號。" #: ../../library/string.rst:898 msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" -"*invalid* -- 此群組與任何其他分隔符號型樣(通常是單一分隔符)匹配,且它應該出" -"現在正規表示式的最後。" +"*invalid* -- 此群組與任何其他分隔符號型樣(通常是單一分隔符號)匹配,且它應該" +"出現在正規表示式的最後。" #: ../../library/string.rst:901 msgid "" @@ -1169,7 +1169,7 @@ msgid "" "the words." msgstr "" "使用 :meth:`str.split` 將引數分割為字詞,使用 :meth:`str.capitalize` 將每個單" -"字大寫,並使用 :meth:`str.join` 將大寫字詞連接起來。如果任選的第二引數 *sep* " +"字大寫,並使用 :meth:`str.join` 將大寫字詞連接起來。如果可選的第二引數 *sep* " "不存在或為 “None”,則連續的空白字元將替換為單一空格,並且刪除前導和尾隨空白;" "在其他情況下則使用 *sep* 來分割和連接單字。" From 7390c6b68580dca8a0579987f10ffa196f64bfc2 Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:57:48 +0800 Subject: [PATCH 5/7] Revise translations of library/string.po (#728) --- library/string.po | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/library/string.po b/library/string.po index 3803f6369f..9101702b44 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-10-22 20:52+0800\n" +"PO-Revision-Date: 2023-12-07 23:52+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.4.1\n" #: ../../library/string.rst:2 msgid ":mod:`string` --- Common string operations" @@ -1026,18 +1026,25 @@ msgid "" "dangling delimiters, unmatched braces, or placeholders that are not valid " "Python identifiers." msgstr "" +"雖然仍可能發生其他異常,但這個方法被稱為「安全」,因為它總是試圖回傳一個有用" +"的字串而不是引發例外。從另一個角度來看,:meth:`safe_substitute` 可能並非完全" +"安全,因為它會默默忽略格式錯誤的模板,這些模板包含了未成對的括號、不匹配的括" +"號,或者不是有效的 Python 識別符的占位符。" #: ../../library/string.rst:802 msgid "" "Returns false if the template has invalid placeholders that will cause :meth:" "`substitute` to raise :exc:`ValueError`." msgstr "" +"如果模板有無效的占位符,將導致 :meth:`substitute` 引發 :exc:`ValueError`,並" +"回傳 false。" #: ../../library/string.rst:810 msgid "" "Returns a list of the valid identifiers in the template, in the order they " "first appear, ignoring any invalid identifiers." msgstr "" +"回傳模板中有效識別符的 list,按照它們首次出現的順序,忽略任何無效的識別符。" #: ../../library/string.rst:815 msgid ":class:`Template` instances also provide one public data attribute:" @@ -1048,10 +1055,12 @@ msgid "" "This is the object passed to the constructor's *template* argument. In " "general, you shouldn't change it, but read-only access is not enforced." msgstr "" +"這是傳遞給建構子 *template* 引數的物件。一般來說,您不應該改變它,但並沒有強" +"制設定成唯讀。" #: ../../library/string.rst:822 msgid "Here is an example of how to use a Template::" -msgstr "" +msgstr "以下是如何使用 Template 的一個範例: ::" #: ../../library/string.rst:840 msgid "" @@ -1060,6 +1069,8 @@ msgid "" "expression used to parse template strings. To do this, you can override " "these class attributes:" msgstr "" +"進階用法:你可以繼承 :class:`Template` 類別來自定義占位符語法、分隔符號,或者" +"用於解析模板字符串的正則表達式。您可以透過覆寫這些類別屬性來達成:" #: ../../library/string.rst:845 msgid "" From 0a78d29f9fd12a875e85962f1bf38528ff05a07a Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Mon, 18 Dec 2023 17:16:57 +0800 Subject: [PATCH 6/7] Apply suggestions from code review --- library/string.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/string.po b/library/string.po index 1c0b3ff890..b72da15c44 100644 --- a/library/string.po +++ b/library/string.po @@ -1141,7 +1141,7 @@ msgstr "" msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." -msgstr "*escaped* -- 此群組在預設模式下與溢出序列匹配,例如 ``$$``。" +msgstr "*escaped* -- 此群組在預設模式下與跳脫序列匹配,例如 ``$$``。" #: ../../library/string.rst:892 msgid "" From 145a73746cd3d9b819cb22da9ae534931abbd685 Mon Sep 17 00:00:00 2001 From: kchsu Date: Wed, 27 Dec 2023 12:16:03 +0800 Subject: [PATCH 7/7] fix translation and symbol --- library/string.po | 65 ++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/library/string.po b/library/string.po index b72da15c44..6f5e36695b 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-11-25 16:42+0800\n" +"PO-Revision-Date: 2023-12-27 12:13+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.4.1\n" +"X-Generator: Poedit 3.4.2\n" #: ../../library/string.rst:2 msgid ":mod:`string` --- Common string operations" @@ -564,9 +564,9 @@ msgid "" "is equivalent to a *fill* character of ``'0'`` with an *alignment* type of " "``'='``." msgstr "" -"當未給予明確的對齊指示,在 *width* 欄位前面將填入零 (``'0'``) 字元將會為" -"數值型別啟用有符號察覺的零填充 (sign-aware zero-padding)。這相當於同時" -"使用 ``'0'`` 為 *fill* 字元與對齊類型 ``'='``" +"當未給予明確的對齊指示,在 *width* 欄位前面將填入零 (``'0'``) 字元將會為數值" +"型別啟用有符號察覺的零填充 (sign-aware zero-padding)。這相當於同時使用 " +"``'0'`` 為 *fill* 字元與對齊類型 ``'='``" #: ../../library/string.rst:439 #, fuzzy @@ -585,10 +585,10 @@ msgid "" "the field content. The *precision* is not allowed for integer presentation " "types." msgstr "" -"*precision* 是一個十進位整數,指定表示類型 ``'f'`` 和 ``'F'`` 的小數點後應顯示多" -"少位,或表示類型 ``'g'`` 或 ``'G'`` 的小數點前後應顯示多少位。對於字串表示類" -"型,該欄位指定最大欄位大小 - 換言之,將使用欄位中的多少字元。整數表示類型不允" -"許使用 *precision*。" +"*precision* 是一個十進位整數,指定表示類型 ``'f'`` 和 ``'F'`` 的小數點後應顯" +"示多少位,或表示類型 ``'g'`` 或 ``'G'`` 的小數點前後應顯示多少位。對於字串表" +"示類型,該欄位指定最大欄位大小 - 換言之,將使用欄位中的多少字元。整數表示類型" +"不允許使用 *precision*。" #: ../../library/string.rst:451 msgid "Finally, the *type* determines how the data should be presented." @@ -864,8 +864,9 @@ msgid "" "In most of the cases the syntax is similar to the old ``%``-formatting, with " "the addition of the ``{}`` and with ``:`` used instead of ``%``. For " "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." -msgstr "此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 ``%``。" -"例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。" +msgstr "" +"此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 " +"``%``。例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。" #: ../../library/string.rst:604 msgid "" @@ -875,74 +876,86 @@ msgstr "新的語法還支援新的選項,將在以下的範例中說明。" #: ../../library/string.rst:607 msgid "Accessing arguments by position::" -msgstr "按位置取得引數:\n" +msgstr "" +"按位置取得引數:\n" "\n" "::" #: ../../library/string.rst:620 msgid "Accessing arguments by name::" -msgstr "按名稱取得引數:\n" +msgstr "" +"按名稱取得引數:\n" "\n" "::" #: ../../library/string.rst:628 msgid "Accessing arguments' attributes::" -msgstr "取得引數的屬性:\n" +msgstr "" +"取得引數的屬性:\n" "\n" "::" #: ../../library/string.rst:643 msgid "Accessing arguments' items::" -msgstr "取得引數的內容:\n" +msgstr "" +"取得引數的內容:\n" "\n" "::" #: ../../library/string.rst:649 msgid "Replacing ``%s`` and ``%r``::" -msgstr "替換 ``%s`` 和 ``%r``:\n" +msgstr "" +"替換 ``%s`` 和 ``%r``:\n" "\n" "::" #: ../../library/string.rst:654 msgid "Aligning the text and specifying a width::" -msgstr "對齊文字以及指定寬度:\n" +msgstr "" +"對齊文字以及指定寬度:\n" "\n" "::" #: ../../library/string.rst:665 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" -msgstr "替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n" +msgstr "" +"替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n" "\n" "::" #: ../../library/string.rst:674 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" -msgstr "替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n" +msgstr "" +"替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n" "\n" "::" #: ../../library/string.rst:683 msgid "Using the comma as a thousands separator::" -msgstr "使用逗號作為千位分隔符:\n" +msgstr "" +"使用逗號作為千位分隔符:\n" "\n" "::" #: ../../library/string.rst:688 msgid "Expressing a percentage::" -msgstr "表示為百分比:\n" +msgstr "" +"表示為百分比:\n" "\n" "::" #: ../../library/string.rst:695 msgid "Using type-specific formatting::" -msgstr "作為特定類型格式:\n" +msgstr "" +"作為特定類型格式:\n" "\n" "::" #: ../../library/string.rst:702 msgid "Nesting arguments and more complex examples::" -msgstr "巢狀引數及更多複雜範例:\n" +msgstr "" +"巢狀引數及更多複雜範例:\n" "\n" "::" @@ -1163,7 +1176,7 @@ msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" -"*invalid* -- 此群組與任何其他分隔符號型樣(通常是單一分隔符號)匹配,且它應該" +"*invalid* -- 此群組與任何其他分隔符號模式(通常是單一分隔符號)匹配,且它應該" "出現在正規表示式的最後。" #: ../../library/string.rst:901 @@ -1189,8 +1202,8 @@ msgid "" msgstr "" "使用 :meth:`str.split` 將引數分割為字詞,使用 :meth:`str.capitalize` 將每個單" "字大寫,並使用 :meth:`str.join` 將大寫字詞連接起來。如果可選的第二引數 *sep* " -"不存在或為 “None”,則連續的空白字元將替換為單一空格,並且刪除前導和尾隨空白;" -"在其他情況下則使用 *sep* 來分割和連接單字。" +"不存在或為 ``None``,則連續的空白字元將替換為單一空格,並且刪除前導和尾隨空" +"白;在其他情況下則使用 *sep* 來分割和連接單字。" #: ../../library/string.rst:195 msgid "{} (curly brackets)"