Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02fdd5e

Browse files
[po] auto sync
1 parent 9991e39 commit 02fdd5e

1 file changed

Lines changed: 55 additions & 20 deletions

File tree

library/locale.po

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# Zombie110year <[email protected]>, 2021
99
# ppcfish <[email protected]>, 2021
1010
# 钢 彭 <[email protected]>, 2021
11-
# Freesand Leo <[email protected]>, 2021
1211
# Dai Xu <[email protected]>, 2021
12+
# Freesand Leo <[email protected]>, 2021
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818
"Report-Msgid-Bugs-To: \n"
1919
"POT-Creation-Date: 2021-06-29 12:56+0000\n"
2020
"PO-Revision-Date: 2021-06-28 01:08+0000\n"
21-
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2021\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
2222
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -89,7 +89,7 @@ msgstr "如果省略 *locale* 或为 ``None``,将返回 *category* 但当前
8989
msgid ""
9090
":func:`setlocale` is not thread-safe on most systems. Applications typically"
9191
" start with a call of ::"
92-
msgstr ""
92+
msgstr ":func:`setlocale` 在大多数系统上都不是线程安全的。应用程序通常会如下调用:"
9393

9494
#: ../../library/locale.rst:52
9595
msgid ""
@@ -664,20 +664,22 @@ msgid ""
664664
"only work for exactly one ``%char`` specifier. For example, ``'%f'`` and "
665665
"``'%.0f'`` are both valid specifiers, but ``'%f KiB'`` is not."
666666
msgstr ""
667+
"请注意,本函数的工作原理与 :meth:`format_string` 类似,但只认一种 ``%char`` 格式符。 比如 ``'%f'`` 和 "
668+
"``'%.0f'`` 都是有效的格式符,但 ``'%f KiB'`` 则不是。"
667669

668670
#: ../../library/locale.rst:397
669671
msgid "For whole format strings, use :func:`format_string`."
670-
msgstr ""
672+
msgstr "若想用到全部的格式化串,请采用 :func:`format_string`。"
671673

672674
#: ../../library/locale.rst:399
673675
msgid "Use :meth:`format_string` instead."
674-
msgstr ""
676+
msgstr "请改用 :meth:`format_string` 。"
675677

676678
#: ../../library/locale.rst:405
677679
msgid ""
678680
"Formats a number *val* according to the current :const:`LC_MONETARY` "
679681
"settings."
680-
msgstr ""
682+
msgstr "根据当前的 :const:`LC_MONETARY` 设置,对数字 *val* 进行格式化。"
681683

682684
#: ../../library/locale.rst:407
683685
msgid ""
@@ -686,67 +688,70 @@ msgid ""
686688
"is done with the value. If *international* is true (which is not the "
687689
"default), the international currency symbol is used."
688690
msgstr ""
691+
"如果 *symbol* 为 True(默认值),则返回的字符串将包含货币符号。如果 *grouping* 为 True(非默认值),则会进行分组。如果 "
692+
"*international* 为 True(非默认值),将采用国际货币符号。"
689693

690694
#: ../../library/locale.rst:412
691695
msgid ""
692696
"Note that this function will not work with the 'C' locale, so you have to "
693697
"set a locale via :func:`setlocale` first."
694-
msgstr ""
698+
msgstr "请注意,本函数对区域 “C” 无效,所以必须先通过 :func:`setlocale` 设置一个区域。"
695699

696700
#: ../../library/locale.rst:418
697701
msgid ""
698702
"Formats a floating point number using the same format as the built-in "
699703
"function ``str(float)``, but takes the decimal point into account."
700-
msgstr ""
704+
msgstr "对浮点数进行格式化,格式要求与内置函数 ``str(float)`` 相同,但会考虑小数点。"
701705

702706
#: ../../library/locale.rst:424
703707
msgid ""
704708
"Converts a string into a normalized number string, following the "
705709
":const:`LC_NUMERIC` settings."
706-
msgstr ""
710+
msgstr "根据 :const:`LC_NUMERIC` 的设置,将字符串转换为标准化的数字字符串。"
707711

708712
#: ../../library/locale.rst:432
709713
msgid ""
710714
"Converts a normalized number string into a formatted string following the "
711715
":const:`LC_NUMERIC` settings."
712-
msgstr ""
716+
msgstr "根据 :const:`LC_NUMERIC` 的设置,将标准化的数字字符串转换为格式化的字符串。"
713717

714718
#: ../../library/locale.rst:440
715719
msgid ""
716720
"Converts a string to a floating point number, following the "
717721
":const:`LC_NUMERIC` settings."
718-
msgstr ""
722+
msgstr "根据 :const:`LC_NUMERIC` 的设置,将字符串转换为浮点数。"
719723

720724
#: ../../library/locale.rst:446
721725
msgid ""
722726
"Converts a string to an integer, following the :const:`LC_NUMERIC` "
723727
"conventions."
724-
msgstr ""
728+
msgstr "按照 :const:`LC_NUMERIC` 的约定,将字符串转换为整数。"
725729

