Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Translate string.rst:777 to 786#717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mattwang44 merged 2 commits intopython:event-1125fromproudofsimin:translate
Jan 4, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletionslibrary/string.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -121,8 +121,8 @@ msgid ""
"positional and keyword arguments. It is just a wrapper that calls :meth:"
"`vformat`."
msgstr ""
"主要的 API method。它接收一個格式字串及一組任意的"
"位置引數與關鍵字引數,是呼叫 :meth:`vformat` 的 wrapper。"
"主要的 API method。它接收一個格式字串及一組任意的位置引數與關鍵字引數,是呼"
" :meth:`vformat` 的 wrapper。"

#: ../../library/string.rst:98
msgid ""
Expand DownExpand Up@@ -1017,6 +1017,9 @@ msgid ""
"keywords are the placeholders. When both *mapping* and *kwds* are given and "
"there are duplicates, the placeholders from *kwds* take precedence."
msgstr ""
"進行模板替換,並回傳一個新的字串。 *mapping* 是任何有金鑰並符合模板裡佔位符號"
"的字典型物件。或者如果關鍵字就是佔位符號時,你也可以改提供關鍵字引數。當 "
"*mapping* 跟 *kwds* 同時給定並存在重複時,*kwds* 的佔位符號會被優先使用。"

#: ../../library/string.rst:786
msgid ""
Expand All@@ -1026,6 +1029,10 @@ msgid ""
"unlike with :meth:`substitute`, any other appearances of the ``$`` will "
"simply return ``$`` instead of raising :exc:`ValueError`."
msgstr ""
"類似於 :meth:`substitute`,但如果 *mapping* 與 *kwds* 中缺少佔位符號的話,原"
"始的佔位符號會完整地出現在結果字串裡,而不會引發 :exc:`KeyError` 例外。此外,"
"與 :meth:`substitute` 不同的是,任何包含 ``$`` 的字句會直接回傳 ``$`` 而非引"
"發 :exc:`ValueError`。"

#: ../../library/string.rst:792
msgid ""
Expand All@@ -1039,15 +1046,15 @@ msgstr ""
"雖然仍可能發生其他異常,但這個方法被稱為「安全」,因為它總是試圖回傳一個有用"
"的字串而不是引發例外。從另一個角度來看,:meth:`safe_substitute` 可能並非完全"
"安全,因為它會默默忽略格式錯誤的模板,這些模板包含了未成對的括號、不匹配的括"
"號,或者不是有效的 Python識別符的占位符。"
"號,或者不是有效的 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。"
"如果模板有無效的佔位符號,將導致 :meth:`substitute` 引發 :exc:`ValueError`,"
"並回傳 false。"

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

#: ../../library/string.rst:845
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp