summaryrefslogtreecommitdiff
path: root/docs/_locale/zh_CN/LC_MESSAGES/development.po
blob: 8f4bc6290499f61ba73f3daff367311550be8656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2009-2017, Marcel Hellkamp
# This file is distributed under the same license as the Bottle package.
# 
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bottle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-19 14:15+0100\n"
"PO-Revision-Date: 2015-12-13 20:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#: ../../development.rst:2
msgid "Developer Notes"
msgstr "开发者笔记"

#: ../../development.rst:4
msgid ""
"This document is intended for developers and package maintainers interested "
"in the bottle development and release workflow. If you want to contribute, "
"you are just right!"
msgstr "这份文档是为那些对Bottle的开发和发布流程感兴趣的开发者和软件包维护者准备的。如果你想要做贡献,看它是对的!"

#: ../../development.rst:8
msgid "Get involved"
msgstr "参与进来"

#: ../../development.rst:10
msgid ""
"There are several ways to join the community and stay up to date. Here are "
"some of them:"
msgstr "有多种加入社区的途径,保持消息的灵通。这里是一些方法:"

#: ../../development.rst:12
msgid ""
"**Mailing list**: Join our mailing list by sending an email to "
"`bottlepy+subscribe@googlegroups.com "
"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required)."
msgstr "**邮件列表**: 发送邮件到 `bottlepy+subscribe@googlegroups.com <mailto:bottlepy+subscribe@googlegroups.com>`_ 以加入我们的邮件列表(无需Google账户)"

#: ../../development.rst:13
msgid ""
"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or "
"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag."
msgstr ""

#: ../../development.rst:14
msgid ""
"**IRC**: Join `#bottlepy on irc.freenode.net "
"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface "
"<http://webchat.freenode.net/?channels=bottlepy>`_."
msgstr "**IRC**: 加入 `#irc.freenode.net上的bottlepy频道 <irc://irc.freenode.net/bottlepy>`_ 或使用 `web聊天界面 <http://webchat.freenode.net/?channels=bottlepy>`_ "

#: ../../development.rst:15
msgid ""
"**Google plus**: We sometimes `blog about Bottle, releases and technical "
"stuff "
"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_"
" on our Google+ page."
msgstr "**Google plus**: 有时我们会在Google+页面上发表一些 `与Bottle有关的博客 <https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_ "

#: ../../development.rst:19
msgid "Get the Sources"
msgstr "获取源代码"

#: ../../development.rst:21
msgid ""
"The bottle `development repository <https://github.com/bottlepy/bottle>`_ "
"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are "
"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan "
"to contribute, it is a good idea to create an account there and fork the "
"main repository. This way your changes and ideas are visible to other "
"developers and can be discussed openly. Even without an account, you can "
"clone the repository or just download the latest development version as a "
"source archive."
msgstr "Bottle的 `开发仓库 <https://github.com/bottlepy/bottle>`_ 和 `问题追踪 <https://github.com/bottlepy/bottle/issues>`_ 都搭建在 `github <https://github.com/bottlepy/bottle>`_ 上面。如果你打算做贡献,创建一个github帐号然后fork一下吧。你做出的更改或建议都可被其他开发者看到,可以一起讨论。即使没有github帐号,你也可以clone代码仓库,或下载最新开发版本的压缩包。"

#: ../../development.rst:23
msgid "**git:** ``git clone git://github.com/bottlepy/bottle.git``"
msgstr "**git:** ``git clone git://github.com/bottlepy/bottle.git``"

#: ../../development.rst:24
msgid "**git/https:** ``git clone https://github.com/bottlepy/bottle.git``"
msgstr "**git/https:** ``git clone https://github.com/bottlepy/bottle.git``"

#: ../../development.rst:25
msgid ""
"**Download:** Development branch as `tar archive "
"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file "
"<http://github.com/bottlepy/bottle/zipball/master>`_."
msgstr "**Download:** Development branch as `tar archive <http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <http://github.com/bottlepy/bottle/zipball/master>`_."

#: ../../development.rst:26
msgid ""
"**Translations:** `transifex.com/projects/p/bottle "
"<https://www.transifex.com/projects/p/bottle/>`_"
msgstr ""

#: ../../development.rst:30
msgid "Releases and Updates"
msgstr "发布和更新"