726730
#: ../../library/locale.rst:453
727731
msgid ""
728732
"Locale category for the character type functions. Depending on the settings"
729733
" of this category, the functions of module :mod:`string` dealing with case "
730734
"change their behaviour."
731-
msgstr ""
735+
msgstr "字符型函数的区域类别。根据该类别的设置,模块 :mod:`string` 中处理大小写的函数会改变操作方式。"
732736

733737
#: ../../library/locale.rst:460
734738
msgid ""
735739
"Locale category for sorting strings. The functions :func:`strcoll` and "
736740
":func:`strxfrm` of the :mod:`locale` module are affected."
737741
msgstr ""
742+
"字符串排序会用到的区域类别。 将会影响 :mod:`locale` 模块的 :func:`strcoll` 和 :func:`strxfrm` 函数。"
738743

739744
#: ../../library/locale.rst:466
740745
msgid ""
741746
"Locale category for the formatting of time. The function "
742747
":func:`time.strftime` follows these conventions."
743-
msgstr ""
748+
msgstr "格式化时间时会用到的区域类别。 :func:`time.strftime` 函数会参考这些约定。"
744749

745750
#: ../../library/locale.rst:472
746751
msgid ""
747752
"Locale category for formatting of monetary values. The available options "
748753
"are available from the :func:`localeconv` function."
749-
msgstr ""
754+
msgstr "格式化货币值时会用到的区域类别。可用值可由 :func:`localeconv` 函数获取。"
750755

751756
#: ../../library/locale.rst:478
752757
msgid ""
@@ -755,6 +760,8 @@ msgid ""
755760
"operating system, like those returned by :func:`os.strerror` might be "
756761
"affected by this category."
757762
msgstr ""
763+
"显示消息时用到的区域类别。目前 Python 不支持应用定制的本地化消息。 由操作系统显示的消息,比如由 :func:`os.strerror` "
764+
"返回的消息可能会受到该类别的影响。"
758765

759766
#: ../../library/locale.rst:486
760767
msgid ""
@@ -763,6 +770,8 @@ msgid ""
763770
"affected by that category. All other numeric formatting operations are not "
764771
"affected."
765772
msgstr ""
773+
"格式化数字时用到的区域类别。 :mod:`locale` 模块的 :func:`.format` 、 :func:`atoi` 、 "
774+
":func:`atof` 和 :func:`.str` 函数会受到该类别的影响。其他所有数字格式化操作不受影响。"
766775

767776
#: ../../library/locale.rst:494
768777
msgid ""
@@ -773,20 +782,21 @@ msgid ""
773782
"categories is returned. This string can be later used to restore the "
774783
"settings."
775784
msgstr ""
785+
"混合所有的区域设置。如果在区域改动时使用该标志,将尝试设置所有类别的区域参数。只要有任何一个类别设置失败,就不会修改任何类别。在使用此标志获取区域设置时,会返回一个代表所有类别设置的字符串。之后可用此字符串恢复设置。"
776786

777787
#: ../../library/locale.rst:503
778788
msgid ""
779789
"This is a symbolic constant used for different values returned by "
780790
":func:`localeconv`."
781-
msgstr ""
791+
msgstr "一个符号常量, :func:`localeconv` 返回多个值时将会用到。"
782792

783793
#: ../../library/locale.rst:507
784794
msgid "Example::"
785-
msgstr "示例::"
795+
msgstr "示例"
786796

787797
#: ../../library/locale.rst:520
788798
msgid "Background, details, hints, tips and caveats"
789-
msgstr ""
799+
msgstr "背景、细节、提示、技巧和注意事项"
790800

791801
#: ../../library/locale.rst:522
792802
msgid ""
@@ -795,6 +805,8 @@ msgid ""
795805
"broken in such a way that frequent locale changes may cause core dumps. "
796806
"This makes the locale somewhat painful to use correctly."
797807
msgstr ""
808+
"C "
809+
"语言标准将区域定义为程序级别的属性,修改的代价可能相对较高。此外,有某些实现代码写得不好,频繁改变区域可能会导致内核崩溃。于是要想正确使用区域就变得有些痛苦。"
798810

799811
#: ../../library/locale.rst:527
800812
msgid ""
@@ -805,6 +817,8 @@ msgid ""
805817
"explicitly say that it wants the user's preferred locale settings for other "
806818
"categories by calling ``setlocale(LC_ALL, '')``."
807819
msgstr ""
820+
"当程序第一次启动时,无论用户偏好定义成什么,区域值都是 ``C``。不过有一个例外,就是在启动时修改 :data:`LC_CTYPE` "
821+
"类别,设置当前区域编码为用户偏好编码。程序必须调用 ``setlocale(LC_ALL, '')`` 明确表示用户偏好区域将设为其他类别。"
808822

