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

Skip to content

Commit e3a5ecf

Browse files
[po] auto sync
1 parent ea94791 commit e3a5ecf

1 file changed

Lines changed: 48 additions & 17 deletions

File tree

library/locale.po

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# Zombie110year <[email protected]>, 2019
1010
# 钢 彭 <[email protected]>, 2019
1111
# ppcfish <[email protected]>, 2019
12-
# Freesand Leo <[email protected]>, 2021
1312
# Dai Xu <[email protected]>, 2021
13+
# Freesand Leo <[email protected]>, 2021
1414
#
1515
#, fuzzy
1616
msgid ""
@@ -19,7 +19,7 @@ msgstr ""
1919
"Report-Msgid-Bugs-To: \n"
2020
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
2121
"PO-Revision-Date: 2017-02-16 23:16+0000\n"
22-
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2021\n"
22+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
2323
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2424
"MIME-Version: 1.0\n"
2525
"Content-Type: text/plain; charset=UTF-8\n"
@@ -90,7 +90,7 @@ msgstr "如果省略 *locale* 或为 ``None``,将返回 *category* 但当前
9090
msgid ""
9191
":func:`setlocale` is not thread-safe on most systems. Applications typically"
9292
" start with a call of ::"
93-
msgstr ""
93+
msgstr ":func:`setlocale` 在大多数系统上都不是线程安全的。应用程序通常会如下调用:"
9494

9595
#: ../../library/locale.rst:52
9696
msgid ""
@@ -660,13 +660,13 @@ msgstr "若想用到全部的格式化串,请采用 :func:`format_string`。"
660660

661661
#: ../../library/locale.rst:395
662662
msgid "Use :meth:`format_string` instead."
663-
msgstr ""
663+
msgstr "请改用 :meth:`format_string` 。"
664664

665665
#: ../../library/locale.rst:401
666666
msgid ""
667667
"Formats a number *val* according to the current :const:`LC_MONETARY` "
668668
"settings."
669-
msgstr ""
669+
msgstr "根据当前的 :const:`LC_MONETARY` 设置,对数字 *val* 进行格式化。"
670670

671671
#: ../../library/locale.rst:403
672672
msgid ""
@@ -675,61 +675,64 @@ msgid ""
675675
"is done with the value. If *international* is true (which is not the "
676676
"default), the international currency symbol is used."
677677
msgstr ""
678+
"如果 *symbol* 为 True(默认值),则返回的字符串将包含货币符号。如果 *grouping* 为 True(非默认值),则会进行分组。如果 "
679+
"*international* 为 True(非默认值),将采用国际货币符号。"
678680

679681
#: ../../library/locale.rst:408
680682
msgid ""
681683
"Note that this function will not work with the 'C' locale, so you have to "
682684
"set a locale via :func:`setlocale` first."
683-
msgstr ""
685+
msgstr "请注意,本函数对区域 “C” 无效,所以必须先通过 :func:`setlocale` 设置一个区域。"
684686

685687
#: ../../library/locale.rst:414
686688
msgid ""
687689
"Formats a floating point number using the same format as the built-in "
688690
"function ``str(float)``, but takes the decimal point into account."
689-
msgstr ""
691+
msgstr "对浮点数进行格式化,格式要求与内置函数 ``str(float)`` 相同,但会考虑小数点。"
690692

691693
#: ../../library/locale.rst:420
692694
msgid ""
693695
"Converts a string into a normalized number string, following the "
694696
":const:`LC_NUMERIC` settings."
695-
msgstr ""
697+
msgstr "根据 :const:`LC_NUMERIC` 的设置,将字符串转换为格式化后的数字字符串。"
696698

697699
#: ../../library/locale.rst:428
698700
msgid ""
699701
"Converts a string to a floating point number, following the "
700702
":const:`LC_NUMERIC` settings."
701-
msgstr ""
703+
msgstr "根据 :const:`LC_NUMERIC` 的设置,将字符串转换为浮点数。"
702704

703705
#: ../../library/locale.rst:434
704706
msgid ""
705707
"Converts a string to an integer, following the :const:`LC_NUMERIC` "
706708
"conventions."
707-
msgstr ""
709+
msgstr "按照 :const:`LC_NUMERIC` 的约定,将字符串转换为整数。"
708710

709711
#: ../../library/locale.rst:441
710712
msgid ""
711713
"Locale category for the character type functions. Depending on the settings"
712714
" of this category, the functions of module :mod:`string` dealing with case "
713715
"change their behaviour."
714-
msgstr ""
716+
msgstr "字符型函数的区域类别。根据该类别的设置,模块 :mod:`string` 中处理大小写的函数会改变操作方式。"
715717

