@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version :Python 3.12\n "
9
9
"Report-Msgid-Bugs-To :\n "
10
10
"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-11-25 16:47 +0800\n "
12
12
"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -17,7 +17,7 @@ msgstr ""
17
17
"Content-Type :text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding :8bit\n "
19
19
"Plural-Forms :nplurals=1; plural=0;\n "
20
- "X-Generator :Poedit 3.4\n "
20
+ "X-Generator :Poedit 3.4.1 \n "
21
21
22
22
#: ../../library/string.rst:2
23
23
msgid ":mod:`string` --- Common string operations"
@@ -49,7 +49,8 @@ msgid ""
49
49
"`ascii_uppercase` constants described below. This value is not locale-"
50
50
"dependent."
51
51
msgstr ""
52
- "下文描述的 :const:`ascii_lowercase` 和 :const:`ascii_uppercase` 常數的串接,該值不依賴於區域設定。"
52
+ "下文描述的 :const:`ascii_lowercase` 和 :const:`ascii_uppercase` 常數的串接,"
53
+ "該值不依賴於區域設定。"
53
54
54
55
#: ../../library/string.rst:32
55
56
msgid ""
@@ -150,10 +151,9 @@ msgid ""
150
151
"by :meth:`vformat` to break the string into either literal text, or "
151
152
"replacement fields."
152
153
msgstr ""
153
- "將 format_string 放入迴圈,並回傳一個可疊代物件,其元素為 "
154
- "(*literal_text*, *field_name*, *format_spec*, *conversion*)。這會被"
155
- " :meth:`vformat` 用於將字串裁切為字面文本或"
156
- "替換欄位。"
154
+ "將 format_string 放入迴圈,並回傳一個可疊代物件,其元素為 (*literal_text*, "
155
+ "*field_name*, *format_spec*, *conversion*)。這會被 :meth:`vformat` 用於將字串"
156
+ "裁切為字面文本或替換欄位。"
157
157
158
158
#: ../../library/string.rst:122
159
159
msgid ""
@@ -926,12 +926,10 @@ msgid ""
926
926
"Python. As an example of a library built on template strings for i18n, see "
927
927
"the `flufl.i18n <https://flufli18n.readthedocs.io/en/latest/>`_ package."
928
928
msgstr ""
929
- "樣板字串提供如 :pep:`292` 所述更簡單的字串替換。"
930
- "樣板字串的主要用例是國際化 (i18n),"
931
- "因為在這種情況下,更簡單的語法和功能使得它"
932
- "比其他 Python 內建字串格式化工具更容易翻譯。"
933
- "基於樣板字串建構的 i18n 函式庫範例,請參閱 "
934
- "`flufl.i18n <https://flufli18n.readthedocs.io/en/latest/>`_ 套件。"
929
+ "樣板字串提供如 :pep:`292` 所述更簡單的字串替換。樣板字串的主要用例是國際化 "
930
+ "(i18n),因為在這種情況下,更簡單的語法和功能使得它比其他 Python 內建字串格式"
931
+ "化工具更容易翻譯。基於樣板字串建構的 i18n 函式庫範例,請參閱 `flufl.i18n "
932
+ "<https://flufli18n.readthedocs.io/en/latest/>`_ 套件。"
935
933
936
934
#: ../../library/string.rst:748
937
935
msgid ""
@@ -1003,18 +1001,25 @@ msgid ""
1003
1001
"dangling delimiters, unmatched braces, or placeholders that are not valid "
1004
1002
"Python identifiers."
1005
1003
msgstr ""
1004
+ "雖然仍可能發生其他異常,但這個方法被稱為「安全」,因為它總是試圖回傳一個有用"
1005
+ "的字串而不是拋出例外。從另一個角度來看,:meth:`safe_substitute` 可能並非完全"
1006
+ "安全,因為它會默默忽略格式錯誤的模板,這些模板包含了搖擺定界符、不匹配的括"
1007
+ "號,或者不是有效的 Python 識別符的占位符。"
1006
1008
1007
1009
#: ../../library/string.rst:802
1008
1010
msgid ""
1009
1011
"Returns false if the template has invalid placeholders that will cause :meth:"
1010
1012
"`substitute` to raise :exc:`ValueError`."
1011
1013
msgstr ""
1014
+ "如果模板有無效的占位符,將導致 :meth:`substitute` 引發 :exc:`ValueError`,並"
1015
+ "回傳 false。"
1012
1016
1013
1017
#: ../../library/string.rst:810
1014
1018
msgid ""
1015
1019
"Returns a list of the valid identifiers in the template, in the order they "
1016
1020
"first appear, ignoring any invalid identifiers."
1017
1021
msgstr ""
1022
+ "回傳模板中有效識別符的 list,按照它們首次出現的順序,忽略任何無效的識別符。"
1018
1023
1019
1024
#: ../../library/string.rst:815
1020
1025
msgid ":class:`Template` instances also provide one public data attribute:"
@@ -1025,10 +1030,12 @@ msgid ""
1025
1030
"This is the object passed to the constructor's *template* argument. In "
1026
1031
"general, you shouldn't change it, but read-only access is not enforced."
1027
1032
msgstr ""
1033
+ "這是傳遞給建構子 *template* 引數的物件。一般來說,您不應該改變它,但並沒有強"
1034
+ "制設定成唯讀。"
1028
1035
1029
1036
#: ../../library/string.rst:822
1030
1037
msgid "Here is an example of how to use a Template::"
1031
- msgstr ""
1038
+ msgstr "以下是如何使用 Template 的一個範例: :: "
1032
1039
1033
1040
#: ../../library/string.rst:840
1034
1041
msgid ""
@@ -1037,6 +1044,8 @@ msgid ""
1037
1044
"expression used to parse template strings. To do this, you can override "
1038
1045
"these class attributes:"
1039
1046
msgstr ""
1047
+ "進階用法:你可以繼承 :class:`Template` 類別來自定義占位符語法、分隔符號,或者"
1048
+ "用於解析模板字符串的正則表達式。您可以透過覆寫這些類別屬性來達成:"
1040
1049
1041
1050
#: ../../library/string.rst:845
1042
1051
msgid ""