809823
#: ../../library/locale.rst:534
810824
msgid ""
@@ -813,6 +827,8 @@ msgid ""
813827
"restoring it is almost as bad: it is expensive and affects other threads "
814828
"that happen to run before the settings have been restored."
815829
msgstr ""
830+
"若要从库程序中调用 :func:`setlocale` "
831+
",通常这不是个好主意,因为副作用是会影响整个程序。保存和恢复区域设置也几乎一样糟糕:不仅代价高昂,而且会影响到恢复之前运行的其他线程。"
816832

817833
#: ../../library/locale.rst:539
818834
msgid ""
@@ -824,13 +840,18 @@ msgid ""
824840
"you document that your module is not compatible with non-\\ ``C`` locale "
825841
"settings."
826842
msgstr ""
843+
"如果是要编写通用模块,需要有一种不受区域设置影响的操作方式(比如某些用到 :func:`time.strftime` "
844+
"的格式),将不得不寻找一种不用标准库的方案。更好的办法是说服自己,可以采纳区域设置。只有在万不得已的情况下,才能用文档标注出模块与非 ``C`` "
845+
"区域设置不兼容。"
827846

828847
#: ../../library/locale.rst:546
829848
msgid ""
830849
"The only way to perform numeric operations according to the locale is to use"
831850
" the special functions defined by this module: :func:`atof`, :func:`atoi`, "
832851
":func:`.format`, :func:`.str`."
833852
msgstr ""
853+
"根据区域设置进行数字运算的唯一方法,就是采用本模块定义的函数::func:`atof` 、 :func:`atoi` 、 :func:`.format`"
854+
" 、 :func:`.str`。"
834855

835856
#: ../../library/locale.rst:550
836857
msgid ""
@@ -842,10 +863,12 @@ msgid ""
842863
"converted or considered part of a character class such as letter or "
843864
"whitespace."
844865
msgstr ""
866+
"无法根据区域设置进行大小写转换和字符分类。对于(Unicode)文本字符串来说,这些操作都是根据字符值进行的;而对于字节符串来说,转换和分类则是根据字节的"
867+
" ASCII 值进行的,高位被置位的字节(即非 ASCII 字节)永远不会被转换或被视作字母或空白符之类。"
845868

846869
#: ../../library/locale.rst:561
847870
msgid "For extension writers and programs that embed Python"
848-
msgstr ""
871+
msgstr "针对扩展程序编写人员和嵌入Python 运行的程序"
849872

850873
#: ../../library/locale.rst:563
851874
msgid ""
@@ -854,6 +877,8 @@ msgid ""
854877
"portably to restore it, that is not very useful (except perhaps to find out "
855878
"whether or not the locale is ``C``)."
856879
msgstr ""
880+
"除了要查询当前区域,扩展模块不应去调用 :func:`setlocale`。但由于返回值只能用于恢复设置,所以也没什么用(也许只能用于确认是否为 "
881+
"``C``)。"
857882

858883
#: ../../library/locale.rst:568
859884
msgid ""
@@ -864,10 +889,13 @@ msgid ""
864889
":file:`config.c` file, and make sure that the :mod:`_locale` module is not "
865890
"accessible as a shared library."
866891
msgstr ""
892+
"当 Python 代码利用 :mod:`locale` 模块修改区域设置时,也会影响到嵌入 Python "
893+
"运行的应用程序。如果嵌入运行的程序不希望发生这种情况,则应从 :file:`config.c` 文件的内置模块表中删除 :mod:`_locale` "
894+
"扩展模块(所有操作均是由它完成的),并确保 :mod:`_locale` 模块不能成为一个共享库。"
867895

868896
#: ../../library/locale.rst:579
869897
msgid "Access to message catalogs"
870-
msgstr ""
898+
msgstr "访问消息目录"
871899

872900
#: ../../library/locale.rst:587
873901
msgid ""
@@ -879,6 +907,10 @@ msgid ""
879907
"library's binary format for message catalogs, and the C library's search "
880908
"algorithms for locating message catalogs."
881909
msgstr ""
910+
"在提供 gettext 接口的系统中,locale 模块暴露出了 C 库的接口。它由 :func:`!gettext` "
911+
"、:func:`!dgettext` 、:func:`!dcgettext` 、 :func:`!textdomain` "
912+
"、:func:`!bindtextdomain` 和 :func:`!bind_textdomain_codeset` 等函数组成。 他们与 "
913+
":mod:`gettext` 模块中的同名函数类似,但采用了 C 库二进制格式的消息目录,以及 C 库的搜索算法来查找消息目录。"
882914

883915
#: ../../library/locale.rst:594
884916
msgid ""
@@ -889,3 +921,6 @@ msgid ""
889921
" necessary to bind the text domain, so that the libraries can properly "
890922
"locate their message catalogs."
891923
msgstr ""
924+
"Python 应用程序通常不需要调用这些函数,而应改用 :mod:`gettext`。这条规则的一个已知例外,是与附加 C "
925+
"库链接的应用程序,他们在内部调用了 :c:func:`gettext` 或 "
926+
":c:func:`dcgettext`。对于这些应用程序,可能有必要绑定文本域,以便库可以准确找到其消息目录。"

0 commit comments

Comments
 (0)