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

Skip to content

Commit ea81e89

Browse files
committed
[po] auto sync bot
1 parent 896625a commit ea81e89

4 files changed

Lines changed: 84 additions & 40 deletions

File tree

tutorial/appendix.po

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgstr ""
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: 启迪 吴 <yeyubuzailai@gmail.com>, 2017\n"
13+
"Last-Translator: ww song <sww4718168@gmail.com>, 2018\n"
1414
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
@@ -51,6 +51,8 @@ msgid ""
5151
" the :exc:`KeyboardInterrupt` exception, which may be handled by a "
5252
":keyword:`try` statement."
5353
msgstr ""
54+
"将中断字符(通常为 :kbd:`Control-C` 或 :kbd:`Delete` )键入主要或辅助提示会取消输入并返回主提示符。 [#]_ "
55+
"在执行命令时键入中断引发的 :exc:`KeyboardInterrupt` 异常,可以由 :keyword:`try` 语句处理。"
5456

5557
#: ../../tutorial/appendix.rst:38
5658
msgid "Executable Python Scripts"
@@ -60,7 +62,7 @@ msgstr "可执行的Python脚本"
6062
msgid ""
6163
"On BSD'ish Unix systems, Python scripts can be made directly executable, "
6264
"like shell scripts, by putting the line ::"
63-
msgstr ""
65+
msgstr "在BSD等类Unix系统上,Python脚本可以直接执行,就像shell脚本一样,第一行使用::"
6466

6567
#: ../../tutorial/appendix.rst:45
6668
msgid ""
@@ -71,12 +73,15 @@ msgid ""
7173
"(``'\\r\\n'``) line ending. Note that the hash, or pound, character, "
7274
"``'#'``, is used to start a comment in Python."
7375
msgstr ""
76+
"(假设解释器位于用户的 :envvar:`PATH`)脚本的开头,并将文件设置为可执行。 ``#!`` "
77+
"必须是文件的前两个字符。在某些平台上,第一行必须以Unix样式的行结尾(``'\\n'``)结束,而不是以Windows(``'\\r\\n'``)行结尾。请注意,散列或磅字符"
78+
" ``'#'`` 在Python中代表注释开始。"
7479

7580
#: ../../tutorial/appendix.rst:52
7681
msgid ""
7782
"The script can be given an executable mode, or permission, using the "
7883
":program:`chmod` command."
79-
msgstr ""
84+
msgstr "可以使用 :program:`chmod` 命令为脚本提供可执行模式或权限。"
8085

8186
#: ../../tutorial/appendix.rst:59
8287
msgid ""
@@ -86,10 +91,12 @@ msgid ""
8691
"extension can also be ``.pyw``, in that case, the console window that "
8792
"normally appears is suppressed."
8893
msgstr ""
94+
"在Windows系统上,没有“可执行模式”的概念。 Python安装程序自动将 ``.py``文件与 ``python.exe`` "
95+
"相关联,这样双击Python文件就会将其作为脚本运行。扩展也可以是 ``.pyw`` ,在这种情况下,会隐藏通常出现的控制台窗口。"
8996

9097
#: ../../tutorial/appendix.rst:69
9198
msgid "The Interactive Startup File"
92-
msgstr ""
99+
msgstr "交互式启动文件"
93100

94101
#: ../../tutorial/appendix.rst:71
95102
msgid ""
@@ -99,6 +106,8 @@ msgid ""
99106
"the name of a file containing your start-up commands. This is similar to "
100107
"the :file:`.profile` feature of the Unix shells."
101108
msgstr ""
109+
"当您以交互方式使用Python时,每次启动解释器时都会执行一些标准命令,这通常很方便。您可以通过将名为 :envvar:`PYTHONSTARTUP` "
110+
"的环境变量设置为包含启动命令的文件名来实现。这类似于Unix shell的 :file:`.profile` 功能。"
102111

