99# ppcfish <[email protected] >, 202110101111# Dai Xu <[email protected] >, 202112- 1312# WH-2099 <[email protected] >, 20231413# Freesand Leo <[email protected] >, 20231514#
@@ -18,7 +17,7 @@ msgid ""
1817msgstr ""
1918"Project-Id-Version : Python 3.12\n "
2019"Report-Msgid-Bugs-To : \n "
21- "POT-Creation-Date : 2023-07-14 14:14+0000\n "
20+ "POT-Creation-Date : 2023-11-03 14:14+0000\n "
2221"PO-Revision-Date : 2021-06-28 01:08+0000\n "
2322"
Last-Translator :
Freesand Leo <[email protected] >, 2023\n "
2423"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -749,33 +748,43 @@ msgid ""
749748"conventions."
750749msgstr "按照 :const:`LC_NUMERIC` 的约定,将字符串转换为整数。"
751750
752- #: ../../library/locale.rst:469
751+ #: ../../library/locale.rst:467
752+ msgid ""
753+ "Locale category for the character type functions. Most importantly, this "
754+ "category defines the text encoding, i.e. how bytes are interpreted as "
755+ "Unicode codepoints. See :pep:`538` and :pep:`540` for how this variable "
756+ "might be automatically coerced to ``C.UTF-8`` to avoid issues created by "
757+ "invalid settings in containers or incompatible settings passed over remote "
758+ "SSH connections."
759+ msgstr ""
760+
761+ #: ../../library/locale.rst:474
753762msgid ""
754- "Locale category for the character type functions. Depending on the settings "
755- " of this category, the functions of module :mod:`string` dealing with case "
756- "change their behaviour ."
757- msgstr "字符型函数的区域类别。根据该类别的设置,模块 :mod:`string` 中处理大小写的函数会改变操作方式。 "
763+ "Python doesn't internally use locale-dependent character transformation "
764+ "functions from ``ctype.h``. Instead, an internal ``pyctype.h`` provides "
765+ "locale-independent equivalents like :c:macro:`!Py_TOLOWER` ."
766+ msgstr ""
758767
759- #: ../../library/locale.rst:476
768+ #: ../../library/locale.rst:481
760769msgid ""
761770"Locale category for sorting strings. The functions :func:`strcoll` and "
762771":func:`strxfrm` of the :mod:`locale` module are affected."
763772msgstr ""
764773"字符串排序会用到的区域类别。 将会影响 :mod:`locale` 模块的 :func:`strcoll` 和 :func:`strxfrm` 函数。"
765774
766- #: ../../library/locale.rst:482
775+ #: ../../library/locale.rst:487
767776msgid ""
768777"Locale category for the formatting of time. The function "
769778":func:`time.strftime` follows these conventions."
770779msgstr "格式化时间时会用到的区域类别。 :func:`time.strftime` 函数会参考这些约定。"
771780
772- #: ../../library/locale.rst:488
781+ #: ../../library/locale.rst:493
773782msgid ""
774783"Locale category for formatting of monetary values. The available options "
775784"are available from the :func:`localeconv` function."
776785msgstr "格式化货币值时会用到的区域类别。可用值可由 :func:`localeconv` 函数获取。"
777786
778- #: ../../library/locale.rst:494
787+ #: ../../library/locale.rst:499
779788msgid ""
780789"Locale category for message display. Python currently does not support "
781790"application specific locale-aware messages. Messages displayed by the "
@@ -785,13 +794,13 @@ msgstr ""
785794"显示消息时用到的区域类别。目前 Python 不支持应用定制的本地化消息。 由操作系统显示的消息,比如由 :func:`os.strerror` "
786795"返回的消息可能会受到该类别的影响。"
787796
788- #: ../../library/locale.rst:499
797+ #: ../../library/locale.rst:504
789798msgid ""
790799"This value may not be available on operating systems not conforming to the "
791800"POSIX standard, most notably Windows."
792801msgstr "这个值在不符合 POSIX 标准的操作系统上可能不可用,最主要是指 Windows。"
793802
794- #: ../../library/locale.rst:505
803+ #: ../../library/locale.rst:510
795804msgid ""
796805"Locale category for formatting numbers. The functions "
797806":func:`format_string`, :func:`atoi`, :func:`atof` and :func:`.str` of the "
@@ -801,7 +810,7 @@ msgstr ""
801810"用于格式化数字的语言区域类别。 :mod:`locale` 模块的 :func:`format_string`, :func:`atoi`, "
802811":func:`atof` 和 :func:`.str` 等函数会受到该类别的影响。 其他所有数字格式化操作将不受影响。"
803812
804- #: ../../library/locale.rst:513
813+ #: ../../library/locale.rst:518
805814msgid ""
806815"Combination of all locale settings. If this flag is used when the locale is"
807816" changed, setting the locale for all categories is attempted. If that fails "
@@ -812,21 +821,21 @@ msgid ""
812821msgstr ""
813822"混合所有的区域设置。如果在区域改动时使用该标志,将尝试设置所有类别的区域参数。只要有任何一个类别设置失败,就不会修改任何类别。在使用此标志获取区域设置时,会返回一个代表所有类别设置的字符串。之后可用此字符串恢复设置。"
814823
815- #: ../../library/locale.rst:522
824+ #: ../../library/locale.rst:527
816825msgid ""
817826"This is a symbolic constant used for different values returned by "
818827":func:`localeconv`."
819828msgstr "一个符号常量, :func:`localeconv` 返回多个值时将会用到。"
820829
821- #: ../../library/locale.rst:526
830+ #: ../../library/locale.rst:531
822831msgid "Example::"
823832msgstr "示例:"
824833
825- #: ../../library/locale.rst:539
834+ #: ../../library/locale.rst:544
826835msgid "Background, details, hints, tips and caveats"
827836msgstr "背景、细节、提示、技巧和注意事项"
828837
829- #: ../../library/locale.rst:541
838+ #: ../../library/locale.rst:546
830839msgid ""
831840"The C standard defines the locale as a program-wide property that may be "
832841"relatively expensive to change. On top of that, some implementations are "
@@ -836,7 +845,7 @@ msgstr ""
836845"C "
837846"语言标准将区域定义为程序级别的属性,修改的代价可能相对较高。此外,有某些实现代码写得不好,频繁改变区域可能会导致内核崩溃。于是要想正确使用区域就变得有些痛苦。"
838847
839- #: ../../library/locale.rst:546
848+ #: ../../library/locale.rst:551
840849msgid ""
841850"Initially, when a program is started, the locale is the ``C`` locale, no "
842851"matter what the user's preferred locale is. There is one exception: the "
@@ -848,7 +857,7 @@ msgstr ""
848857"当程序第一次启动时,无论用户偏好定义成什么,区域值都是 ``C``。不过有一个例外,就是在启动时修改 :data:`LC_CTYPE` "
849858"类别,设置当前区域编码为用户偏好编码。程序必须调用 ``setlocale(LC_ALL, '')`` 明确表示用户偏好区域将设为其他类别。"
850859
851- #: ../../library/locale.rst:553
860+ #: ../../library/locale.rst:558
852861msgid ""
853862"It is generally a bad idea to call :func:`setlocale` in some library "
854863"routine, since as a side effect it affects the entire program. Saving and "
@@ -858,7 +867,7 @@ msgstr ""
858867"若要从库程序中调用 :func:`setlocale` "
859868",通常这不是个好主意,因为副作用是会影响整个程序。保存和恢复区域设置也几乎一样糟糕:不仅代价高昂,而且会影响到恢复之前运行的其他线程。"
860869
861- #: ../../library/locale.rst:558
870+ #: ../../library/locale.rst:563
862871msgid ""
863872"If, when coding a module for general use, you need a locale independent "
864873"version of an operation that is affected by the locale (such as certain "
@@ -872,7 +881,7 @@ msgstr ""
872881"的格式),将不得不寻找一种不用标准库的方案。更好的办法是说服自己,可以采纳区域设置。只有在万不得已的情况下,才能用文档标注出模块与非 ``C`` "
873882"区域设置不兼容。"
874883
875- #: ../../library/locale.rst:565
884+ #: ../../library/locale.rst:570
876885msgid ""
877886"The only way to perform numeric operations according to the locale is to use"
878887" the special functions defined by this module: :func:`atof`, :func:`atoi`, "
@@ -881,7 +890,7 @@ msgstr ""
881890"根据语言区域执行数字运算的唯一方式就是使用本模块所定义的特殊函数: :func:`atof`, :func:`atoi`, "
882891":func:`format_string`, :func:`.str`。"
883892
884- #: ../../library/locale.rst:569
893+ #: ../../library/locale.rst:574
885894msgid ""
886895"There is no way to perform case conversions and character classifications "
887896"according to the locale. For (Unicode) text strings these are done "
@@ -894,11 +903,11 @@ msgstr ""
894903"无法根据区域设置进行大小写转换和字符分类。对于(Unicode)文本字符串来说,这些操作都是根据字符值进行的;而对于字节符串来说,转换和分类则是根据字节的"
895904" ASCII 值进行的,高位被置位的字节(即非 ASCII 字节)永远不会被转换或被视作字母或空白符之类。"
896905
897- #: ../../library/locale.rst:580
906+ #: ../../library/locale.rst:585
898907msgid "For extension writers and programs that embed Python"
899908msgstr "针对扩展程序编写人员和嵌入Python 运行的程序"
900909
901- #: ../../library/locale.rst:582
910+ #: ../../library/locale.rst:587
902911msgid ""
903912"Extension modules should never call :func:`setlocale`, except to find out "
904913"what the current locale is. But since the return value can only be used "
@@ -908,7 +917,7 @@ msgstr ""
908917"除了要查询当前区域,扩展模块不应去调用 :func:`setlocale`。但由于返回值只能用于恢复设置,所以也没什么用(也许只能用于确认是否为 "
909918"``C``)。"
910919
911- #: ../../library/locale.rst:587
920+ #: ../../library/locale.rst:592
912921msgid ""
913922"When Python code uses the :mod:`locale` module to change the locale, this "
914923"also affects the embedding application. If the embedding application "
@@ -921,11 +930,11 @@ msgstr ""
921930"运行的应用程序。如果嵌入运行的程序不希望发生这种情况,则应从 :file:`config.c` 文件的内置模块表中删除 :mod:`_locale` "
922931"扩展模块(所有操作均是由它完成的),并确保 :mod:`_locale` 模块不能成为一个共享库。"
923932
924- #: ../../library/locale.rst:598
933+ #: ../../library/locale.rst:603
925934msgid "Access to message catalogs"
926935msgstr "访问消息目录"
927936
928- #: ../../library/locale.rst:606
937+ #: ../../library/locale.rst:611
929938msgid ""
930939"The locale module exposes the C library's gettext interface on systems that "
931940"provide this interface. It consists of the functions :func:`!gettext`, "
@@ -940,7 +949,7 @@ msgstr ""
940949"、:func:`!bindtextdomain` 和 :func:`!bind_textdomain_codeset` 等函数组成。 他们与 "
941950":mod:`gettext` 模块中的同名函数类似,但采用了 C 库二进制格式的消息目录,以及 C 库的搜索算法来查找消息目录。"
942951
943- #: ../../library/locale.rst:613
952+ #: ../../library/locale.rst:618
944953msgid ""
945954"Python applications should normally find no need to invoke these functions, "
946955"and should use :mod:`gettext` instead. A known exception to this rule are "
@@ -953,14 +962,10 @@ msgstr ""
953962"库链接的应用程序,他们在内部调用了 :c:func:`gettext` 或 "
954963":c:func:`dcgettext`。对于这些应用程序,可能有必要绑定文本域,以便库可以准确找到其消息目录。"
955964
956- #: ../../library/locale.rst:19 ../../library/locale.rst:467
965+ #: ../../library/locale.rst:19
957966msgid "module"
958967msgstr "module"
959968
960969#: ../../library/locale.rst:19
961970msgid "_locale"
962971msgstr "_locale"
963-
964- #: ../../library/locale.rst:467
965- msgid "string"
966- msgstr "string"
0 commit comments