#: ../../development.rst:32
msgid ""
"Bottle is released at irregular intervals and distributed through `PyPI "
"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-"
"revisions of outdated releases are only available from the git repository "
"mentioned above. Some Linux distributions may offer packages for outdated "
"releases, though."
msgstr ""

#: ../../development.rst:34
msgid ""
"The Bottle version number splits into three parts "
"(**major.minor.revision**). These are *not* used to promote new features but"
" to indicate important bug-fixes and/or API changes. Critical bugs are fixed"
" in at least the two latest minor releases and announced in all available "
"channels (mailinglist, twitter, github). Non-critical bugs or features are "
"not guaranteed to be backported. This may change in the future, through."
msgstr "Bottle的版本号分隔为三个部分(**major.minor.revision**)。版本号 *不会* 用于引入新特征,只是为了指出重要的bug-fix或API的改动。关键的bug会在近两个新的版本中修复,然后通过所有渠道发布(邮件列表, twitter, github)。不重要的bug修复或特征不保证添加到旧版本中。这个情况在未来也许会改变。"

#: ../../development.rst:37
msgid "Major Release (x.0)"
msgstr ""

#: ../../development.rst:37
msgid ""
"The major release number is increased on important milestones or updates "
"that completely break backward compatibility. You probably have to work over"
" your entire application to use a new release. These releases are very rare,"
" through."
msgstr "在重要的里程碑达成或新的更新和旧版本彻底不兼容时,会增加major版本号。为了使用新版本,你也许需要修改整个应用,但major版本号极少会改变。"

#: ../../development.rst:40
msgid "Minor Release (x.y)"
msgstr ""

#: ../../development.rst:40
msgid ""
"The minor release number is increased on updates that change the API or "
"behaviour in some way. You might get some depreciation warnings any may have"
" to tweak some configuration settings to restore the old behaviour, but in "
"most cases these changes are designed to be backward compatible for at least"
" one minor release. You should update to stay up do date, but don't have to."
" An exception is 0.8, which *will* break backward compatibility hard. (This "
"is why 0.7 was skipped). Sorry about that."
msgstr "在更改了API之后,或增加minor版本号。你可能会收到一些API已过时的警告,调整设置以继续使用旧的特征,但在大多数情况下,这些更新都会对旧版本兼容。你应当保持更新,但这不是必须的。0.8版本是一个特例,它 *不兼容* 旧版本(所以我们跳过了0.7版本直接发布0.8版本),不好意思。"

#: ../../development.rst:43
msgid "Revision (x.y.z)"
msgstr ""

#: ../../development.rst:43
msgid ""
"The revision number is increased on bug-fixes and other patches that do not "
"change the API or behaviour. You can safely update without editing your "
"application code. In fact, you really should as soon as possible, because "
"important security fixes are released this way."
msgstr "在修复了一些bug,和改动不会修改API的时候,会增加revision版本号。你可以放心更新,而不用修改你应用的代码。事实上,你确实应该更新这类版本,因为它常常修复一些安全问题。"

#: ../../development.rst:47
msgid "Pre-Release Versions"
msgstr ""

#: ../../development.rst:46
msgid ""
"Release candidates are marked by an ``rc`` in their revision number. These "
"are API stable most of the time and open for testing, but not officially "
"released yet. You should not use these for production."
msgstr "RC版本会在版本号中添加 ``rc`` 字样。API已基本稳定,已经开放测试,但还没正式发布。你不应该在生产环境中使用rc版本。"

#: ../../development.rst:50
msgid "Repository Structure"
msgstr "代码仓库结构"

#: ../../development.rst:52
msgid "The source repository is structured as follows:"
msgstr "代码仓库的结构如下:"

#: ../../development.rst:55
msgid "master branch"
msgstr ""

#: ../../development.rst:55
msgid ""
"This is the integration, testing and development branch. All changes that "
"are planned to be part of the next release are merged and tested here."
msgstr "该分支用于集成,测试和开发。所有计划添加到下一版本的改动,会在这里合并和测试。"

#: ../../development.rst:58
msgid "release-x.y branches"
msgstr ""

