Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b341237

Browse files
JustinBear99Justin Bearmattwang44
authored
translate format specification rst:305-324 (#716)
Co-authored-by: Justin Bear <[email protected]> Co-authored-by: Matt Wang <[email protected]>
1 parent 0861c86 commit b341237

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

library/string.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ msgid ""
379379
"to the built-in :func:`format` function. Each formattable type may define "
380380
"how the format specification is to be interpreted."
381381
msgstr ""
382-
"格式規格在格式字串 (format string) 中包含的替換欄位中使用,以定義各個值如"
382+
"格式規格在格式字串 (format string) 中包含的替換欄位中使用,以定義各個值如"
383383
"何被呈現(請參考 :ref:`formatstrings` and :ref:`f-strings` )。它們也能夠直接"
384384
"傳遞給內建的 :func:`format` 函式。每個可格式化型別 (formattable type) 可以定"
385385
"義格式規格如何被直譯。"
@@ -390,17 +390,20 @@ msgid ""
390390
"specifications, although some of the formatting options are only supported "
391391
"by the numeric types."
392392
msgstr ""
393+
"大部分內建型別為了格式規格實作了下列選項,不過有些選項只被數值型別支援。"
393394

394395
#: ../../library/string.rst:308
395396
msgid ""
396397
"A general convention is that an empty format specification produces the same "
397398
"result as if you had called :func:`str` on the value. A non-empty format "
398399
"specification typically modifies the result."
399400
msgstr ""
401+
"一般來說,輸入空格式規格會產生和呼叫 :func:`str` 函式相同的結果,非空的格式規"
402+
"格才會修改結果。"
400403

401404
#: ../../library/string.rst:312
402405
msgid "The general form of a *standard format specifier* is:"
403-
msgstr ""
406+
msgstr "*標準格式說明符號 (standard format specifier)* 的一般型式如下:"
404407

405408
#: ../../library/string.rst:324
406409
msgid ""
@@ -412,6 +415,11 @@ msgid ""
412415
"curly brace with a nested replacement field. This limitation doesn't affect "
413416
"the :func:`format` function."
414417
msgstr ""
418+
"如果給定了一個有效的 *align* 值,則可以在它之前加一個 *fill* 字元,且該字元可"
419+
"為任意字元,若不加的話預設為空格。使用\\ :ref:`格式字串 <f-strings>`\\ 或 :"
420+
"meth:`str.format` 時是無法在其中使用大括號(\"``{``\"\"``}``\")作為 "
421+
"*fill* 字元的,但仍可透過巢狀替換的方式插入大括號。此限制不影響 :func:"
422+
"`format` 函式。"
415423

416424
#: ../../library/string.rst:333
417425
msgid "The meaning of the various alignment options is as follows:"

0 commit comments

Comments
 (0)