103112
#: ../../tutorial/appendix.rst:77
104113
msgid ""
@@ -110,6 +119,9 @@ msgid ""
110119
" qualification in the interactive session. You can also change the prompts "
111120
"``sys.ps1`` and ``sys.ps2`` in this file."
112121
msgstr ""
122+
" 此文件仅在交互式会话中读取,而不是在Python从脚本读取命令时读取,而不是在以下情况下读取 :file:`/dev/tty` "
123+
"作为命令的显式来源(否则其行为类似于交互式会话)。它在执行交互式命令的同一命名空间中执行,因此可以在交互式会话中无限制地使用它定义或导入的对象。您还可以在此文件中更改提示"
124+
" ``sys.ps1`` 和 ``sys.ps2`` 。"
113125

114126
#: ../../tutorial/appendix.rst:85
115127
msgid ""
@@ -119,10 +131,13 @@ msgid ""
119131
"want to use the startup file in a script, you must do this explicitly in the"
120132
" script::"
121133
msgstr ""
134+
"如果你想从当前目录中读取一个额外的启动文件,你可以使用像 ``if os.path.isfile('.pythonrc.py'): "
135+
"exec(open('.pythonrc.py').read())`` "
136+
"这样的代码在全局启动文件中对它进行编程。如果要在脚本中使用启动文件,则必须在脚本中显式执行此操作::"
122137

123138
#: ../../tutorial/appendix.rst:102
124139
msgid "The Customization Modules"
125-
msgstr ""
140+
msgstr "定制模块"
126141

127142
#: ../../tutorial/appendix.rst:104
128143
msgid ""
@@ -131,6 +146,8 @@ msgid ""
131146
"location of your user site-packages directory. Start Python and run this "
132147
"code::"
133148
msgstr ""
149+
"Python提供了两个钩子来让你自定义它: :mod:`sitecustomize` 和 :mod:`usercustomize`。要查看其工作原理"
150+
",首先需要找到用户site-packages目录的位置。启动Python并运行此代码::"
134151

135152
#: ../../tutorial/appendix.rst:112
136153
msgid ""
@@ -139,6 +156,8 @@ msgid ""
139156
" unless it is started with the :option:`-s` option to disable the automatic "
140157
"import."
141158
msgstr ""
159+
"现在,您可以在该目录中创建一个名为 :file:`usercustomize.py` "
160+
"的文件,并将所需内容放入其中。它会影响Python的每次调用,除非它以 :option:`-s` 选项启动,以禁用自动导入。"
142161

143162
#: ../../tutorial/appendix.rst:116
144163
msgid ""
@@ -147,11 +166,13 @@ msgid ""
147166
"imported before :mod:`usercustomize`. See the documentation of the "
148167
":mod:`site` module for more details."
149168
msgstr ""
169+
"以相同的方式工作,但通常由全局site-packages目录中的计算机管理员创建,并在以下之前导入 :mod:`usercustomize` "
170+
"。有关更多详细信息,请参阅 :mod:`site` 模块的文档。"
150171

151172
#: ../../tutorial/appendix.rst:123
152173
msgid "Footnotes"
153174
msgstr "脚注"
154175

155176
#: ../../tutorial/appendix.rst:124
156177
msgid "A problem with the GNU Readline package may prevent this."
157-
msgstr ""
178+
msgstr "GNU Readline包的问题可能会阻止这种情况。"

tutorial/classes.po

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgstr ""
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2018-07-26 08:41+0900\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: Shengjing Zhu <zsj950618@gmail.com>, 2018\n"
13+
"Last-Translator: ww song <sww4718168@gmail.com>, 2018\n"
1414
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
@@ -64,6 +64,11 @@ msgid ""
6464
"(arithmetic operators, subscripting etc.) can be redefined for class "
6565
"instances."
6666
msgstr ""
67+
"在C++术语中,通常类成员(包括数据成员)是*public*(除了见下文 :ref:`tut-private` ),所有成员函数都是*virtual"
68+
"*。与在Modula-"
69+
"3中一样,没有用于从其方法引用对象成员的简写:方法函数使用表示对象的显式第一个参数声明,该参数由调用隐式提供。与Smalltalk一样,类本身也是对象。这为导入和重命名提供了语义。与C"
70+
"++和Modula-"
71+
"3不同,内置类型可以用作用户扩展的基类。此外,与C++一样,大多数具有特殊语法(算术运算符,下标等)的内置运算符都可以重新定义为类实例。"
6772

