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

Skip to content

Commit 8aa7090

Browse files
committed
[po] auto sync bot
1 parent 2bbbf8b commit 8aa7090

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

tutorial/controlflow.po

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,21 +701,21 @@ msgstr "这有助于使用小型显示器的用户,并且可以在较大的显
701701
msgid ""
702702
"Use blank lines to separate functions and classes, and larger blocks of code"
703703
" inside functions."
704-
msgstr ""
704+
msgstr "使用空行分隔函数和类,以及函数内的较大的代码块。"
705705

706706
#: ../../tutorial/controlflow.rst:737
707707
msgid "When possible, put comments on a line of their own."
708-
msgstr ""
708+
msgstr "如果可能,把注释放到单独的一行。"
709709

710710
#: ../../tutorial/controlflow.rst:739
711711
msgid "Use docstrings."
712-
msgstr ""
712+
msgstr "使用文档字符串。"
713713

714714
#: ../../tutorial/controlflow.rst:741
715715
msgid ""
716716
"Use spaces around operators and after commas, but not directly inside "
717717
"bracketing constructs: ``a = f(1, 2) + g(3, 4)``."
718-
msgstr ""
718+
msgstr "在运算符前后和逗号后使用空格,但不能直接在括号内使用: ``a = f(1, 2) + g(3, 4)``。"
719719

720720
#: ../../tutorial/controlflow.rst:744
721721
msgid ""
@@ -724,20 +724,22 @@ msgid ""
724724
"and methods. Always use ``self`` as the name for the first method argument "
725725
"(see :ref:`tut-firstclasses` for more on classes and methods)."
726726
msgstr ""
727+
"类和函数命名的一致性;规范是使用 ``CamelCase`` 命名类,``lower_case_with_underscores`` "
728+
"命名函数和方法。始终使用 ``self`` 作为第一个方法参数的名称(有关类和方法,请参阅 :ref:`tut-firstclasses` )。"
727729

728730
#: ../../tutorial/controlflow.rst:749
729731
msgid ""
730732
"Don't use fancy encodings if your code is meant to be used in international "
731733
"environments. Python's default, UTF-8, or even plain ASCII work best in any"
732734
" case."
733-
msgstr ""
735+
msgstr "如果你的代码旨在用于国际环境,请不要使用花哨的编码。Python默认的,UTF-8,或者纯ASCII在任何情况下都能最好的工作。"
734736

735737
#: ../../tutorial/controlflow.rst:753
736738
msgid ""
737739
"Likewise, don't use non-ASCII characters in identifiers if there is only the"
738740
" slightest chance people speaking a different language will read or maintain"
739741
" the code."
740-
msgstr ""
742+
msgstr "同样,哪怕只有很小的可能说不同语言的人会阅读或维护代码,也不要在标识符中使用非ASCII字符。"
741743

742744
#: ../../tutorial/controlflow.rst:759
743745
msgid "Footnotes"
@@ -749,3 +751,4 @@ msgid ""
749751
" a mutable object is passed, the caller will see any changes the callee "
750752
"makes to it (items inserted into a list)."
751753
msgstr ""
754+
"实际上,*通过对象引用调用* 会是一个更好的表述,因为如果传递的是可变对象,则调用者将看到被调用者对其做出的任何更改(插入到列表中的元素)。"

tutorial/modules.po

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6+
# Translators:
7+
# Jerry Chen <[email protected]>, 2017
8+
# eric R <[email protected]>, 2018
9+
# ww song <[email protected]>, 2018
10+
# Junkai Shao <[email protected]>, 2018
11+
#
612
#, fuzzy
713
msgid ""
814
msgstr ""
915
"Project-Id-Version: Python 3.7\n"
1016
"Report-Msgid-Bugs-To: \n"
1117
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: eric R <trencyclopedia@gmail.com>, 2018\n"
18+
"PO-Revision-Date: 2017-02-16 23:41+0000\n"
19+
"Last-Translator: Junkai Shao <skaifun.dev@gmail.com>, 2018\n"
1420
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1521
"MIME-Version: 1.0\n"
1622
"Content-Type: text/plain; charset=UTF-8\n"
@@ -538,6 +544,8 @@ msgid ""
538544
"could take a long time and importing sub-modules might have unwanted side-"
539545
"effects that should only happen when the sub-module is explicitly imported."
540546
msgstr ""
547+
"当用户写 ``from sound.effects import *`` "
548+
"会发生什么?理想情况下,人们希望这会以某种方式传递给文件系统,找到包中存在哪些子模块,并将它们全部导入。这可能需要很长时间,导入子模块可能会产生不必要的副作用,这种副作用只有在显式导入子模块时才会发生。"
541549

542550
#: ../../tutorial/modules.rst:489
543551
msgid ""
@@ -551,6 +559,10 @@ msgid ""
551559
"for importing \\* from their package. For example, the file "
552560
":file:`sound/effects/__init__.py` could contain the following code::"
553561
msgstr ""
562+
"唯一的解决方案是让包作者提供包的显式索引。:keyword:`import` 语句使用下面的规范:如果一个包的 :file:`__init__.py` "
563+
"代码定义了一个名为 ``__all__`` 的列表,它将被视为遇到``from package import *`` "
564+
"时应该导入的模块名列表。在发布新版本的软件包时,由软件包作者决定是否保持此列表的最新状态。如果包作者没有看到从包中导入 \\* "
565+
"的用途,他们也可能决定不支持它。比如,文件 :file:`sound/effects/__init__.py` 可以包含以下代码::"
554566

555567
#: ../../tutorial/modules.rst:501
556568
msgid ""

0 commit comments

Comments
 (0)