diff --git a/docs/locale/zh_CN/LC_MESSAGES/content.po b/docs/locale/zh_CN/LC_MESSAGES/content.po new file mode 100644 index 00000000..435c6039 --- /dev/null +++ b/docs/locale/zh_CN/LC_MESSAGES/content.po @@ -0,0 +1,1127 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010–2024 +# This file is distributed under the same license as the PELICAN package. +# FIRST AUTHOR , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: PELICAN 4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-24 19:06+0800\n" +"PO-Revision-Date: 2024-06-25 19:00+0800\n" +"Last-Translator: GeorgeHu \n" +"Language: zh_CN\n" +"Language-Team: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.15.0\n" + +#: ../../content.rst:2 8b86ba5cdc904ea88a27f880dc2b1913 +msgid "Writing content" +msgstr "创作内容" + +#: ../../content.rst:5 3c677db28e2e496fb3fdecf92ea495d4 +msgid "Articles and pages" +msgstr "文章和页面" + +#: ../../content.rst:7 ee8948f91474442194b0ec7436c5ab12 +msgid "" +"Pelican considers \"articles\" to be chronological content, such as posts" +" on a blog, and thus associated with a date." +msgstr "" +"Pelican将“文章”(article)视为有时间顺序的内容," +"例如博客上的博文就是文章。" + +#: ../../content.rst:10 02e0c50959304a1d85a05ca8b5f293ee +msgid "" +"The idea behind \"pages\" is that they are usually not temporal in nature" +" and are used for content that does not change very often (e.g., " +"\"About\" or \"Contact\" pages)." +msgstr "" +"“页面”(page)指的是不经常改变的内容,例如“关于”“联系我们”这样的。" + +#: ../../content.rst:14 1dbecd8f54584ce484414532d39a32c5 +msgid "You can find sample content in the repository at ``samples/content/``." +msgstr "在代码仓库的 ``samples/content/`` 文件夹下有一些内容示例供您查看。" +"(译者注:原文档中还有post与content的说法,一般既指代文章又指代页面,后文统一" +"将其翻译为推文)" + +#: ../../content.rst:19 f79ba96c49ec4a9c9d85efb9aa097cc9 +msgid "File metadata" +msgstr "文件元数据" + +#: ../../content.rst:21 bf3f939a8cdb41748a198c9945c94c59 +msgid "" +"Pelican tries to be smart enough to get the information it needs from the" +" file system (for instance, about the category of your articles), but " +"some information you need to provide in the form of metadata inside your " +"files." +msgstr "" +"Pelican可以从文件系统中自动地获取一些信息(例如文章的分类),但是有些信息" +"需要您以元数据的形式在文件中提供。" + +#: ../../content.rst:25 d3a297ea42cf41cca09407ae15b51bf5 +msgid "" +"If you are writing your content in reStructuredText format, you can " +"provide this metadata in text files via the following syntax (give your " +"file the ``.rst`` extension)::" +msgstr "" +"如果您用reStructuredText的格式进行内容创作,您可以按照下面的语法在文本文件中" +"提供元数据(请给文本文件加上 ``.rst`` 后缀):" + +#: ../../content.rst:40 de682bb831e145d39a84e479448daaa2 +msgid "" +"Author and tag lists may be semicolon-separated instead, which allows you" +" to write authors and tags containing commas::" +msgstr "" +"如果有多个作者或多个文章标签,需要将他们以分号分隔,这样就可以在作者或标签中使用逗号了:" + +#: ../../content.rst:46 9c78f09333764e11bf034628cefc9f9e +msgid "" +"Pelican implements an extension to reStructuredText to enable support for" +" the ``abbr`` HTML tag. To use it, write something like this in your " +"post::" +msgstr "" +"Pelican在reStructuredText上实现了 ``abbr`` HTML标签的使用支持。" +"在正文部分按照下面的形式书写即可。" + +#: ../../content.rst:51 1306d5a5e7774eafbfcaef3cedc846eb +msgid "" +"You can also use Markdown syntax (with a file ending in ``.md``, " +"``.markdown``, ``.mkd``, or ``.mdown``). Markdown generation requires " +"that you first explicitly install the Python-Markdown_ package, which can" +" be done via ``pip install Markdown``." +msgstr "" +"Pelican同时也支持Markdown语法(文件的扩展名需要为 ``.md`` 、 ``.markdown``、 " +"``.mkd`` 或 ``.mdown`` )要让Pelican进行Markdown的生成,需要先通过 " +"``pip install Markdown`` 安装 Python-Markdown_ 。" + +#: ../../content.rst:56 d0076f5574114bf1b5a3b5313983674e +msgid "" +"Pelican also supports `Markdown Extensions`_, which might have to be " +"installed separately if they are not included in the default ``Markdown``" +" package and can be configured and loaded via the ``MARKDOWN`` setting." +msgstr "" +"Pelican同样支持 `Markdown扩展`_ ,可以是 ``Markdown`` 包自带的扩展,也可以是" +"另外安装的,可以通过 ``MARKDOWN`` 配置项管理这些扩展。" + +#: ../../content.rst:60 bdced0be285645878ebe3688ef8a9b28 +msgid "Metadata syntax for Markdown posts should follow this pattern::" +msgstr "Markdown中的元数据语法需要按照下面的格式书写:" + +#: ../../content.rst:73 6b519f43a3c14f6d806f9b0c1924583d +msgid "" +"You can also have your own metadata keys (so long as they don't conflict " +"with reserved metadata keywords) for use in your templates. The following" +" table contains a list of reserved metadata keywords:" +msgstr "" +"您也可以定义自己的元数据类型(只要和保留的元数据关键字不冲突),这些自定义的" +"元数据关键字可以用在自定义的模板中。下面的列出了所有保留的元数据关键字。" + +#: ../../content.rst:78 a6152aab476f4d4987e63bef224fcc68 +msgid "Metadata" +msgstr "元数据类型" + +#: ../../content.rst:78 ../../content.rst:545 3c6a45e9fb4547e9997e3431369212ee +#: c0deff608df5433e8df6b88d80a8da9a +msgid "Description" +msgstr "描述" + +#: ../../content.rst:80 18a67d2c3edc45528c9638ac6ee79a9e +msgid "``title``" +msgstr "``title``" + +#: ../../content.rst:80 c63a4c828040455984c7817d280e1b38 +msgid "Title of the article or page" +msgstr "文章或页面的标题" + +#: ../../content.rst:81 642d8594b37f474dbb5aadfe603f4e95 +msgid "``date``" +msgstr "``date``" + +#: ../../content.rst:81 e9ea1acea5f94220b65a01d9d862ed1e +msgid "Publication date (e.g., ``YYYY-MM-DD HH:SS``)" +msgstr "发布日期(需要以 ``YYYY-MM-DD HH:SS`` 的格式)" + +#: ../../content.rst:82 b17de07284b34e0c9790f776cad9d23b +msgid "``modified``" +msgstr "``modified``" + +#: ../../content.rst:82 6c3efadebfad493cb8545548b4156954 +msgid "Modification date (e.g., ``YYYY-MM-DD HH:SS``)" +msgstr "最后修改日期(需要以 ``YYYY-MM-DD HH:SS`` 的格式)" + +#: ../../content.rst:83 00a8fbd7d72f43ac93adb7331308b020 +msgid "``tags``" +msgstr "``tags``" + +#: ../../content.rst:83 d2438478b5c848d78d1252d4b7944d06 +msgid "Content tags, separated by commas" +msgstr "推文标签,以逗号分隔" + +#: ../../content.rst:84 6f978aace5c745b3b85a90f189652ad0 +msgid "``keywords``" +msgstr "``keywords``" + +#: ../../content.rst:84 6ad371599e044384a3181a01daf9310e +msgid "Content keywords, separated by commas (HTML content only)" +msgstr "推文关键字,以逗号分隔(只能在HTML内容中使用)" + +#: ../../content.rst:85 03b0ecde96f74b8c837626397eb88519 +msgid "``category``" +msgstr "``category``" + +#: ../../content.rst:85 3c8388d6ff954900820868021ae5cde6 +msgid "Content category (one only — not multiple)" +msgstr "推文分类(只能归属到一个分类中,不支持多个)" + +#: ../../content.rst:86 978a387b22d84947b93eabb85d2a3d50 +msgid "``slug``" +msgstr "``slug``" + +#: ../../content.rst:86 8dd4ced5acfb483b82b2247d50964bd6 +msgid "Identifier used in URLs and translations" +msgstr "URL和翻译的唯一标识符" + +#: ../../content.rst:87 e566ec6f1b854d2fa791abafdab52963 +msgid "``author``" +msgstr "``author``" + +#: ../../content.rst:87 9b04524f715a49fb99cf4595e397d261 +msgid "Content author, when there is only one" +msgstr "当只有一个作者时可以使用这个元数据" + +#: ../../content.rst:88 d5c08548bd604525993543bdebc32bda +msgid "``authors``" +msgstr "``authors``" + +#: ../../content.rst:88 5dcbbf96b15a458abe484f8ecad551c4 +msgid "Content authors, when there are multiple" +msgstr "当有多个作者时需要使用这个元数据" + +#: ../../content.rst:89 e0a9f64122ed45e283aa0c6f4bed8295 +msgid "``summary``" +msgstr "``summary``" + +#: ../../content.rst:89 9fe022c678944f9dbc6b486750871374 +msgid "Brief description of content for index pages" +msgstr "简短的推文概要,会显示在首页上" + +#: ../../content.rst:90 f05a96202bf947a896f68bc45d063375 +msgid "``lang``" +msgstr "``lang``" + +#: ../../content.rst:90 8c863c0f6eac412693c6b0972a8f31d9 +msgid "Content language ID (``en``, ``fr``, etc.)" +msgstr "推文所用语言的ID(例如 ``en`` 、 ``fr`` 、 ``zh-cn`` 等)" + +#: ../../content.rst:91 165932172c744f4a8ecfd82bf467d96a +msgid "``translation``" +msgstr "``translation``" + +#: ../../content.rst:91 4b210cc6659c4725abb10a7ee0f920f1 +msgid "If content is a translation of another (``true`` or ``false``)" +msgstr "手动指定当前内容是否是某个翻译版本(该元数据的值只能是 ``true`` 或 ``false``)" + +#: ../../content.rst:92 4ffe05aabbb54f98b4f4fa4e6b46a57f +msgid "``status``" +msgstr "``status``" + +#: ../../content.rst:92 5ff47f8a85054c49ba96e0b3831ddd5b +msgid "Content status: ``draft``, ``hidden``, or ``published``" +msgstr "推文的状态: ``draft``、 ``hidden`` 或 ``published`` " + +#: ../../content.rst:93 6cd409724628439099c67b3ed3832f88 +msgid "``template``" +msgstr "``template``" + +#: ../../content.rst:93 e6b12b8a80eb4970b772abb6efbddf79 +msgid "Name of template to use to generate content (without extension)" +msgstr "用于指定要使用的生成模板,只需要写模板的名字,不需要模板文件的后缀名" + +#: ../../content.rst:94 485897ad32c040ff8d1dc71b901a6088 +msgid "``save_as``" +msgstr "``save_as``" + +#: ../../content.rst:94 4bccea6cb0bb47ecb366513e568b09f3 +msgid "Save content to this relative file path" +msgstr "将内容保存到指定的相对文件路径" + +#: ../../content.rst:95 9ec83bcf720c4df3b1e359e943dbd657 +msgid "``url``" +msgstr "``url``" + +#: ../../content.rst:95 26943de61cbc4a6a9738ae90b2718e89 +msgid "URL to use for this article/page" +msgstr "指定本篇文章或页面要使用的URL" + +#: ../../content.rst:98 35aa406d097544ccaa3709a9fad102ab +msgid "" +"Readers for additional formats (such as AsciiDoc_) are available via " +"plugins, which you can find via the `Pelican Plugins`_ collection as well" +" as the legacy `pelican-plugins`_ repository." +msgstr "" +"对其他格式的支持(例如 AsciiDoc_ )可以通过插件实现,在 `Pelican插件`_ 集中可以" +"查看所有插件。当然,在老的 `pelican-plugins`_ 仓库中也可以查看。" + +#: ../../content.rst:102 0a452e5e3f29401d8f5a21474628fd39 +msgid "" +"Pelican can also process HTML files ending in ``.html`` and ``.htm``. " +"Pelican interprets the HTML in a very straightforward manner, reading " +"metadata from ``meta`` tags, the title from the ``title`` tag, and the " +"body out from the ``body`` tag::" +msgstr "" +"Pelican还能处理后缀名为 ``.html`` 和 ``.htm`` 的HTML文件" +"Pelican在解释转换HTML文件时用的方法非常直接,会从 ``meta`` HTML标签中获取" +"元数据信息,从 ``title`` HTML标签中获取标题,从 ``body`` 标签中获取文章的正文内容:" + +#: ../../content.rst:122 ff424c01135f4e91afee4f561d3a7e97 +msgid "" +"With HTML, there is one simple exception to the standard metadata: tags " +"can be specified either via the ``tags`` metadata, as is standard in " +"Pelican, or via the ``keywords`` metadata, as is standard in HTML. The " +"two can be used interchangeably." +msgstr "" +"当使用HTML文件时,上述的众多元数据中有一个比较特殊的存在——tags。这个元数据" +"在HTML文档中有两种方式可以指定,一种是Pelican中定义的 ``tags`` (上面的" +"例子中用的就是这种);另一种是使用HTML中定义的 ``keywords`` " +"(即将name属性的“tags”换成“keywords”)。" + +#: ../../content.rst:127 eabc8fb8a1704b8099b35c66d8d51ff9 +msgid "" +"Note that, aside from the title, none of this content metadata is " +"mandatory: if the date is not specified and ``DEFAULT_DATE`` is set to " +"``'fs'``, Pelican will rely on the file's \"mtime\" timestamp, and the " +"category can be determined by the directory in which the file resides. " +"For example, a file located at ``python/foobar/myfoobar.rst`` will have a" +" category of ``foobar``. If you would like to organize your files in " +"other ways where the name of the subfolder would not be a good category " +"name, you can set the setting ``USE_FOLDER_AS_CATEGORY`` to ``False``. " +"When parsing dates given in the page metadata, Pelican supports the W3C's" +" `suggested subset ISO 8601`__." +msgstr "" +"需要注意的是,除了title外,其他所有元数据都是可以缺省的。若未指定日期元数据" +"并且将 ``DEFAULT_DATE`` 设为了 ``'fs'``,Pelican就会从文件的 “mtime” 时间戳" +"中获取日期信息;文件所在目录的名称会被作为category。例如 " +"``python/foobar/myfoobar.rst`` 的category元数据值就会被设为 " +"``foobar`` 。如果您不希望子目录的名称成为category的值,则需要在设置中" +"将 ``USE_FOLDER_AS_CATEGORY`` 设为 ``False`` 。进行日期元数据的解析时," +"Pelican支持W3C的 `suggested subset ISO 8601`__ 标准。" + +#: ../../content.rst:137 8b2d127007d048aebc9e48a5482c83a2 +msgid "" +"So the title is the only required metadata. If that bothers you, worry " +"not. Instead of manually specifying a title in your metadata each time, " +"you can use the source content file name as the title. For example, a " +"Markdown source file named ``Publishing via Pelican.md`` would " +"automatically be assigned a title of *Publishing via Pelican*. If you " +"would prefer this behavior, add the following line to your settings " +"file::" +msgstr "" +"总而言之,标题是唯一必须指定的元数据。如果您甚至懒得写标题,也不用担心,Pelican会" +"自动将文件名作为内容的标题。例如,Markdown源文件 ``Publishing via Pelican.md`` " +"的标题会自动设为 *Publishing via Pelican*。如果您希望启用这个特性," +"请在设置文件中添加下面这么一行:" + +#: ../../content.rst:148 0ae4c44da0b84246854460e8b1b5be0a +msgid "" +"When experimenting with different settings (especially the metadata ones)" +" 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 "" +"在您尝试不同的设置时(特别是在设置元数据时),缓存可能会对您造成干扰,导致设置更改" +"不起作用。若您遇到了这种问题,可以在配置文件中加上 ``LOAD_CONTENT_CACHE = False`` " +",或是在使用命令行生成站点时加上 ``--ignore-cache`` 参数。" + +#: ../../content.rst:155 08133c5ba3a844388654321b911ed288 +msgid "" +"``modified`` should be last time you updated the article, and defaults to" +" ``date`` if not specified. Besides you can show ``modified`` in the " +"templates, feed entries in feed readers will be updated automatically " +"when you set ``modified`` to the current date after you modified your " +"article." +msgstr "" +"``modified`` 元数据中应该为文章最后一次的修改时间,若没有指定,会自动" +"与 ``date`` 保持一致。在您修改文章并将 ``modified`` 设为当前日期后," +"除了在模板中显示 ``modified`` 之外,feed阅读器中的feed条目也会自动更新。" + +#: ../../content.rst:160 3853c7df67904d209af1d6832c032b0e +msgid "" +"``authors`` is a comma-separated list of article authors. If there's only" +" one author you can use ``author`` field." +msgstr "" +"``authors`` 元数据中是文章作者的列表,各个作者之间用逗号分隔。" +"若只有一个作者,可以使用 ``author`` 。" + +#: ../../content.rst:163 aafa192c91954b1291b79a6b2f78742f +msgid "" +"If you do not explicitly specify summary metadata for a given post, the " +"``SUMMARY_MAX_LENGTH`` setting can be used to specify how many words from" +" the beginning of an article are used as the summary." +msgstr "" +"若您没有显式地指定summary元数据,Pelican会自动从推文开头截取由 " +"``SUMMARY_MAX_LENGTH`` 指定长度的内容作为summary。" + +#: ../../content.rst:167 934bdc95433d4a74b0699901a0429279 +msgid "" +"You can also extract any metadata from the filename through a regular " +"expression to be set in the ``FILENAME_METADATA`` setting. All named " +"groups that are matched will be set in the metadata object. The default " +"value for the ``FILENAME_METADATA`` setting will only extract the date " +"from the filename. For example, if you would like to extract both the " +"date and the slug, you could set something like: " +"``'(?P\\d{4}-\\d{2}-\\d{2})_(?P.*)'``" +msgstr "" +"您可以通过 ``FILENAME_METADATA`` 设置来使用正则表达式从文件名中提取元数据。" +"正则匹配到的每个命名分组都被看成一个元数据。预设的 ``FILENAME_METADATA`` " +"只会从文件名中提取date和slug。例如,可以使用 " +"``'(?P\\d{4}-\\d{2}-\\d{2})_(?P.*)'`` 提取date和slug。" + +#: ../../content.rst:174 b562894808eb4713b12964c87b8f1a17 +msgid "" +"Please note that the metadata available inside your files takes " +"precedence over the metadata extracted from the filename." +msgstr "" +"请注意,您在推文中直接指定的元数据的优先级是大于从文件名中提取的。" + +#: ../../content.rst:178 c668fe9b6fdd41d2a59a3c29b1dd9ef2 +msgid "Pages" +msgstr "页面" + +#: ../../content.rst:180 8870a064ecbe43da921a52cb8a9cfe6b +msgid "" +"If you create a folder named ``pages`` inside the content folder, all the" +" files in it will be used to generate static pages, such as **About** or " +"**Contact** pages. (See example filesystem layout below.)" +msgstr "" +"如果您在content文件夹下创建了一个 ``pages`` 文件夹,那么Pelican会为其中的每个文件" +"生成一个例如 **关于** 、**联系我们** 这样的静态页面。" +"(具体可以看下面项目文件组织的例子)" + +#: ../../content.rst:184 f96c3f3eb18b4c77997f50c4ac615820 +msgid "" +"You can use the ``DISPLAY_PAGES_ON_MENU`` setting to control whether all " +"those pages are displayed in the primary navigation menu. (Default is " +"``True``.)" +msgstr "" +"您可以通过 ``DISPLAY_PAGES_ON_MENU`` 设置来决定页面是否被列在主导航菜单中" +"(默认值为 ``True`` )。" + +#: ../../content.rst:187 6b7dc97e8be94cfc8d21e372e7f599ed +msgid "" +"If you want to exclude any pages from being linked to or listed in the " +"menu, then add a ``status: hidden`` attribute to its metadata. This is " +"useful for things like making error pages that fit the generated theme of" +" your site." +msgstr "" +"如果您希望让某些页面不会被链接并且也不列在任何菜单中,可以为它加上元数据属性 " +"``status: hidden`` 。这在将错误页面适配到所用主题时很有用。" + +#: ../../content.rst:192 369d9adbc4874f158e28d4d7b983af69 +msgid "Static content" +msgstr "静态内容" + +#: ../../content.rst:194 ccd621cba5c84e15bf8e804f080f8a88 +msgid "" +"Static files are files other than articles and pages that are copied to " +"the output folder as-is, without processing. You can control which static" +" files are copied over with the ``STATIC_PATHS`` setting of the project's" +" ``pelicanconf.py`` file. Pelican's default configuration includes the " +"``images`` directory for this, but others must be added manually. In " +"addition, static files that are explicitly linked to are included (see " +"below)." +msgstr "" +"静态文件与文章、页面不同,会原模原样地复制到输出文件夹中。当然,您也通过设置 " +"``STATIC_PATHS`` 更改复制时的目标文件夹。Pelican的默认配置中只包含了 ``images`` " +"一个文件夹,其他的需要手动添加。另外静态文件也包含那些被显式链接的(详见后文)。" + +#: ../../content.rst:203 63fb6cf17c6a41dfa807511f936d48c1 +msgid "" +"In the default configuration, all files with a valid content file suffix " +"(``.html``, ``.rst``, ``.md``, ...) get processed by the article and page" +" generators *before* the static generator. This is avoided by altering " +"the ``*_EXCLUDE`` settings appropriately." +msgstr "" +"在默认配置下,所有后缀名有效的文件( ``.html`` 、 ``.rst`` 、 ``.md`` , " +"...)都会由文章/页面生成器处理,这是在静态文件处理之前完成的。若这些文件中的某" +"一些是静态文件,可以合理使用 ``*_EXCLUDE`` 配置项将他们排除" +"(例如 ``ARTICLE_EXCLUDES`` 、 ``PAGE_EXCLUDES``)。" + +#: ../../content.rst:209 503f8b3234bb4800ae544a9f306bc2c7 +msgid "Mixed content in the same directory" +msgstr "在同一个目录下存放不同类型的内容" + +#: ../../content.rst:211 5c25f3b1a8604c6cade24f34d53062f1 +msgid "" +"Starting with Pelican 3.5, static files can safely share a source " +"directory with page source files, without exposing the page sources in " +"the generated site. Any such directory must be added to both " +"``STATIC_PATHS`` and ``PAGE_PATHS`` (or ``STATIC_PATHS`` and " +"``ARTICLE_PATHS``). Pelican will identify and process the page source " +"files normally, and copy the remaining files as if they lived in a " +"separate directory reserved for static files." +msgstr "" +"从Pelican 3.5开始,静态文件就可以和页面源文件安全地放在同一目录下了。" +"这些包含了不同类型内容文件的目录需要添加到 ``STATIC_PATHS`` 和 ``PAGE_PATHS`` " +"中(或者 ``STATIC_PATHS`` 和 ``ARTICLE_PATHS`` 中)。Pelican会正常地识别和处理" +"文章和页面源文件,然后再把静态文件复制,和处理处于单独一个文件夹的静态文件行为一致。" + +#: ../../content.rst:218 dc85604dbc73479e957e1566cf941b56 +msgid "" +"Note: Placing static and content source files together in the same source" +" directory does not guarantee that they will end up in the same place in " +"the generated site. The easiest way to do this is by using the " +"``{attach}`` link syntax (described below). Alternatively, the " +"``STATIC_SAVE_AS``, ``PAGE_SAVE_AS``, and ``ARTICLE_SAVE_AS`` settings " +"(and the corresponding ``*_URL`` settings) can be configured to place " +"files of different types together, just as they could in earlier versions" +" of Pelican." +msgstr "" +"请注意:Pelican不保证放在同一个源目录下的静态文件和内容文件在站点生成完后最终出现" +"在同一个地方。要让他们出现在一个地方,可以使用 ``{attach}`` 链接语法(下面会提到)。" +"此外,还可以通过设置 ``STATIC_SAVE_AS`` 、 ``PAGE_SAVE_AS`` 和 ``ARTICLE_SAVE_AS`` " +"(还有相应的 ``*_URL`` 设置)让不同类型的文件最终放在一起。" + +#: ../../content.rst:229 b805d4ff080f4d16957fafbff72c587a +msgid "Linking to internal content" +msgstr "内部链接" + +#: ../../content.rst:231 0fb7890a6cbd44b4a00838ef4609ce4b +msgid "" +"From Pelican 3.1 onwards, it is now possible to specify intra-site links " +"to files in the *source content* hierarchy instead of files in the " +"*generated* hierarchy. This makes it easier to link from the current post" +" to other content that may be sitting alongside that post (instead of " +"having to determine where the other content will be placed after site " +"generation)." +msgstr "" +"从Pelican 3.1开始,站内链接可以在 *源文件* 层次下指定,而不是只能在 *生成后的站点* " +"层次下指定。当需要在当前推文链接到邻近位置的内容时,可以直接从源内容文件的位置" +"开始链接(而不需要考虑在站点生成后文件会被放在哪儿)。" + +#: ../../content.rst:237 250bb5723cdc4e85bee656ba042b5ca9 +msgid "" +"To link to internal content (files in the ``content`` directory), use the" +" following syntax for the link target: ``{filename}path/to/file``. Note: " +"forward slashes, ``/``, are the required path separator in the " +"``{filename}`` directive on all operating systems, including Windows." +msgstr "" +"要链接到站内(即在 ``content`` 目录下的文件),使用下述的目标链接语法: " +"``{filename}path/to/file`` 。注意,在所有操作系统(当然也包括Windows)上," +"路径的分隔符都要使用正斜杠 ``/`` 。" + +#: ../../content.rst:243 d51ad995df9c4f03a8346bb08b49d455 +msgid "For example, a Pelican project might be structured like this::" +msgstr "例如,某Pelican项目的文件结构组织如下:" + +#: ../../content.rst:254 f8ac1c186bc94f7996937f59a93e5701 +msgid "In this example, ``article1.rst`` could look like this::" +msgstr "在这个例子中, ``article1.rst`` 的内容如下:" + +#: ../../content.rst:266 87c97b5a2c7c472dbc3e83acd8675859 +msgid "and ``article2.md``::" +msgstr "``article2.md`` 的内容如下:" + +#: ../../content.rst:277 04ba451914f5459aaf5d58b1aced264d +msgid "Linking to static files" +msgstr "链接到静态文件" + +#: ../../content.rst:279 c7fd68b125fa4f3898c58c9cb56e8a66 +msgid "" +"You can link to static content using ``{static}path/to/file``. Files " +"linked to with this syntax will automatically be copied to the output " +"directory, even if the source directories containing them are not " +"included in the ``STATIC_PATHS`` setting of the project's " +"``pelicanconf.py`` file." +msgstr "" +"您可以通过 ``{static}path/to/file`` 链接到静态内容。使用这个指令链接的文件" +"都会被自动复制到输出目录中,即使它没有包含在 ``STATIC_PATHS`` 中。" + +#: ../../content.rst:284 ../../content.rst:319 769cd62a18a249648468050998d58c75 +#: 8c05e8da16394015b25a5a968804fa21 +msgid "For example, a project's content directory might be structured like this::" +msgstr "例如,某Pelican项目的文件结构组织如下:" + +#: ../../content.rst:294 23b58b0e8d134da2b9afbd819448aaff +msgid "``test.md`` would include::" +msgstr "``test.md`` 的文件内容如下:" + +#: ../../content.rst:299 4c0ef14179c848f79fb40f8a23d245f4 +msgid "" +"Site generation would then copy ``han.jpg`` to ``output/images/han.jpg``," +" ``menu.pdf`` to ``output/pdfs/menu.pdf``, and write the appropriate " +"links in ``test.md``." +msgstr "" +"站点生成时会将 ``han.jpg`` 拷贝到 ``output/images/han.jpg`` 、将 " +"``menu.pdf`` 拷贝到 ``output/pdfs/menu.pdf`` ,同时也会自动把 ``test.md`` " +"中的相关链接都替换为正确的。" + +#: ../../content.rst:303 0fd28cfd8e1142559165733fd95ca9c4 +msgid "" +"If you use ``{static}`` to link to an article or a page, this will be " +"turned into a link to its source code." +msgstr "" +"如果您使用 ``{static}`` 链接到文章或页面,会链接到他们的源文件而不是渲染后的文章或页面。" + +#: ../../content.rst:307 95e894ad132e4b55b1bcc9efb813c45c +msgid "Attaching static files" +msgstr "将静态文件作为附件" + +#: ../../content.rst:309 4a6f4d8811094fd69cdf160445ff48eb +msgid "" +"Starting with Pelican 3.5, static files can be \"attached\" to a page or " +"article using this syntax for the link target: ``{attach}path/to/file``. " +"This works like the ``{static}`` syntax, but also relocates the static " +"file into the linking document's output directory. If the static file " +"originates from a subdirectory beneath the linking document's source, " +"that relationship will be preserved on output. Otherwise, it will become " +"a sibling of the linking document." +msgstr "" +"从Pelican 3.5开始,静态文件可以使用下述语法 “附” 在页面或文章上: " +"``{attach}path/to/file`` 。这和 ``{static}`` 语法很像,也会将静态文件重定位" +"到文章或页面的对应输出目录中。当推文所链接的静态文件处于其源文件所在位置的子目录下时," +"这种父子关系在输出目录中会得以保留。否则,默认情况下,静态文件会和对应的文档输出到" +"同一目录层级下。" + +#: ../../content.rst:317 102403a738a04441be06f235356c9879 +msgid "This only works for linking to static files." +msgstr "这只在链接到静态文件时起作用。" + +#: ../../content.rst:330 a843a76e8bfe46438d7c5aa16f1bd5cf +msgid "``pelicanconf.py`` would include::" +msgstr "例如对于某设置文件 ``pelicanconf.py`` " + +#: ../../content.rst:337 026b4cfa5f0b41e58f157d11e217071d +msgid "``testpost.md`` would include::" +msgstr "``testpost.md`` 的内容如下:" + +#: ../../content.rst:347 d85affd317f84015a790f36c5b0b81d2 +msgid "" +"Site generation would then produce an output directory structured like " +"this::" +msgstr "" +"对应生成输出的站点目录结构如下:" + +#: ../../content.rst:357 8998b85808eb4d0ba0f6a16a550df5af +msgid "" +"Notice that all the files linked using ``{attach}`` ended up in or " +"beneath the article's output directory." +msgstr "" +"可以注意到,使用 ``{attach}`` 链接的文件要么和文章输出处于同级目录," +"要么就是在文章所在位置的子目录下。" + +#: ../../content.rst:360 33185f522cef4740b1071fa5c090832d +msgid "" +"If a static file is linked multiple times, the relocating feature of " +"``{attach}`` will only work in the first of those links to be processed. " +"After the first link, Pelican will treat ``{attach}`` like ``{static}``. " +"This avoids breaking the already-processed links." +msgstr "" +"若一个静态文件被多次链接, ``{attach}`` 只会在该静态文件第一次被链接时进行重定位处理" +"(即按照上面的规则复制到对应目录)。之后使用 ``{attach}`` 进行的链接的效果就和 " +"``{static}`` 一模一样了。这样子就可以避免破坏已经生成好的链接。" + +#: ../../content.rst:365 e23bb5443b1147fda26148ca2949dd5d +msgid "" +"**Be careful when linking to a file from multiple documents:** Since the " +"first link to a file finalizes its location and Pelican does not define " +"the order in which documents are processed, using ``{attach}`` on a file " +"linked by multiple documents can cause its location to change from one " +"site build to the next. (Whether this happens in practice will depend on " +"the operating system, file system, version of Pelican, and documents " +"being added, modified, or removed from the project.) Any external sites " +"linking to the file's old location might then find their links broken. " +"**It is therefore advisable to use {attach} only if you use it in all " +"links to a file, and only if the linking documents share a single " +"directory.** Under these conditions, the file's output location will not " +"change in future builds. In cases where these precautions are not " +"possible, consider using ``{static}`` links instead of ``{attach}``, and " +"letting the file's location be determined by the project's " +"``STATIC_SAVE_AS`` and ``STATIC_URL`` settings. (Per-file ``save_as`` and" +" ``url`` overrides can still be set in ``EXTRA_PATH_METADATA``.)" +msgstr "" +"**当同一文件被多个推文链接时需要尤其小心:** 第一次链接到文件时,Pelican就会" +"确定其最终位置,而Pelican处理推文的顺序是不能确定的,因此多个推文使用 ``{attach}`` " +"链接到同一文件时,每一次站点生成后该文件的最终位置是无法确定的(这种情况发生与否" +"取决于操作系统、文件系统、Pelican的版本、推文从项目中的添加修改移除)。当这种情况" +"发生时,其他站点到本站点文件旧位置的链接就会损坏。**因此,只有当静态文件只被一篇推文" +"链接,或链接到某静态文件的推文都在同一目录下时才使用 {attach}**。在这种情况下," +"该文件的输出位置在站点构建中不会变化。如果无法保证上述条件来预防链接损坏,可以" +"考虑使用 ``{static}`` 来替换 ``{attach}`` 。如此,文件的最终位置就由 " +"``STATIC_SAVE_AS`` 和 ``STATIC_URL`` 来决定。(每个文件的 ``save_as`` 和 " +"``url`` 仍然可以通过更改 ``EXTRA_PATH_METADATA`` 设置来覆盖)" + +#: ../../content.rst:382 5ceceb4e67ac4d9295b06b5bd8913f6b +msgid "" +"When using ``{attach}``, any parent directory in ``*_URL`` / " +"``*_SAVE_AS`` settings should match each other. See also: :ref:`url-" +"settings`" +msgstr "" +"当使用{attach}时, ``*_URL`` / ``*_SAVE_AS`` 设置中的所有父目录都应该互相对应。" +"具体请参见 :ref:`URL配置` 。" + +#: ../../content.rst:386 b42d3dba1dc54bd7b264bb77e999c649 +msgid "Linking to authors, categories, index and tags" +msgstr "链接到作者、分类、索引、标签" + +#: ../../content.rst:388 9f8ac49620864d8480d692602f3b8489 +msgid "" +"You can link to authors, categories, index and tags using the " +"``{author}name``, ``{category}foobar``, ``{index}`` and ``{tag}tagname`` " +"syntax." +msgstr "" +"您可以通过 ``{author}name`` 、 ``{category}foobar`` 、 ``{index}`` 和 " +"``{tag}tagname`` 这样的语法链接到作者、分类、索引和标签。" + +#: ../../content.rst:392 c17b5dae050b4f75a7b5822d8296e360 +msgid "Deprecated internal link syntax" +msgstr "已弃用的内部链接语法" + +#: ../../content.rst:394 56d074b5c35146de99da900cad042267 +msgid "" +"To remain compatible with earlier versions, Pelican still supports " +"vertical bars (``||``) in addition to curly braces (``{}``) for internal " +"links. For example: ``|filename|an_article.rst``, ``|tag|tagname``, " +"``|category|foobar``. The syntax was changed from ``||`` to ``{}`` to " +"avoid collision with Markdown extensions or reST directives. Similarly, " +"Pelican also still supports linking to static content with " +"``{filename}``. The syntax was changed to ``{static}`` to allow linking " +"to both generated articles and pages and their static sources." +msgstr "" +"为了保持和早期版本的兼容,在内部链接中除了使用花括号( ``{}`` )外,还支持在" +"内部链接中使用竖线( ``||`` )。例如, ``|filename|an_article.rst`` 、 " +"``|tag|tagname`` 、 ``|category|foobar`` 。将语法中的 ``||`` 改到 ``{}`` " +"是为了避免和Markdown或reST的语法和指令相冲突。类似地, ``{filename}`` 虽然" +"仍能使用,但是其语法已经改为了 ``{static}`` 。 ``{static}`` 既可以链接到" +"文章或页面,也可以链接到静态资源。" + +#: ../../content.rst:402 cafd502b37434253acff76cfd6e328a5 +msgid "Support for the old syntax may eventually be removed." +msgstr "对旧语法地支持最终会被移除。" + +#: ../../content.rst:405 4302f0c9e44c473fa92e9e5d518f7212 +msgid "Including other files" +msgstr "引入其他文件" + +#: ../../content.rst:406 3b8832031a01415b912c6bef421a86cb +msgid "Both Markdown and reStructuredText syntaxes provide mechanisms for this." +msgstr "Markdown和reStructuredText的语法中都提供了这种机制" + +#: ../../content.rst:408 403518effc4e4fa7b6fc0f042d632576 +msgid "" +"Following below are some examples for **reStructuredText** using `the " +"include directive`_:" +msgstr "" +"下面是 **reStructuredText** 使用 `include指令`_ 的一些例子:" + +#: ../../content.rst:414 1cefd5cb5ae7404db0d4076bc04f9b84 +msgid "" +"Include a fragment of a file delimited by two identifiers, highlighted as" +" C++ (slicing based on line numbers is also possible):" +msgstr "" +"下面的例子,引入了一段用一对标识符分隔的文件片段,并指定以C++语法进行高亮显示。" +"(同样支持通过行号指定片段)" + +#: ../../content.rst:423 f036350b005d4e56b8b5811af3949814 +msgid "" +"Include a raw HTML file (or an inline SVG) and put it directly into the " +"output without any processing:" +msgstr "" +"将一HTML文件(或者一个行内SVG)直接引入,并且不进行任何处理直接将其作为输出:" + +#: ../../content.rst:430 5e299b24059e492f9c232e1bb2649faf +msgid "" +"For **Markdown**, one must rely on an extension. For example, using the " +"`mdx_include plugin`_:" +msgstr "" +"对于 **Markdown** ,若要进行文件引入,就必须使用扩展插件。" +"例如可以使用 `mdx_include plugin`_ :" + +#: ../../content.rst:440 caaf5f8e2ebb417393af05a8ac5a1b3d +msgid "Importing an existing site" +msgstr "导入已有站点" + +#: ../../content.rst:442 17b346c7c3674c688dcd6a2ffc5c1992 +msgid "" +"It is possible to import your site from several other blogging sites " +"(like WordPress, Tumblr, ..) using a simple script. See :ref:`import`." +msgstr "" +"您可以使用一个简单的脚本导入已有的站点(例如WordPress、Tumblr)。" +"详见 :ref:`导入已有站点` 。" + +#: ../../content.rst:446 a118f0eb2c5f4b3f8a90e867b8752c28 +msgid "Translations" +msgstr "翻译" + +#: ../../content.rst:448 12367367e71d42168e1301344cc9c87d +msgid "" +"It is possible to translate articles. To do so, you need to add a " +"``lang`` meta attribute to your articles/pages and set a ``DEFAULT_LANG``" +" setting (which is English [en] by default). With those settings in " +"place, only articles with the default language will be listed, and each " +"article will be accompanied by a list of available translations for that " +"article." +msgstr "" +"一篇文章可以有多个翻译版本。对于这类文章,您需要加上元数据属性 ``lang`` ," +"并且配置 ``DEFAULT_LANG`` (默认为[en])。完成上述配置后,文章列表中" +"列出的是默认语言版本的文章,文章内容页中会列出所有可用的翻译版本供读者选择。" + +#: ../../content.rst:456 27e9f86d341a4f128d431be73c312435 +msgid "" +"This core Pelican functionality does not create sub-sites (e.g. " +"``example.com/de``) with translated templates for each language. For such" +" advanced functionality the `i18n_subsites plugin`_ can be used." +msgstr "" +"Pelican的这个核心功能并不会给同一文章的不同语言版本创建子站点(例如 " +"``example.com/de`` )。但是如果需要创建子站点的话,可以使用扩展插件 " +"`i18n_subsites plugin`_ 。" + +#: ../../content.rst:461 ec93028685b4473fbeb47dc61ba3a370 +msgid "" +"By default, Pelican uses the article's URL \"slug\" to determine if two " +"or more articles are translations of one another. (This can be changed " +"with the ``ARTICLE_TRANSLATION_ID`` setting.) The slug can be set " +"manually in the file's metadata; if not set explicitly, Pelican will " +"auto-generate the slug from the title of the article." +msgstr "" +"默认情况下,Pelican会使用文章的URL “slug” 来判断当前文档是否是同一篇文章的" +"不同翻译版本。(这一点可以通过配置 ``ARTICLE_TRANSLATION_ID`` 来改变)" +"slug可以通过元数据手动指定,若没有,Pelican会根据文章的标题(title)来自动生成slug。" + +#: ../../content.rst:467 c300d76653824775934ea9b96bb6fd24 +msgid "" +"Here is an example of two articles, one in English and the other in " +"French." +msgstr "" +"以下的例子是一篇文章有英语和法语两个翻译版本的情况。" + +#: ../../content.rst:469 fbc6d50fe2d24577b902cf451006b34f +msgid "The English article::" +msgstr "英语文章如下:" + +#: ../../content.rst:479 bbd3c95a57d341f8bd9ef9e2f8fc29b3 +msgid "And the French version::" +msgstr "法语版本为:" + +#: ../../content.rst:489 e6855834a5874e71b747e027451c6dfe +msgid "" +"Post content quality notwithstanding, you can see that only item in " +"common between the two articles is the slug, which is functioning here as" +" an identifier. If you'd rather not explicitly define the slug this way, " +"you must then instead ensure that the translated article titles are " +"identical, since the slug will be auto-generated from the article title." +msgstr "" +"值得注意的是,以上两篇文章的slug是相同的,即slug作为唯一标识符存在。若您没有" +"手动指定slug,那么请保证同一篇文章的不同翻译版本的标题是相同的。如此,由于slug会" +"根据文章标题自动生成,它们隐含的slug会是相同的。" + +#: ../../content.rst:495 73d8475bcf2d45968cc27422d76074a1 +msgid "" +"If you do not want the original version of one specific article to be " +"detected by the ``DEFAULT_LANG`` setting, use the ``translation`` " +"metadata to specify which posts are translations::" +msgstr "" +"如果您不希望某篇文章的原始版本以 ``DEFAULT_LANG`` 翻译版本出现,可以使用 " +"``translation`` 元数据来指出本推文是一个非默认语言的翻译版本。" +"(译者注:例如,设置的默认语言为zh_CN,如果某篇推文的原始版本是英文而不是中文," +"那么对于中文翻译版本的就可以指定其translations元数据为true,即对于该推文来说," +"中文版本是翻译后的版本)" + +#: ../../content.rst:512 976f71e42fd84e968ee2512fe7de0183 +msgid "Syntax highlighting" +msgstr "语法高亮" + +#: ../../content.rst:514 c21960ee8f414159bf27de01ba7922f8 +msgid "" +"Pelican can provide colorized syntax highlighting for your code blocks. " +"To do so, you must use the following conventions inside your content " +"files." +msgstr "" +"您可以按照下面的约定在文件内容中添加代码块,Pelican可以完成五彩缤纷的语法高亮。" + +#: ../../content.rst:517 a5216efbf07a4fccbfb30b4e81f75040 +msgid "" +"For reStructuredText, use the ``code-block`` directive to specify the " +"type of code to be highlighted (in these examples, we'll use " +"``python``)::" +msgstr "" +"对于reStructuredText,使用 ``code-block`` 指令指定代码所使用的语言" +"(此处以``python``为例):" + +#: ../../content.rst:524 d810ac7e52a6428c8a0f54a5c33f6d1f +msgid "" +"For Markdown, which utilizes the `CodeHilite extension`_ to provide " +"syntax highlighting, include the language identifier just above the code " +"block, indenting both the identifier and the code::" +msgstr "" +"Markdown则使用 `CodeHilite extension`_ 扩展插件来完成语法高亮。" +"在代码上方标记所用语言,同时将其与代码都进行缩进:" + +#: ../../content.rst:538 fe7b65a2154a4468ae9eb3b2fac0bb07 +msgid "" +"The specified identifier (e.g. ``python``, ``ruby``) should be one that " +"appears on the `list of available lexers " +"`_." +msgstr "" +"指定语言的标识符(例如 ``python``、``ruby``)必须是在 " +"`可用列表 `_ 中列出的。" + +#: ../../content.rst:541 1f482819874b46e5acfd146e51654ae3 +msgid "" +"When using reStructuredText the following options are available in the " +"`code-block` directive:" +msgstr "" +"对于reStructuredText,下面列出的选项可以在 `code-block` 命令中使用:" + +#: ../../content.rst:545 8f6e2ce01bea4ec092248f2e3a6e6ecc +msgid "Option" +msgstr "选项" + +#: ../../content.rst:545 db8b4d4f2b104d81aab608230fd6e1cc +msgid "Valid values" +msgstr "有效值" + +#: ../../content.rst:547 047fc9e56b554be3a1b7da18907b7f90 +msgid "anchorlinenos" +msgstr "anchorlinenos" + +#: ../../content.rst:547 ../../content.rst:571 ../../content.rst:573 +#: 1c2d3dca20b54edb9548dddb34806933 86aa17a954c04f0d95f982fb0f246965 +#: ae4adfdf8caf4f008f604f7df27bdd22 +msgid "N/A" +msgstr "N/A" + +#: ../../content.rst:547 65c27f05964d40c2b7b186adf787ee93 +msgid "If present, wrap line numbers in ```` tags." +msgstr "指定行号是否显示在 标签中" + +#: ../../content.rst:548 ed3978c78c5e42a18e6f99d8d02c8098 +msgid "classprefix" +msgstr "classprefix" + +#: ../../content.rst:548 ../../content.rst:556 ../../content.rst:558 +#: ../../content.rst:567 ../../content.rst:569 ../../content.rst:574 +#: ../../content.rst:575 04074453fc9b4f7d9730abfafb55296e +#: 0cfda11b91c44fe28b3518b2d0f919fe 212195ee1ba9499eb702b0cc934eebf6 +#: 72377cf8eb674b018e46773b14ee8ca6 77824272208e46a88014dda02d61cb87 +#: db0b1666f7424777a04ec63ee4f35fc8 fbe493b8452e491384e35023a04ea044 +msgid "string" +msgstr "string" + +#: ../../content.rst:548 fb4ea5477c014d7e99cc03966bd3c702 +msgid "String to prepend to token class names" +msgstr "要添加到用于语法高亮的css类名前面的字符串" + +#: ../../content.rst:549 52b699bbe9924640a87f05f79ab23a53 +msgid "hl_lines" +msgstr "hl_lines" + +#: ../../content.rst:549 fbaac5cc76c64f8fbfc4161b22af2daa +msgid "numbers" +msgstr "numbers" + +#: ../../content.rst:549 df014e3cc995414a91122bf8f55d1636 +msgid "" +"List of lines to be highlighted, where line numbers to highlight are " +"separated by a space. This is similar to ``emphasize-lines`` in Sphinx, " +"but it does not support a range of line numbers separated by a hyphen, or" +" comma-separated line numbers." +msgstr "" +"需要高亮的行号列表,行号之间以空格隔开。这与Sphinx中的 ``emphasize-lines`` " +"类似,但是不支持使用连字符和逗号指定行号范围。" + +#: ../../content.rst:556 7cb9b62ed41f47a48a52d0b867136186 +msgid "lineanchors" +msgstr "lineanchors" + +#: ../../content.rst:556 b30281027c97468586c74d01b44bc6b9 +msgid "Wrap each line in an anchor using this string and -linenumber." +msgstr "用此处指定的字符串和 “-行号”给每一行都加上锚点。" + +#: ../../content.rst:558 dd578575fcfa428d8c4224fe5bcc3903 +msgid "linenos" +msgstr "linenos" + +#: ../../content.rst:558 efa8f95553f148079296aaba25a134e7 +msgid "" +"If present or set to \"table\", output line numbers in a table; if set to" +" \"inline\", output them inline. \"none\" means do not output the line " +"numbers for this table." +msgstr "" +"开启此选项或将此选项设为“table”时,输出表格时会带上行号;如果设为“inline”," +"则内联输出行号;如果设为“none”,则不输出行号。" + +#: ../../content.rst:563 5a4d9d11f3294559b711297a4f5470dc +msgid "linenospecial" +msgstr "linenospecial" + +#: ../../content.rst:563 ../../content.rst:565 ../../content.rst:566 +#: 750abd5b57eb4406b31e6f5b469f533b 8b12e52f3e3a4d40a5027ade4865fb0f +#: b7da51041a22404f949e85d2d093a28b +msgid "number" +msgstr "number" + +#: ../../content.rst:563 e6d2a8201365442e887f5ca0e565c59e +msgid "If set, every nth line will be given the 'special' CSS class." +msgstr "是否每隔几行就设置一行特殊的css样式类。" + +#: ../../content.rst:565 406ba5adaeeb4023b53832cbadff46e2 +msgid "linenostart" +msgstr "linenostart" + +#: ../../content.rst:565 096428e4609f4e8799cfc72a62228258 +msgid "Line number for the first line." +msgstr "起始行的行号。" + +#: ../../content.rst:566 81234c8ec93b4680b0a0b84082a50e70 +msgid "linenostep" +msgstr "linenostep" + +#: ../../content.rst:566 7caa370b533240e5be181428ee24054a +msgid "Print every nth line number." +msgstr "每隔几行输出一次" + +#: ../../content.rst:567 62c04bb9d12d4cc7b5b1170631f9e411 +msgid "lineseparator" +msgstr "lineseparator" + +#: ../../content.rst:567 6d969350c93f4b75a5c0e619efd85d3f +msgid "String to print between lines of code, '\\n' by default." +msgstr "每行输出代码之间的输出字符串,默认为 '\\n'。" + +#: ../../content.rst:569 672c5f712c0b49618a61a8a5be9edc38 +msgid "linespans" +msgstr "linespans" + +#: ../../content.rst:569 46dde549648248e89e04c3c7d3b183fe +msgid "Wrap each line in a span using this and -linenumber." +msgstr "使用指定的字符串和“-行号”将每一行包装在一个span中。" + +#: ../../content.rst:571 b2f9bfe5ebfc4113b36a1f3bd381809c +msgid "nobackground" +msgstr "nobackground" + +#: ../../content.rst:571 917af7907ee34af5a81688b62b140c5c +msgid "If set, do not output background color for the wrapping element" +msgstr "若设置,则不为元素输出背景颜色" + +#: ../../content.rst:573 50ea55e4381f4be2a59aba032147b9a8 +msgid "nowrap" +msgstr "nowrap" + +#: ../../content.rst:573 4feffa38842e47b6a069f7967d97d18c +msgid "If set, do not wrap the tokens at all." +msgstr "若设置,则不对token进行换行处理。" + +#: ../../content.rst:574 9a8da94a32044cb1b163d5172bc180c0 +msgid "tagsfile" +msgstr "tagsfile" + +#: ../../content.rst:574 21740e36e1c44cd29865254a902ad516 +msgid "ctags file to use for name definitions." +msgstr "用于命名定义的ctags文件" + +#: ../../content.rst:575 b2130a3acae044e7b914a4bb3aa325a8 +msgid "tagurlformat" +msgstr "tagurlformat" + +#: ../../content.rst:575 d0c8a33550704d5db7d70922fa610edf +msgid "format for the ctag links." +msgstr "用于ctag链接的格式" + +#: ../../content.rst:578 0f002bfe94ff4bfcb83ea2a52f780c26 +msgid "" +"Note that, depending on the version, your Pygments module might not have " +"all of these options available. Refer to the *HtmlFormatter* section of " +"the `Pygments documentation `_ for" +" more details on each of the options." +msgstr "" +"请注意,由于版本的不同,Pygments模块可能不完全支持上述选项。请参考 " +"`Pygments文档 `_ 中 *HtmlFormatter* " +"一节获取每个选项的详细信息。" + +#: ../../content.rst:583 c665232723ee4e3793f4036c2721a228 +msgid "" +"For example, the following code block enables line numbers, starting at " +"153, and prefixes the Pygments CSS classes with *pgcss* to make the names" +" more unique and avoid possible CSS conflicts::" +msgstr "" +"举个例子,下面的代码块开启了行号显示,从153行开始输出,并且指定Pygments的CSS类" +"以 *pgcss* 为前缀,使得类名更为独特并避免可能的CSS冲突:" + +#: ../../content.rst:594 0a749c8cb059455bacc49da21a20de64 +msgid "" +"It is also possible to specify the ``PYGMENTS_RST_OPTIONS`` variable in " +"your Pelican settings file to include options that will be automatically " +"applied to every code block." +msgstr "" +"您也可以在Pelican的配置文件中指定 ``PYGMENTS_RST_OPTIONS`` ,如此就可以让" +"Pelican自动在每个代码块上使用指定的选项。" + +#: ../../content.rst:598 2ab0fe8ec25a499ebd7c6138d719eaeb +msgid "" +"For example, if you want to have line numbers displayed for every code " +"block and a CSS prefix, you would set this variable to::" +msgstr "" +"举个例子,若您希望每个代码块都显示行号,并且在CSS类名前都加上前缀pgcss," +"就可以像这样设置 ``PYGMENTS_RST_OPTIONS`` :" + +#: ../../content.rst:603 5527e744ebb143bab0bf674ac5a869aa +msgid "" +"If specified, settings for individual code blocks will override the " +"defaults in your settings file." +msgstr "" +"若指定了 ``PYGMENTS_RST_OPTIONS`` ,同时也为代码块单独指定了一些选项," +"单独指定的会将 ``PYGMENTS_RST_OPTIONS`` 覆盖。" + +#: ../../content.rst:607 a21ed65bb8304fd9a33cb6a072163509 +msgid "Publishing drafts" +msgstr "发布草稿" + +#: ../../content.rst:609 b5d868b0ef654ecb9b14460a1286d4f6 +msgid "" +"If you want to publish an article or a page as a draft (for friends to " +"review before publishing, for example), you can add a ``Status: draft`` " +"attribute to its metadata. That article will then be output to the " +"``drafts`` folder and not listed on the index page nor on any category or" +" tag page." +msgstr "" +"如果您想要以草稿的形式发布文章或页面(例如在正式发布前给朋友预览),可以添加" +"元数据属性 ``Status: draft`` 。如此,文章就会输出到 ``drafts`` 文件夹中," +"并且不会被列在首页、分类或是标签页面中。" + +#: ../../content.rst:614 d033b64ff7ca403bb7c8731de3f904bb +msgid "" +"If your articles should be automatically published as a draft (to not " +"accidentally publish an article before it is finished), include the " +"status in the ``DEFAULT_METADATA``::" +msgstr "" +"若您希望文章默认以草稿形式发布(可以防止在完成文章前不小心将其正式发布)," +"可以将此status属性加在 ``DEFAULT_METADATA`` 中:" + +#: ../../content.rst:622 9fd01a462ba54cef85146d868fcff83c +msgid "" +"To publish a post when the default status is ``draft``, update the post's" +" metadata to include ``Status: published``." +msgstr "" +"要发布当前处于 ``draft`` 状态的推文,更新推文的元数据,使其中包括 " +"``Status: published``。" + +#: ../../content.rst:626 07da3060096c4cd6829f4e4eed6ea099 +msgid "Hidden Posts" +msgstr "隐藏推文" + +#: ../../content.rst:628 a2cf66f63c2846a384baff82f96d2e31 +msgid "" +"Like pages, posts can also be marked as ``hidden`` with the ``Status: " +"hidden`` attribute. Hidden posts will be output to ``ARTICLE_SAVE_AS`` as" +" expected, but are not included by default in tag, category, and author " +"indexes, nor in the main article feed. This has the effect of creating an" +" \"unlisted\" post." +msgstr "" +"和页面一样,推文也能通过 ``Status: hidden`` 标记为隐藏状态。隐藏的推文会输出到 " +"``ARTICLE_SAVE_AS`` 指定的目录中,这些推文“不会被列出”,即不会在标签、分类、" +"作者主页、feed中出现。" diff --git a/docs/locale/zh_CN/LC_MESSAGES/install.po b/docs/locale/zh_CN/LC_MESSAGES/install.po index 8a1f345d..4bc2c10f 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/install.po +++ b/docs/locale/zh_CN/LC_MESSAGES/install.po @@ -20,8 +20,7 @@ msgstr "" #: ../../install.rst:2 32d9c99d9171418c89daafbe7260daa9 msgid "Installing Pelican" -msgstr "" -"安装Pelican" +msgstr "安装Pelican" #: ../../install.rst:4 73ec02b650044be6bb17951f4a915075 msgid "" @@ -39,8 +38,7 @@ msgstr "" #: ../../install.rst:10 22d5948b07d14a13bc45aa14ef11e856 msgid "Or, if you plan on using Markdown::" -msgstr "" -"如果您需要使用Markdown,请使用下面的命令安装:" +msgstr "如果您需要使用Markdown,请使用下面的命令安装:" #: ../../install.rst:14 b910f7faa2c84e5eb62fbd0fae2544d3 msgid "" @@ -91,8 +89,7 @@ msgstr "" #: ../../install.rst:42 d1850a31cca24c5281cc7c9fd748b56b msgid "Optional packages" -msgstr "" -"可选包" +msgstr "可选包" #: ../../install.rst:44 8428281e15354c71a5aec92e9e0041b9 msgid "" @@ -113,8 +110,7 @@ msgstr "" #: ../../install.rst:56 d3ff6383ae9745bc9bfed85654086311 msgid "Dependencies" -msgstr "" -"依赖" +msgstr "依赖" #: ../../install.rst:58 2dc22a3fa6c242bdb5b61005e1910d79 msgid "" @@ -134,8 +130,7 @@ msgstr "" #: ../../install.rst:63 365c8fb0938e4d9fbf78d110b05cb99f msgid "`jinja2 `_, for templating support" -msgstr "" -"`jinja2 `_,用于模板系统" +msgstr "`jinja2 `_,用于模板系统" #: ../../install.rst:64 5db63207e60c4997924c3baf8aec8524 msgid "`pygments `_, for syntax highlighting" @@ -145,41 +140,45 @@ msgstr "`pygments `_,用于语法高亮" msgid "" "`docutils `_, for supporting " "reStructuredText as an input format" -msgstr "`docutils `_," +msgstr "" +"`docutils `_," "用于reStructuredText格式" #: ../../install.rst:67 d00ac0c26d884a2d9d7f02fa89491892 msgid "" "`blinker `_, an object-to-object and " "broadcast signaling system" -msgstr "`blinker `_," +msgstr "" +"`blinker `_," "对象-对象的信号广播系统" #: ../../install.rst:69 0d317b007acf49fc879203fa8ffb4048 msgid "" "`unidecode `_, for ASCII " "transliterations of Unicode text utilities" -msgstr "`unidecode `_," +msgstr "" +"`unidecode `_," "用于将Unicode文本转为ASCII字符的音译" #: ../../install.rst:72 ded0aae575854f149bcf2ea9efa4ba21 msgid "" "`MarkupSafe `_, for a markup-safe " "string implementation" -msgstr "`MarkupSafe `_," +msgstr "" +"`MarkupSafe `_," "用于转义字符的安全处理" #: ../../install.rst:74 eae7d8f6f84040339ccfef98e20502d8 msgid "" "`python-dateutil `_, to read " "the date metadata" -msgstr "`python-dateutil `_," +msgstr "" +"`python-dateutil `_," "用于读取日期相关的元数据" #: ../../install.rst:78 cd33ec4583574c5bb879f08813b9932c msgid "Upgrading" -msgstr "" -"更新升级" +msgstr "更新升级" #: ../../install.rst:80 1513dd1e43564cb29da0a14988e0791d msgid "" @@ -193,13 +192,13 @@ msgstr "" msgid "" "If you installed Pelican via distutils or the bleeding-edge method, " "simply perform the same step to install the most recent version." -msgstr "若是通过distutils安装或是通过Git安装了测试版的Pelican" +msgstr "" +"若是通过distutils安装或是通过Git安装了测试版的Pelican" "重新进行一遍和安装时同样的步骤即可。" #: ../../install.rst:89 89392d36f81f4c7eb75e9a74d1795faa msgid "Kickstart your site" -msgstr "" -"启动网站" +msgstr "启动网站" #: ../../install.rst:91 a8517a0fbbb1420297df214f50d8792d msgid "" diff --git a/docs/locale/zh_CN/LC_MESSAGES/quickstart.po b/docs/locale/zh_CN/LC_MESSAGES/quickstart.po index c91c00b8..42ad4387 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/quickstart.po +++ b/docs/locale/zh_CN/LC_MESSAGES/quickstart.po @@ -32,8 +32,7 @@ msgstr "" #: ../../quickstart.rst:8 c5982d5ecf7c445590254370b84995be msgid "Installation" -msgstr "" -"安装" +msgstr "安装" #: ../../quickstart.rst:10 fda7d08c05f14e2fa0c07a4a1d216db5 msgid "" @@ -46,8 +45,7 @@ msgstr "" #: ../../quickstart.rst:17 9db650d9dc9d4ac48df4dd9fc0a246ac msgid "Create a project" -msgstr "" -"创建项目" +msgstr "创建项目" #: ../../quickstart.rst:19 2e9a72a878754604abdb27d9ec37937e msgid "" @@ -78,8 +76,7 @@ msgstr "" #: ../../quickstart.rst:36 66d29d63cce0488a8ec9e43ce97035f9 msgid "Create an article" -msgstr "" -"创作文章" +msgstr "创作文章" #: ../../quickstart.rst:38 03af35552ef84e4491b46d8bf8c0f51e msgid "" @@ -99,8 +96,7 @@ msgstr "" #: ../../quickstart.rst:51 5cc306848439434f81708eddee812f0e msgid "Generate your site" -msgstr "" -"生成站点" +msgstr "生成站点" #: ../../quickstart.rst:53 03037d0c3b0b4a64b957f8284f008c9d msgid "" @@ -120,8 +116,7 @@ msgstr "" #: ../../quickstart.rst:62 7cf36e609f544f02a0c800f8412cf79c msgid "Preview your site" -msgstr "" -"预览站点" +msgstr "预览站点" #: ../../quickstart.rst:64 1a64015c5cc9401bac0a6ac953164fb3 msgid "" @@ -132,8 +127,7 @@ msgstr "" #: ../../quickstart.rst:69 eb286b4785304d22a46e90884d26de07 msgid "Preview your site by navigating to http://localhost:8000/ in your browser." -msgstr "" -"打开浏览器,进入 http://localhost:8000/ 就可以看到刚刚生成的站点了。" +msgstr "打开浏览器,进入 http://localhost:8000/ 就可以看到刚刚生成的站点了。" #: ../../quickstart.rst:71 1dc30b5cb267402c9da251303ff59dbf msgid "" @@ -146,8 +140,7 @@ msgstr "" #: ../../quickstart.rst:78 6c135ea1cbb44400b446c0f9074e0fc5 msgid "Footnotes" -msgstr "" -"脚注" +msgstr "脚注" #: ../../quickstart.rst:80 911df4217fd94e6184502153ed0e53dc msgid ""