@@ -323,8 +323,8 @@ msgid ""
323
323
"`str` on the value, ``'!r'`` which calls :func:`repr` and ``'!a'`` which "
324
324
"calls :func:`ascii`."
325
325
msgstr ""
326
- "目前支援三種轉換旗標:``'!s'`` 會對該值呼叫 :func:`str`,``'!r'`` 會對該值 "
327
- "呼叫 :func:`repr`,而 ``'!a'`` 則會對該值呼叫 :func:`ascii`。"
326
+ "目前支援三種轉換旗標:``'!s'`` 會對該值呼叫 :func:`str`,``'!r'`` 會對該值呼 "
327
+ "叫 :func:`repr`,而 ``'!a'`` 則會對該值呼叫 :func:`ascii`。"
328
328
329
329
#: ../../library/string.rst:269
330
330
msgid "Some examples::"
@@ -340,9 +340,9 @@ msgid ""
340
340
"decimal precision and so on. Each value type can define its own "
341
341
"\" formatting mini-language\" or interpretation of the *format_spec*."
342
342
msgstr ""
343
- "*format_spec* 欄位描述了值的呈現規格,例如欄位寬度、對齊、填充、小 "
344
- "數精度等細節資訊 。每種值類型都可以定義自己的「格式化迷你語言」或對 "
345
- "*format_spec* 的解釋 。"
343
+ "*format_spec* 欄位描述了值的呈現規格,例如欄位寬度、對齊、填充、小數精度等細 "
344
+ "節資訊 。每種值類型都可以定義自己的「格式化迷你語言」或對 *format_spec* 的解 "
345
+ "釋 。"
346
346
347
347
#: ../../library/string.rst:280
348
348
msgid ""
@@ -879,7 +879,7 @@ msgid ""
879
879
"example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``."
880
880
msgstr ""
881
881
"此語法在大多情況下與舊式的 ``%`` 格式類似,只是增加了 ``{}`` 和 ``:`` 來取代 "
882
- "``%``。例如, ``'%03.2f'`` 可以改寫為 ``'{:03.2f}'`` 。"
882
+ "``%``。例如,``'%03.2f'`` 可以改寫為 ``'{:03.2f}'``。"
883
883
884
884
#: ../../library/string.rst:604
885
885
msgid ""
@@ -889,92 +889,56 @@ msgstr "新的語法還支援新的選項,將在以下的範例中說明。"
889
889
890
890
#: ../../library/string.rst:607
891
891
msgid "Accessing arguments by position::"
892
- msgstr ""
893
- "按位置取得引數:\n"
894
- "\n"
895
- "::"
892
+ msgstr "按位置存取引數: ::"
896
893
897
894
#: ../../library/string.rst:620
898
895
msgid "Accessing arguments by name::"
899
- msgstr ""
900
- "按名稱取得引數:\n"
901
- "\n"
902
- "::"
896
+ msgstr "按名稱存取引數: ::"
903
897
904
898
#: ../../library/string.rst:628
905
899
msgid "Accessing arguments' attributes::"
906
- msgstr ""
907
- "取得引數的屬性:\n"
908
- "\n"
909
- "::"
900
+ msgstr "存取引數的屬性: ::"
910
901
911
902
#: ../../library/string.rst:643
912
903
msgid "Accessing arguments' items::"
913
- msgstr ""
914
- "取得引數的內容:\n"
915
- "\n"
916
- "::"
904
+ msgstr "存取引數的內容: ::"
917
905
918
906
#: ../../library/string.rst:649
919
907
msgid "Replacing ``%s`` and ``%r``::"
920
- msgstr ""
921
- "替換 ``%s`` 和 ``%r``:\n"
922
- "\n"
923
- "::"
908
+ msgstr "替換 ``%s`` 和 ``%r``: ::"
924
909
925
910
#: ../../library/string.rst:654
926
911
msgid "Aligning the text and specifying a width::"
927
- msgstr ""
928
- "對齊文字以及指定寬度:\n"
929
- "\n"
930
- "::"
912
+ msgstr "對齊文字以及指定寬度: ::"
931
913
932
914
#: ../../library/string.rst:665
933
915
msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::"
934
- msgstr ""
935
- "替換 ``%+f``,``%-f`` 和 ``% f`` 以及指定正負號:\n"
936
- "\n"
937
- "::"
916
+ msgstr "替換 ``%+f``、``%-f`` 和 ``% f`` 以及指定正負號: ::"
938
917
939
918
#: ../../library/string.rst:674
940
919
msgid ""
941
920
"Replacing ``%x`` and ``%o`` and converting the value to different bases::"
942
- msgstr ""
943
- "替換 ``%x`` 或 ``%o`` 用來根據不同的進制轉換其值:\n"
944
- "\n"
945
- "::"
921
+ msgstr "替換 ``%x`` 或 ``%o`` 用來根據不同的進位制轉換其值: ::"
946
922
947
923
#: ../../library/string.rst:683
948
924
msgid "Using the comma as a thousands separator::"
949
- msgstr ""
950
- "使用逗號作為千位分隔符:\n"
951
- "\n"
952
- "::"
925
+ msgstr "使用逗號作為千位分隔符: ::"
953
926
954
927
#: ../../library/string.rst:688
955
928
msgid "Expressing a percentage::"
956
- msgstr ""
957
- "表示為百分比:\n"
958
- "\n"
959
- "::"
929
+ msgstr "表示為百分比: ::"
960
930
961
931
#: ../../library/string.rst:695
962
932
msgid "Using type-specific formatting::"
963
- msgstr ""
964
- "作為特定類型格式:\n"
965
- "\n"
966
- "::"
933
+ msgstr "作為特定型別格式: ::"
967
934
968
935
#: ../../library/string.rst:702
969
936
msgid "Nesting arguments and more complex examples::"
970
- msgstr ""
971
- "巢狀引數及更多複雜範例:\n"
972
- "\n"
973
- "::"
937
+ msgstr "巢狀引數及更多複雜範例: ::"
974
938
975
939
#: ../../library/string.rst:736
976
940
msgid "Template strings"
977
- msgstr "樣板字串 "
941
+ msgstr "模板字串 "
978
942
979
943
#: ../../library/string.rst:738
980
944
msgid ""
@@ -985,9 +949,9 @@ msgid ""
985
949
"Python. As an example of a library built on template strings for i18n, see "
986
950
"the `flufl.i18n <https://flufli18n.readthedocs.io/en/latest/>`_ package."
987
951
msgstr ""
988
- "樣板字串提供如 :pep:`292` 所述更簡單的字串替換。樣板字串的主要用例是國際化 "
952
+ "模板字串提供如 :pep:`292` 所述更簡單的字串替換。模板字串的主要用例是國際化 "
989
953
"(i18n),因為在這種情況下,更簡單的語法和功能使得它比其他 Python 內建字串格式"
990
- "化工具更容易翻譯。基於樣板字串建構的 i18n 函式庫範例,請參閱 `flufl.i18n "
954
+ "化工具更容易翻譯。基於模板字串建構的 i18n 函式庫範例,請參閱 `flufl.i18n "
991
955
"<https://flufli18n.readthedocs.io/en/latest/>`_ 套件。"
992
956
993
957
#: ../../library/string.rst:748
@@ -1089,7 +1053,7 @@ msgid ""
1089
1053
"This is the object passed to the constructor's *template* argument. In "
1090
1054
"general, you shouldn't change it, but read-only access is not enforced."
1091
1055
msgstr ""
1092
- "這是傳遞給建構子 *template* 引數的物件。一般來說,您不應該改變它 ,但並沒有強"
1056
+ "這是傳遞給建構子 *template* 引數的物件。一般來說,你不應該改變它 ,但並沒有強"
1093
1057
"制設定成唯讀。"
1094
1058
1095
1059
#: ../../library/string.rst:822
@@ -1103,8 +1067,8 @@ msgid ""
1103
1067
"expression used to parse template strings. To do this, you can override "
1104
1068
"these class attributes:"
1105
1069
msgstr ""
1106
- "進階用法:你可以繼承 :class:`Template` 類別來自定義占位符語法、分隔符號,或者 "
1107
- "用於解析模板字符串的正則表達式。您可以透過覆寫這些類別屬性來達成 :"
1070
+ "進階用法:你可以繼承 :class:`Template` 類別來自定義占位符號語法、分隔符號字 "
1071
+ "元,或者用於剖析模板字串的正則表達式。你可以透過覆寫這些類別屬性來達成 :"
1108
1072
1109
1073
#: ../../library/string.rst:845
1110
1074
msgid ""
@@ -1115,6 +1079,10 @@ msgid ""
1115
1079
"delimiter after class creation (i.e. a different delimiter must be set in "
1116
1080
"the subclass's class namespace)."
1117
1081
msgstr ""
1082
+ "*delimiter* -- 這是描述引入分隔符號 placeholder 的文字字串。預設值是 ``$``。"
1083
+ "請注意這\\ *不是*\\ 正規表示式,實作會根據字串值呼叫 :meth:`re.escape` 方法。"
1084
+ "也請注意你不能在建立類別後修改分隔符號。(意即在子類別的命名空間中必須設置不"
1085
+ "同的分隔符號)"
1118
1086
1119
1087
#: ../../library/string.rst:852
1120
1088
msgid ""
@@ -1197,7 +1165,7 @@ msgid ""
1197
1165
"The methods on this class will raise :exc:`ValueError` if the pattern "
1198
1166
"matches the template without one of these named groups matching."
1199
1167
msgstr ""
1200
- "當格式符合樣板卻沒有符合這些命名組之一 ,此類別的方法將引發 :exc:"
1168
+ "當格式符合模板卻沒有符合這些命名組之一 ,此類別的方法將引發 :exc:"
1201
1169
"`ValueError`。"
1202
1170
1203
1171
#: ../../library/string.rst:906
0 commit comments