6873
#: ../../tutorial/classes.rst:34
6974
msgid ""
@@ -72,6 +77,8 @@ msgid ""
7277
"since its object-oriented semantics are closer to those of Python than C++, "
7378
"but I expect that few readers have heard of it.)"
7479
msgstr ""
80+
" (由于缺乏普遍接受的术语来讨论类,我偶尔会使用Smalltalk和C ++术语。我会使用Modula-3术语,因为它的面向对象语义比C "
81+
"++更接近Python,但我r认为读者很少听说过。)"
7582

7683
#: ../../tutorial/classes.rst:43
7784
msgid "A Word About Names and Objects"
@@ -92,6 +99,8 @@ msgid ""
9299
"the caller will see the change --- this eliminates the need for two "
93100
"different argument passing mechanisms as in Pascal."
94101
msgstr ""
102+
"对象具有个性,多个名称(在多个范围内)可以绑定到同一个对象。这在其他语言中称为别名。乍一看Python时通常不会理解这一点,在处理不可变的基本类型(数字,字符串,元组)时可以安全地忽略它。但是,别名对涉及可变对象,如,列表,字典和大多数其他类型,的Python代码的语义可能会产生惊人的影响。这通常用于程序的好处,因为别名在某些方面表现得像指针。例如,传递一个对象很便宜,因为实现只传递一个指针;如果函数修改了作为参数传递的对象,调用者将看到更改"
103+
"---这消除了对Pascal中两个不同的参数传递机制的需要。"
95104

96105
#: ../../tutorial/classes.rst:61
97106
msgid "Python Scopes and Namespaces"
@@ -105,10 +114,11 @@ msgid ""
105114
"understand what's going on. Incidentally, knowledge about this subject is "
106115
"useful for any advanced Python programmer."
107116
msgstr ""
117+
"在介绍类之前,我首先要告诉你一些Python的作用域规则。类定义对命名空间有一些巧妙的技巧,你需要知道作用域和命名空间如何工作才能完全理解正在发生的事情。顺便说一下,关于这个主题的知识对任何高级Python程序员都很有用。"
108118

109119
#: ../../tutorial/classes.rst:69
110120
msgid "Let's begin with some definitions."
111-
msgstr ""
121+
msgstr "让我们从一些定义开始。"
112122

113123
#: ../../tutorial/classes.rst:71
114124
msgid ""
@@ -181,27 +191,27 @@ msgid ""
181191
"Although scopes are determined statically, they are used dynamically. At any"
182192
" time during execution, there are at least three nested scopes whose "
183193
"namespaces are directly accessible:"
184-
msgstr ""
194+
msgstr " 尽管范围是静态确定的,但它们是动态使用的。在执行期间的任何时候,至少有三个嵌套的作用域,其名称空间可以直接访问:"
185195

186196
#: ../../tutorial/classes.rst:120
187197
msgid "the innermost scope, which is searched first, contains the local names"
188-
msgstr ""
198+
msgstr "最先搜索的最内部作用域包含局部名称"
189199

190200
#: ../../tutorial/classes.rst:121
191201
msgid ""
192202
"the scopes of any enclosing functions, which are searched starting with the "
193203
"nearest enclosing scope, contains non-local, but also non-global names"
194-
msgstr ""
204+
msgstr "从最近的封闭作用域开始搜索的任何封闭函数的范围包含非局部名称,也包括非全局名称"
195205

196206
#: ../../tutorial/classes.rst:123
197207
msgid "the next-to-last scope contains the current module's global names"
198-
msgstr ""
208+
msgstr "倒数第二个作用域包含当前模块的全局名称"
199209

200210
#: ../../tutorial/classes.rst:124
201211
msgid ""
202212
"the outermost scope (searched last) is the namespace containing built-in "
203213
"names"
204-
msgstr ""
214+
msgstr "最外面的范围(最后搜索)是包含内置名称的命名空间"
205215

