@@ -452,13 +452,14 @@ msgid ""
452452"application. Application programmers need not instantiate one explicitly, "
453453"the system creates one whenever any of the other classes are instantiated."
454454msgstr ""
455+ ":class:`Tk` 类在同一个应用程序中仅需作一次实例化。应用程序编程人员不需要显式进行实例化,只要有其他任何类被实例化,系统就会创建一个。"
455456
456457#: ../../library/tkinter.rst:246
457458msgid ""
458459"The :class:`Widget` class is not meant to be instantiated, it is meant only "
459460"for subclassing to make \" real\" widgets (in C++, this is called an "
460461"'abstract class')."
461- msgstr ""
462+ msgstr ":class:`Widget` 类不是用来实例化的,它仅用于继承以便生成“真正”的部件( C++ 中称为“抽象类”)。 "
462463
463464#: ../../library/tkinter.rst:250
464465msgid ""
@@ -467,6 +468,8 @@ msgid ""
467468"various parts of a Tk command. (See section :ref:`tkinter-basic-mapping` "
468469"for the :mod:`tkinter` equivalents of what's below.)"
469470msgstr ""
471+ "若要充分利用这些参考资料,有时需要知道如何阅读 Tk 的短文,以及如何识别 Tk 命令的各个部分。(参见 :ref:`tkinter-basic-"
472+ "mapping` 一节,了解以下内容在 :mod:`tkinter` 中的对应部分)。"
470473
471474#: ../../library/tkinter.rst:255
472475msgid ""
@@ -475,22 +478,24 @@ msgid ""
475478"*options* that help configure it, and the *actions* that make it do useful "
476479"things."
477480msgstr ""
481+ "Tk 脚本就是 Tcl 程序。像所有其他的 Tcl 程序一样,Tk 脚本只是由空格分隔的单词列表。一个Tk 部件只是它的 "
482+ "*class*,*options* 用于进行配置,*actions* 让它执行有用的动作。"
478483
479484#: ../../library/tkinter.rst:259
480485msgid "To make a widget in Tk, the command is always of the form::"
481- msgstr ""
486+ msgstr "要在 Tk 中制作一个部件,总是采用如下格式的命令: "
482487
483488#: ../../library/tkinter.rst:264
484489msgid "*classCommand*"
485- msgstr ""
490+ msgstr "*classCommand* "
486491
487492#: ../../library/tkinter.rst:264
488493msgid "denotes which kind of widget to make (a button, a label, a menu...)"
489- msgstr ""
494+ msgstr "表示要制作何种部件(按钮、标签、菜单......)。 "
490495
491496#: ../../library/tkinter.rst:273
492497msgid "*newPathname*"
493- msgstr ""
498+ msgstr "*newPathname* "
494499
495500#: ../../library/tkinter.rst:269
496501msgid ""
@@ -500,6 +505,8 @@ msgid ""
500505"and children are delimited by more periods. For example, "
501506"``.myApp.controlPanel.okButton`` might be the name of a widget."
502507msgstr ""
508+ "该组件的新名字。Tk 中的所有名字都必须唯一。为了帮助实现这一点,Tk 中的部件都用 *路径* 命名,就像文件系统中的文件一样。顶层的部件,即 "
509+ "*根*,名为 ``.``(句点),而子部件则由更多的句点分隔。比如部件名可能会是 ``.myApp.controlPanel.okButton`` 。"
503510
504511#: ../../library/tkinter.rst:279
505512msgid "*options*"
@@ -512,6 +519,8 @@ msgid ""
512519"by a '-', like Unix shell command flags, and values are put in quotes if "
513520"they are more than one word."
514521msgstr ""
522+ "配置部件的外观,有时也能配置行为。这些选项以标志和值的列表形式出现。标志前带一个“-”,就像 Unix shell "
523+ "命令的标志一样,如果值超过一个单词,就用引号括起来。"
515524
516525#: ../../library/tkinter.rst:281 ../../library/tkinter.rst:543
517526#: ../../library/tkinter.rst:717
@@ -526,10 +535,13 @@ msgid ""
526535"someOptions), in C++, you would express this as "
527536"fred.someAction(someOptions), and in Tk, you say::"
528537msgstr ""
538+ "一旦创建成功,部件的路径名就成了一条新的命令。这个新的 *部件命令* 是程序员让新部件执行某些 *action* 的句柄。在 C "
539+ "语言中可表示为someAction(fred, someOptions),在 C++ "
540+ "中可表示为fred.someAction(someOptions),而在 Tk 中写作:"
529541
530542#: ../../library/tkinter.rst:297
531543msgid "Note that the object name, ``.fred``, starts with a dot."
532- msgstr ""
544+ msgstr "请注意,对象名 ``.fred`` 是以句点开头的。 "
533545
534546#: ../../library/tkinter.rst:299
535547msgid ""
@@ -538,6 +550,8 @@ msgid ""
538550"greyed out), but does not work if fred is a label (disabling of labels is "
539551"not supported in Tk)."
540552msgstr ""
553+ "如您所料,*someAction* 的可用值取决于部件的类别。如果 fred 为按钮,则 `.fred disable` 有效(fred 会变灰),而当"
554+ " fred 为标签时则无效(Tk 不支持标签的禁用)。"
541555
542556#: ../../library/tkinter.rst:303
543557msgid ""
@@ -546,20 +560,22 @@ msgid ""
546560"``delete`` command, would need arguments to specify what range of text to "
547561"delete."
548562msgstr ""
563+ "*someOptions* 的合法值取决于动作。有些动作不需要参数,比如 ``disable``,其他动作如文本输入框的 ``delete`` "
564+ "命令则需用参数指定要删除的文本范围。"
549565
550566#: ../../library/tkinter.rst:311
551567msgid "Mapping Basic Tk into Tkinter"
552- msgstr ""
568+ msgstr "将简单的 Tk 映射到 Tkinter "
553569
554570#: ../../library/tkinter.rst:313
555571msgid "Class commands in Tk correspond to class constructors in Tkinter. ::"
556- msgstr ""
572+ msgstr "Tk 中的类命令对应于 Tkinter 中的类构造函数: "
557573
558574#: ../../library/tkinter.rst:317
559575msgid ""
560576"The master of an object is implicit in the new name given to it at creation "
561577"time. In Tkinter, masters are specified explicitly. ::"
562- msgstr ""
578+ msgstr "父对象是隐含在创建时给定的新名字中的。在 Tkinter 中,父对象是显式指定的: "
563579
564580#: ../../library/tkinter.rst:322
565581msgid ""
@@ -569,6 +585,8 @@ msgid ""
569585"indices, in dictionary style, for established instances. See section :ref"
570586":`tkinter-setting-options` on setting options. ::"
571587msgstr ""
588+ "Tk 中的配置项是以连字符标签列表的形式给出的,后跟着参数值。在 Tkinter 中,选项指定为实例构造函数中的关键字参数,在配置调用时指定为关键字 "
589+ "args,或在已有实例中指定为实例索引,以字典的形式。参见 :ref:`tkinter-setting-options` 一节的选项设置部分。"
572590
573591#: ../../library/tkinter.rst:332
574592msgid ""
@@ -578,6 +596,8 @@ msgid ""
578596"widget. The actions (methods) that a given widget can perform are listed in"
579597" :file:`tkinter/__init__.py`. ::"
580598msgstr ""
599+ "在 Tk 中, 要在某个部件上执行动作, 要用部件名作为命令, 并后面附上动作名称, 可能还会带有参数(option)。在 Tkinter "
600+ "中,则调用类实例的方法来执行部件的动作。部件能够执行的动作(方法)列在 :file:`tkinter/__init__.py` 中。"
581601
582602#: ../../library/tkinter.rst:340
583603msgid ""
@@ -588,18 +608,21 @@ msgid ""
588608"so inherit all the packing methods. See the :mod:`tkinter.tix` module "
589609"documentation for additional information on the Form geometry manager. ::"
590610msgstr ""
611+ "若要将部件交给打包器(geometry manager),需带上可选参数去调用 pack。在 Tkinter 中,Pack 类拥有全部这些功能,pack"
612+ " 命令的各种形式都以方法的形式实现。 :mod:`tkinter` 中的所有部件都是从 Packer 继承而来的,因此继承了所有打包方法。关于Form "
613+ "geometry manager 的更多信息,请参见 :mod:`tkinter.tix` 模块的文档。"
591614
592615#: ../../library/tkinter.rst:351
593616msgid "How Tk and Tkinter are Related"
594- msgstr ""
617+ msgstr "Tk 和 Tkinter 如何关联 "
595618
596619#: ../../library/tkinter.rst:353
597620msgid "From the top down:"
598- msgstr ""
621+ msgstr "自上而下: "
599622
600623#: ../../library/tkinter.rst:356
601624msgid "Your App Here (Python)"
602- msgstr ""
625+ msgstr "(Python)应用程序位于这里 "
603626
604627#: ../../library/tkinter.rst:356
605628msgid "A Python application makes a :mod:`tkinter` call."
0 commit comments