#: ../../development.rst:58
msgid ""
"As soon as the master branch is (almost) ready for a new release, it is "
"branched into a new release branch. This \"release candidate\" is feature-"
"frozen but may receive bug-fixes and last-minute changes until it is "
"considered production ready and officially released. From that point on it "
"is called a \"support branch\" and still receives bug-fixes, but only "
"important ones. The revision number is increased on each push to these "
"branches, so you can keep up with important changes."
msgstr "只要master分支已经可以用来发布一个新的版本,它会被安排到一个新的发行分支里面。在RC阶段,不再添加或删除特征,只接受bug-fix和小改动,直到认为它可以用于生产环境和正式发布。基于这点考虑,我们称之为“支持分支(support branch)”,依然接受bug-fix,但仅限关键的bug-fix。每次更改后,版本号都会更新,这样你就能及时获取重要的改动了。"

#: ../../development.rst:61
msgid "bugfix_name-x.y branches"
msgstr ""

#: ../../development.rst:61
msgid ""
"These branches are only temporary and used to develop and share non-trivial "
"bug-fixes for existing releases. They are merged into the corresponding "
"release branch and deleted soon after that."
msgstr "这些分支是临时性的,用于修复现有发布版本的bug。在合并到其他分支后,它们就会被删除。"

#: ../../development.rst:65
msgid "Feature branches"
msgstr ""

#: ../../development.rst:64
msgid ""
"All other branches are feature branches. These are based on the master "
"branch and only live as long as they are still active and not merged back "
"into ``master``."
msgstr "所有这类分支都是用于新增特征的。基于master分支,在开发、合并完毕后,就会被删除。"

#: ../../development.rst:68
msgid "What does this mean for a developer?"
msgstr "对于开发者,这意味着什么?"

#: ../../development.rst:69
msgid ""
"If you want to add a feature, create a new branch from ``master``. If you "
"want to fix a bug, branch ``release-x.y`` for each affected release. Please "
"use a separate branch for each feature or bug to make integration as easy as"
" possible. Thats all. There are git workflow examples at the bottom of this "
"page."
msgstr "如果你想添加一个特征,可以从 ``master`` 分支创建一个分支。如果你想修复一个bug,可从 ``release-x.y`` 这类分支创建一个分支。无论是添加特征还是修复bug,都建议在一个独立的分支上进行,这样合并工作就简单了。就这些了!在页面底部会有git工作流程的例子。"

#: ../../development.rst:71
msgid ""
"Oh, and never ever change the release number. We'll do that on integration. "
"You never know in which order we pull pending requests anyway :)"
msgstr "Oh,请不要修改版本号。我们会在集成的时候进行修改。因为你不知道我们什么时候会将你的request pull下来:)"

#: ../../development.rst:75
msgid "What does this mean for a maintainer ?"
msgstr "对于软件包维护者,这意味着什么?"

#: ../../development.rst:76
msgid ""
"Watch the tags (and the mailing list) for bug-fixes and new releases. If you"
" want to fetch a specific release from the git repository, trust the tags, "
"not the branches. A branch may contain changes that are not released yet, "
"but a tag marks the exact commit which changed the version number."
msgstr "关注那些bugfix和新版本的tag,还有邮件列表。如果你想从代码仓库中获取特定的版本,请使用tag,而不是分支。分支中也许会包含一些未发布的改动,但tag会标记是那个commit更改了版本号。"

#: ../../development.rst:80
msgid "Submitting Patches"
msgstr "提交补丁"

#: ../../development.rst:82
msgid ""
"The best way to get your changes integrated into the main development branch"
" is to fork the main repository at github, create a new feature-branch, "
"apply your changes and send a pull-request. Further down this page is a "
"small collection of git workflow examples that may guide you. Submitting "
"git-compatible patches to the mailing list is fine too. In any case, please "
"follow some basic rules:"
msgstr "让你的补丁被集成进来的最好方法,是在github上面fork整个项目,创建一个新的分支,修改代码,然后发送一个pull-request。页面下方是git工作流程的例子,也许会有帮助。提交git兼容的补丁文件到邮件列表也是可以的。无论使用什么方法,请遵守以下的基本规则:"

#: ../../development.rst:84
msgid ""
"**Documentation:** Tell us what your patch does. Comment your code. If you "
"introduced a new feature, add to the documentation so others can learn about"
" it."
msgstr "**文档:** 告诉我们你的补丁做了什么。注释你的代码。如果你添加了新的特征,请添加相应的使用方法。"

