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

Skip to content

Commit 7555518

Browse files
[po] auto sync
1 parent 010b441 commit 7555518

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.47%", "updated_at": "2023-10-13T07:56:15Z"}
1+
{"translation": "91.48%", "updated_at": "2023-10-13T08:57:04Z"}

library/gettext.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ msgid ""
633633
"wrapping it in ``_('...')`` --- that is, a call to the function :func:`_ "
634634
"<gettext>`. For example::"
635635
msgstr ""
636+
"为了准备代码以实现 I18N,你需要查看文件中的所有字符串。 任何需要翻译的字符串都应在 ``_('...')`` 中包含它来进行标记 --- "
637+
"即调用函数 :func:`_ <gettext>`。 例如::"
636638

637639
#: ../../library/gettext.rst:439
638640
msgid ""
@@ -745,6 +747,8 @@ msgid ""
745747
"file of your application. This will let all your application-specific files"
746748
" just use ``_('...')`` without having to explicitly install it in each file."
747749
msgstr ""
750+
"如果你正在本地化你的应用程序,你可以将 :func:`!_` 函数全局安装到内置命名空间中,通常位于应用程序的主驱动文件内。 "
751+
"这样将让你的应用程序专属的所有文件都可以使用 ``_('...')`` 而无需在每个文件中显示安装它。"
748752

749753
#: ../../library/gettext.rst:509
750754
msgid ""
@@ -799,13 +803,16 @@ msgid ""
799803
" command). Take care, though if you have a previous definition of :func:`!_`"
800804
" in the local namespace."
801805
msgstr ""
806+
"这样做是因为 :func:`!_` 的虚定义只是简单地原样返回字符串。 并且这个虚定义将临时覆盖内置命名空间中任何的 :func:`!_` 定义(直到 "
807+
":keyword:`del` 命令)。 但是如果之前你在局部命名空间中已有 :func:`!_` 的定义,则需要特别注意。"
802808

803809
#: ../../library/gettext.rst:587
804810
msgid ""
805811
"Note that the second use of :func:`!_` will not identify \"a\" as being "
806812
"translatable to the :program:`gettext` program, because the parameter is not"
807813
" a string literal."
808814
msgstr ""
815+
"请注意在第二次使用 :func:`!_` 时将不会认为“a”可以由 :program:`gettext` 程序去翻译,因为该形参不是字符串字面值。"
809816

810817
#: ../../library/gettext.rst:591
811818
msgid "Another way to handle this is with the following example::"
@@ -822,6 +829,11 @@ msgid ""
822829
" :func:`!N_` here is totally arbitrary; it could have just as easily been "
823830
":func:`!MarkThisStringForTranslation`."
824831
msgstr ""
832+
"在这种情况下,你用函数 :func:`!N_` 来标记可翻译的字符串,它与 :func:`!_` 的任何定义都不会冲突。 "
833+
"不过,你需要让你的消息提取程序寻找用 :func:`!N_` 标记的可翻译字符串。 :program:`xgettext`, "
834+
":program:`pygettext`, ``pybabel extract`` 和 :program:`xpot` 都通过使用 "
835+
":option:`!-k` 命令行开关来支持此功能。 这里选择用 :func:`!N_` 完全是任意的;它也可以简单地改为 "
836+
":func:`!MarkThisStringForTranslation`。"
825837

826838
#: ../../library/gettext.rst:616
827839
msgid "Acknowledgements"

0 commit comments

Comments
 (0)