diff --git a/library/string.po b/library/string.po index e35dfca6c1..ed3269b80a 100644 --- a/library/string.po +++ b/library/string.po @@ -323,8 +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`。" +"目前支援三種轉換旗標:``'!s'`` 會對該值呼叫 :func:`str`,``'!r'`` 會對該值呼" +"叫 :func:`repr`,而 ``'!a'`` 則會對該值呼叫 :func:`ascii`。" #: ../../library/string.rst:269 msgid "Some examples::" @@ -340,9 +340,9 @@ 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* 的解釋。" +"*format_spec* 欄位描述了值的呈現規格,例如欄位寬度、對齊、填充、小數精度等細" +"節資訊。每種值類型都可以定義自己的「格式化迷你語言」或對 *format_spec* 的解" +"釋。" #: ../../library/string.rst:280 msgid "" @@ -879,7 +879,7 @@ msgid "" "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." msgstr "" "此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 " -"``%``。例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。" +"``%``。例如,``'%03.2f'`` 可以改寫為 ``'{:03.2f}'``。" #: ../../library/string.rst:604 msgid "" @@ -889,92 +889,56 @@ msgstr "新的語法還支援新的選項,將在以下的範例中說明。" #: ../../library/string.rst:607 msgid "Accessing arguments by position::" -msgstr "" -"按位置取得引數:\n" -"\n" -"::" +msgstr "按位置存取引數: ::" #: ../../library/string.rst:620 msgid "Accessing arguments by name::" -msgstr "" -"按名稱取得引數:\n" -"\n" -"::" +msgstr "按名稱存取引數: ::" #: ../../library/string.rst:628 msgid "Accessing arguments' attributes::" -msgstr "" -"取得引數的屬性:\n" -"\n" -"::" +msgstr "存取引數的屬性: ::" #: ../../library/string.rst:643 msgid "Accessing arguments' items::" -msgstr "" -"取得引數的內容:\n" -"\n" -"::" +msgstr "存取引數的內容: ::" #: ../../library/string.rst:649 msgid "Replacing ``%s`` and ``%r``::" -msgstr "" -"替換 ``%s`` 和 ``%r``:\n" -"\n" -"::" +msgstr "替換 ``%s`` 和 ``%r``: ::" #: ../../library/string.rst:654 msgid "Aligning the text and specifying a width::" -msgstr "" -"對齊文字以及指定寬度:\n" -"\n" -"::" +msgstr "對齊文字以及指定寬度: ::" #: ../../library/string.rst:665 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" -msgstr "" -"替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n" -"\n" -"::" +msgstr "替換 ``%+f``、``%-f`` 和 ``% f`` 以及指定正負號: ::" #: ../../library/string.rst:674 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" -msgstr "" -"替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n" -"\n" -"::" +msgstr "替換 ``%x`` 或 ``%o`` 用來根據不同的進位制轉換其值: ::" #: ../../library/string.rst:683 msgid "Using the comma as a thousands separator::" -msgstr "" -"使用逗號作為千位分隔符:\n" -"\n" -"::" +msgstr "使用逗號作為千位分隔符: ::" #: ../../library/string.rst:688 msgid "Expressing a percentage::" -msgstr "" -"表示為百分比:\n" -"\n" -"::" +msgstr "表示為百分比: ::" #: ../../library/string.rst:695 msgid "Using type-specific formatting::" -msgstr "" -"作為特定類型格式:\n" -"\n" -"::" +msgstr "作為特定型別格式: ::" #: ../../library/string.rst:702 msgid "Nesting arguments and more complex examples::" -msgstr "" -"巢狀引數及更多複雜範例:\n" -"\n" -"::" +msgstr "巢狀引數及更多複雜範例: ::" #: ../../library/string.rst:736 msgid "Template strings" -msgstr "樣板字串" +msgstr "模板字串" #: ../../library/string.rst:738 msgid "" @@ -985,9 +949,9 @@ msgid "" "Python. As an example of a library built on template strings for i18n, see " "the `flufl.i18n `_ package." msgstr "" -"樣板字串提供如 :pep:`292` 所述更簡單的字串替換。樣板字串的主要用例是國際化 " +"模板字串提供如 :pep:`292` 所述更簡單的字串替換。模板字串的主要用例是國際化 " "(i18n),因為在這種情況下,更簡單的語法和功能使得它比其他 Python 內建字串格式" -"化工具更容易翻譯。基於樣板字串建構的 i18n 函式庫範例,請參閱 `flufl.i18n " +"化工具更容易翻譯。基於模板字串建構的 i18n 函式庫範例,請參閱 `flufl.i18n " "`_ 套件。" #: ../../library/string.rst:748 @@ -1089,7 +1053,7 @@ msgid "" "This is the object passed to the constructor's *template* argument. In " "general, you shouldn't change it, but read-only access is not enforced." msgstr "" -"這是傳遞給建構子 *template* 引數的物件。一般來說,您不應該改變它,但並沒有強" +"這是傳遞給建構子 *template* 引數的物件。一般來說,你不應該改變它,但並沒有強" "制設定成唯讀。" #: ../../library/string.rst:822 @@ -1103,8 +1067,8 @@ 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 msgid "" @@ -1115,6 +1079,10 @@ msgid "" "delimiter after class creation (i.e. a different delimiter must be set in " "the subclass's class namespace)." msgstr "" +"*delimiter* -- 這是描述引入分隔符號 placeholder 的文字字串。預設值是 ``$``。" +"請注意這\\ *不是*\\ 正規表示式,實作會根據字串值呼叫 :meth:`re.escape` 方法。" +"也請注意你不能在建立類別後修改分隔符號。(意即在子類別的命名空間中必須設置不" +"同的分隔符號)" #: ../../library/string.rst:852 msgid "" @@ -1197,7 +1165,7 @@ msgid "" "The methods on this class will raise :exc:`ValueError` if the pattern " "matches the template without one of these named groups matching." msgstr "" -"當格式符合樣板卻沒有符合這些命名組之一,此類別的方法將引發 :exc:" +"當格式符合模板卻沒有符合這些命名組之一,此類別的方法將引發 :exc:" "`ValueError`。" #: ../../library/string.rst:906