@@ -327,7 +327,7 @@ msgstr "位置位置"
327
327
msgid ""
328
328
"Positional arguments are for those pieces of information that your program "
329
329
"absolutely, positively requires to run."
330
- msgstr ""
330
+ msgstr "位置参是对于你的程序运行来说绝对、肯定需要的信息片段。 "
331
331
332
332
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:225
333
333
msgid ""
@@ -339,6 +339,9 @@ msgid ""
339
339
" a configuration file, or a GUI: if you make that many demands on your "
340
340
"users, most of them will simply give up."
341
341
msgstr ""
342
+ "一个好的用户界面应当尽可能少地设置绝对必需提供的信息。 如果你的程序必需提供 17 项不同的信息片段才能成功运行,那么你要 *如何* "
343
+ "从用户获取这些信息将不是问题的关键 --- 大多数人会在他们成功运行此程序之前放弃并离开。 无论用户界面是命令行、配置文件还是 GUI "
344
+ "都一样适用:如果你对你的用户提出如此多的要求,它们大多将会直接放弃。"
342
345
343
346
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:233
344
347
msgid ""
@@ -352,6 +355,9 @@ msgid ""
352
355
"flexibility has drawbacks as well, of course; too many options can overwhelm"
353
356
" users and make your code much harder to maintain."
354
357
msgstr ""
358
+ "简而言之,请尽量最小化绝对要求用户提供的信息量 --- 只要有可能就使用合理的默认值。 当然,你希望程序足够灵活也是合理的。 这就是选项的作用。 "
359
+ "同样,选项是配置文件中的条目,GUI 中的“首选项”对话框中的控件,还是命令行选项不是问题的关键 --- "
360
+ "你实现的选项越多,你的程序就越灵活,它的具体实现也会变得更为复杂。 当然,太大的灵活性也存在缺点;过多的选项会让用户更难掌握并使你的代码更难维护。"
355
361
356
362
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:246
357
363
msgid "Tutorial"
@@ -363,12 +369,14 @@ msgid ""
363
369
"straightforward to use in most cases. This section covers the code patterns"
364
370
" that are common to any :mod:`optparse`\\ -based program."
365
371
msgstr ""
372
+ "虽然 :mod:`optparse` 非常灵活和强大,但在大多数情况下它也很简明易用。 本小节介绍了任何基于 :mod:`optparse` "
373
+ "的程序中常见的代码模式。"
366
374
367
375
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:252
368
376
msgid ""
369
377
"First, you need to import the OptionParser class; then, early in the main "
370
378
"program, create an OptionParser instance::"
371
- msgstr ""
379
+ msgstr "首先,你需要导入 OptionParser 类;然后在主程序的开头部分,创建一个 OptionParser 实例:: "
372
380
373
381
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:259
374
382
msgid "Then you can start defining options. The basic syntax is::"
0 commit comments