#: ../../development.rst:85
msgid ""
"**Test:** Write tests to prove that your code works as expected and does not"
" break anything. If you fixed a bug, write at least one test-case that "
"triggers the bug. Make sure that all tests pass before you submit a patch."
msgstr "**测试:** 编写测试以证明你的补丁如期工作,且没有破坏任何东西。如果你修复了一个bug,至少写一个测试用例来触发这个bug。在提交补丁之前,请确保所有测试已通过。"

#: ../../development.rst:86
msgid ""
"**One patch at a time:** Only fix one bug or add one feature at a time. "
"Design your patches so that they can be applyed as a whole. Keep your "
"patches clean, small and focused."
msgstr "**一次只提交一个补丁:** 一次只修改一个bug,一次只添加一个新特征。保持补丁的干净。"

#: ../../development.rst:87
msgid ""
"**Sync with upstream:** If the ``upstream/master`` branch changed while you "
"were working on your patch, rebase or pull to make sure that your patch "
"still applies without conflicts."
msgstr "**与上流同步:** 如果在你编写补丁的时候, ``upstream/master`` 分支被修改了,那么先rebase或将新的修改pull下来,确保你的补丁在合并的时候不会造成冲突。"

#: ../../development.rst:91
msgid "Building the Documentation"
msgstr "生成文档"

#: ../../development.rst:93
msgid ""
"You need a recent version of Sphinx to build the documentation. The "
"recommended way is to install :command:`virtualenv` using your distribution "
"package repository and install sphinx manually to get an up-to-date version."
msgstr "你需要一个Sphinx的新版本来生产整份文档。建议将Sphinx安装到一个 :command:`virtualenv` 环境。"

#: ../../development.rst:124
msgid "GIT Workflow Examples"
msgstr "GIT工作流程"

#: ../../development.rst:126
msgid ""
"The following examples assume that you have an (free) `github account "
"<https://github.com>`_. This is not mandatory, but makes things a lot "
"easier."
msgstr "接下来的例子都假设你已经有一个 `git的免费帐号 <https://github.com>`_ 。虽然不是必须的,但可简单化很多东西。"

#: ../../development.rst:128
msgid ""
"First of all you need to create a fork (a personal clone) of the official "
"repository. To do this, you simply click the \"fork\" button on the `bottle "
"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, "
"you will be presented with a short introduction to your new repository."
msgstr "首先,你需要从官方代码仓库创建一个fork。只需在 `bottle项目页面 <https://github.com/bottlepy/bottle>`_ 点击一下\"fork\"按钮就行了。创建玩fork之后,会得到一个关于这个新仓库的简介。"

#: ../../development.rst:130
msgid ""
"The fork you just created is hosted at github and read-able by everyone, but"
" write-able only by you. Now you need to clone the fork locally to actually "
"make changes to it. Make sure you use the private (read-write) URL and *not*"
" the public (read-only) one::"
msgstr "你刚刚创建的fork托管在github上面,对所有人都是可见的,但只有你有修改的权限。现在你需要将其从线上clone下面,做出实际的修改。确保你使用的是(可写-可读)的私有URL,而不是(只读)的公开URL。"

#: ../../development.rst:134
msgid ""
"Once the clone is complete your repository will have a remote named "
"\"origin\" that points to your fork on github. Don’t let the name confuse "
"you, this does not point to the original bottle repository, but to your own "
"fork. To keep track of the official repository, add another remote named "
"\"upstream\"::"
msgstr "在你将代码仓库clone下来后,就有了一个\"origin\"分支,指向你在github上的fork。不要让名字迷惑了你,它并不指向bottle的官方代码仓库,只是指向你自己的fork。为了追踪官方的代码仓库,可添加一个新的\"upstream\"远程分支。"

#: ../../development.rst:140
msgid ""
"Note that \"upstream\" is a public clone URL, which is read-only. You cannot"
" push changes directly to it. Instead, we will pull from your public "
"repository. This is described later."
msgstr "注意,\"upstream\"分支使用的是公开的URL,是只读的。你不能直接往该分支push东西,而是由我们来你的公开代码仓库pull,后面会讲到。"

#: ../../development.rst:143
msgid "Submit a Feature"
msgstr "提交一个特征"

