From e529a29404e80ce6aeb1f4b0ee518ddd0be94aec Mon Sep 17 00:00:00 2001 From: GeorgeHu Date: Sat, 14 Oct 2023 19:54:09 +0800 Subject: [PATCH] complete translation of plugins. --- docs/locales/zh_CN/LC_MESSAGES/plugins.mo | Bin 425 -> 19717 bytes docs/locales/zh_CN/LC_MESSAGES/plugins.po | 284 ++++++++++++---------- 2 files changed, 158 insertions(+), 126 deletions(-) diff --git a/docs/locales/zh_CN/LC_MESSAGES/plugins.mo b/docs/locales/zh_CN/LC_MESSAGES/plugins.mo index 6debe4e616f1b6e34a88a0612e3e0a00332ee341..2d54f9bab83a66f6adfaea504cb68207721bd760 100644 GIT binary patch literal 19717 zcmeI2d2k%}b?4g~CwAy0PVCr;?Oku%a;%FOQIwp>kYx*^D2WM0a!ER}Qo9BQg9gyz zU zhJMCzhM^~*jnMmk)^S!sJ?N*Q$Dp5pUWa}R`uor_^as$NWxe0~ImanN|M;VhGtd3i zzu-8Ja{T~~#i;h|V5+|2UMToEy+jLI1?kAKCjKWK*%1 z3zg@;24xH9UqShCviy?$hM}m^xeOJ1-h_(&{s4-qoxifr=b@O&`CF*i^(S4WABD>N zPeC!UbC11#$X-7I6?;Dm-2#0cx(WL4p-)3U^*MNlCZUf&SAO1cz6jj{{Sx$L=&wS* z5ABEkKj`m3`|om`i_i~$!ExSzjzd>NTYtrIz6QMvT@I~6?}dJXMcbfXgLXqlp^b9? zZhgK13JcClP#!s_por>x56X}8*ZdMWKZ4U>a_7@f(cem_==nD+ZMFA%prX&0?fr{T zvBNA>?EaVb{@+;oL70^1pMm0{&X=H~|6hm7I^TfG{%Pokpx=gyJ$6EcpAkzhLw}y@ z--U|*{3%rU{IR|M$@_GF7b^FE75Z)balO6&2lwM+-2ZP-i8~)9{s{Wp&~HLJ8dQ(} z0s2#1-=9FA%wGwWd9OZT@2}7}SPA_K_vfH&;rtyG7j^D_P}hIT(&wR5+)qP)4E^Ft z$N5dx{rE$U^Fyv*coTTqefFQI3lKZLGl{eSnU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k#2l~-A_r4% zgacBWh_lf6(W=W?mmS0ITBjqd^c#oHVq9k-_*VgvsmXh2LxKX61DI6Eeq*f z707-d1Fvw7B!yCaHk7&v(4RR{ zxhzGN_K(qVru6)9Gk^X~$^a45^butJaNuBN?5MP@XUS?O`E;c^#PN=t8Zt!;#`%%K z+~5|6CIj#&+}-KS#aVPdQF}kIl8KcYvxGQ|vzkHn=vJbIO4K&uHGExPVItfG(J z(<<>GJsFY{X>;7H+}TrfgMl#@go>jqES;>fD7TCQS#7eP@9iZ;$!Ye$e#DSi)7CgT ztz%ooJzG-(hUS%nMj~M@m}U+_$=nUDWWm8B`h`mM&0XR22&*=@!N`Gd$s z!J**5-pbhvdhji0tS5Ha?^3KLo0hz9wIapQEcik%JTjy*30SStmoxDj)5SwJ$os*k z@AzTM;^C~g>0Q1%xy_V!=Uk7{)uB}Hky*@HkvXTeMF=kf%)vMPY-N0pPQgy<5(<}U z6)`CX)&`MnqP;pASK^`^5&q7yD^J#QBd=yrIlQ_9LnQln{NIP6chjw9>GbiicRP~H zo0E5BOnd(M`tf_u(K#--V~#Cl9eq(_Qn8+wzqFZXL}FdQ4{g!)UGt~ju;HYjvB--euN&00BzYS=fw^FoI33nDT3;8HXGE8a zm#g=Icsccoc)2^R;wbpfz+duhqc`xSkeY2{gpN72z^ER1Xx^B$w;g2#)X z^R`QDT=c=pf&~^w`_dKUV~pB6rA42c{L^PEbtRW*s{VtP_xIU~9I0J9AAPM7(SH, 2023. -# -#, fuzzy + msgid "" msgstr "" "Project-Id-Version: Pelican 4\n" @@ -21,18 +20,19 @@ msgstr "" #: ../../plugins.rst:4 msgid "Plugins" -msgstr "" +msgstr "插件" #: ../../plugins.rst:6 msgid "" "Beginning with version 3.0, Pelican supports plugins. Plugins are a way " "to add features to Pelican without having to directly modify the Pelican " "core." -msgstr "" +msgstr "Pelican从3.0版本开始支持插件。通过插件可以在给Pelican添加功能的同时," +"不直接修改Pelican的核心代码。" #: ../../plugins.rst:10 msgid "How to use plugins" -msgstr "" +msgstr "如何使用插件" #: ../../plugins.rst:12 msgid "" @@ -42,7 +42,9 @@ msgid "" "package ``pelican.plugins`` and can be automatically discovered by " "Pelican. To see a list of Pip-installed namespace plugins that are active" " in your environment, run::" -msgstr "" +msgstr "Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地" +"通过 Pip_ 进行安装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` 下,因此" +"Pelican可以自动发现他们。下面的命令可以用于查看环境中用Pip安装的所有插件:" #: ../../plugins.rst:20 msgid "" @@ -52,7 +54,9 @@ msgid "" "auto-discovery will be disabled. At that point, only the plugins you " "specify will be registered, and you must explicitly list any namespace " "plugins as well." -msgstr "" +msgstr "若将 ``PLUGINS`` 设置项留为默认的 ``None`` ,Pelican会自动发现命名空间中的插件并且" +"将他们全部登记上;若你在 ``PLUGINS`` 设置项中指定了一系列的插件,Pelican就不会去自动发现插件," +"也就是说,你需要显示地指定所有要使用的插件,包括在plugins命名空间中的。" #: ../../plugins.rst:26 msgid "" @@ -60,13 +64,14 @@ msgid "" "ways. The first method specifies plugins as a list of strings. Namespace " "plugins can be specified either by their full names " "(``pelican.plugins.myplugin``) or by their short names (``myplugin``)::" -msgstr "" +msgstr "在使用 ``PLUGINS`` 设置项时,有两种方式。一是用字符串列表指定插件的名称,可以是" +"包含命名空间的完整名称(例如 ``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``):" #: ../../plugins.rst:35 msgid "" "Alternatively, you can import them in your settings file and pass the " "modules::" -msgstr "" +msgstr "二是在设置文件中先import进来,再将import进的模块放在 ``PLUGINS`` 设置项中:" #: ../../plugins.rst:43 msgid "" @@ -74,7 +79,9 @@ msgid "" "with metadata and content) caching may interfere and the changes may not " "be visible. In such cases disable caching with ``LOAD_CONTENT_CACHE = " "False`` or use the ``--ignore-cache`` command-line switch." -msgstr "" +msgstr "在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改" +"可能会不显示。发生这种情况时,就需要通过设置 ``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` " +"命令行选项禁用缓存。" #: ../../plugins.rst:48 msgid "" @@ -82,11 +89,12 @@ msgid "" "paths via the ``PLUGIN_PATHS`` setting. As shown in the following " "example, paths in the ``PLUGIN_PATHS`` list can be absolute or relative " "to the settings file::" -msgstr "" +msgstr "如果插件处于无法直接进行import的路径,可以在 ``PLUGIN_PATHS`` 设置项中指定这些路径。" +"如下例所示, ``PLUGIN_PATHS`` 中的路径可以是绝对的,也可以是相对于设置文件的:" #: ../../plugins.rst:56 msgid "Where to find plugins" -msgstr "" +msgstr "在哪儿可以找到插件呢" #: ../../plugins.rst:57 msgid "" @@ -94,39 +102,45 @@ msgid "" "individual repositories. Legacy plugins are located in the `pelican-" "plugins repository`_ and will be gradually phased out in favor of the " "namespace versions." -msgstr "" +msgstr "新的命名空间插件可以在GitHub的 `pelican-plugins 组织`_ 中找到,每个插件都是一个" +"独立的仓库。而老的插件则可以在GitHub的 `pelican-plugins 仓库`_ 中找到。这些老的插件会逐步" +"淘汰并转移到新的命名空间版本。" #: ../../plugins.rst:65 msgid "" "Please note that while we do our best to review and maintain these " "plugins, they are submitted by the Pelican community and thus may have " "varying levels of support and interoperability." -msgstr "" +msgstr "请注意,尽管我们尽全力审查和维护这些插件,但这些插件是Pelican社区提交的,因此支持性和" +"互操作性水平各不相同。" #: ../../plugins.rst:70 msgid "How to create plugins" -msgstr "" +msgstr "如何创建插件" #: ../../plugins.rst:72 msgid "" "Plugins are based on the concept of signals. Pelican sends signals, and " "plugins subscribe to those signals. The list of available signals is " "documented in a subsequent section." -msgstr "" +msgstr "插件是基于信号这一概念的。Pelican会发送信号,插件则订阅这些信号。可用的信号在下一节" +"会贴出来。" #: ../../plugins.rst:76 msgid "" "The only rule to follow for plugins is to define a ``register`` callable," " in which you map the signals to your plugin logic. Let's take a simple " "example::" -msgstr "" +msgstr "对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``register`` ," +"在 ``register`` 中需要将信号映射到插件逻辑上。下面是一个简单的例子:" #: ../../plugins.rst:93 msgid "" "Signal receivers are weakly-referenced and thus must not be defined " "within your ``register`` callable or they will be garbage-collected " "before the signal is emitted." -msgstr "" +msgstr "信号接收器在Pelican中是弱引用的,因此不能将它定义在可调用的 ``register`` 中," +"否则接收器在信号发送之前就会被回收。" #: ../../plugins.rst:97 msgid "" @@ -134,18 +148,20 @@ msgid "" "guarantee or control in which order the plugins will be executed. This is" " a limitation inherited from Blinker_, the dependency Pelican uses to " "implement signals." -msgstr "" +msgstr "若一个信号连接有多个插件,则不能保证也不能控制这些插件的执行顺序。Pelican使用 " +"Blinker_ 来实现信号,这个缺陷就是从此处继承而来的。" #: ../../plugins.rst:102 msgid "Namespace plugin structure" -msgstr "" +msgstr "命名空间插件的结构" #: ../../plugins.rst:104 msgid "" "Namespace plugins must adhere to a certain structure in order to function" " properly. They need to be installable (i.e. contain ``setup.py`` or " "equivalent) and have a folder structure as follows::" -msgstr "" +msgstr "命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或" +"其他等效文件),并且遵循下述文件夹结构:" #: ../../plugins.rst:117 msgid "" @@ -154,337 +170,346 @@ msgid "" "folders empty besides the listed folders in the above structure and keep " "your plugin related files contained solely in the " "``pelican/plugins/myplugin`` folder to avoid any issues." -msgstr "" +msgstr "非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含" +" ``__init__.py`` 文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关" +"的文件都仅包含在 ``pelican/plugins/myplugin`` 文件夹中,以避免奇奇怪怪的问题。" #: ../../plugins.rst:123 msgid "" "To easily set up the proper structure, a `cookiecutter template for " "plugins`_ is provided. Refer to that project's README for instructions on" " how to use it." -msgstr "" +msgstr "为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ ," +"使用方法参考此项目README文件中的指示即可。" #: ../../plugins.rst:129 msgid "List of signals" -msgstr "" +msgstr "信号列表" #: ../../plugins.rst:131 msgid "Here is the list of currently implemented signals:" -msgstr "" +msgstr "下面是目前已经实现了的信号:" #: ../../plugins.rst:134 msgid "Signal" -msgstr "" +msgstr "信号" #: ../../plugins.rst:134 msgid "Arguments" -msgstr "" +msgstr "参数" #: ../../plugins.rst:134 msgid "Description" -msgstr "" +msgstr "描述" #: ../../plugins.rst:136 msgid "initialized" -msgstr "" +msgstr "initialized" #: ../../plugins.rst:136 ../../plugins.rst:137 ../../plugins.rst:155 #: ../../plugins.rst:158 msgid "pelican object" -msgstr "" +msgstr "pelican对象" #: ../../plugins.rst:137 msgid "finalized" -msgstr "" +msgstr "finalized" #: ../../plugins.rst:137 msgid "" "invoked after all the generators are executed and just before pelican " "exits useful for custom post processing actions, such as: - minifying " "js/css assets. - notify/ping search engines with an updated sitemap." -msgstr "" +msgstr "所有generator执行完成后调用,即pelican退出之前。这对于自定义后处理操作是非常有用的," +"例如:- 简化js/css资源。- 向搜索引擎告知更新后的sitemap。" #: ../../plugins.rst:141 msgid "generator_init" -msgstr "" +msgstr "generator_init" #: ../../plugins.rst:141 msgid "generator" -msgstr "" +msgstr "generator" #: ../../plugins.rst:141 msgid "invoked in the Generator.__init__" -msgstr "" +msgstr "在Generator.__init__中调用" #: ../../plugins.rst:142 msgid "all_generators_finalized" -msgstr "" +msgstr "all_generators_finalized" #: ../../plugins.rst:142 msgid "generators" -msgstr "" +msgstr "generators" #: ../../plugins.rst:142 msgid "invoked after all the generators are executed and before writing output" -msgstr "" +msgstr "在所有generator执行完后,写入输出内容前调用," #: ../../plugins.rst:143 msgid "readers_init" -msgstr "" +msgstr "readers_init" #: ../../plugins.rst:143 msgid "readers" -msgstr "" +msgstr "readers" #: ../../plugins.rst:143 msgid "invoked in the Readers.__init__" -msgstr "" +msgstr "在Readers.__init__中调用" #: ../../plugins.rst:144 ../../plugins.rst:198 msgid "article_generator_context" -msgstr "" +msgstr "article_generator_context" #: ../../plugins.rst:144 msgid "article_generator, metadata" -msgstr "" +msgstr "article_generator, metadata" #: ../../plugins.rst:145 ../../plugins.rst:200 msgid "article_generator_preread" -msgstr "" +msgstr "article_generator_preread" #: ../../plugins.rst:145 ../../plugins.rst:147 ../../plugins.rst:148 #: ../../plugins.rst:151 msgid "article_generator" -msgstr "" +msgstr "article_generator" #: ../../plugins.rst:145 msgid "" "invoked before a article is read in ArticlesGenerator.generate_context; " "use if code needs to do something before every article is parsed" -msgstr "" +msgstr "在ArticlesGenerator.generate_context读取文章之前调用;若代码需要在解析每篇文章前" +"执行某些操作,就可以使用此信号。" #: ../../plugins.rst:147 msgid "article_generator_init" -msgstr "" +msgstr "article_generator_init" #: ../../plugins.rst:147 msgid "invoked in the ArticlesGenerator.__init__" -msgstr "" +msgstr "在ArticlesGenerator.__init__中调用" #: ../../plugins.rst:148 msgid "article_generator_pretaxonomy" -msgstr "" +msgstr "article_generator_pretaxonomy" #: ../../plugins.rst:148 msgid "" "invoked before categories and tags lists are created useful when e.g. " "modifying the list of articles to be generated so that removed articles " "are not leaked in categories or tags" -msgstr "" +msgstr "在创建类别和标签列表之前调用。例如,当需要变更要生成的文章列表时可以使用," +"如此可以避免一些已移除文章在分类或标签列表中泄露。" #: ../../plugins.rst:151 ../../plugins.rst:199 msgid "article_generator_finalized" -msgstr "" +msgstr "article_generator_finalized" #: ../../plugins.rst:151 msgid "invoked at the end of ArticlesGenerator.generate_context" -msgstr "" +msgstr "在ArticlesGenerator.generate_context的最后调用" #: ../../plugins.rst:152 msgid "article_generator_write_article" -msgstr "" +msgstr "article_generator_write_article" #: ../../plugins.rst:152 msgid "article_generator, content" -msgstr "" +msgstr "article_generator, content" #: ../../plugins.rst:152 msgid "invoked before writing each article, the article is passed as content" -msgstr "" +msgstr "在写入每篇文章前调用,文章以内容的形式作为参数传入。" #: ../../plugins.rst:153 msgid "article_writer_finalized" -msgstr "" +msgstr "article_writer_finalized" #: ../../plugins.rst:153 msgid "article_generator, writer" -msgstr "" +msgstr "article_generator, writer" #: ../../plugins.rst:153 msgid "" "invoked after all articles and related pages have been written, but " "before the article generator is closed." -msgstr "" +msgstr "在所有文章及相关联页面写入完成后,在文章generator关闭前调用。" #: ../../plugins.rst:155 msgid "get_generators" -msgstr "" +msgstr "get_generators" #: ../../plugins.rst:155 msgid "" "invoked in Pelican.get_generator_classes, can return a Generator, or " "several generators in a tuple or in a list." -msgstr "" +msgstr "在Pelican.get_generator_classes中调用,可以返回一个Generator,也可以" +"以一个元组或列表的形式返回多个generator" #: ../../plugins.rst:158 msgid "get_writer" -msgstr "" +msgstr "get_writer" #: ../../plugins.rst:158 msgid "invoked in Pelican.get_writer, can return a custom Writer." -msgstr "" +msgstr "在Pelican.get_writer前调用,可以返回一个自定义Writer。" #: ../../plugins.rst:160 ../../plugins.rst:201 msgid "page_generator_context" -msgstr "" +msgstr "page_generator_context" #: ../../plugins.rst:160 msgid "page_generator, metadata" -msgstr "" +msgstr "page_generator, metadata" #: ../../plugins.rst:161 ../../plugins.rst:202 msgid "page_generator_preread" -msgstr "" +msgstr "page_generator_preread" #: ../../plugins.rst:161 ../../plugins.rst:163 ../../plugins.rst:164 msgid "page_generator" -msgstr "" +msgstr "page_generator" #: ../../plugins.rst:161 msgid "" "invoked before a page is read in PageGenerator.generate_context; use if " "code needs to do something before every page is parsed." -msgstr "" +msgstr "在PageGenerator.generate_context读取页面前调用,若代码需要在解析每个页面前" +"执行某些操作,就可以使用此信号。" #: ../../plugins.rst:163 ../../plugins.rst:204 msgid "page_generator_init" -msgstr "" +msgstr "page_generator_init" #: ../../plugins.rst:163 msgid "invoked in the PagesGenerator.__init__" -msgstr "" +msgstr "在PagesGenerator.__init__中调用" #: ../../plugins.rst:164 ../../plugins.rst:203 msgid "page_generator_finalized" -msgstr "" +msgstr "page_generator_finalized" #: ../../plugins.rst:164 msgid "invoked at the end of PagesGenerator.generate_context" -msgstr "" +msgstr "PagesGenerator.generate_context的最后调用" #: ../../plugins.rst:165 msgid "page_generator_write_page" -msgstr "" +msgstr "page_generator_write_page" #: ../../plugins.rst:165 msgid "page_generator, content" -msgstr "" +msgstr "page_generator, content" #: ../../plugins.rst:165 msgid "invoked before writing each page, the page is passed as content" -msgstr "" +msgstr "在写入每个页面前调用,页面以内容形式作为参数传入" #: ../../plugins.rst:166 msgid "page_writer_finalized" -msgstr "" +msgstr "page_writer_finalized" #: ../../plugins.rst:166 msgid "page_generator, writer" -msgstr "" +msgstr "page_generator, writer" #: ../../plugins.rst:166 msgid "" "invoked after all pages have been written, but before the page generator " "is closed." -msgstr "" +msgstr "在所有页面写入完成后,在页面generator关闭前调用。" #: ../../plugins.rst:168 ../../plugins.rst:205 msgid "static_generator_context" -msgstr "" +msgstr "static_generator_context" #: ../../plugins.rst:168 msgid "static_generator, metadata" -msgstr "" +msgstr "static_generator, metadata" #: ../../plugins.rst:169 ../../plugins.rst:206 msgid "static_generator_preread" -msgstr "" +msgstr "static_generator_preread" #: ../../plugins.rst:169 ../../plugins.rst:172 ../../plugins.rst:173 msgid "static_generator" -msgstr "" +msgstr "static_generator" #: ../../plugins.rst:169 msgid "" "invoked before a static file is read in StaticGenerator.generate_context;" " use if code needs to do something before every static file is added to " "the staticfiles list." -msgstr "" +msgstr "在StaticGenerator.generate_context读取静态文件前调用,若代码需要在每个静态文件加入" +"静态文件列表前进行一些修改,就可以使用此信号。" #: ../../plugins.rst:172 msgid "static_generator_init" -msgstr "" +msgstr "static_generator_init" #: ../../plugins.rst:172 msgid "invoked in the StaticGenerator.__init__" -msgstr "" +msgstr "在StaticGenerator.__init__中调用" #: ../../plugins.rst:173 msgid "static_generator_finalized" -msgstr "" +msgstr "static_generator_finalized" #: ../../plugins.rst:173 msgid "invoked at the end of StaticGenerator.generate_context" -msgstr "" +msgstr "在StaticGenerator.generate_context的最后调用" #: ../../plugins.rst:174 msgid "content_object_init" -msgstr "" +msgstr "content_object_init" #: ../../plugins.rst:174 msgid "content_object" -msgstr "" +msgstr "content_object" #: ../../plugins.rst:174 msgid "invoked at the end of Content.__init__" -msgstr "" +msgstr "在Content.__init__的最后调用" #: ../../plugins.rst:175 msgid "content_written" -msgstr "" +msgstr "content_written" #: ../../plugins.rst:175 msgid "path, context" -msgstr "" +msgstr "path, context" #: ../../plugins.rst:175 msgid "invoked each time a content file is written." -msgstr "" +msgstr "每一次内容文件写入后调用。" #: ../../plugins.rst:176 msgid "feed_generated" -msgstr "" +msgstr "feed_generated" #: ../../plugins.rst:176 msgid "context, feed" -msgstr "" +msgstr "context, feed" #: ../../plugins.rst:176 msgid "" "invoked each time a feed gets generated. Can be used to modify a feed " "object before it gets written." -msgstr "" +msgstr "每个feed生成前调用。可以用于在feed写入前修改之。" #: ../../plugins.rst:178 msgid "feed_written" -msgstr "" +msgstr "feed_written" #: ../../plugins.rst:178 msgid "path, context, feed" -msgstr "" +msgstr "path, context, feed" #: ../../plugins.rst:178 msgid "invoked each time a feed file is written." -msgstr "" +msgstr "每一个feed文件写入后调用。" #: ../../plugins.rst:183 msgid "" @@ -494,71 +519,74 @@ msgid "" "(see `pelican-plugins bug #314`_). Use ``_summary`` and ``_content`` " "properties instead, or, alternatively, run your plugin at a later stage " "(e.g. ``all_generators_finalized``)." -msgstr "" +msgstr "请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或" +" ``content`` 属性,这可能导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接" +"(请参阅 `pelican-plugins bug #314`_ )。请改用 ``_summary`` 和 ``_content`` 属性," +"或者就在后续阶段再运行插件(例如 ``all_generators_finalized`` 时)。" #: ../../plugins.rst:192 msgid "" "After Pelican 3.2, signal names were standardized. Older plugins may " "need to be updated to use the new names:" -msgstr "" +msgstr "Pelican3.2之后,信号名都进行了标准化,较老的插件可能需要进行更新:" #: ../../plugins.rst:196 msgid "Old name" -msgstr "" +msgstr "旧名称" #: ../../plugins.rst:196 msgid "New name" -msgstr "" +msgstr "新名称" #: ../../plugins.rst:198 msgid "article_generate_context" -msgstr "" +msgstr "article_generate_context" #: ../../plugins.rst:199 msgid "article_generate_finalized" -msgstr "" +msgstr "article_generate_finalized" #: ../../plugins.rst:200 msgid "article_generate_preread" -msgstr "" +msgstr "article_generate_preread" #: ../../plugins.rst:201 msgid "pages_generate_context" -msgstr "" +msgstr "pages_generate_context" #: ../../plugins.rst:202 msgid "pages_generate_preread" -msgstr "" +msgstr "pages_generate_preread" #: ../../plugins.rst:203 msgid "pages_generator_finalized" -msgstr "" +msgstr "pages_generator_finalized" #: ../../plugins.rst:204 msgid "pages_generator_init" -msgstr "" +msgstr "pages_generator_init" #: ../../plugins.rst:205 msgid "static_generate_context" -msgstr "" +msgstr "static_generate_context" #: ../../plugins.rst:206 msgid "static_generate_preread" -msgstr "" +msgstr "static_generate_preread" #: ../../plugins.rst:210 msgid "Recipes" -msgstr "" +msgstr "具体使用方法举例" #: ../../plugins.rst:212 msgid "" "We eventually realised some of the recipes to create plugins would be " "best shared in the documentation somewhere, so here they are!" -msgstr "" +msgstr "下面分享了一些创建插件的具体方法,请享用!" #: ../../plugins.rst:216 msgid "How to create a new reader" -msgstr "" +msgstr "如何创建一个新的reader" #: ../../plugins.rst:218 msgid "" @@ -566,32 +594,35 @@ msgid "" "format. While it might make sense to add this feature in Pelican core, we" " wisely chose to avoid this situation and instead have the different " "readers defined via plugins." -msgstr "" +msgstr "你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能,但" +"我们选择避免将此功能放在核心中,而是通过插件实现不同的reader。" #: ../../plugins.rst:223 msgid "" "The rationale behind this choice is mainly that plugins are really easy " "to write and don't slow down Pelican itself when they're not active." -msgstr "" +msgstr "做出这个决定主要是因为实现这样的格式支持插件非常容易,而且这样在不需要此功能时" +"也不会影响Pelican自身的速度。" #: ../../plugins.rst:226 msgid "No more talking — here is an example::" -msgstr "" +msgstr "多说无益,下面就是例子:" #: ../../plugins.rst:262 msgid "Adding a new generator" -msgstr "" +msgstr "添加新的generator" #: ../../plugins.rst:264 msgid "" "Adding a new generator is also really easy. You might want to have a look" " at :doc:`internals` for more information on how to create your own " "generator." -msgstr "" +msgstr "添加一个generator也非常简单,你可能会想要看一看 :doc:`internals` ,其中" +"有关于如何创建generator的内容。" #: ../../plugins.rst:278 msgid "Adding a new writer" -msgstr "" +msgstr "添加新的writer" #: ../../plugins.rst:280 msgid "" @@ -599,25 +630,26 @@ msgid "" " or change how the existing formats are written to disk. Note that only " "one writer will be active at a time, so be sure to either subclass the " "built-in Writer, or completely re-implement it." -msgstr "" +msgstr "添加writer可以让你将其他文件格式输出到磁盘,或者可以改变现有格式写入磁盘的方式。" +"请注意,一次只能启用一个writer,因此请确保继承了内置的Writer,并且完全重新实现之。" #: ../../plugins.rst:285 msgid "Here is a basic example of how to set up your own writer::" -msgstr "" +msgstr "下面是启用你的自定义writer的一个基本例子:" #: ../../plugins.rst:305 msgid "Using Plugins to Inject Content" -msgstr "" +msgstr "使用插件添加内容" #: ../../plugins.rst:307 msgid "" "You can programmatically inject articles or pages using plugins. This can" " be useful if you plan to fetch articles from an API, for example." -msgstr "" +msgstr "可以通过插件以可编程的方式添加文章或页面。如果你打算从某些API获取文章,这就会很有用。" #: ../../plugins.rst:310 msgid "" "Following is a simple example of how one can build a plugin that injects " "a custom article, using the ``article_generator_pretaxonomy`` signal::" -msgstr "" - +msgstr "下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号" +"构建一个添加自定义文章的插件:"