206216
#: ../../tutorial/classes.rst:126
207217
msgid ""
@@ -263,10 +273,12 @@ msgid ""
263273
"namespaces, and how :keyword:`global` and :keyword:`nonlocal` affect "
264274
"variable binding::"
265275
msgstr ""
276+
" 这是一个演示如何引用不同作用域和名称空间的示例,以及如何 :keyword:`global` 和 :keyword:`nonlocal` "
277+
"影响变量绑定::"
266278

267279
#: ../../tutorial/classes.rst:191
268280
msgid "The output of the example code is:"
269-
msgstr ""
281+
msgstr "示例代码的输出是:"
270282

271283
#: ../../tutorial/classes.rst:200
272284
msgid ""
@@ -280,7 +292,7 @@ msgstr ""
280292
msgid ""
281293
"You can also see that there was no previous binding for *spam* before the "
282294
":keyword:`global` assignment."
283-
msgstr ""
295+
msgstr "您还可以在 :keyword:`global` 赋值之前看到之前没有 *spam* 的绑定。"
284296

285297
#: ../../tutorial/classes.rst:212
286298
msgid "A First Look at Classes"
@@ -290,15 +302,15 @@ msgstr "初探类"
290302
msgid ""
291303
"Classes introduce a little bit of new syntax, three new object types, and "
292304
"some new semantics."
293-
msgstr ""
305+
msgstr "类引入了一些新语法,三种新对象类型和一些新语义。"
294306

295307
#: ../../tutorial/classes.rst:221
296308
msgid "Class Definition Syntax"
297309
msgstr "类定义语法"
298310

299311
#: ../../tutorial/classes.rst:223
300312
msgid "The simplest form of class definition looks like this::"
301-
msgstr ""
313+
msgstr "最简单的类定义看起来像这样::"
302314

303315
#: ../../tutorial/classes.rst:232
304316
msgid ""
@@ -344,7 +356,7 @@ msgstr "类对象"
344356
msgid ""
345357
"Class objects support two kinds of operations: attribute references and "
346358
"instantiation."
347-
msgstr ""
359+
msgstr "类对象支持两种操作:属性引用和实例化。"
348360

349361
#: ../../tutorial/classes.rst:264
350362
msgid ""
@@ -374,7 +386,7 @@ msgstr ""
374386
msgid ""
375387
"creates a new *instance* of the class and assigns this object to the local "
376388
"variable ``x``."
377-
msgstr ""
389+
msgstr "创建类的新*实例*并将此对象分配给局部变量 ``x``。"
378390

379391
#: ../../tutorial/classes.rst:291
380392
msgid ""
@@ -407,7 +419,7 @@ msgid ""
407419
"Now what can we do with instance objects? The only operations understood by"
408420
" instance objects are attribute references. There are two kinds of valid "
409421
"attribute names, data attributes and methods."
410-
msgstr ""
422+
msgstr "现在我们可以用实例对象做什么?实例对象理解的唯一操作是属性引用。有两种有效的属性名称,数据属性和方法。"
411423

412424
#: ../../tutorial/classes.rst:328
413425
msgid ""
@@ -446,7 +458,7 @@ msgstr "方法对象"
446458

447459
#: ../../tutorial/classes.rst:362
448460
msgid "Usually, a method is called right after it is bound::"
449-
msgstr ""
461+
msgstr "通常,方法在绑定后立即调用::"
450462

451463
#: ../../tutorial/classes.rst:366
452464
msgid ""
@@ -458,7 +470,7 @@ msgstr ""
458470

459471
#: ../../tutorial/classes.rst:374
460472
msgid "will continue to print ``hello world`` until the end of time."
461-
msgstr ""
473+
msgstr "将继续打印 ``hello world`` ,直到时间结束。"
462474

463475
#: ../../tutorial/classes.rst:376
464476
msgid ""
@@ -503,7 +515,7 @@ msgid ""
503515
"Generally speaking, instance variables are for data unique to each instance "
504516
"and class variables are for attributes and methods shared by all instances "
505517
"of the class::"
506-
msgstr ""
518+
msgstr "一般来说,实例变量用于每个实例的唯一数据,而类变量用于类的所有实例共享的属性和方法::"
507519

508520
#: ../../tutorial/classes.rst:427
509521
msgid ""
@@ -516,7 +528,7 @@ msgstr ""
516528