#: ../../development.rst:144
msgid ""
"New features are developed in separate feature-branches to make integration "
"easy. Because they are going to be integrated into the ``master`` branch, "
"they must be based on ``upstream/master``. To create a new feature-branch, "
"type the following::"
msgstr "在独立的特征分支内开发新的特征,会令集成工作更简单。因为它们会被合并到 ``master`` 分支,所有它们必须是基于 ``upstream/master`` 的分支。下列命令创建一个特征分支。"

#: ../../development.rst:148
msgid ""
"Now implement your feature, write tests, update the documentation, make sure"
" that all tests pass and commit your changes::"
msgstr "现在可开始写代码,写测试,更新文档。在提交更改之前,记得确保所有测试已经通过。"

#: ../../development.rst:152
msgid ""
"If the ``upstream/master`` branch changed in the meantime, there may be "
"conflicts with your changes. To solve these, 'rebase' your feature-branch "
"onto the top of the updated ``upstream/master`` branch::"
msgstr "与此同时,如果 ``upstream/master`` 这个分支有改动,那么你的提交就有可能造成冲突,可通过rebase操作来解决。"

#: ../../development.rst:157
msgid ""
"This is equivalent to undoing all your changes, updating your branch to the "
"latest version and reapplying all your patches again. If you released your "
"branch already (see next step), this is not an option because it rewrites "
"your history. You can do a normal pull instead. Resolve any conflicts, run "
"the tests again and commit."
msgstr "这相当于先撤销你的所有改动,更新你的分支到最新版本,再重做你的所有改动。如果你已经发布了你的分支(下一步会提及),这就不是一个好主意了,因为会覆写你的提交历史。这种情况下,你应该先将最新版本pull下来,手动解决所有冲突,运行测试,再提交。"

#: ../../development.rst:159
msgid ""
"Now you are almost ready to send a pull request. But first you need to make "
"your feature-branch public by pushing it to your github fork::"
msgstr "现在,你已经做好准备发一个pull-request了。但首先你应该公开你的特征分支,很简单,将其push到你github的fork上面就行了。"

#: ../../development.rst:163
msgid ""
"After you’ve pushed your commit(s) you need to inform us about the new "
"feature. One way is to send a pull-request using github. Another way would "
"be to start a thread in the mailing-list, which is recommended. It allows "
"other developers to see and discuss your patches and you get some feedback "
"for free :)"
msgstr "在你push完你所有的commit之后,你需要告知我们这个新特征。一种办法是通过github发一个pull-request。另一种办法是把这个消息发到邮件列表,这也是我们推荐的方式,这样其他开发者就能看到和讨论你的补丁,你也能免费得到一些反馈 :)"

#: ../../development.rst:165
msgid ""
"If we accept your patch, we will integrate it into the official development "
"branch and make it part of the next release."
msgstr "如果我们接受了你的补丁,我们会将其集成到官方的开发分支中,它将成为下个发布版本的一部分。"

#: ../../development.rst:168
msgid "Fix a Bug"
msgstr "修复Bug"

#: ../../development.rst:169
msgid ""
"The workflow for bug-fixes is very similar to the one for features, but "
"there are some differences:"
msgstr "修复Bug和添加一个特征差不多,下面是一些不同点:"

#: ../../development.rst:171
msgid ""
"Branch off of the affected release branches instead of just the development "
"branch."
msgstr "修复所有受影响的分支,而不仅仅是开发分支(Branch off of the affected release branches instead of just the development branch)。"

#: ../../development.rst:172
msgid "Write at least one test-case that triggers the bug."
msgstr "至少编写一个触发该Bug的测试用例。"

#: ../../development.rst:173
msgid ""
"Do this for each affected branch including ``upstream/master`` if it is "
"affected. ``git cherry-pick`` may help you reducing repetitive work."
msgstr "修复所有受影响的分支,包括 ``upstream/master`` ,如果它也受影响。 ``git cherry-pick`` 可帮你完成一些重复工作。"

#: ../../development.rst:174
msgid ""
"Name your branch after the release it is based on to avoid confusion. "
"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``."
msgstr "字后面要加上其修复的版本号,以防冲突。例子: ``my_bugfix-x.y`` 或 ``my_bugfix-dev`` 。"