716718
#: ../../library/locale.rst:448
717719
msgid ""
718720
"Locale category for sorting strings. The functions :func:`strcoll` and "
719721
":func:`strxfrm` of the :mod:`locale` module are affected."
720722
msgstr ""
723+
"字符串排序会用到的区域类别。 将会影响 :mod:`locale` 模块的 :func:`strcoll` 和 :func:`strxfrm` 函数。"
721724

722725
#: ../../library/locale.rst:454
723726
msgid ""
724727
"Locale category for the formatting of time. The function "
725728
":func:`time.strftime` follows these conventions."
726-
msgstr ""
729+
msgstr "格式化时间时会用到的区域类别。 :func:`time.strftime` 函数会参考这些约定。"
727730

728731
#: ../../library/locale.rst:460
729732
msgid ""
730733
"Locale category for formatting of monetary values. The available options "
731734
"are available from the :func:`localeconv` function."
732-
msgstr ""
735+
msgstr "格式化货币值时会用到的区域类别。可用值可由 :func:`localeconv` 函数获取。"
733736

734737
#: ../../library/locale.rst:466
735738
msgid ""
@@ -738,6 +741,8 @@ msgid ""
738741
"operating system, like those returned by :func:`os.strerror` might be "
739742
"affected by this category."
740743
msgstr ""
744+
"显示消息时用到的区域类别。目前 Python 不支持应用定制的本地化消息。 由操作系统显示的消息,比如由 :func:`os.strerror` "
745+
"返回的消息可能会受到该类别的影响。"
741746

742747
#: ../../library/locale.rst:474
743748
msgid ""
@@ -746,6 +751,8 @@ msgid ""
746751
"affected by that category. All other numeric formatting operations are not "
747752
"affected."
748753
msgstr ""
754+
"格式化数字时用到的区域类别。 :mod:`locale` 模块的 :func:`.format` 、 :func:`atoi` 、 "
755+
":func:`atof` 和 :func:`.str` 函数会受到该类别的影响。其他所有数字格式化操作不受影响。"
749756

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

760768
#: ../../library/locale.rst:491
761769
msgid ""
762770
"This is a symbolic constant used for different values returned by "
763771
":func:`localeconv`."
764-
msgstr ""
772+
msgstr "一个符号常量, :func:`localeconv` 返回多个值时将会用到。"
765773

766774
#: ../../library/locale.rst:495
767775
msgid "Example::"
768776
msgstr "示例::"
769777

770778
#: ../../library/locale.rst:508
771779
msgid "Background, details, hints, tips and caveats"
772-
msgstr ""
780+
msgstr "背景、细节、提示、技巧和注意事项"
773781

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

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

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

811826
#: ../../library/locale.rst:534
812827
msgid ""
813828
"The only way to perform numeric operations according to the locale is to use"
814829
" the special functions defined by this module: :func:`atof`, :func:`atoi`, "
815830
":func:`.format`, :func:`.str`."
816831
msgstr ""
832+
"根据区域设置进行数字运算的唯一方法,就是采用本模块定义的函数::func:`atof` 、 :func:`atoi` 、 :func:`.format`"
833+
" 、 :func:`.str`。"
817834

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

829848
#: ../../library/locale.rst:549
830849
msgid "For extension writers and programs that embed Python"
831-
msgstr ""
850+
msgstr "针对扩展程序编写人员和嵌入Python 运行的程序"
832851

833852
#: ../../library/locale.rst:551
834853
msgid ""
@@ -837,6 +856,8 @@ msgid ""
837856
"portably to restore it, that is not very useful (except perhaps to find out "
838857
"whether or not the locale is ``C``)."
839858
msgstr ""
859+
"除了要查询当前区域,扩展模块不应去调用 :func:`setlocale`。但由于返回值只能用于恢复设置,所以也没什么用(也许只能用于确认是否为 "
860+
"``C``)。"
840861

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

851875
#: ../../library/locale.rst:567
852876
msgid "Access to message catalogs"
853-
msgstr ""
877+
msgstr "访问信息目录"
854878

855879
#: ../../library/locale.rst:575
856880
msgid ""
@@ -862,6 +886,10 @@ msgid ""
862886
"library's binary format for message catalogs, and the C library's search "
863887
"algorithms for locating message catalogs."
864888
msgstr ""
889+
"在提供 gettext 接口的系统中,locale 模块暴露出了 C 库的接口。它由 :func:`!gettext` "
890+
"、:func:`!dgettext` 、:func:`!dcgettext` 、 :func:`!textdomain` "
891+
"、:func:`!bindtextdomain` 和 :func:`!bind_textdomain_codeset` 等函数组成。 他们与 "
892+
":mod:`gettext` 模块中的同名函数类似,但采用了 C 库二进制格式的消息目录,以及 C 库的搜索算法来查找消息目录。"
865893

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

0 commit comments

Comments
 (0)