517529
#: ../../tutorial/classes.rst:450
518530
msgid "Correct design of the class should use an instance variable instead::"
519-
msgstr ""
531+
msgstr "正确的类设计应该使用实例变量::"
520532

521533
#: ../../tutorial/classes.rst:474
522534
msgid "Random Remarks"
@@ -591,7 +603,7 @@ msgstr ""
591603
msgid ""
592604
"Methods may call other methods by using method attributes of the ``self`` "
593605
"argument::"
594-
msgstr ""
606+
msgstr "方法可以通过使用``self``参数的方法属性调用其他方法::"
595607

596608
#: ../../tutorial/classes.rst:546
597609
msgid ""
@@ -610,7 +622,7 @@ msgstr ""
610622
msgid ""
611623
"Each value is an object, and therefore has a *class* (also called its "
612624
"*type*). It is stored as ``object.__class__``."
613-
msgstr ""
625+
msgstr "每个值都是一个对象,因此具有 *class*(也称为*type*)。它存储为 ``object .__ class__``。"
614626

615627
#: ../../tutorial/classes.rst:563
616628
msgid "Inheritance"
@@ -621,7 +633,7 @@ msgid ""
621633
"Of course, a language feature would not be worthy of the name \"class\" "
622634
"without supporting inheritance. The syntax for a derived class definition "
623635
"looks like this::"
624-
msgstr ""
636+
msgstr "当然,如果不支持继承,语言特性就不值得称为“类”。派生类定义的语法如下所示::"
625637

626638
#: ../../tutorial/classes.rst:576
627639
msgid ""
@@ -671,7 +683,7 @@ msgstr ""
671683

672684
#: ../../tutorial/classes.rst:608
673685
msgid "Python has two built-in functions that work with inheritance:"
674-
msgstr ""
686+
msgstr "Python有两个内置函数同继承一起工作:"
675687

676688
#: ../../tutorial/classes.rst:610
677689
msgid ""
@@ -696,7 +708,7 @@ msgstr "多重继承"
696708
msgid ""
697709
"Python supports a form of multiple inheritance as well. A class definition "
698710
"with multiple base classes looks like this::"
699-
msgstr ""
711+
msgstr " Python也支持多重继承的形式。具有多个基类的类定义如下所示::"
700712

701713
#: ../../tutorial/classes.rst:636
702714
msgid ""
@@ -765,14 +777,14 @@ msgstr ""
765777
msgid ""
766778
"Name mangling is helpful for letting subclasses override methods without "
767779
"breaking intraclass method calls. For example::"
768-
msgstr ""
780+
msgstr "名称修改有助于让子类重载方法而不破坏类内方法调用。例如::"
769781

770782
#: ../../tutorial/classes.rst:706
771783
msgid ""
772784
"Note that the mangling rules are designed mostly to avoid accidents; it "
773785
"still is possible to access or modify a variable that is considered private."
774786
" This can even be useful in special circumstances, such as in the debugger."
775-
msgstr ""
787+
msgstr "请注意,修剪规则主要是为了避免事故;它仍然可以访问或修改被视为私有的变量。这在特殊情况下甚至可能很有用,例如在调试器中。"
776788

777789
#: ../../tutorial/classes.rst:710
778790
msgid ""
@@ -794,6 +806,7 @@ msgid ""
794806
"or C \"struct\", bundling together a few named data items. An empty class "
795807
"definition will do nicely::"
796808
msgstr ""
809+
"有时,使用类似于Pascal “record”或C “struct”的数据类型是有用的,将一些命名数据项捆绑在一起。定义一个空类就很适合::"
797810

798811
#: ../../tutorial/classes.rst:737
799812
msgid ""
@@ -820,7 +833,7 @@ msgstr "迭代器"
820833
msgid ""
821834
"By now you have probably noticed that most container objects can be looped "
822835
"over using a :keyword:`for` statement::"
823-
msgstr ""
836+
msgstr "到目前为止,您可能已经注意到大多数容器对象都可以使用 :keyword:`for` 语句::"
824837

825838
#: ../../tutorial/classes.rst:772
826839
msgid ""

0 commit comments

Comments
 (0)