@@ -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-10-22 20 :52+0800\n "
11+ "PO-Revision-Date : 2023-12-07 23 :52+0800\n "
1212"
Last-Translator :
Adrian Liaw <[email protected] >\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\n "
20+ "X-Generator : Poedit 3.4.1 \n "
2121
2222#: ../../library/string.rst:2
2323msgid ":mod:`string` --- Common string operations"
@@ -1026,18 +1026,25 @@ msgid ""
10261026"dangling delimiters, unmatched braces, or placeholders that are not valid "
10271027"Python identifiers."
10281028msgstr ""
1029+ "雖然仍可能發生其他異常,但這個方法被稱為「安全」,因為它總是試圖回傳一個有用"
1030+ "的字串而不是引發例外。從另一個角度來看,:meth:`safe_substitute` 可能並非完全"
1031+ "安全,因為它會默默忽略格式錯誤的模板,這些模板包含了未成對的括號、不匹配的括"
1032+ "號,或者不是有效的 Python 識別符的占位符。"
10291033
10301034#: ../../library/string.rst:802
10311035msgid ""
10321036"Returns false if the template has invalid placeholders that will cause :meth:"
10331037"`substitute` to raise :exc:`ValueError`."
10341038msgstr ""
1039+ "如果模板有無效的占位符,將導致 :meth:`substitute` 引發 :exc:`ValueError`,並"
1040+ "回傳 false。"
10351041
10361042#: ../../library/string.rst:810
10371043msgid ""
10381044"Returns a list of the valid identifiers in the template, in the order they "
10391045"first appear, ignoring any invalid identifiers."
10401046msgstr ""
1047+ "回傳模板中有效識別符的 list,按照它們首次出現的順序,忽略任何無效的識別符。"
10411048
10421049#: ../../library/string.rst:815
10431050msgid ":class:`Template` instances also provide one public data attribute:"
@@ -1048,10 +1055,12 @@ msgid ""
10481055"This is the object passed to the constructor's *template* argument. In "
10491056"general, you shouldn't change it, but read-only access is not enforced."
10501057msgstr ""
1058+ "這是傳遞給建構子 *template* 引數的物件。一般來說,您不應該改變它,但並沒有強"
1059+ "制設定成唯讀。"
10511060
10521061#: ../../library/string.rst:822
10531062msgid "Here is an example of how to use a Template::"
1054- msgstr ""
1063+ msgstr "以下是如何使用 Template 的一個範例: :: "
10551064
10561065#: ../../library/string.rst:840
10571066msgid ""
@@ -1060,6 +1069,8 @@ msgid ""
10601069"expression used to parse template strings. To do this, you can override "
10611070"these class attributes:"
10621071msgstr ""
1072+ "進階用法:你可以繼承 :class:`Template` 類別來自定義占位符語法、分隔符號,或者"
1073+ "用於解析模板字符串的正則表達式。您可以透過覆寫這些類別屬性來達成:"
10631074
10641075#: ../../library/string.rst:845
10651076msgid ""
0 commit comments