python / python-docs-zh-cn

zh_CN translation of the Python documentation
https://docs.python.org/zh-cn/
431 stars 74 forks source link

疑似译文不准确两处《site —— 指定域的配置钩子》 #211

Closed c1ino closed 3 years ago

c1ino commented 3 years ago

  1. 【第一处】(译文不准确)

译文:

导入此模块将会附加域特定的路径到模块搜索路径并且添加一些内建对象,除非使用了 -S 选项。在此例中,模块可以被安全地导入,而不会对模块搜索路径和内建对象有自动的修改或添加。要明确地触发通常域特定的添加,调用函数 site.main()。

在 3.3 版更改: 即便使用了 -S,也会导入此模块用于触发路径操纵。

原文:

Importing this module will append site-specific paths to the module search path and add a few builtins, unless -S was used. In that case, this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the site.main() function.

Changed in version 3.3: Importing the module used to trigger paths manipulation even when using -S.

改进:

导入此模块将会附加域特定的路径到模块搜索路径并且添加一些内建对象,除非使用了 -S 选项,那样的话,模块可以被安全地导入,而不会对模块搜索路径和内建对象有自动的修改或添加。要明确地触发通常域特定的添加,调用函数 site.main()。

在 3.3 版更改: 在之前即便使用了 -S,导入此模块仍然会触发路径操纵。


  1. 【第二处】(用词不一致)

译文:

site —— 指定域的配置钩子 …… 要明确地触发通常域特定的添加 …… 在这些路径操作之后,会尝试导入一个名为 sitecustomize 的模块,它可以执行任意站点专属的定制。 …… 在此之后,会尝试导入一个名为 usercustomize 的模块,它可以执行任意用户专属的定制 ……

原文:

site — Site-specific configuration hook …… To explicitly trigger the usual site-specific additions …… After these path manipulations, an attempt is made to import a module named sitecustomize, which can perform arbitrary site-specific customizations. …… After this, an attempt is made to import a module named usercustomize, which can perform arbitrary user-specific customizations ……

改进:想不出更好的表达。 site-specific域特定特定域指定域站点专属域专属user-specific:(同理)


silkriver commented 3 years ago

fixed

c1ino commented 3 years ago

@silkriver 请问第一处中的第一个错处 。在此例中 是否被遗漏了?原文对应的In that case应该指的是“除非使用了-S选项”的情况。不催,只是问问。

silkriver commented 3 years ago

是的,谢谢提醒