Skip to content

Commit aa92d14

Browse files
committed
fix(library/string): refine translation
1 parent 975ddf7 commit aa92d14

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

library/string.po

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,8 @@ msgid ""
10181018
"there are duplicates, the placeholders from *kwds* take precedence."
10191019
msgstr ""
10201020
"進行模板替換,並回傳一個新的字串。 *mapping* 是任何有金鑰並符合模板裡佔位符號"
1021-
"的字典型物件。另外,如果關鍵字就是佔位符號時,您也可以改提供關鍵字引數。當 "
1022-
"*mapping* 跟 *kwds* 同時給定並存在重複時,*kwds* 在佔位符號裡會被優先使用。"
1021+
"的字典型物件。或者如果關鍵字就是佔位符號時,你也可以改提供關鍵字引數。當 "
1022+
"*mapping* 跟 *kwds* 同時給定並存在重複時,*kwds* 的佔位符號會被優先使用。"
10231023

10241024
#: ../../library/string.rst:786
10251025
msgid ""
@@ -1030,9 +1030,9 @@ msgid ""
10301030
"simply return ``$`` instead of raising :exc:`ValueError`."
10311031
msgstr ""
10321032
"類似於 :meth:`substitute`,但如果 *mapping* 與 *kwds* 中缺少佔位符號的話,原"
1033-
"始的佔位符號會完整地出現在生成的字串裡,而不會引發 :exc:`KeyError`異常。"
1034-
"外,與 :meth:`substitute` 不同的是,任何包含 ``$`` 的字句會直接回傳 ``$`` "
1035-
"非引發 :exc:`ValueError`。"
1033+
"始的佔位符號會完整地出現在結果字串裡,而不會引發 :exc:`KeyError`異常。此外,"
1034+
"與 :meth:`substitute` 不同的是,任何包含 ``$`` 的字句會直接回傳 ``$`` 而非引"
1035+
" :exc:`ValueError`。"
10361036

10371037
#: ../../library/string.rst:792
10381038
msgid ""
@@ -1046,15 +1046,15 @@ msgstr ""
10461046
"雖然仍可能發生其他異常,但這個方法被稱為「安全」,因為它總是試圖回傳一個有用"
10471047
"的字串而不是引發例外。從另一個角度來看,:meth:`safe_substitute` 可能並非完全"
10481048
"安全,因為它會默默忽略格式錯誤的模板,這些模板包含了未成對的括號、不匹配的括"
1049-
"號,或者不是有效的 Python 識別符的占位符。"
1049+
"號,或者不是有效的 Python 識別符的佔位符號。"
10501050

10511051
#: ../../library/string.rst:802
10521052
msgid ""
10531053
"Returns false if the template has invalid placeholders that will cause :meth:"
10541054
"`substitute` to raise :exc:`ValueError`."
10551055
msgstr ""
1056-
"如果模板有無效的占位符,將導致 :meth:`substitute` 引發 :exc:`ValueError`,"
1057-
"回傳 false。"
1056+
"如果模板有無效的佔位符號,將導致 :meth:`substitute` 引發 :exc:`ValueError`,"
1057+
"並回傳 false。"
10581058

10591059
#: ../../library/string.rst:810
10601060
msgid ""
@@ -1086,7 +1086,7 @@ msgid ""
10861086
"expression used to parse template strings. To do this, you can override "
10871087
"these class attributes:"
10881088
msgstr ""
1089-
"進階用法:你可以繼承 :class:`Template` 類別來自定義占位符號語法、分隔符號字"
1089+
"進階用法:你可以繼承 :class:`Template` 類別來自定義佔位符號語法、分隔符號字"
10901090
"元,或者用於剖析模板字串的正則表達式。你可以透過覆寫這些類別屬性來達成:"
10911091

10921092
#: ../../library/string.rst:845

0 commit comments

Comments
 (0)