Skip to content

Commit 79a2354

Browse files
[po] auto sync
1 parent 866df3a commit 79a2354

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "96.11%", "updated_at": "2024-08-28T03:47:03Z"}
1+
{"translation": "96.11%", "updated_at": "2024-08-28T04:47:05Z"}

howto/regex.po

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ msgstr "方法 / 属性"
732732
#: ../../howto/regex.rst:363 ../../howto/regex.rst:417
733733
#: ../../howto/regex.rst:1065
734734
msgid "Purpose"
735-
msgstr "目的"
735+
msgstr "用途"
736736

737737
#: ../../howto/regex.rst:365
738738
msgid "``match()``"
@@ -811,16 +811,17 @@ msgid ""
811811
"<match-objects>`, so you should store the result in a variable for later "
812812
"use. ::"
813813
msgstr ""
814-
"现在,让我们尝试一下它应该匹配的字符串,例如 ``tempo``。在这个例子中 :meth:`~re.Pattern.match` 将返回一个 "
815-
":ref:`匹配对象 <match-objects>`,因此你应该将结果储存到一个变量中以供稍后使用。 ::"
814+
"接下来,让我们尝试把这个正则应用到一个可以匹配的字符串,比如 ``tempo``。在这个例子中 :meth:`~re.Pattern.match` "
815+
"会返回一个 :ref:`匹配对象 <match-objects>`,所以你应该将结果储存到一个变量中,以便后续使用。 ::"
816816

817817
#: ../../howto/regex.rst:412
818818
msgid ""
819819
"Now you can query the :ref:`match object <match-objects>` for information "
820820
"about the matching string. Match object instances also have several methods"
821821
" and attributes; the most important ones are:"
822822
msgstr ""
823-
"现在你可以检查 :ref:`匹配对象 <match-objects>` 以获取有关匹配字符串的信息。 匹配对象实例也有几个方法和属性;最重要的是:"
823+
"现在你可以查询 :ref:`匹配对象 <match-objects>` 来获取有关匹配字符串的信息。 "
824+
"匹配对象实例也有多个方法和属性,其中比较最重要的是:"
824825

825826
#: ../../howto/regex.rst:419
826827
msgid "``group()``"
@@ -852,11 +853,11 @@ msgstr "``span()``"
852853

853854
#: ../../howto/regex.rst:425
854855
msgid "Return a tuple containing the (start, end) positions of the match"
855-
msgstr "返回包含匹配 (start, end) 位置的元组"
856+
msgstr "返回包含匹配 (起始, 结束) 位置的元组"
856857

857858
#: ../../howto/regex.rst:429
858859
msgid "Trying these methods will soon clarify their meaning::"
859-
msgstr "尝试这些方法很快就会清楚它们的含义::"
860+
msgstr "测下一下这些方法,很快就能明白它们的含义::"
860861

861862
#: ../../howto/regex.rst:438
862863
msgid ""
@@ -869,25 +870,28 @@ msgid ""
869870
"scans through the string, so the match may not start at zero in that case. "
870871
"::"
871872
msgstr ""
872-
":meth:`~re.Match.group` 返回正则匹配的子字符串。 :meth:`~re.Match.start` 和 "
873-
":meth:`~re.Match.end` 返回匹配的起始和结束索引。 :meth:`~re.Match.span` 在单个元组中返回开始和结束索引。 "
874-
"由于 :meth:`~re.Pattern.match` 方法只检查正则是否在字符串的开头匹配,所以 :meth:`!start` 将始终为零。 "
875-
"但是,模式的 :meth:`~re.Pattern.search` 方法会扫描字符串,因此在这种情况下匹配可能不会从零开始。::"
873+
":meth:`~re.Match.group` 方法返回正则表达式匹配到的子字符串。 :meth:`~re.Match.start` 和 "
874+
":meth:`~re.Match.end` 方法分别返回匹配的起始和结束索引。 :meth:`~re.Match.span` "
875+
"方法则以元组的形式返回始始和结束索引。 由于 :meth:`~re.Pattern.match` 方法只检查正则表达式能否在字符串的开头匹配,所以 "
876+
":meth:`!start` 方法始终返回零。 而 :meth:`~re.Pattern.search` "
877+
"方法会扫描字符串的所有位置,因此匹配的起始索引不一定是零。::"
876878

877879
#: ../../howto/regex.rst:455
878880
msgid ""
879881
"In actual programs, the most common style is to store the :ref:`match object"
880882
" <match-objects>` in a variable, and then check if it was ``None``. This "
881883
"usually looks like::"
882884
msgstr ""
883-
"在实际程序中,最常见的样式是在变量中存储 :ref:`匹配对象 <match-objects>`,然后检查它是否为 ``None``。 "
884-
"这通常看起来像::"
885+
"在实际编程中,最常用的方式是将 :ref:`匹配对象 <match-objects>` 储存到一个变量中,然后检查这个变量是否为 ``None``。 "
886+
"这种做法通常如下所示::"
885887

886888
#: ../../howto/regex.rst:466
887889
msgid ""
888890
"Two pattern methods return all of the matches for a pattern. "
889891
":meth:`~re.Pattern.findall` returns a list of matching strings::"
890-
msgstr "两种模式方法返回模式的所有匹配项。 :meth:`~re.Pattern.findall` 返回匹配字符串的列表::"
892+
msgstr ""
893+
"有两个 pattern 方法可以用来返回 pattern 的所有匹配项。 :meth:`~re.Pattern.findall` "
894+
"方法会返回一个包含所有匹配字符串的列表::"
891895

892896
#: ../../howto/regex.rst:473
893897
msgid ""

0 commit comments

Comments
 (0)