@@ -216,6 +216,9 @@ msgid ""
216216"is specified, and the target is a filename, the executable bit of the target"
217217" file will be set."
218218msgstr ""
219+ "参数 *interpreter* 指定了 Python 解释器程序名,用于执行打包文件。这将以 “释伴(shebang)”行的形式写入打包文件的头部。在"
220+ " POSIX 平台上,操作系统会进行解释,而在 Windows 平台则会由 Python 启动器进行处理。省略 *interpreter* "
221+ "参数则不会写入释伴行。如果指定了解释器,且目标为文件名,则会设置目标文件的可执行属性位。"
219222
220223#: ../../library/zipapp.rst:145
221224msgid ""
@@ -228,13 +231,19 @@ msgid ""
228231"a directory and does not contain a ``__main__.py`` file, as otherwise the "
229232"resulting archive would not be executable."
230233msgstr ""
234+ "参数 *main* 指定某个可调用程序的名称,用作打包文件的主程序。仅当 source 为目录且不含 ``__main__.py`` "
235+ "文件时,才能指定该参数。*main* 参数应采用 "
236+ "“pkg.module:callable”的形式,通过导入“pkg.module”并不带参数地执行给出的可调用对象,即可执行打包文件。如果 source"
237+ " 是目录且不含``__main__.py`` 文件,省略 *main* 将会出错,生成的打包文件将无法执行。"
231238
232239#: ../../library/zipapp.rst:155
233240msgid ""
234241"The optional *filter* argument specifies a callback function that is passed "
235242"a Path object representing the path to the file being added (relative to the"
236243" source directory). It should return ``True`` if the file is to be added."
237244msgstr ""
245+ "可选参数 *filter* 指定了回调函数,将传给代表被添加文件路径的 Path 对象(相对于源目录)。如若文件需要加入打包文件,则回调函数应返回 "
246+ "``True``。"
238247
239248#: ../../library/zipapp.rst:160
240249msgid ""
@@ -243,6 +252,8 @@ msgid ""
243252"method; otherwise, files are stored uncompressed. This argument has no "
244253"effect when copying an existing archive."
245254msgstr ""
255+ "可选参数 *compressed* 指定是否要压缩打包文件。若设为 ``True``,则打包中的文件将用 deflate "
256+ "方法进行压缩;否则就不会压缩。本参数在复制现有打包文件时无效。"
246257
247258#: ../../library/zipapp.rst:165
248259msgid ""
0 commit comments