diff --git a/library/string.po b/library/string.po index 349e3c7756..8e4945990d 100644 --- a/library/string.po +++ b/library/string.po @@ -113,7 +113,7 @@ msgstr "" #: ../../library/string.rst:90 msgid "The :class:`Formatter` class has the following public methods:" -msgstr "" +msgstr ":class:`Formatter` 類別有以下的公開方法:" #: ../../library/string.rst:94 msgid "" @@ -323,6 +323,8 @@ msgid "" "`str` on the value, ``'!r'`` which calls :func:`repr` and ``'!a'`` which " "calls :func:`ascii`." msgstr "" +"目前支援三種轉換旗標:``'!s'`` 會對該值呼叫 :func:`str`,``'!r'`` 會對該值" +"呼叫 :func:`repr`,而 ``'!a'`` 則會對該值呼叫 :func:`ascii`。" #: ../../library/string.rst:269 msgid "Some examples::" @@ -338,12 +340,15 @@ msgid "" "decimal precision and so on. Each value type can define its own " "\"formatting mini-language\" or interpretation of the *format_spec*." msgstr "" +"*format_spec* 欄位描述了值的呈現規格,例如欄位寬度、對齊、填充、小" +"數精度等細節資訊。每種值類型都可以定義自己的「格式化迷你語言」或對 " +"*format_spec* 的解釋。" #: ../../library/string.rst:280 msgid "" "Most built-in types support a common formatting mini-language, which is " "described in the next section." -msgstr "" +msgstr "大多數內建型別都支援常見的格式化迷你語言,下一節將會詳細說明。" #: ../../library/string.rst:283 msgid "" @@ -354,6 +359,9 @@ msgid "" "*format_spec* string is interpreted. This allows the formatting of a value " "to be dynamically specified." msgstr "" +"*format_spec* 欄位還可以在其內部包含巢狀的替換字段。這些巢狀的替換字段包含字" +"段名稱、轉換旗標、格式規格描述,但是不允許再更深層的巢狀。format_spec 内部的" +"替換字段會在解讀 *format_spec* 字符串之前先被解讀。這允許動態地指定值的格式。" #: ../../library/string.rst:290 msgid "See the :ref:`formatexamples` section for some examples." @@ -843,75 +851,100 @@ msgstr "" #: ../../library/string.rst:595 msgid "Format examples" -msgstr "" +msgstr "格式範例" #: ../../library/string.rst:597 msgid "" "This section contains examples of the :meth:`str.format` syntax and " "comparison with the old ``%``-formatting." -msgstr "" +msgstr "本節包含 :meth:`str.format` 語法以及與舊式 ``%`` 格式的比較。" #: ../../library/string.rst:600 msgid "" "In most of the cases the syntax is similar to the old ``%``-formatting, with " "the addition of the ``{}`` and with ``:`` used instead of ``%``. For " "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." -msgstr "" +msgstr "此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 ``%``。" +"例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。" #: ../../library/string.rst:604 msgid "" "The new format syntax also supports new and different options, shown in the " "following examples." -msgstr "" +msgstr "新的語法還支援新的選項,將在以下的範例中說明。" #: ../../library/string.rst:607 msgid "Accessing arguments by position::" -msgstr "" +msgstr "按位置取得引數:\n" +"\n" +"::" #: ../../library/string.rst:620 msgid "Accessing arguments by name::" -msgstr "" +msgstr "按名稱取得引數:\n" +"\n" +"::" #: ../../library/string.rst:628 msgid "Accessing arguments' attributes::" -msgstr "" +msgstr "取得引數的屬性:\n" +"\n" +"::" #: ../../library/string.rst:643 msgid "Accessing arguments' items::" -msgstr "" +msgstr "取得引數的內容:\n" +"\n" +"::" #: ../../library/string.rst:649 msgid "Replacing ``%s`` and ``%r``::" -msgstr "" +msgstr "替換 ``%s`` 和 ``%r``:\n" +"\n" +"::" #: ../../library/string.rst:654 msgid "Aligning the text and specifying a width::" -msgstr "" +msgstr "對齊文字以及指定寬度:\n" +"\n" +"::" #: ../../library/string.rst:665 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" -msgstr "" +msgstr "替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n" +"\n" +"::" #: ../../library/string.rst:674 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" -msgstr "" +msgstr "替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n" +"\n" +"::" #: ../../library/string.rst:683 msgid "Using the comma as a thousands separator::" -msgstr "" +msgstr "使用逗號作為千位分隔符:\n" +"\n" +"::" #: ../../library/string.rst:688 msgid "Expressing a percentage::" -msgstr "" +msgstr "表示為百分比:\n" +"\n" +"::" #: ../../library/string.rst:695 msgid "Using type-specific formatting::" -msgstr "" +msgstr "作為特定類型格式:\n" +"\n" +"::" #: ../../library/string.rst:702 msgid "Nesting arguments and more complex examples::" -msgstr "" +msgstr "巢狀引數及更多複雜範例:\n" +"\n" +"::" #: ../../library/string.rst:736 msgid "Template strings"