This commit is contained in:
GeorgeHu 2024-06-24 16:38:31 +08:00 committed by GitHub
commit d22417229a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 9843 additions and 0 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,713 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../contribute.rst:2
msgid "Contributing and feedback guidelines"
msgstr "项目贡献与意见反馈"
#: ../../contribute.rst:4
msgid ""
"There are many ways to contribute to Pelican. You can improve the "
"documentation, add missing features, and fix bugs (or just report them). "
"You can also help out by reviewing and commenting on `existing issues "
"<https://github.com/getpelican/pelican/issues>`_."
msgstr "有很多渠道可以参与到贡献项目中来例如帮助改进文档、添加缺失的特性、修复与报告bug。"
"可以从查看 `已有 issues <https://github.com/getpelican/pelican/issues>`_ 开始。"
#: ../../contribute.rst:9
msgid ""
"Don't hesitate to fork Pelican and submit an issue or pull request on "
"GitHub. When doing so, please consider the following guidelines."
msgstr "随时随地都可以fork Pelican或是在GitHub上提交issue或PR。"
#: ../../../CONTRIBUTING.rst:2
msgid "Filing issues"
msgstr "提出issue"
#: ../../../CONTRIBUTING.rst:4
msgid "Before you submit a new issue, try `asking for help`_ first."
msgstr "在你提交一个新的issue之前可以先尝试 `请求他人帮助`_ 。"
#: ../../../CONTRIBUTING.rst:5
msgid ""
"If determined to create a new issue, first search `Pelican Discussions`_ "
"and `existing issues`_ (open and closed) to see if your question has "
"already been answered previously."
msgstr "当你决定要创建新的issue时先在 `Pelican的讨论版`_ 和 `已有issues`_ 中搜索一下,"
"开放关闭的issue都搜一下来看看你的问题是不是有人之前已经提出过。"
#: ../../../CONTRIBUTING.rst:14
msgid "How to get help"
msgstr "如何获取帮助"
#: ../../../CONTRIBUTING.rst:16
msgid "Before you ask for help, please make sure you do the following:"
msgstr "在寻求帮助之前,请先尝试如下步骤:"
#: ../../../CONTRIBUTING.rst:18
msgid ""
"Read the documentation_ thoroughly. If in a hurry, at least use the "
"search field that is provided at top-left on the documentation_ pages. "
"Make sure you read the docs for the Pelican version you are using."
msgstr "完整阅读 documentation_ 。如果你很急,至少先在 documentation_ 页面左上角的搜索栏中尝试搜索。"
"确保你阅读的文档和使用的Pelican版本相匹配。"
#: ../../../CONTRIBUTING.rst:21
msgid ""
"Use a search engine (e.g., DuckDuckGo, Google) to search for a solution "
"to your problem. Someone may have already found a solution, perhaps in "
"the form of a ':pelican-doc:`plugins` or a specific combination of "
"settings."
msgstr "使用搜索引擎(例如 DuckDuckGo、Google搜索遇到问题的解决方案。互联网上可能已经有人遇到过"
"相同的问题,解决方法可能包括使用某些 :pelican-doc:`插件` 或配置一系列的设置选项。"
#: ../../../CONTRIBUTING.rst:25
msgid "Try reproducing the issue in a clean environment, ensuring you are using:"
msgstr "尝试在一个干净的环境中重现问题,确保以下内容:"
#: ../../../CONTRIBUTING.rst:27
msgid "latest Pelican release (or an up-to-date Git clone of Pelican master)"
msgstr "使用最新版本的Pelican或是用Git克隆Pelican的master分支"
#: ../../../CONTRIBUTING.rst:28
msgid "latest releases of libraries used by Pelican"
msgstr "将Pelican使用的库升级到最新版本"
#: ../../../CONTRIBUTING.rst:29
msgid "no plugins or only those related to the issue"
msgstr "此环境中没有使用插件或是只使用和问题相关的插件"
#: ../../../CONTRIBUTING.rst:31
msgid ""
"**NOTE:** The most common sources of problems are anomalies in (1) "
"themes, (2) plugins, (3) settings files, and (4) ``make``/``invoke`` "
"automation wrappers. If you can't reproduce your problem when using the "
"following steps to generate your site, then the problem is almost "
"certainly with one of the above-listed elements (and not Pelican "
"itself)::"
msgstr "**注意:** 最常见的问题基本上都产生于主题、插件、设置文件和自动化工具 ``make``/``invoke`` 中。"
"如果按照下述步骤生成站点后无法复现之前的问题那么几乎可以肯定问题出在这四个地方而不在Pelican本身"
#: ../../../CONTRIBUTING.rst:41
msgid ""
"If you can generate your site without problems using the steps above, "
"then your problem is unlikely to be caused by Pelican itself, and "
"therefore please consider reaching out to the maintainers of the "
"plugins/theme you are using instead of raising the topic with the Pelican"
" core community."
msgstr "如果按照上述步骤能够正常生成站点那么你的问题不太可能是由Pelican本身导致的请考虑联系对应插件/主题"
"的维护者而不是在Pelican内核的社区中提出问题。"
#: ../../../CONTRIBUTING.rst:46
msgid ""
"If despite the above efforts you still cannot resolve your problem, be "
"sure to include in your inquiry the following information, preferably in "
"the form of links to content uploaded to a `paste service`_, GitHub "
"repository, or other publicly-accessible location:"
msgstr "经过上面这些努力,若您仍无法解决问题,确保你的提问中包括如下信息,可以以 `paste service`_ 链接、"
"GitHub仓库或者其他可公开获取的形式提供"
#: ../../../CONTRIBUTING.rst:51
msgid ""
"Describe what version of Pelican you are running (output of ``pelican "
"--version`` or the HEAD commit hash if you cloned the repo) and how "
"exactly you installed it (the full command you used, e.g. ``python -m pip"
" install pelican``)."
msgstr "描述正在运行的Pelican版本信息可以通过 ``pelican --version`` 命令得到如果clone的源仓库"
"则可以查看HEAD commit的哈希值以及你是如何安装Pelican的要包括使用到的命令例如 ``python -m pip install pelican``"
#: ../../../CONTRIBUTING.rst:54
msgid ""
"If you are looking for a way to get some end result, prepare a detailed "
"description of what the end result should look like (preferably in the "
"form of an image or a mock-up page) and explain in detail what you have "
"done so far to achieve it."
msgstr "如果你希望产生某种最终结果,请详细描述此最终结果是什么样的(最好以图片或者伪页面的形式),"
",并且细致讲述你做了哪些尝试。"
#: ../../../CONTRIBUTING.rst:58
msgid ""
"If you are trying to solve some issue, prepare a detailed description of "
"how to reproduce the problem. If the issue cannot be easily reproduced, "
"it cannot be debugged by developers or volunteers. Describe only the "
"**minimum steps** necessary to reproduce it (no extra plugins, etc.)."
msgstr "如果你在尝试解决某些问题,请详细描述如何复现此问题。如果问题很难被复现,其他开发者和志愿者就很难进行调试。"
"尽量只写出复现该问题的 **最少步骤** (无额外插件)。"
#: ../../../CONTRIBUTING.rst:62
msgid ""
"Upload your settings file or any other custom code that would enable "
"people to reproduce the problem or to see what you have already tried to "
"achieve the desired end result."
msgstr "上传你的设置文件以及所有自定义过的代码,这可以使得大家能够重现问题或者看到你已经做出的尝试。"
#: ../../../CONTRIBUTING.rst:65
msgid ""
"Upload detailed and **complete** output logs and backtraces (remember to "
"add the ``--debug`` flag: ``pelican --debug content [...]``)"
msgstr "上传详细 **完备** 的输出日志以及回溯信息记得在执行pelican命令时加上 ``--debug`` 标记: "
"``pelican --debug content [...]`` "
#: ../../../CONTRIBUTING.rst:71
msgid ""
"Once the above preparation is ready, you can post your query as a new "
"thread in `Pelican Discussions`_. Remember to include all the information"
" you prepared."
msgstr "一旦做好了上述准备,就可以在 `Pelican Discussions`_ 中发起你的请求了。记得在请求中附上收集好的信息。"
#: ../../../CONTRIBUTING.rst:75
msgid "Contributing code"
msgstr "贡献代码"
#: ../../../CONTRIBUTING.rst:77
msgid ""
"Before you submit a contribution, please ask whether it is desired so "
"that you don't spend a lot of time working on something that would be "
"rejected for a known reason. Consider also whether your new feature might"
" be better suited as a ':pelican-doc:`plugins` — you can `ask for help`_"
" to make that determination."
msgstr "在提交代码修改前,请先询问是否需要此修改,以免你做的工作因为已知原因而被拒绝。想想要添加的"
"新特性是否更适合以 :pelican-doc:`插件` 形式完成。可以通过 `如何获取帮助`_ 来帮助你作出决定。"
#: ../../../CONTRIBUTING.rst:82
msgid ""
"Also, if you intend to submit a pull request to address something for "
"which there is no existing issue, there is no need to create a new issue "
"and then immediately submit a pull request that closes it. You can submit"
" the pull request by itself."
msgstr "另外如果你的PR是为了解决一个目前没有在issue中出现过的问题那么就没有必要先创建一个新的"
"issue而是可以直接提起PR。"
#: ../../../CONTRIBUTING.rst:87
msgid "Using Git and GitHub"
msgstr "使用Git与GitHub"
#: ../../../CONTRIBUTING.rst:89
msgid ""
"`Create a new branch`_ specific to your change (as opposed to making your"
" commits in the master branch)."
msgstr "`创建一个新的分支`_ 来标志你做的修改(而不是直接在主分支中提交)。"
#: ../../../CONTRIBUTING.rst:91
msgid ""
"**Don't put multiple unrelated fixes/features in the same branch / pull "
"request.** For example, if you're working on a new feature and find a "
"bugfix that doesn't *require* your new feature, **make a new distinct "
"branch and pull request** for the bugfix. Similarly, any proposed changes"
" to code style formatting should be in a completely separate pull "
"request."
msgstr "**不要把多个无关联的修复/特性修改放在同一个分支/拉去请求中。** 如果当你在做新特性的时候"
"发现了一个bug可以修复但修复这个bug *不需要用到* 这个新特性, **那么请另外创建一个分支并拉取请求。** "
"类似的,任何对代码风格的格式化都应该在单独的请求中拉取。"
#: ../../../CONTRIBUTING.rst:96
msgid ""
"Add a ``RELEASE.md`` file in the root of the project that contains the "
"release type (major, minor, patch) and a summary of the changes that will"
" be used as the release changelog entry. For example::"
msgstr "在项目根目录下添加 ``RELEASE.md`` 文件在其中包含release的类型主要、次要、补丁"
"以及对项目改变的概述这些内容会作为该release发布日志的一部分。下面是一个例子"
#: ../../../CONTRIBUTING.rst:104
msgid ""
"Check for unnecessary whitespace via ``git diff --check`` before "
"committing."
msgstr "在提交前使用 ``git diff --check`` 来检查是否有无意义的空白字符。"
#: ../../../CONTRIBUTING.rst:105
msgid ""
"First line of your commit message should start with present-tense verb, "
"be 50 characters or less, and include the relevant issue number(s) if "
"applicable. *Example:* ``Ensure proper PLUGIN_PATH behavior. Refs #428.``"
" If the commit *completely fixes* an existing bug report, please use "
"``Fixes #585`` or ``Fix #585`` syntax (so the relevant issue is "
"automatically closed upon PR merge)."
msgstr "commit信息的第一行应该以现在时动词开头并且第一行尽量保持在50字以下并且包含相关联"
"issue的编号如果有的话。 例如: ``Ensure proper PLUGIN_PATH behavior. Refs #428.`` "
"如果此项提交 *完全修复* 了某项已报告的bug请使用例如 ``Fixes #585`` 或 ``Fix #585`` 的语法"
"这样的话相关的issue会在PR合并后自动关闭。"
#: ../../../CONTRIBUTING.rst:110
msgid ""
"After the first line of the commit message, add a blank line and then a "
"more detailed explanation (when relevant)."
msgstr "在第一行commit信息后添加一行空白行再进行更多相关的细节描述。"
#: ../../../CONTRIBUTING.rst:112
msgid ""
"`Squash your commits`_ to eliminate merge commits and ensure a clean and "
"readable commit history."
msgstr "`压缩commit`_ 来消除合并commits确保你的commit历史记录是干净可读的。"
#: ../../../CONTRIBUTING.rst:114
msgid ""
"After you have issued a pull request, the continuous integration (CI) "
"system will run the test suite on all supported Python versions and check"
" for code style compliance. If any of these checks fail, you should fix "
"them. (If tests fail on the CI system but seem to pass locally, ensure "
"that local test runs aren't skipping any tests.)"
msgstr "在你发出拉取请求后持续集成CI系统会在所有支持的Python版本上运行测试套件并且"
"检查代码风格的合规性。如果出现了错误你应该将其修复。如果没有通过CI系统上的测试但是本地测试"
"通过了请再检查一下确保在本地进行了所有CI系统中的检查"
#: ../../../CONTRIBUTING.rst:121
msgid "Contribution quality standards"
msgstr "贡献质量标准"
#: ../../../CONTRIBUTING.rst:123
msgid ""
"Adhere to the project's code style standards. See: `Development "
"Environment`_"
msgstr "坚持项目的代码风格标准。详见 `开发环境`_"
#: ../../../CONTRIBUTING.rst:124
msgid ""
"Ensure your code is compatible with the `officially-supported Python "
"releases`_."
msgstr "确保你的代码可以兼容 `python的官方发布版本`_"
#: ../../../CONTRIBUTING.rst:125
msgid ""
"Add docs and tests for your changes. Undocumented and untested features "
"will not be accepted."
msgstr "请为你修改的内容添加文档与测试。未注有文档或没有对应测试的特性会被拒绝。"
#: ../../../CONTRIBUTING.rst:127
msgid ""
":pelican-doc:`Run all the tests <contribute>` **on all versions of Python"
" supported by Pelican** to ensure nothing was accidentally broken."
msgstr "**在Pelican支持的所有Python版本上** :pelican-doc:`执行所有测试 <contribute>` ,以确保"
"没有意外的问题。"
#: ../../../CONTRIBUTING.rst:130
msgid ""
"Check out our `Git Tips`_ page or `ask for help`_ if you need assistance "
"or have any questions about these guidelines."
msgstr "若需要帮助或对以上指南有任何疑惑,还可以查看我们的 `Git提示`_ 页面和 `请求帮助`_ 部分。"
#: ../../contribute.rst:15
msgid "Setting up the development environment"
msgstr "配置开发环境"
#: ../../contribute.rst:17
msgid ""
"While there are many ways to set up one's development environment, the "
"following instructions will utilize Pip_ and PDM_. These tools facilitate"
" managing virtual environments for separate Python projects that are "
"isolated from one another, so you can use different packages (and package"
" versions) for each."
msgstr "在配置开发环境时往往有很多种方式,但下面的指南会使用 Pip_ 和 PDM_ 完成配置。这两个工具"
"都可以用于管理虚拟环境使得不同的Python项目相互隔离这样就可以很方便的在不同的项目中使用不同的库以及不同的库版本。"
#: ../../contribute.rst:22
msgid "Please note that Python |min_python| is required for Pelican development."
msgstr "请注意要进行Pelican的开发至少需要Python |min_python|"
#: ../../contribute.rst:24
msgid ""
"*(Optional)* If you prefer to `install PDM "
"<https://pdm.fming.dev/latest/#installation>`_ once for use with multiple"
" projects, you can install it via::"
msgstr "*(可选)* 若您想要 `安装PDM <https://pdm.fming.dev/latest/#installation>`_ ,可以使用下面这条命令:"
#: ../../contribute.rst:29
msgid ""
"Point your web browser to the `Pelican repository`_ and tap the **Fork** "
"button at top-right. Then clone the source for your fork and add the "
"upstream project as a Git remote::"
msgstr "在Web浏览器中进入 `Pelican的代码仓库`_ ,点击右上角的 **Fork** 按钮。然后克隆你自己的这份fork最后添加项目的"
"原仓库为远程仓库upstream"
#: ../../contribute.rst:38
msgid ""
"While PDM can dynamically create and manage virtual environments, we're "
"going to manually create and activate a virtual environment::"
msgstr "通过下面的命令可以手动创建并激活一个虚拟环境:"
#: ../../contribute.rst:45 ../../contribute.rst:145
msgid "Install the needed dependencies and set up the project::"
msgstr "安装必需的依赖并配置项目:"
#: ../../contribute.rst:50
msgid "Your local environment should now be ready to go!"
msgstr "现在,你的本地开发环境就配置完成了!"
#: ../../contribute.rst:57
msgid "Development"
msgstr "开发"
#: ../../contribute.rst:59
msgid ""
"Once Pelican has been set up for local development, create a topic branch"
" for your bug fix or feature::"
msgstr "在配置好Pelican的本地开发环境后请先为你的bug修复或特性增加创建一个分支"
#: ../../contribute.rst:64
msgid ""
"Now you can make changes to Pelican, its documentation, and/or other "
"aspects of the project."
msgstr "在切换到新建的分支后就可以开始对Pelican的文档或其他内容做更改了。"
#: ../../contribute.rst:68
msgid "Running the test suite"
msgstr "运行测试套件"
#: ../../contribute.rst:70
msgid ""
"Each time you make changes to Pelican, there are two things to do "
"regarding tests: check that the existing tests pass, and add tests for "
"any new features or bug fixes. The tests are located in "
"``pelican/tests``, and you can run them via::"
msgstr "每次对Pelican做出修改后在测试方面需要做两个工作检查是否能通过已有的测试、为新增特性或bug修复"
"创建测试。请将自动化测试文件放在 ``pelican/tests`` 中,接着执行以下命令:"
#: ../../contribute.rst:77
msgid ""
"(For more on Invoke, see ``invoke -l`` to list tasks, or "
"https://pyinvoke.org for documentation.)"
msgstr "(执行 ``invoke -l`` 会列出可以调用的测试任务,关于此的更多文档请参阅 https://pyinvoke.org "
#: ../../contribute.rst:80
msgid ""
"In addition to running the test suite, it is important to also ensure "
"that any lines you changed conform to code style guidelines. You can "
"check that via::"
msgstr "除了运行测试套件外,还要确保修改了的部分遵循代码风格指南。可以通过下面的命令检查代码风格:"
#: ../../contribute.rst:85
msgid ""
"If code style violations are found in lines you changed, correct those "
"lines and re-run the above lint command until they have all been fixed. "
"You do not need to address style violations, if any, for code lines you "
"did not touch."
msgstr "如果在你修改过的代码中有地方违反了代码风格规范,请纠正并再次运行上述命令,直到全部纠正。"
"但是若是发现违反代码风格的地方并不是你修改的,请忽略之,不要进行纠正。"
#: ../../contribute.rst:89
msgid ""
"After making your changes and running the tests, you may see a test "
"failure mentioning that \"some generated files differ from the expected "
"functional tests output.\" If you have made changes that affect the HTML "
"output generated by Pelican, and the changes to that output are expected "
"and deemed correct given the nature of your changes, then you should "
"update the output used by the functional tests. To do so, **make sure you"
" have both** ``en_EN.utf8`` **and** ``fr_FR.utf8`` **locales installed**,"
" and then run the following command::"
msgstr "在修改完代码,运行测试的过程中,你可能会看到测试失败中有提到 \"some generated files differ from the expected "
"functional tests output.\" 。这可能是由于你对代码的修改影响到了Pelican的HTML输出若输出的结果确实是你想要的"
"请更新功能测试所用的输出用例。请确保你安装了 ``en_EN.utf8`` 和 ``fr_FR.utf8`` ,然后执行下述命令:"
#: ../../contribute.rst:99
msgid ""
"You may also find that some tests are skipped because some dependency "
"(e.g., Pandoc) is not installed. This does not automatically mean that "
"these tests have passed; you should at least verify that any skipped "
"tests are not affected by your changes."
msgstr "你还可能会发现有一些测试由于缺少依赖(例如 Pandoc而被跳过。这并不意味着通过了这些测试请至少确保对代码的修改"
"不会影响到这些被跳过的测试。"
#: ../../contribute.rst:104
msgid ""
"You should run the test suite under each of the supported versions of "
"Python. This is best done by creating a separate Python environment for "
"each version. Tox_ is a useful tool to automate running tests inside "
"``virtualenv`` environments."
msgstr "你应该在支持的所有Python版本下运行测试套件。一般会通过为每一个Python版本创建一个虚拟环境来实现这一点。"
"Tox_ 是一个用于在 ``virtualenv`` 环境中自动运行测试的工具。"
#: ../../contribute.rst:112
msgid "Building the docs"
msgstr "构建文档"
#: ../../contribute.rst:114
msgid ""
"If you make changes to the documentation, you should build and inspect "
"your changes before committing them::"
msgstr "若你对文档进行过修改请在commit前完成构建和检查"
#: ../../contribute.rst:119
msgid ""
"Open http://localhost:8000 in your browser to review the documentation. "
"While the above task is running, any changes you make and save to the "
"documentation should automatically appear in the browser, as it live-"
"reloads when it detects changes to the documentation source files."
msgstr "执行上述命令后请在Web浏览器中打开 http://localhost:8000 来查看文档。在上述命令执行时,对文档做的任何修改"
"应该会自动表现在浏览器中。"
#: ../../contribute.rst:125
msgid "Plugin development"
msgstr "插件开发"
#: ../../contribute.rst:127
msgid ""
"To create a *new* Pelican plugin, please refer to the `plugin template`_ "
"repository for detailed instructions."
msgstr "要创建一个 *新的* Pelican插件请参阅 `插件模板`_ 仓库以获得更为详细的指导。"
#: ../../contribute.rst:130
msgid ""
"If you want to contribute to an *existing* Pelican plugin, follow the "
"steps above to set up Pelican for local development, and then create a "
"directory to store cloned plugin repositories::"
msgstr "若你想在 *已有* Pelican插件中做贡献请先按前文所述步骤配置Pelican的本地开发环境然后创建一个"
"文件夹来存放克隆下来的插件仓库:"
#: ../../contribute.rst:136
msgid ""
"Assuming you wanted to contribute to the Simple Footnotes plugin, you "
"would first browse to the `Simple Footnotes`_ repository on GitHub and "
"tap the **Fork** button at top-right. Then clone the source for your fork"
" and add the upstream project as a Git remote::"
msgstr "假设想要为一个Simple Footnotes插件做贡献你应该先查看并fork `Simple Footnotes`_ 的Github仓库"
"然后克隆你自己fork的那一份再添加原仓库作为Git远程仓库upstream"
#: ../../contribute.rst:149
msgid "Create a topic branch for your plugin bug fix or feature::"
msgstr "同样地为你想要进行的bug修复或特性添加创建一个分支"
#: ../../contribute.rst:153
msgid ""
"After writing new tests for your plugin changes, run the plugin test "
"suite and check for code style compliance via::"
msgstr "完成修改并添加测试后,运行测试套件,并检查代码风格:"
#: ../../contribute.rst:159
msgid ""
"If style violations are found, many of them can be addressed "
"automatically via::"
msgstr "若存在不合规范风格的代码,大多数情况下可以通过下述命令自动纠正:"
#: ../../contribute.rst:163
msgid ""
"If style violations are found even after running the above auto-"
"formatters, you will need to make additional manual changes until "
"``invoke lint`` no longer reports any code style violations."
msgstr "如果在自动格式化后仍存在代码风格上的问题,请手动修正这些问题,直到执行 ``invoke lint`` "
"时不再报告问题。"
#: ../../contribute.rst:171
msgid "Submitting your changes"
msgstr "提交更改"
#: ../../contribute.rst:173
msgid ""
"Assuming linting validation and tests pass, add a ``RELEASE.md`` file in "
"the root of the project that contains the release type (major, minor, "
"patch) and a summary of the changes that will be used as the release "
"changelog entry. For example::"
msgstr "通过了风格检查和所有测试后,请在项目的根目录下添加一个 ``RELEASE.md`` 文件,其中应包含发布的"
"类型major、minor、patch以及代码变更的摘要这份摘要会被用作更新日志的条目。下面是一个例子"
#: ../../contribute.rst:182
msgid "Commit your changes and push your topic branch::"
msgstr "commit你的更改并push对应分支"
#: ../../contribute.rst:188
msgid ""
"Finally, browse to your repository fork on GitHub and submit a pull "
"request."
msgstr "最后前往Github从你fork的仓库向原仓库提出PR。"
#: ../../contribute.rst:192
msgid "Logging tips"
msgstr "日志指南"
#: ../../contribute.rst:194
msgid "Try to use logging with appropriate levels."
msgstr "请仔细斟酌合适的日志等级。"
#: ../../contribute.rst:196
msgid "For logging messages that are not repeated, use the usual Python way::"
msgstr "对于不重复的日志消息,使用一般的方式即可:"
#: ../../contribute.rst:205
#, python-format
msgid ""
"Do not format log messages yourself. Use ``%s`` formatting in messages "
"and pass arguments to logger. This is important, because the Pelican "
"logger will preprocess some arguments, such as exceptions."
msgstr "请不要自己格式化日志消息,而是使用在日志消息中使用 ``%s`` 并向logger传入参数。请务必"
"遵循这一规则因为Pelican的logger会自动预处理一些特殊的参数例如exception。"
#: ../../contribute.rst:210
msgid "Limiting extraneous log messages"
msgstr "限制低关联日志消息"
#: ../../contribute.rst:212
msgid ""
"If the log message can occur several times, you may want to limit the log"
" to prevent flooding. In order to do that, use the ``extra`` keyword "
"argument for the logging message in the following format::"
msgstr "如果日志消息会重复多次,你会希望限制这些多余的内容。使用 ``extra`` 命名参数来实现这一点:"
#: ../../contribute.rst:219
msgid ""
"Optionally, you can also set ``'limit_args'`` as a tuple of arguments in "
"``extra`` dict if your generic message needs formatting."
msgstr "另外,如果通用日志消息需要格式化,可以添加 ``'limit_args'`` 参数并将其对应值设为一个元组。"
#: ../../contribute.rst:222
msgid ""
"Limit is set to ``5``, i.e, first four logs with the same ``'limit_msg'``"
" are outputted normally but the fifth one will be logged using "
"``'limit_msg'`` (and ``'limit_args'`` if present). After the fifth, "
"corresponding log messages will be ignored."
msgstr "限制数默认设为了 ``5`` ,即前四个有相同 ``'limit_msg'`` 参数的日志消息会正常输出,但第五条"
"这样的日志消息会呈现为 ``'limit_msg'`` 参数值本身( ``'limit_args'`` 同理)。第六条及之后的日志消息会被直接忽略。"
#: ../../contribute.rst:227
msgid ""
"For example, if you want to log missing resources, use the following "
"code::"
msgstr "例如,如果你想要用日志记录资源缺失的信息,可以使用下面的代码:"
#: ../../contribute.rst:235
msgid "The log messages will be displayed as follows::"
msgstr "最终的日志消息看起来会像这样:"
#: ../../contribute.rst:245
msgid "Outputting traceback in the logs"
msgstr "在日志中输出traceback信息"
#: ../../contribute.rst:247
msgid ""
"If you're logging inside an ``except`` block, you may want to provide the"
" traceback information as well. You can do that by setting ``exc_info`` "
"keyword argument to ``True`` during logging. However, doing so by default"
" can be undesired because tracebacks are long and can be confusing to "
"regular users. Try to limit them to ``--debug`` mode like the following::"
msgstr "当在 ``except`` 块中进行日志记录时你可能会希望同时输出traceback信息。可以简单地将 ``exc_info`` 参数"
"设为 ``True`` 实现这一功能。但是通过此方法输出地traceback信息会非常长不便于理解。可以像下述代码一样将这些"
"信息限制在 ``--debug`` 模式中:"
#~ msgid ""
#~ "Use a search engine (e.g., DuckDuckGo,"
#~ " Google) to search for a solution "
#~ "to your problem. Someone may have "
#~ "already found a solution, perhaps in "
#~ "the form of a plugin_ or a "
#~ "specific combination of settings."
#~ msgstr ""
#~ msgid ""
#~ "Before you submit a contribution, please"
#~ " ask whether it is desired so "
#~ "that you don't spend a lot of "
#~ "time working on something that would "
#~ "be rejected for a known reason. "
#~ "Consider also whether your new feature"
#~ " might be better suited as a "
#~ "plugin_ — you can `ask for help`_"
#~ " to make that determination."
#~ msgstr ""
#~ msgid ""
#~ "`Run all the tests`_ **on all "
#~ "versions of Python supported by "
#~ "Pelican** to ensure nothing was "
#~ "accidentally broken."
#~ msgstr ""
#~ msgid ""
#~ "**Don't put multiple unrelated fixes/features"
#~ " in the same branch / pull "
#~ "request.** For example, if you're "
#~ "working on a new feature and find"
#~ " a bugfix that doesn't *require* your"
#~ " new feature, **make a new distinct"
#~ " branch and pull request** for the"
#~ " bugfix."
#~ msgstr ""
#~ msgid ""
#~ "If you have previously filed a "
#~ "GitHub issue and want to contribute "
#~ "code that addresses that issue, **please"
#~ " use** ``hub pull-request`` instead "
#~ "of using GitHub's web UI to submit"
#~ " the pull request. This isn't an "
#~ "absolute requirement, but makes the "
#~ "maintainers' lives much easier! Specifically:"
#~ " `install hub "
#~ "<https://github.com/github/hub/#installation>`_ and then"
#~ " run `hub pull-request -i [ISSUE] "
#~ "<https://hub.github.com/hub-pull-request.1.html>`_ "
#~ "to turn your GitHub issue into a"
#~ " pull request containing your code."
#~ msgstr ""
#~ msgid ""
#~ "After you have issued a pull "
#~ "request, the continuous integration (CI) "
#~ "system will run the test suite for"
#~ " all supported Python versions and "
#~ "check for PEP8 compliance. If any "
#~ "of these checks fail, you should "
#~ "fix them. (If tests fail on the"
#~ " CI system but seem to pass "
#~ "locally, ensure that local test runs "
#~ "aren't skipping any tests.)"
#~ msgstr ""
#~ msgid ""
#~ "Adhere to `PEP8 coding standards`_. This"
#~ " can be eased via the `pycodestyle"
#~ " <https://pypi.org/project/pycodestyle>`_ or `flake8"
#~ " <https://pypi.org/project/flake8/>`_ tools, the "
#~ "latter of which in particular will "
#~ "give you some useful hints about "
#~ "ways in which the code/formatting can"
#~ " be improved. We try to keep "
#~ "line length within the 79-character "
#~ "maximum specified by PEP8. Because that"
#~ " can sometimes compromise readability, the"
#~ " hard/enforced maximum is 88 characters."
#~ msgstr ""
#~ msgid ""
#~ "While there are many ways to set"
#~ " up one's development environment, the "
#~ "following instructions will utilize Pip_ "
#~ "and Poetry_. These tools facilitate "
#~ "managing virtual environments for separate "
#~ "Python projects that are isolated from"
#~ " one another, so you can use "
#~ "different packages (and package versions) "
#~ "for each."
#~ msgstr ""
#~ msgid "Please note that Python 3.7+ is required for Pelican development."
#~ msgstr ""
#~ msgid ""
#~ "*(Optional)* If you prefer to `install"
#~ " Poetry <https://python-"
#~ "poetry.org/docs/master/#installation>`_ once for use"
#~ " with multiple projects, you can "
#~ "install it via::"
#~ msgstr ""
#~ msgid ""
#~ "While Poetry can dynamically create and"
#~ " manage virtual environments, we're going"
#~ " to manually create and activate a"
#~ " virtual environment::"
#~ msgstr ""

Binary file not shown.

View file

@ -0,0 +1,481 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../faq.rst:2
msgid "Frequently Asked Questions (FAQ)"
msgstr "常见问题"
#: ../../faq.rst:4
msgid "Here are some frequently asked questions about Pelican."
msgstr "以下回答了一些关于Pelican的常见问题。"
#: ../../faq.rst:7
msgid "What's the best way to communicate a problem, question, or suggestion?"
msgstr "交流问题、疑问或提建议的最佳方式是什么?"
#: ../../faq.rst:9
msgid "Please read our :doc:`feedback guidelines <contribute>`."
msgstr "请参阅文档 :doc:`feedback guidelines <contribute>` 。"
#: ../../faq.rst:12
msgid "How can I help?"
msgstr "我如何能帮上忙?"
#: ../../faq.rst:14
msgid ""
"There are several ways to help out. First, you can communicate any "
"Pelican suggestions or problems you might have via `Pelican Discussions "
"<https://github.com/getpelican/pelican/discussions>`_. Please first check"
" the existing list of discussions and issues (both open and closed) in "
"order to avoid submitting topics that have already been covered before."
msgstr "有好多种方法可以提供帮助。首先,可以在 `Pelican讨论板块 <https://github.com/getpelican/pelican/discussions>`_ "
"中提出任何关于Pelican的建议或是问题。在提问或建议之前请先查看已关闭或开放的issues中是否已有相关"
"内容,以避免内容上的重复。"
#: ../../faq.rst:20
msgid ""
"If you want to contribute, please fork `the Git repository "
"<https://github.com/getpelican/pelican/>`_, create a new feature branch, "
"make your changes, and issue a pull request. Someone will review your "
"changes as soon as possible. Please refer to the :doc:`How to Contribute "
"<contribute>` section for more details."
msgstr "如果你想要对项目进行贡献请fork `Git仓库 <https://github.com/getpelican/pelican/>`_ "
"创建一个新的功能分支并在其中进行修改在修改完成后提出一个PR。项目组会尽快审核你的PR。关于此的更多"
"内容,请参见 :doc:`How to Contribute <contribute>` 一节。"
#: ../../faq.rst:26
msgid ""
"You can also contribute by creating themes and improving the "
"documentation."
msgstr "你可以发起的贡献当然也包括创建主题和改进文档。"
#: ../../faq.rst:29
msgid "Is the Pelican settings file mandatory?"
msgstr "一定需要Pelican配置文件吗"
#: ../../faq.rst:31
msgid ""
"Configuration files are optional and are just an easy way to configure "
"Pelican. For basic operations, it's possible to specify options while "
"invoking Pelican via the command line. See ``pelican --help`` for more "
"information."
msgstr "配置文件是可选的其本质是使您可以更方便地配置Pelican。对于一些基本的配置操作完全可以"
"在命令行中指定,调用 ``pelican --help`` 可以查看pelican命令的更多信息。"
#: ../../faq.rst:36
msgid "Changes to the settings file take no effect"
msgstr "对配置文件的修改没有生效"
#: ../../faq.rst:38
msgid ""
"When experimenting with different settings (especially the metadata ones)"
" caching may interfere and the changes may not be visible. In such cases,"
" ensure that caching is disabled via ``LOAD_CONTENT_CACHE = False`` or "
"use the ``--ignore-cache`` command-line switch."
msgstr "在尝试不同的配置时(尤其是尝试不同元数据时),缓存很可能会产生干扰,使得修改不可见。"
"此时,确保配置了 ``LOAD_CONTENT_CACHE = False`` 或在命令行中加上 ``--ignore-cache`` 以禁用缓存。"
#: ../../faq.rst:44
msgid "I'm creating my own theme. How do I use Pygments for syntax highlighting?"
msgstr "在自己创建主题时如何使用Pygments来调整语法高亮"
#: ../../faq.rst:46
msgid ""
"Pygments adds some classes to the generated content. These classes are "
"used by themes to style code syntax highlighting via CSS. Specifically, "
"you can customize the appearance of your syntax highlighting via the "
"``.highlight pre`` class in your theme's CSS file. To see how various "
"styles can be used to render Django code, for example, use the style "
"selector drop-down at top-right on the `Pygments project demo site "
"<https://pygments.org/demo/>`_."
msgstr "Pygments会为生成的内容添加一些类。这些类会为主题所用主题会通过CSS来为代码添加语法高亮。"
"具体来说你可以通过主题CSS文件中的 ``.highlight pre`` 类来自定义语法高亮的外观。在"
"`Pygments 项目的demo网站 <https://pygments.org/demo/>`_ 上可以预览能够渲染的代码类型。"
#: ../../faq.rst:53
msgid ""
"You can use the following example commands to generate a starting CSS "
"file from a Pygments built-in style (in this case, \"monokai\") and then "
"copy the generated CSS file to your new theme::"
msgstr "你可以使用下面的命令来让Pygments使用内置风格此处为 \"monokai\" 生成一个初始CSS文件"
"然后将此文件拷贝到新主题中:"
#: ../../faq.rst:60
msgid "Don't forget to import your ``pygment.css`` file from your main CSS file."
msgstr "不要忘了在你的CSS主文件中引入 ``pygment.css`` 文件。"
#: ../../faq.rst:63
msgid "How do I create my own theme?"
msgstr "如何创建我自己的主题?"
#: ../../faq.rst:65
msgid "Please refer to :ref:`theming-pelican`."
msgstr "请参阅 :ref:`theming-pelican` 。"
#: ../../faq.rst:68
msgid "I want to use Markdown, but I got an error."
msgstr "我想要使用Markdown但是出错了。"
#: ../../faq.rst:70
msgid ""
"If you try to generate Markdown content without first installing the "
"Markdown library, you may see a message that says ``No valid files found "
"in content``. Markdown is not a hard dependency for Pelican, so if you "
"have content in Markdown format, you will need to explicitly install the "
"Markdown library. You can do so by typing the following command, "
"prepending ``sudo`` if permissions require it::"
msgstr "如果没有事先安装Markdown库在生成Markdown内容时会看到一条提示 ``No valid files found "
"in content`` 。虽然Markdown并不是必需依赖但如果你写的内容中含有Markdown格式就需要安装Markdown"
"库了。输入下面的命令以安装Markdown库如果有要求权限请在前面添加 ``sudo`` "
#: ../../faq.rst:80
msgid "Can I use arbitrary metadata in my templates?"
msgstr "在模板中可以使用任意元数据吗?"
#: ../../faq.rst:82
msgid ""
"Yes. For example, to include a modified date in a Markdown post, one "
"could include the following at the top of the article::"
msgstr "当然可以。例如可以在Markdown帖子中包含一个“修改日期”加在文章开头即可"
#: ../../faq.rst:87
msgid ""
"For reStructuredText, this metadata should of course be prefixed with a "
"colon::"
msgstr "对于reStructuredText此元数据也应当以冒号为前缀"
#: ../../faq.rst:91
msgid ""
"This metadata can then be accessed in templates such as ``article.html`` "
"via::"
msgstr "此元数据可以在模板中获取到,例如在 ``article.html`` 中,可以像这样获取:"
#: ../../faq.rst:97
msgid ""
"If you want to include metadata in templates outside the article context "
"(e.g., ``base.html``), the ``if`` statement should instead be::"
msgstr "如果您想在article模板之外的模板中包含此元数据例如 ``base.html`` ),则 ``if`` 语句应改为:"
#: ../../faq.rst:103
msgid "How do I assign custom templates on a per-page basis?"
msgstr "如何为某个页面指定某个模板?"
#: ../../faq.rst:105
msgid ""
"It's as simple as adding an extra line of metadata to any page or article"
" that you want to have its own template. For example, this is how it "
"would be handled for content in reST format::"
msgstr "这非常简单在任何页面或者文章中都可以通过多添加一行元数据来指定特定模板。例如在reST中使用"
#: ../../faq.rst:111
msgid "For content in Markdown format::"
msgstr "对于Markdown则使用"
#: ../../faq.rst:115
msgid ""
"Then just make sure your theme contains the relevant template file (e.g. "
"``template_name.html``)."
msgstr "确保对应的模板文件在主题中存在即可(例如 ``template_name.html`` )。"
#: ../../faq.rst:119
msgid "How can I override the generated URL of a specific page or article?"
msgstr "如何重写某一个页面或文章生成的URL"
#: ../../faq.rst:121
msgid ""
"Include ``url`` and ``save_as`` metadata in any pages or articles that "
"you want to override the generated URL. Here is an example page in reST "
"format::"
msgstr "在任意页面或文章中都可以添加 ``url`` 和 ``save_as`` 元数据这样就可以重写URL了。"
"下面以reST格式为例"
#: ../../faq.rst:130
msgid ""
"With this metadata, the page will be written to "
"``override/url/index.html`` and Pelican will use the URL "
"``override/url/`` to link to this page."
msgstr "有了这样的元数据,此页面会写入 ``override/url/index.html`` Pelican会将"
"``override/url/`` 作为链接到此页面的URL。"
#: ../../faq.rst:134
msgid "How can I use a static page as my home page?"
msgstr "如何使用一个静态页面作为主页?"
#: ../../faq.rst:136
msgid ""
"The override feature mentioned above can be used to specify a static page"
" as your home page. The following Markdown example could be stored in "
"``content/pages/home.md``::"
msgstr "上一个问题中提到的特性可以用于实现此需求。下面例子中的Markdown文件保存为"
"``content/pages/home.md`` "
#: ../../faq.rst:146
msgid ""
"If the original blog index is still wanted, it can then be saved in a "
"different location by setting ``INDEX_SAVE_AS = 'blog_index.html'`` for "
"the ``'index'`` direct template."
msgstr "如果仍需要原来的博客主页(即 ``'index'`` 直接模板),可以通过设置 "
"``INDEX_SAVE_AS = 'blog_index.html'`` 将其存储在其他位置。"
#: ../../faq.rst:151
msgid "What if I want to disable feed generation?"
msgstr "可以禁用订阅源生成吗?"
#: ../../faq.rst:153
msgid ""
"To disable feed generation, all feed settings should be set to ``None``. "
"All but three feed settings already default to ``None``, so if you want "
"to disable all feed generation, you only need to specify the following "
"settings::"
msgstr "要禁用订阅源,所有订阅源相关的设置都应被设为 ``None`` 。其中有三项设置默认为 ``None`` "
"因此如果要彻底不生成订阅源,你只需要指定下面这些设置:"
#: ../../faq.rst:163
msgid ""
"The word ``None`` should not be surrounded by quotes. Please note that "
"``None`` and ``''`` are not the same thing."
msgstr "``None`` 两侧不需要加引号。请注意 ``None`` 和 ``''`` 不是同一个东西。"
#: ../../faq.rst:167
msgid ""
"I'm getting a warning about feeds generated without SITEURL being set "
"properly"
msgstr "Pelican警告说由于SITEURL设置不正确无法正常生成订阅源"
#: ../../faq.rst:169
msgid ""
"`RSS and Atom feeds require all URL links to be absolute "
"<https://validator.w3.org/feed/docs/rss2.html#comments>`_. In order to "
"properly generate links in Pelican you will need to set ``SITEURL`` to "
"the full path of your site."
msgstr "`RSS和Atom订阅源要求所有URL都要链接到绝对地址 <https://validator.w3.org/feed/docs/rss2.html#comments>`_ 。"
"为了让Pelican正确生成链接你需要将站点的 ``SITEURL`` 设置为完整路径。"
#: ../../faq.rst:174
msgid ""
"Feeds are still generated when this warning is displayed, but links "
"within may be malformed and thus the feed may not validate."
msgstr "虽然Pelican提出了警告但是仍会生成订阅源但其中的链接可能是坏掉的这会导致订阅源不可用。"
#: ../../faq.rst:178
msgid "Can I force Atom feeds to show only summaries instead of article content?"
msgstr "可以让Atom订阅源只显示摘要不显示文章内容吗"
#: ../../faq.rst:180
msgid ""
"Instead of having to open a separate browser window to read articles, the"
" overwhelming majority of folks who use feed readers prefer to read "
"content within the feed reader itself. Mainly for that reason, Pelican "
"does not support restricting Atom feeds to only contain summaries. Unlike"
" Atom feeds, the RSS feed specification does not include a separate "
"``content`` field, so by default Pelican publishes RSS feeds that only "
"contain summaries (but can optionally be set to instead publish full "
"content RSS feeds). So the default feed generation behavior provides "
"users with a choice: subscribe to Atom feeds for full content or to RSS "
"feeds for just the summaries."
msgstr "绝大多数使用订阅源阅读器的人都更喜欢直接在阅读器中阅读文章内容,而不是另外再打开窗口来阅读。"
"因此Pelican不支持使Atom只包含摘要。但是由于RSS不包含单独的 ``content`` 字段因此Pelican在发布RSS"
"时默认只包含摘要当然也可以设置为包含文章内容。Pelican在订阅源生成上的如此行为就可以让用户自行选择订阅类型"
"包含了完整内容的Atom或是只包含摘要的RSS。"
#: ../../faq.rst:191
msgid "Is Pelican only suitable for blogs?"
msgstr "Pelican只适合用于博客吗"
#: ../../faq.rst:193
msgid ""
"No. Pelican can be easily configured to create and maintain any type of "
"static site. This may require a little customization of your theme and "
"Pelican configuration. For example, if you are building a launch site for"
" your product and do not need tags on your site, you could remove the "
"relevant HTML code from your theme. You can also disable generation of "
"tag-related pages via::"
msgstr "不是的。Pelican可以很方便就用于创建维护任何静态站点为此你需要对主题和配置做一些定制。"
"例如如果要为你的产品构建一个宣传网站即不需要使用标签从主题中移除与标签相关的HTML代码即可。"
"另外,还可以通过下面的设置来禁用标签相关页面的生成:"
#: ../../faq.rst:203
msgid ""
"Why does Pelican always write all HTML files even with content caching "
"enabled?"
msgstr "启用内容缓存后Pelican为什么仍会写入所有HTML文件"
#: ../../faq.rst:205
msgid ""
"In order to reliably determine whether the HTML output is different "
"before writing it, a large part of the generation environment including "
"the template contexts, imported plugins, etc. would have to be saved and "
"compared, at least in the form of a hash (which would require special "
"handling of unhashable types), because of all the possible combinations "
"of plugins, pagination, etc. which may change in many different ways. "
"This would require a lot more processing time and memory and storage "
"space. Simply writing the files each time is a lot faster and a lot more "
"reliable."
msgstr "为了确定HTML输出确实和之前的不同模板上下文、插件等很多生成环境都需要保存并比较某种哈希值"
"对于不可哈希的内容类型还需要进行一些额外处理。另外由于插件、分页等内容的存在输出的HTML很可能"
"会与之前不同。因此考虑到处理时间和存储空间每次都重新写入HTML会更快更可靠。"
#: ../../faq.rst:214
msgid ""
"However, this means that the modification time of the files changes every"
" time, so a ``rsync`` based upload will transfer them even if their "
"content hasn't changed. A simple solution is to make ``rsync`` use the "
"``--checksum`` option, which will make it compare the file checksums in a"
" much faster way than Pelican would."
msgstr "然而,这样的机制会使得在每次生成站点后,文件的修改时间都会变化,因此基于 ``rsync`` 上传时会把"
"没有变化的内容也进行上传。一个简便的解决方法就是给 ``rsync`` 加上 ``--checksum`` 选项这会比Pelican在"
"生成时进行校验更快。"
#: ../../faq.rst:221
msgid "How to process only a subset of all articles?"
msgstr "如何只处理一部分文章?"
#: ../../faq.rst:223
msgid ""
"It is often useful to process only e.g. 10 articles for debugging "
"purposes. This can be achieved by explicitly specifying only the "
"filenames of those articles in ``ARTICLE_PATHS``. A list of such "
"filenames could be found using a command similar to ``cd content; find "
"-name '*.md' | head -n 10``."
msgstr "简便起见,在调试时可能只需要处理几篇文章。可以通过在设置项 ``ARTICLE_PATHS`` 中添加需要处理的文章"
"的文件名。可以通过类似于 ``cd content; find -name '*.md' | head -n 10`` 的命令获取文章文件名的一个列表。"
#: ../../faq.rst:229
msgid "My tag cloud is missing/broken since I upgraded Pelican"
msgstr "在升级Pelican后标签云消失或不可用了"
#: ../../faq.rst:231
msgid ""
"In an ongoing effort to streamline Pelican, tag cloud generation has been"
" moved out of Pelican core and into a separate `plugin "
"<https://github.com/pelican-plugins/tag-cloud>`_. See the :ref:`plugins` "
"documentation for further information about the Pelican plugin system."
msgstr "我们一直致力于精简Pelican标签云生成的功能已经从Pelican核心中移除转而放到了一个单独的 "
"`插件 <https://github.com/pelican-plugins/tag-cloud>`_ 中。查看 :ref:`plugins` 文档获取更多关于"
"Pelican插件系统的信息。"
#: ../../faq.rst:237
msgid "Since I upgraded Pelican my pages are no longer rendered"
msgstr "升级Pelican后一些页面没有被渲染"
#: ../../faq.rst:239
msgid ""
"Pages were available to themes as lowercase ``pages`` and uppercase "
"``PAGES``. To bring this inline with the :ref:`templates-variables` "
"section, ``PAGES`` has been removed. This is quickly resolved by updating"
" your theme to iterate over ``pages`` instead of ``PAGES``. Just "
"replace::"
msgstr "在以前的版本中,主题通过小写的 ``pages`` 和大写的 ``PAGES`` 都能获取到页面。"
"为了使之与 :ref:`templates-variables` 一节中的内容保持一致,大写的 ``PAGES`` 被删除了。"
"只要将主题中的 ``PAGES`` 替换为 ``pages`` ,问题即可解决。例如将原先的:"
#: ../../faq.rst:246
msgid "with something like::"
msgstr "替换为:"
#: ../../faq.rst:251
msgid "How can I stop Pelican from trying to parse my static files as content?"
msgstr "如何避免让Pelican将我的静态文件解析为内容文件译者注例如要将一个HTML文件作为静态文件"
#: ../../faq.rst:253
msgid ""
"Pelican's article and page generators run before it's static generator. "
"That means if you use a setup similar to the default configuration, where"
" a static source directory is defined inside a ``*_PATHS`` setting, all "
"files that have a valid content file ending (``.html``, ``.rst``, "
"``.md``, ...) will be treated as articles or pages before they get "
"treated as static files."
msgstr "Pelican的文章与页面生成器会先于静态文件生成器运行。这意味着若使用与默认配置类似的设置即"
"静态资源文件夹定义在某个 ``*_PATHS`` 配置项中,所有以有效内容文件后缀结尾的文件( ``.html`` 、 ``.rst`` 、 "
"``.md`` 等)都会被视为文章或者页面,而不是静态文件。"
#: ../../faq.rst:259
msgid ""
"To circumvent this issue either use the appropriate ``*_EXCLUDES`` "
"setting or disable the offending reader via ``READERS`` if you don't need"
" it."
msgstr "为了避免这个问题,使用合适的 ``*_EXCLUDES`` 配置,在必要时还可以通过 ``READERS`` 配置项"
"来直接禁用产生问题的reader"
#: ../../faq.rst:263
msgid "Why is [arbitrary Markdown syntax] not supported?"
msgstr "为什么不是所有的Markdown语法都支持"
#: ../../faq.rst:265
msgid ""
"Pelican does not directly handle Markdown processing and instead "
"delegates that task to the Python-Markdown_ project, the core of which "
"purposefully follows the original Markdown syntax rules and not the "
"myriad Markdown \"flavors\" that have subsequently propagated. That said,"
" Python-Markdown_ is quite modular, and the syntax you are looking for "
"may be provided by one of the many available `Markdown Extensions`_. "
"Alternatively, some folks have created Pelican plugins that support "
"Markdown variants, so that may be your best choice if there is a "
"particular variant you want to use when writing your content."
msgstr "Pelican并不直接对Markdown进行处理而是将此任务交给 Python-Markdown_ 项目,此项目的核心有意只"
"遵循原始的Markdown语法规则而不服从之后传播开的大量Markdown风格。另外 Python-Markdown_ 时相当模块化的,"
"你想要使用的语法可能已经有现成的 `Markdown扩展`_ 进行了实现。或者也有人创建了支持Markdown变体的Pelican"
"插件如果你想要用某种Markdown变体可以在这些地方寻找支持。"
#~ msgid ""
#~ "If you want to contribute, please "
#~ "fork `the git repository "
#~ "<https://github.com/getpelican/pelican/>`_, create a "
#~ "new feature branch, make your changes,"
#~ " and issue a pull request. Someone"
#~ " will review your changes as soon "
#~ "as possible. Please refer to the "
#~ ":doc:`How to Contribute <contribute>` section"
#~ " for more details."
#~ msgstr ""
#~ msgid ""
#~ "If you try to generate Markdown "
#~ "content without first installing the "
#~ "Markdown library, may see a message "
#~ "that says ``No valid files found "
#~ "in content``. Markdown is not a "
#~ "hard dependency for Pelican, so if "
#~ "you have content in Markdown format, "
#~ "you will need to explicitly install "
#~ "the Markdown library. You can do "
#~ "so by typing the following command, "
#~ "prepending ``sudo`` if permissions require "
#~ "it::"
#~ msgstr ""
#~ msgid ""
#~ "With this metadata, the page will "
#~ "be written to ``override/url/index.html`` and"
#~ " Pelican will use url ``override/url/`` "
#~ "to link to this page."
#~ msgstr ""
#~ msgid "My tag-cloud is missing/broken since I upgraded Pelican"
#~ msgstr ""
#~ msgid ""
#~ "When only several specific output files"
#~ " are of interest (e.g. when working"
#~ " on some specific page or the "
#~ "theme templates), the ``WRITE_SELECTED`` "
#~ "option may help, see "
#~ ":ref:`writing_only_selected_content`."
#~ msgstr ""

Binary file not shown.

View file

@ -0,0 +1,328 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-13 10:21+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../importer.rst:4
msgid "Importing an existing site"
msgstr "导入已有站点"
#: ../../importer.rst:7
msgid "Description"
msgstr "简介"
#: ../../importer.rst:9
msgid ""
"``pelican-import`` is a command-line tool for converting articles from "
"other software to reStructuredText or Markdown. The supported import "
"formats are:"
msgstr ""
"命令行工具 ``pelican-import`` "
"用于将其他软件生成的文章转换成reStructuredText或Markdown格式。支持导入下面这些格式"
#: ../../importer.rst:12
msgid "Blogger XML export"
msgstr "Blogger XML export"
#: ../../importer.rst:13
msgid "Dotclear export"
msgstr "Dotclear export"
#: ../../importer.rst:14
msgid "Medium export"
msgstr ""
#: ../../importer.rst:15
msgid "Tumblr API"
msgstr "Tumblr API"
#: ../../importer.rst:16
msgid "WordPress XML export"
msgstr "WordPress XML export"
#: ../../importer.rst:17
msgid "RSS/Atom feed"
msgstr "RSS/Atom feed"
#: ../../importer.rst:19
msgid ""
"The conversion from HTML to reStructuredText or Markdown relies on "
"`Pandoc`_. For Dotclear, if the source posts are written with Markdown "
"syntax, they will not be converted (as Pelican also supports Markdown)."
msgstr ""
"从HTML转换到reStructuredText或Markdown是依赖 `Pandoc`_ "
"完成的。对于Dotclear若原帖子是由Markdown语法写的则无需转换因为Pelican本就支持Markdown。"
#: ../../importer.rst:25
msgid ""
"Unlike Pelican, Wordpress supports multiple categories per article. These"
" are imported as a comma-separated string. You have to resolve these "
"manually, or use a plugin such as `More Categories`_ that enables "
"multiple categories per article."
msgstr ""
"和Pelican不同在Wordpress中可以将一篇文章同时放在多个分类中。在导入时各个分类会以逗号分隔你必须自己手动进行处理。或者也可以使用例如"
" `More Categories`_ 这样的插件,从而可以将文章放在多个分类中。"
#: ../../importer.rst:32
msgid ""
"Imported pages may contain links to images that still point to the "
"original site. So you might want to download those images into your local"
" content and manually re-link them from the relevant pages of your site."
msgstr ""
#: ../../importer.rst:37
msgid "Dependencies"
msgstr "依赖"
#: ../../importer.rst:39
msgid ""
"``pelican-import`` has some dependencies not required by the rest of "
"Pelican:"
msgstr "``pelican-import`` 需要用到一些其他依赖,这些依赖只会被 ``pelican-import`` 用到:"
#: ../../importer.rst:41
msgid ""
"*BeautifulSoup4* and *lxml*, for WordPress and Dotclear import. Can be "
"installed like any other Python package (``pip install BeautifulSoup4 "
"lxml``)."
msgstr ""
"为了能够导入WordPress和Dotclear的内容需要*BeautifulSoup4* 与 *lxml* "
"。安装方法与其他Python包相同 ``pip install BeautifulSoup4 lxml`` "
#: ../../importer.rst:44
msgid "*Feedparser*, for feed import (``pip install feedparser``)."
msgstr "为了能够导入订阅源,需要 *Feedparser* ``pip install feedparser`` "
#: ../../importer.rst:45
msgid ""
"*Pandoc*, see the `Pandoc site`_ for installation instructions on your "
"operating system."
msgstr "还需要 *Pandoc* ,参照 `Pandoc官方网站`_ 进行安装。"
#: ../../importer.rst:53
msgid "Usage"
msgstr "用法"
#: ../../importer.rst:63
msgid "Positional arguments"
msgstr "位置参数"
#: ../../importer.rst:65
msgid "``input``"
msgstr "``input``"
#: ../../importer.rst:65
msgid "The input file to read"
msgstr "需要读取的输入文件"
#: ../../importer.rst:66
msgid "``api_key``"
msgstr "``api_key``"
#: ../../importer.rst:66
msgid ""
"(Tumblr only) api_key can be obtained from "
"https://www.tumblr.com/oauth/apps"
msgstr "只会在Tumblr中用到从 https://www.tumblr.com/oauth/apps 中获取到的api_key"
#: ../../importer.rst:70
msgid "Optional arguments"
msgstr "可选参数"
#: ../../importer.rst:72
msgid "Show this help message and exit"
msgstr "显示此帮助信息并退出 ``pelican-import`` "
#: ../../importer.rst:73
msgid "Blogger XML export (default: False)"
msgstr "输入是否为Blogger XML格式默认False"
#: ../../importer.rst:74
msgid "Dotclear export (default: False)"
msgstr "输入是否为Dotclear格式默认False"
#: ../../importer.rst:75
msgid "Medium export (default: False)"
msgstr "输入是否为Medium格式默认False"
#: ../../importer.rst:76
msgid "Tumblr API (default: False)"
msgstr "输入是否为Tumblr API格式默认False"
#: ../../importer.rst:77
msgid "WordPress XML export (default: False)"
msgstr "输入是否为WordPress XML格式默认False"
#: ../../importer.rst:78
msgid "Feed to parse (default: False)"
msgstr "输入是否为订阅源格式默认False"
#: ../../importer.rst:80
msgid "Output path (default: content)"
msgstr "输出路径默认content"
#: ../../importer.rst:82
msgid ""
"Output markup format: ``rst``, ``markdown``, or ``asciidoc`` (default: "
"``rst``)"
msgstr "输出格式,可选值为: ``rst`` 、 ``markdown`` 、 ``asciidoc`` (默认: ``rst`` "
#: ../../importer.rst:84
msgid "Put files in directories with categories name (default: False)"
msgstr "将输出文件按分类名放到各文件夹中默认False"
#: ../../importer.rst:86
msgid ""
"Put files recognised as pages in \"pages/\" sub- directory (blogger and "
"wordpress import only) (default: False)"
msgstr "将识别为页面的文件放入 \"pages/\" 子文件夹中仅在blogger和wordpress中有用默认False"
#: ../../importer.rst:89
msgid "Import only post from the specified author"
msgstr "只导入某个作者的帖子"
#: ../../importer.rst:90
msgid ""
"Strip raw HTML code that can't be converted to markup such as flash "
"embeds or iframes (default: False)"
msgstr "删除无法转换的HTML代码例如嵌入的flash或iframe默认False"
#: ../../importer.rst:92
msgid ""
"Put wordpress custom post types in directories. If used with --dir-cat "
"option directories will be created as \"/post_type/category/\" (wordpress"
" import only)"
msgstr ""
"将wordpress中的自定义类型博文放到对应文件夹中。如果同时还使用了 --dir-cat 选项,输出转换后文件时会创建诸如 "
"\"/post_type/category/\" 的文件夹。只在wordpress中有效"
#: ../../importer.rst:95
msgid ""
"Download files uploaded to wordpress as attachments. Files will be added "
"to posts as a list in the post header and links to the files within the "
"post will be updated. All files will be downloaded, even if they aren't "
"associated with a post. Files will be downloaded with their original path"
" inside the output directory, e.g. \"output/wp-"
"uploads/date/postname/file.jpg\". (wordpress import only) (requires an "
"internet connection)"
msgstr ""
"下载作为附件上传到WordPress的文件。文件会以列表形式添加到帖子的开头并且到这些文件的链接都会进行更新。另外即使某些文件没有在任何帖子中用到也同样会被下载。文件会被下载到输出文件夹下并保持原始路径例如"
" \"output/wp-uploads/date/postname/file.jpg\" "
"。只有在wordpress中有用且需要互联网连接"
#: ../../importer.rst:104
msgid ""
"Disable storing slugs from imported posts within output. With this "
"disabled, your Pelican URLs may not be consistent with your original "
"posts. (default: False)"
msgstr "不保存导入帖子的slug会导致Pelican的URL和原始帖子不一致。默认False"
#: ../../importer.rst:109
msgid "Blog name used in Tumblr API"
msgstr "Tumblr API中使用的博客名"
#: ../../importer.rst:113
msgid "Examples"
msgstr "例子"
#: ../../importer.rst:115
msgid "For Blogger::"
msgstr "导入Blogger"
#: ../../importer.rst:119
msgid "For Dotclear::"
msgstr "导入Dotclear"
#: ../../importer.rst:123
msgid "For Medium::"
msgstr "导入Medium"
#: ../../importer.rst:127
msgid ""
"The Medium export is a zip file. Unzip it, and point this tool to the "
"\"posts\" subdirectory. For more information on how to export, see "
"https://help.medium.com/hc/en-us/articles/115004745787-Export-your-"
"account-data."
msgstr "Medium中导出的是一个zip文件。请先解压之然后再将其中的“posts”子目录传给此工具。"
"https://help.medium.com/hc/en-us/articles/115004745787-Export-your-account-data 中有更详细的导出指导。"
#: ../../importer.rst:131
msgid "For Tumblr::"
msgstr "导入Tumblr"
#: ../../importer.rst:135
msgid "For WordPress::"
msgstr "导入WordPress"
#: ../../importer.rst:139
msgid "For Medium (an example of using an RSS feed):"
msgstr "导入Medium一个使用RSS订阅源的例子"
#: ../../importer.rst:141
msgid ""
"$ python -m pip install feedparser $ pelican-import --feed "
"https://medium.com/feed/@username"
msgstr "$ python -m pip install feedparser $ pelican-import --feed "
"https://medium.com/feed/@username"
#: ../../importer.rst:146
msgid "The RSS feed may only return the most recent posts — not all of them."
msgstr "RSS订阅源可能只会返回最新的帖子而不是所有帖子。"
#: ../../importer.rst:149
msgid "Tests"
msgstr "测试"
#: ../../importer.rst:151
msgid "To test the module, one can use sample files:"
msgstr "可以使用下面的文件作为样例,来测试模块"
#: ../../importer.rst:153
msgid ""
"for WordPress: https://www.wpbeginner.com/wp-themes/how-to-add-dummy-"
"content-for-theme-development-in-wordpress/"
msgstr ""
"WordPress https://www.wpbeginner.com/wp-themes/how-to-add-dummy-content-"
"for-theme-development-in-wordpress/"
#: ../../importer.rst:154
msgid "for Dotclear: http://media.dotaddict.org/tda/downloads/lorem-backup.txt"
msgstr "Dotclear http://media.dotaddict.org/tda/downloads/lorem-backup.txt"
#~ msgid "Posterous API"
#~ msgstr ""
#~ msgid "``api_token``"
#~ msgstr ""
#~ msgid ""
#~ "(Posterous only) api_token can be "
#~ "obtained from http://posterous.com/api/"
#~ msgstr ""
#~ msgid "Posterous API (default: False)"
#~ msgstr ""
#~ msgid "Email used to authenticate Posterous API"
#~ msgstr ""
#~ msgid "Password used to authenticate Posterous API"
#~ msgstr ""
#~ msgid "for Posterous::"
#~ msgstr ""

Binary file not shown.

View file

@ -0,0 +1,131 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.12.1\n"
#: ../../index.rst:2
msgid "Pelican |release|"
msgstr "Pelican |release|"
#: ../../index.rst:13
msgid ""
"Pelican is a static site generator, written in Python_. Highlights "
"include:"
msgstr "Pelican是一个用 Python_ 写的静态站点生成器,"
"它有诸多亮点:"
#: ../../index.rst:15
msgid ""
"Write your content directly with your editor of choice in "
"reStructuredText_ or Markdown_ formats"
msgstr "你可以直接在自己的编辑器中用 reStructuredText_ 或 Markdown_ 完成内容创作"
#: ../../index.rst:17
msgid "Includes a simple CLI tool to (re)generate your site"
msgstr "自带了一个简单的命令行工具,你可以用它来生成你的站点"
#: ../../index.rst:18
msgid "Easy to interface with distributed version control systems and web hooks"
msgstr "易于和分布式版本控制系统和webhook连接"
#: ../../index.rst:19
msgid "Completely static output is easy to host anywhere"
msgstr "生成的站点是完全静态的,可以在任何主机上轻松地部署"
#: ../../index.rst:21
msgid "Ready to get started? Check out the :doc:`Quickstart<quickstart>` guide."
msgstr "准备好开始体验了吗?请查看 :doc:`快速入门<quickstart>` 指南。"
#: ../../index.rst:24
msgid "Features"
msgstr "特性"
#: ../../index.rst:26
msgid "Pelicans feature highlights include:"
msgstr "Pelican在特性上也有很多亮点"
#: ../../index.rst:28
msgid ""
"Articles (e.g., blog posts) and pages (e.g., \"About\", \"Projects\", "
"\"Contact\")"
msgstr "可以生成文章(例如博客推文)和页面(例如“关于”、“联系我们”、“项目”)"
#: ../../index.rst:29
msgid "Integration with external services"
msgstr "可以和外部服务集成"
#: ../../index.rst:30
msgid "Site themes (created using Jinja2_ templates)"
msgstr "可以使用主题(主题使用 Jinja2_ 模板引擎创建的)"
#: ../../index.rst:31
msgid "Publication of articles in multiple languages"
msgstr "可以发布多语言文章(可切换语言)"
#: ../../index.rst:32
msgid "Generation of Atom and RSS feeds"
msgstr "可以生成Atom和Rss feeds"
#: ../../index.rst:33
msgid "Code syntax highlighting"
msgstr "可以显示代码高亮"
#: ../../index.rst:34
msgid "Import existing content from WordPress, Dotclear, or RSS feeds"
msgstr "可以从WordPress、Dotclear或Rss feeds导入已有的内容"
#: ../../index.rst:35
msgid "Fast rebuild times thanks to content caching and selective output writing"
msgstr "得益于内容缓存和选择性生成,可以快速的重新生成站点"
#: ../../index.rst:36
msgid "Extensible via a rich plugin ecosystem: `Pelican Plugins`_"
msgstr "可扩展性强,有丰富的插件生态: `Pelican Plugins`_"
#: ../../index.rst:39
msgid "Why the name \"Pelican\"?"
msgstr "为什么叫做“Pelican”"
#: ../../index.rst:41
msgid ""
"\"Pelican\" is an anagram for *calepin*, which means \"notebook\" in "
"French. ;)"
msgstr "“Pelican”是法语词笔记本 *calepin* 读音的回文。;)"
#: ../../index.rst:44
msgid "Source code"
msgstr "源码"
#: ../../index.rst:46
msgid "You can access the source code at: https://github.com/getpelican/pelican"
msgstr "在这里可以获取Pelican的源码 https://github.com/getpelican/pelican"
#: ../../index.rst:49
msgid "How to get help, contribute, or provide feedback"
msgstr "如何获取帮助、贡献内容或是提供反馈"
#: ../../index.rst:51
msgid ""
"See our :doc:`feedback and contribution submission guidelines "
"<contribute>`."
msgstr "请查看文档 :doc:`反馈意见和贡献的提交指南 "
"<contribute>`。"
#: ../../index.rst:54
msgid "Documentation"
msgstr "文档"

Binary file not shown.

View file

@ -0,0 +1,221 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../install.rst:2
msgid "Installing Pelican"
msgstr "安装Pelican"
#: ../../install.rst:4
msgid ""
"Pelican currently runs best on |min_python|; earlier versions of Python "
"are not supported."
msgstr "Pelican需要运行在 |min_python| 版本以上的Python低版本的Python是不支持的。"
#: ../../install.rst:6
msgid ""
"You can install Pelican via several different methods. The simplest is "
"via Pip_::"
msgstr "有几种不同的方法可以安装Pelican最简单的就是通过 Pip_"
#: ../../install.rst:10
msgid "Or, if you plan on using Markdown::"
msgstr "如果您需要使用Markdown请使用下面的命令安装"
#: ../../install.rst:14
msgid ""
"(Keep in mind that some operating systems will require you to prefix the "
"above command with ``sudo`` in order to install Pelican system-wide.)"
msgstr "(在某些操作系统中,需要在命令前加 ``sudo`` 才能在整个系统上安装Pelican"
#: ../../install.rst:17
msgid ""
"While the above is the simplest method, the recommended approach is to "
"create a virtual environment for Pelican via virtualenv_ before "
"installing Pelican. Assuming you have virtualenv_ installed, you can then"
" open a new terminal session and create a new virtual environment for "
"Pelican::"
msgstr ""
"尽管上面是最简单的安装方法,但我们推荐使用虚拟环境 virtualenv_ 完成Pelican的安装。当您安装好了 virtualenv_ "
"后打开一个新的命令行来为Pelican创建一个虚拟环境"
#: ../../install.rst:26
msgid ""
"Once the virtual environment has been created and activated, Pelican can "
"be installed via ``python -m pip install pelican`` as noted above. "
"Alternatively, if you have the project source, you can install Pelican "
"using the distutils method::"
msgstr ""
"当创建并激活虚拟环境后,使用之前提到过的命令 ``python -m pip install pelican`` "
"就可以安装Pelican了。或者如果您想要从源码安装可以通过distutils的安装脚本完成"
#: ../../install.rst:33
msgid ""
"If you have Git installed and prefer to install the latest bleeding-edge "
"version of Pelican rather than a stable release, use the following "
"command::"
msgstr "如果安装过Git并且您希望安装Pelican的最最新版本而不是稳定版请使用下面的命令"
#: ../../install.rst:38
msgid ""
"Once Pelican is installed, you can run ``pelican --help`` to see basic "
"usage options. For more detail, refer to the :doc:`Publish<publish>` "
"section."
msgstr ""
"当您安装了Pelican可以执行 ``pelican --help`` 命令来查看一些基本的用法。从文档的 "
":doc:`Publish<publish>` 章节可以了解更多信息。"
#: ../../install.rst:42
msgid "Optional packages"
msgstr "可选包"
#: ../../install.rst:44
msgid ""
"If you plan on using `Markdown <https://pypi.org/project/Markdown/>`_ as "
"a markup format, you can install Pelican with Markdown support::"
msgstr ""
"如您希望使用 `Markdown <https://pypi.org/project/Markdown/>`_ "
"来写作执行下面的命令来安装Markdown支持"
#: ../../install.rst:49
msgid ""
"Typographical enhancements can be enabled in your settings file, but "
"first the requisite `Typogrify <https://pypi.org/project/typogrify/>`_ "
"library must be installed::"
msgstr ""
"Pelican还支持排版增强若您需要使用请先安装 `Typogrify "
"<https://pypi.org/project/typogrify/>`_ 库,稍后您可以在设置文件中启用它。"
#: ../../install.rst:56
msgid "Dependencies"
msgstr "依赖"
#: ../../install.rst:58
msgid ""
"When Pelican is installed, the following dependent Python packages should"
" be automatically installed without any action on your part:"
msgstr "当Pelican安装完成后下面的所有Python依赖应该都会自动安装无需另外做任何操作"
#: ../../install.rst:61
msgid ""
"`feedgenerator <https://pypi.org/project/feedgenerator/>`_, to generate "
"the Atom feeds"
msgstr "`feedgenerator <https://pypi.org/project/feedgenerator/>`_用于生成Atom feeds"
#: ../../install.rst:63
msgid "`jinja2 <https://pypi.org/project/Jinja2/>`_, for templating support"
msgstr "`jinja2 <https://pypi.org/project/Jinja2/>`_用于模板"
#: ../../install.rst:64
msgid "`pygments <https://pypi.org/project/Pygments/>`_, for syntax highlighting"
msgstr "`pygments <https://pypi.org/project/Pygments/>`_用于语法高亮"
#: ../../install.rst:65
msgid ""
"`docutils <https://pypi.org/project/docutils/>`_, for supporting "
"reStructuredText as an input format"
msgstr "`docutils <https://pypi.org/project/docutils/>`_用于reStructuredText格式"
#: ../../install.rst:67
msgid ""
"`blinker <https://pypi.org/project/blinker/>`_, an object-to-object and "
"broadcast signaling system"
msgstr "`blinker <https://pypi.org/project/blinker/>`_对象-对象的信号广播系统"
#: ../../install.rst:69
msgid ""
"`unidecode <https://pypi.org/project/Unidecode/>`_, for ASCII "
"transliterations of Unicode text utilities"
msgstr ""
"`unidecode "
"<https://pypi.org/project/Unidecode/>`_用于将Unicode文本转为ASCII字符的音译"
#: ../../install.rst:72
msgid ""
"`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_, for a markup-safe "
"string implementation"
msgstr "`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_用于转义字符的安全处理"
#: ../../install.rst:74
msgid ""
"`python-dateutil <https://pypi.org/project/python-dateutil/>`_, to read "
"the date metadata"
msgstr ""
"`python-dateutil <https://pypi.org/project/python-"
"dateutil/>`_用于读取日期相关的元数据"
#: ../../install.rst:78
msgid "Upgrading"
msgstr "更新升级"
#: ../../install.rst:80
msgid ""
"If you installed a stable Pelican release via Pip_ and wish to upgrade to"
" the latest stable release, you can do so by adding ``--upgrade``::"
msgstr "对于通过 Pip_ 安装的稳定版本的Pelican可以通过在安装命令中加 ``--upgrade`` 来升级到最新版:"
#: ../../install.rst:85
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再做一遍和安装时同样的步骤即可。"
#: ../../install.rst:89
msgid "Kickstart your site"
msgstr "启动网站"
#: ../../install.rst:91
msgid ""
"Once Pelican has been installed, you can create a skeleton project via "
"the ``pelican-quickstart`` command, which begins by asking some questions"
" about your site::"
msgstr "Pelican安装完成后通过 ``pelican-quickstart`` 命令创建项目的整体框架执行这个命令后,您需要输入一些站点相关的信息:"
#: ../../install.rst:97
msgid ""
"If run inside an activated virtual environment, ``pelican-quickstart`` "
"will look for an associated project path inside "
"``$VIRTUAL_ENV/.project``. If that file exists and contains a valid "
"directory path, the new Pelican project will be saved at that location. "
"Otherwise, the default is the current working directory. To set the new "
"project path on initial invocation, use: ``pelican-quickstart --path "
"/your/desired/directory``"
msgstr ""
"如果是在虚拟环境中执行 ``pelican-quickstart`` ,系统会自动在 ``$VIRTUAL_ENV/.project`` "
"目录中查找这个命令若这个这个命令存在并且路径是正确的一个新的Pelican项目就会在目标位置创建。否则会默认在当前的工作目录下创建这个项目。若要在初始化时指定项目路径请使用"
" ``pelican-quickstart --path /your/desired/directory``"
#: ../../install.rst:104
msgid ""
"Once you finish answering all the questions, your project will consist of"
" the following hierarchy (except for *pages* — shown in parentheses below"
" — which you can optionally add yourself if you plan to create non-"
"chronological content)::"
msgstr ""
"当您回答完所有问题后,项目就会创建。项目中会包含下述的一些层级结构(除了用括号括起来的 "
"*pages*如果有一些内容不需要按时间排序您可以将它们放在pages所在的位置"
#: ../../install.rst:118
msgid ""
"The next step is to begin to adding content to the *content* folder that "
"has been created for you."
msgstr "下一步就可以开始往 *content* 目录中添加自己创建的内容了。"
#~ msgid "`pytz <https://pypi.org/project/pytz/>`_, for timezone definitions"
#~ msgstr "`pytz <https://pypi.org/project/pytz/>`_用于定义时区"

Binary file not shown.

View file

@ -0,0 +1,156 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.12.1\n"
#: ../../internals.rst:2
msgid "Pelican internals"
msgstr "Pelican内部机制"
#: ../../internals.rst:4
msgid ""
"This section describe how Pelican works internally. As you'll see, it's "
"quite simple, but a bit of documentation doesn't hurt. :)"
msgstr "这一节描述了Pelican的内部运行机制。你会发现Pelican的内部并不复杂。 :)"
#: ../../internals.rst:7
msgid ""
"You can also find in the :doc:`report` section an excerpt of a report the"
" original author wrote with some software design information."
msgstr "你可以在 :doc:`report` 一节中找到原作者用软件设计相关内容报告的节选。"
#: ../../internals.rst:13
msgid "Overall structure"
msgstr "总体结构"
#: ../../internals.rst:15
msgid ""
"What Pelican does is take a list of files and process them into some sort"
" of output. Usually, the input files are reStructuredText and Markdown "
"files, and the output is a blog, but both input and output can be "
"anything you want."
msgstr "Pelican做的事情其实很简单获取一个文件列表并将它们处理为某种输出。通常输入文件是"
"reStructuredText和Markdown文件输出是一个博客但事实上输入和输出都可以是你想要的任何内容。"
#: ../../internals.rst:19
msgid "The logic is separated into different classes and concepts:"
msgstr "系统的整体逻辑可以分为几个不同的类和概念:"
#: ../../internals.rst:21
msgid ""
"**Writers** are responsible for writing files: .html files, RSS feeds, "
"and so on. Since those operations are commonly used, the object is "
"created once and then passed to the generators."
msgstr "**Writers** 负责完成 html文件、RSS订阅源等等内容。因为这些操作都是比较常用的这个类只会被创建"
"一次然后再传给Generators。"
#: ../../internals.rst:25
msgid ""
"**Readers** are used to read from various formats (HTML, Markdown and "
"reStructuredText for now, but the system is extensible). Given a file, "
"they return metadata (author, tags, category, etc.) and content (HTML-"
"formatted)."
msgstr "**Readers** 用于读取不同格式的文件目前支持HTML、Markdown、reStructuredText但可以继续扩展。"
"向**Readers**输入一个文件它会返回文档的元数据作者、标签、分类等等与HTML格式的文档正文内容。"
#: ../../internals.rst:29
msgid ""
"**Generators** generate the different outputs. For instance, Pelican "
"comes with ``ArticlesGenerator`` and ``PageGenerator``. Given a "
"configuration, they can do whatever they want. Most of the time, it's "
"generating files from inputs."
msgstr "**Generators** 用以生成不同的输出Pelican自带了 ``ArticlesGenerator`` 和 ``PageGenerator`` 。"
"给定一套配置信息, **Generators** 可以做几乎任何事。但大多数情况下,它的工作就是从输入生成文件。"
#: ../../internals.rst:34
msgid ""
"Pelican also uses templates, so it's easy to write your own theme. The "
"syntax is `Jinja2 <https://palletsprojects.com/p/jinja/>`_ and is very "
"easy to learn, so don't hesitate to jump in and build your own theme."
msgstr "Pelican同样也使用模板因此可以较为简单地编写自定义主题。模板语法使用的是易于学习的 "
"`Jinja2 <https://palletsprojects.com/p/jinja/>`_ ,因此快去构建你自己的主题吧。"
#: ../../internals.rst:39
msgid "How to implement a new reader?"
msgstr "如何实现一个新的reader"
#: ../../internals.rst:41
msgid ""
"Is there an awesome markup language you want to add to Pelican? Well, the"
" only thing you have to do is to create a class with a ``read`` method "
"that returns HTML content and some metadata."
msgstr "若是希望为Pelican添加一个标记语言只需要创建一个类实现 ``read`` 方法,并在其中返回元数据"
"和以HTML表示的正文内容。"
#: ../../internals.rst:45
msgid "Take a look at the Markdown reader::"
msgstr "可以看一看Markdown的reader"
#: ../../internals.rst:71
msgid "Simple, isn't it?"
msgstr "是不是很简单呢?"
#: ../../internals.rst:73
msgid ""
"If your new reader requires additional Python dependencies, then you "
"should wrap their ``import`` statements in a ``try...except`` block. "
"Then inside the reader's class, set the ``enabled`` class attribute to "
"mark import success or failure. This makes it possible for users to "
"continue using their favourite markup method without needing to install "
"modules for formats they don't use."
msgstr "如果新创建的reader需要额外的Python依赖应该把 ``import`` 放在 ``try...except`` 块中。"
"在reader类中设置类属性 ``enabled`` 来标记import是否成功。这使得用户能继续使用他们喜欢的标记语言"
"而无需安装用不到的模块。"
#: ../../internals.rst:80
msgid "How to implement a new generator?"
msgstr "如何实现一个新的generator"
#: ../../internals.rst:82
msgid ""
"Generators have two important methods. You're not forced to create both; "
"only the existing ones will be called."
msgstr "generator有两个重要方法。不一定两个都要创建若只创建了一个就会自动调用存在的方法。"
#: ../../internals.rst:85
msgid ""
"``generate_context``, that is called first, for all the generators. Do "
"whatever you have to do, and update the global context if needed. This "
"context is shared between all generators, and will be passed to the "
"templates. For instance, the ``PageGenerator`` ``generate_context`` "
"method finds all the pages, transforms them into objects, and populates "
"the context with them. Be careful *not* to output anything using this "
"context at this stage, as it is likely to change by the effect of other "
"generators."
msgstr "``generate_context`` 会优先被调用,其中可以完成任何你想要做的事,如果需要的话,还要"
"更新全局上下文。全局上下文会在所有generator间共享并在之后传给模板。例如 ``PageGenerator`` 的 "
"``generate_context`` 方法会找寻所有页面,并将他们转换为对象,再将上下文传入其中。注意,请 *不要* 在"
"此阶段使用该上下文输出任何内容因为其他generator还会继续影响上下文。"
#: ../../internals.rst:93
msgid ""
"``generate_output`` is then called. And guess what is it made for? Oh, "
"generating the output. :) It's here that you may want to look at the "
"context and call the methods of the ``writer`` object that is passed as "
"the first argument of this function. In the ``PageGenerator`` example, "
"this method will look at all the pages recorded in the global context and"
" output a file on the disk (using the writer method ``write_file``) for "
"each page encountered."
msgstr "``generate_output`` 会在 ``generate_context`` 之后被调用,用于生成要输出的内容。此时就需要使用"
"上下文并调用 ``writer`` 对象的方法,此 ``writer`` 就是传入 ``generate_output`` 方法的第一个参数。"
"``PageGenerator`` 的 ``generate_output`` 方法中会使用writer的 ``write_file`` 方法为全局上下文中的"
"每一个页面输出一个文件。"

Binary file not shown.

View file

@ -0,0 +1,227 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-11 10:44+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../pelican-themes.rst:2
msgid "pelican-themes"
msgstr "pelican-themes命令"
#: ../../pelican-themes.rst:7
msgid "Description"
msgstr "简介"
#: ../../pelican-themes.rst:9
msgid ""
"``pelican-themes`` is a command line tool for managing themes for "
"Pelican. See :ref:`settings/themes` for settings related to themes."
msgstr "``pelican-themes`` 是一个命令行工具用于Pelican的主题管理。"
"有关主题的设置,请参考 :ref:`settings/themes` 。"
#: ../../pelican-themes.rst:14
msgid "Usage"
msgstr "用法"
#: ../../pelican-themes.rst:16
msgid "pelican-themes [-h] [-l] [-i theme path [theme path ...]]"
msgstr "pelican-themes [-h] [-l] [-i theme path [theme path ...]]"
#: ../../pelican-themes.rst:17
msgid "[-r theme name [theme name ...]]"
msgstr "[-r theme name [theme name ...]]"
#: ../../pelican-themes.rst:18
msgid "[-s theme path [theme path ...]] [-v] [--version]"
msgstr "[-s theme path [theme path ...]] [-v] [--version]"
#: ../../pelican-themes.rst:21
msgid "Optional arguments:"
msgstr "可选参数"
#: ../../pelican-themes.rst:24
msgid "Show the help and exit"
msgstr "显示帮助信息并退出"
#: ../../pelican-themes.rst:26
msgid "Show the themes already installed"
msgstr "显示已安装的主题"
#: ../../pelican-themes.rst:28
msgid "One or more themes to install"
msgstr "安装一个或多个主题"
#: ../../pelican-themes.rst:30
msgid "One or more themes to remove"
msgstr "移除一个或多个主题"
#: ../../pelican-themes.rst:32
msgid ""
"Same as ``--install``, but create a symbolic link instead of copying the "
"theme. Useful for theme development"
msgstr "和 ``--install`` 相同,区别在于此选项仅会创建一个符号链接到给定的目录,"
"而不会将主题完整拷贝。一般用于主题的开发。"
#: ../../pelican-themes.rst:35
msgid "Verbose output"
msgstr "开启详细输出"
#: ../../pelican-themes.rst:37
msgid "Print the version of this script"
msgstr "显示此工具的版本信息"
#: ../../pelican-themes.rst:42
msgid "Examples"
msgstr "例子"
#: ../../pelican-themes.rst:46
msgid "Listing the installed themes"
msgstr "列出已安装主题"
#: ../../pelican-themes.rst:48
msgid ""
"With ``pelican-themes``, you can see the available themes by using the "
"``-l`` or ``--list`` option:"
msgstr "在 ``pelican-themes`` 中使用 ``-l`` 或 ``--list`` 选项,查看可用主题:"
#: ../../pelican-themes.rst:62
msgid ""
"In this example, we can see there are three themes available: "
"``notmyidea``, ``simple``, and ``two-column``."
msgstr "在上面的例子中,可以看到有三个主题可供使用: ``notmyidea`` 、 ``simple`` 、和 ``two-column`` 。"
#: ../../pelican-themes.rst:65
msgid ""
"``two-column`` is followed by an ``@`` because this theme is not copied "
"to the Pelican theme path, but is instead just linked to it (see "
"`Creating symbolic links`_ for details about creating symbolic links)."
msgstr "主题 ``two-column`` 后有一个 ``@`` 这是因为该主题没有被拷贝到Pelican的主题"
"路径下,而只是为其创建了一个符号链接 (详见 `创建符号链接`_ )。"
#: ../../pelican-themes.rst:69
msgid ""
"Note that you can combine the ``--list`` option with the ``-v`` or "
"``--verbose`` option to get more verbose output, like this:"
msgstr "当然,你可以将 ``--list`` 选项和 ``-v`` 或 ``--verbose`` 结合起来,从而"
"得到更详细的输出:"
#: ../../pelican-themes.rst:81
msgid "Installing themes"
msgstr "安装主题"
#: ../../pelican-themes.rst:83
msgid ""
"You can install one or more themes using the ``-i`` or ``--install`` "
"option. This option takes as argument the path(s) of the theme(s) you "
"want to install, and can be combined with the ``--verbose`` option:"
msgstr "使用 ``-i`` 或 ``--install`` 选项可以安装一个或多个主题。此选项将一个"
"或多个到达主题的路径作为参数,同样可以结合 ``--verbose`` 选项:"
#: ../../pelican-themes.rst:103
msgid "Removing themes"
msgstr "移除主题"
#: ../../pelican-themes.rst:105
msgid ""
"The ``pelican-themes`` command can also remove themes from the Pelican "
"themes path. The ``-r`` or ``--remove`` option takes as argument the "
"name(s) of the theme(s) you want to remove, and can be combined with the "
"``--verbose`` option."
msgstr "``pelican-themes`` 命令同样可用于移除Pelican主题文件夹下的主题。 ``-r`` 或 "
"``--remove`` 选项以一个或多个主题的名称为参数,同样也可以结合 ``--verbose`` 选项使用。"
#: ../../pelican-themes.rst:122
msgid "Creating symbolic links"
msgstr "创建符号链接"
#: ../../pelican-themes.rst:124
msgid ""
"``pelican-themes`` can also install themes by creating symbolic links "
"instead of copying entire themes into the Pelican themes path."
msgstr "``pelican-themes`` 也可以通过创建符号链接来安装主题,这样就不需要拷贝整个主题文件了。"
#: ../../pelican-themes.rst:127
msgid ""
"To symbolically link a theme, you can use the ``-s`` or ``--symlink``, "
"which works exactly as the ``--install`` option:"
msgstr "使用 ``-s`` 或 ``--symlink`` 选项来为主题创建符号链接,用法和 ``--install`` 选项相同:"
#: ../../pelican-themes.rst:134
msgid ""
"In this example, the ``two-column`` theme is now symbolically linked to "
"the Pelican themes path, so we can use it, but we can also modify it "
"without having to reinstall it after each modification."
msgstr "在上面的例子中, ``two-column`` 主题就已经在Pelican主题目录下创建了符号链接"
"也可以正常使用。如此,当我们修改主题后就无需重新进行安装。"
#: ../../pelican-themes.rst:138
msgid "This is useful for theme development:"
msgstr "这对主题的开发是很有用的:"
#: ../../pelican-themes.rst:155
msgid "Doing several things at once"
msgstr "同时执行多个动作"
#: ../../pelican-themes.rst:157
msgid ""
"The ``--install``, ``--remove`` and ``--symlink`` options are not "
"mutually exclusive, so you can combine them in the same command line to "
"do more than one operation at time, like this:"
msgstr "``--install`` 、 ``--remove`` 和 ``--symlink`` 可以同时使用,不会冲突,"
"因此可以在同一行中同时做多个操作:"
#: ../../pelican-themes.rst:169
msgid ""
"In this example, the theme ``notmyidea-cms`` is replaced by the theme "
"``notmyidea-cms-fr``"
msgstr "在上面的例子中,用 ``notmyidea-cms-fr`` 替换了 ``notmyidea-cms`` 主题。"
#~ msgid "Show the help an exit"
#~ msgstr ""
#~ msgid ""
#~ "Same as \"--install\", but create "
#~ "a symbolic link instead of copying "
#~ "the theme. Useful for theme development"
#~ msgstr ""
#~ msgid ""
#~ "``two-column`` is prefixed with an "
#~ "``@`` because this theme is not "
#~ "copied to the Pelican theme path, "
#~ "but is instead just linked to it"
#~ " (see `Creating symbolic links`_ for "
#~ "details about creating symbolic links)."
#~ msgstr ""
#~ msgid ""
#~ "You can install one or more themes"
#~ " using the ``-i`` or ``--install`` "
#~ "option. This option takes as argument"
#~ " the path(s) of the theme(s) you "
#~ "want to install, and can be "
#~ "combined with the verbose option:"
#~ msgstr ""
#~ msgid ""
#~ "The ``--install``, ``--remove`` and "
#~ "``--symlink`` option are not mutually "
#~ "exclusive, so you can combine them "
#~ "in the same command line to do "
#~ "more than one operation at time, "
#~ "like this:"
#~ msgstr ""

Binary file not shown.

View file

@ -0,0 +1,663 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../plugins.rst:4
msgid "Plugins"
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 "Pelican从3.0版本开始支持插件。通过插件可以在给Pelican添加功能的同时不直接修改Pelican的核心代码。"
#: ../../plugins.rst:10
msgid "How to use plugins"
msgstr "如何使用插件"
#: ../../plugins.rst:12
msgid ""
"Starting with version 4.5, Pelican moved to a new plugin structure "
"utilizing namespace packages that can be easily installed via Pip_. "
"Plugins supporting this structure will install under the namespace "
"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 ""
"Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地通过 Pip_ "
"进行安装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` "
"下因此Pelican可以自动发现他们。下面的命令可以用于查看环境中用Pip安装的所有插件"
#: ../../plugins.rst:20
msgid ""
"If you leave the ``PLUGINS`` setting as default (``None``), Pelican will "
"automatically discover namespace plugins and register them. If, on the "
"other hand, you specify a ``PLUGINS`` setting as a list of plugins, this "
"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 ""
"若将 ``PLUGINS`` 设置项留为默认的 ``None`` Pelican会自动发现命名空间中的插件并且将他们全部登记上若你在 "
"``PLUGINS`` "
"设置项中指定了一系列的插件Pelican就不会去自动发现插件也就是说你需要显示地指定所有要使用的插件包括在plugins命名空间中的。"
#: ../../plugins.rst:26
msgid ""
"If you are using the ``PLUGINS`` setting, you can specify plugins in two "
"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 ""
"在使用 ``PLUGINS`` 设置项时,有两种方式。一是用字符串列表指定插件的名称,可以是包含命名空间的完整名称(例如 "
"``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``"
#: ../../plugins.rst:35
msgid ""
"Alternatively, you can import them in your settings file and pass the "
"modules::"
msgstr "二是在设置文件中先import进来再将import进的模块放在 ``PLUGINS`` 设置项中:"
#: ../../plugins.rst:43
msgid ""
"When experimenting with different plugins (especially the ones that deal "
"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 ""
"在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改可能会不显示。发生这种情况时,就需要通过设置 "
"``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` 命令行选项禁用缓存。"
#: ../../plugins.rst:48
msgid ""
"If your plugins are not in an importable path, you can specify a list of "
"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 ""
"如果插件处于无法直接进行import的路径可以在 ``PLUGIN_PATHS`` 设置项中指定这些路径。如下例所示, "
"``PLUGIN_PATHS`` 中的路径可以是绝对的,也可以是相对于设置文件的:"
#: ../../plugins.rst:56
msgid "Where to find plugins"
msgstr "在哪儿可以找到插件呢"
#: ../../plugins.rst:57
msgid ""
"Namespace plugins can be found in the `pelican-plugins organization`_ as "
"individual repositories. Legacy plugins are located in the `pelican-"
"plugins repository`_ and will be gradually phased out in favor of the "
"namespace versions."
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 "请注意尽管我们尽全力审查和维护这些插件但这些插件是Pelican社区提交的因此支持性和互操作性水平各不相同。"
#: ../../plugins.rst:70
msgid "How to create plugins"
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 "插件是基于信号这一概念的。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 ""
"对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``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 "信号接收器在Pelican中是弱引用的因此不能将它定义在可调用的 ``register`` 中,否则接收器在信号发送之前就会被回收。"
#: ../../plugins.rst:97
msgid ""
"If multiple plugins connect to the same signal, plugins will be executed "
"in the order they are connected. With ``PLUGINS`` setting, order will be "
"as defined in the setting. If you rely on auto-discovered namespace "
"plugins, no ``PLUGINS`` setting, they will be connected in the same order"
" they are discovered (same order as ``pelican-plugins`` output). If you "
"want to specify the order explicitly, disable auto-discovery by defining "
"``PLUGINS`` in the desired order."
msgstr "如果多个插件关联到同一个信号,插件将按照它们关联的前后顺序执行。但若设置了 ``PLUGINS`` 配置项"
"会以此配置项中的顺序为准。如果您使用了无需PLUGINS设置的新版命名空间插件它们将按照被探测到的顺序进行连接"
"(与 pelican-plugins 输出的顺序相同)。"
#: ../../plugins.rst:105
msgid "Namespace plugin structure"
msgstr "命名空间插件的结构"
#: ../../plugins.rst:107
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 "命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或其他等效文件),并且遵循下述文件夹结构:"
#: ../../plugins.rst:120
msgid ""
"It is crucial that ``pelican`` or ``pelican/plugins`` folder **not** "
"contain an ``__init__.py`` file. In fact, it is best to have those "
"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 ""
"非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含 "
"``__init__.py`` 文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关的文件都仅包含在 "
"``pelican/plugins/myplugin`` 文件夹中,以避免奇奇怪怪的问题。"
#: ../../plugins.rst:126
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 "为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ 使用方法参考此项目README文件中的指示即可。"
#: ../../plugins.rst:132
msgid "List of signals"
msgstr "信号列表"
#: ../../plugins.rst:134
msgid "Here is the list of currently implemented signals:"
msgstr "下面是目前已经实现了的信号:"
#: ../../plugins.rst:137
msgid "Signal"
msgstr "信号"
#: ../../plugins.rst:137
msgid "Arguments"
msgstr "参数"
#: ../../plugins.rst:137
msgid "Description"
msgstr "描述"
#: ../../plugins.rst:139
msgid "initialized"
msgstr "initialized"
#: ../../plugins.rst:139 ../../plugins.rst:140 ../../plugins.rst:158
#: ../../plugins.rst:161
msgid "pelican object"
msgstr "pelican对象"
#: ../../plugins.rst:140
msgid "finalized"
msgstr "finalized"
#: ../../plugins.rst:140
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 ""
"所有generator执行完成后调用即pelican退出之前。这对于自定义后处理操作是非常有用的例如- 简化js/css资源。- "
"向搜索引擎告知更新后的sitemap。"
#: ../../plugins.rst:144
msgid "generator_init"
msgstr "generator_init"
#: ../../plugins.rst:144
msgid "generator"
msgstr "generator"
#: ../../plugins.rst:144
msgid "invoked in the Generator.__init__"
msgstr "在Generator.__init__中调用"
#: ../../plugins.rst:145
msgid "all_generators_finalized"
msgstr "all_generators_finalized"
#: ../../plugins.rst:145
msgid "generators"
msgstr "generators"
#: ../../plugins.rst:145
msgid "invoked after all the generators are executed and before writing output"
msgstr "在所有generator执行完后写入输出内容前调用"
#: ../../plugins.rst:146
msgid "readers_init"
msgstr "readers_init"
#: ../../plugins.rst:146
msgid "readers"
msgstr "readers"
#: ../../plugins.rst:146
msgid "invoked in the Readers.__init__"
msgstr "在Readers.__init__中调用"
#: ../../plugins.rst:147 ../../plugins.rst:201
msgid "article_generator_context"
msgstr "article_generator_context"
#: ../../plugins.rst:147
msgid "article_generator, metadata"
msgstr "article_generator, metadata"
#: ../../plugins.rst:148 ../../plugins.rst:203
msgid "article_generator_preread"
msgstr "article_generator_preread"
#: ../../plugins.rst:148 ../../plugins.rst:150 ../../plugins.rst:151
#: ../../plugins.rst:154
msgid "article_generator"
msgstr "article_generator"
#: ../../plugins.rst:148
msgid ""
"invoked before a article is read in ArticlesGenerator.generate_context; "
"use if code needs to do something before every article is parsed"
msgstr "在ArticlesGenerator.generate_context读取文章之前调用若代码需要在解析每篇文章前执行某些操作就可以使用此信号。"
#: ../../plugins.rst:150
msgid "article_generator_init"
msgstr "article_generator_init"
#: ../../plugins.rst:150
msgid "invoked in the ArticlesGenerator.__init__"
msgstr "在ArticlesGenerator.__init__中调用"
#: ../../plugins.rst:151
msgid "article_generator_pretaxonomy"
msgstr "article_generator_pretaxonomy"
#: ../../plugins.rst:151
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 "在创建类别和标签列表之前调用。例如,当需要变更要生成的文章列表时可以使用,如此可以避免一些已移除文章在分类或标签列表中泄露。"
#: ../../plugins.rst:154 ../../plugins.rst:202
msgid "article_generator_finalized"
msgstr "article_generator_finalized"
#: ../../plugins.rst:154
msgid "invoked at the end of ArticlesGenerator.generate_context"
msgstr "在ArticlesGenerator.generate_context的最后调用"
#: ../../plugins.rst:155
msgid "article_generator_write_article"
msgstr "article_generator_write_article"
#: ../../plugins.rst:155
msgid "article_generator, content"
msgstr "article_generator, content"
#: ../../plugins.rst:155
msgid "invoked before writing each article, the article is passed as content"
msgstr "在写入每篇文章前调用,文章以内容的形式作为参数传入。"
#: ../../plugins.rst:156
msgid "article_writer_finalized"
msgstr "article_writer_finalized"
#: ../../plugins.rst:156
msgid "article_generator, writer"
msgstr "article_generator, writer"
#: ../../plugins.rst:156
msgid ""
"invoked after all articles and related pages have been written, but "
"before the article generator is closed."
msgstr "在所有文章及相关联页面写入完成后在文章generator关闭前调用。"
#: ../../plugins.rst:158
msgid "get_generators"
msgstr "get_generators"
#: ../../plugins.rst:158
msgid ""
"invoked in Pelican.get_generator_classes, can return a Generator, or "
"several generators in a tuple or in a list."
msgstr "在Pelican.get_generator_classes中调用可以返回一个Generator也可以以一个元组或列表的形式返回多个generator"
#: ../../plugins.rst:161
msgid "get_writer"
msgstr "get_writer"
#: ../../plugins.rst:161
msgid "invoked in Pelican.get_writer, can return a custom Writer."
msgstr "在Pelican.get_writer前调用可以返回一个自定义Writer。"
#: ../../plugins.rst:163 ../../plugins.rst:204
msgid "page_generator_context"
msgstr "page_generator_context"
#: ../../plugins.rst:163
msgid "page_generator, metadata"
msgstr "page_generator, metadata"
#: ../../plugins.rst:164 ../../plugins.rst:205
msgid "page_generator_preread"
msgstr "page_generator_preread"
#: ../../plugins.rst:164 ../../plugins.rst:166 ../../plugins.rst:167
msgid "page_generator"
msgstr "page_generator"
#: ../../plugins.rst:164
msgid ""
"invoked before a page is read in PageGenerator.generate_context; use if "
"code needs to do something before every page is parsed."
msgstr "在PageGenerator.generate_context读取页面前调用若代码需要在解析每个页面前执行某些操作就可以使用此信号。"
#: ../../plugins.rst:166 ../../plugins.rst:207
msgid "page_generator_init"
msgstr "page_generator_init"
#: ../../plugins.rst:166
msgid "invoked in the PagesGenerator.__init__"
msgstr "在PagesGenerator.__init__中调用"
#: ../../plugins.rst:167 ../../plugins.rst:206
msgid "page_generator_finalized"
msgstr "page_generator_finalized"
#: ../../plugins.rst:167
msgid "invoked at the end of PagesGenerator.generate_context"
msgstr "PagesGenerator.generate_context的最后调用"
#: ../../plugins.rst:168
msgid "page_generator_write_page"
msgstr "page_generator_write_page"
#: ../../plugins.rst:168
msgid "page_generator, content"
msgstr "page_generator, content"
#: ../../plugins.rst:168
msgid "invoked before writing each page, the page is passed as content"
msgstr "在写入每个页面前调用,页面以内容形式作为参数传入"
#: ../../plugins.rst:169
msgid "page_writer_finalized"
msgstr "page_writer_finalized"
#: ../../plugins.rst:169
msgid "page_generator, writer"
msgstr "page_generator, writer"
#: ../../plugins.rst:169
msgid ""
"invoked after all pages have been written, but before the page generator "
"is closed."
msgstr "在所有页面写入完成后在页面generator关闭前调用。"
#: ../../plugins.rst:171 ../../plugins.rst:208
msgid "static_generator_context"
msgstr "static_generator_context"
#: ../../plugins.rst:171
msgid "static_generator, metadata"
msgstr "static_generator, metadata"
#: ../../plugins.rst:172 ../../plugins.rst:209
msgid "static_generator_preread"
msgstr "static_generator_preread"
#: ../../plugins.rst:172 ../../plugins.rst:175 ../../plugins.rst:176
msgid "static_generator"
msgstr "static_generator"
#: ../../plugins.rst:172
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 "在StaticGenerator.generate_context读取静态文件前调用若代码需要在每个静态文件加入静态文件列表前进行一些修改就可以使用此信号。"
#: ../../plugins.rst:175
msgid "static_generator_init"
msgstr "static_generator_init"
#: ../../plugins.rst:175
msgid "invoked in the StaticGenerator.__init__"
msgstr "在StaticGenerator.__init__中调用"
#: ../../plugins.rst:176
msgid "static_generator_finalized"
msgstr "static_generator_finalized"
#: ../../plugins.rst:176
msgid "invoked at the end of StaticGenerator.generate_context"
msgstr "在StaticGenerator.generate_context的最后调用"
#: ../../plugins.rst:177
msgid "content_object_init"
msgstr "content_object_init"
#: ../../plugins.rst:177
msgid "content_object"
msgstr "content_object"
#: ../../plugins.rst:177
msgid "invoked at the end of Content.__init__"
msgstr "在Content.__init__的最后调用"
#: ../../plugins.rst:178
msgid "content_written"
msgstr "content_written"
#: ../../plugins.rst:178
msgid "path, context"
msgstr "path, context"
#: ../../plugins.rst:178
msgid "invoked each time a content file is written."
msgstr "每一次内容文件写入后调用。"
#: ../../plugins.rst:179
msgid "feed_generated"
msgstr "feed_generated"
#: ../../plugins.rst:179
msgid "context, feed"
msgstr "context, feed"
#: ../../plugins.rst:179
msgid ""
"invoked each time a feed gets generated. Can be used to modify a feed "
"object before it gets written."
msgstr "每个feed生成前调用。可以用于在feed写入前修改之。"
#: ../../plugins.rst:181
msgid "feed_written"
msgstr "feed_written"
#: ../../plugins.rst:181
msgid "path, context, feed"
msgstr "path, context, feed"
#: ../../plugins.rst:181
msgid "invoked each time a feed file is written."
msgstr "每一个feed文件写入后调用。"
#: ../../plugins.rst:186
msgid ""
"Avoid ``content_object_init`` signal if you intend to read ``summary`` or"
" ``content`` properties of the content object. That combination can "
"result in unresolved links when :ref:`ref-linking-to-internal-content` "
"(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 ""
"请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或 ``content`` "
"属性,这可能导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接(请参阅 `pelican-"
"plugins bug #314`_ )。请改用 ``_summary`` 和 ``_content`` 属性,或者就在后续阶段再运行插件(例如 "
"``all_generators_finalized`` 时)。"
#: ../../plugins.rst:195
msgid ""
"After Pelican 3.2, signal names were standardized. Older plugins may "
"need to be updated to use the new names:"
msgstr "Pelican3.2之后,信号名都进行了标准化,较老的插件可能需要进行更新:"
#: ../../plugins.rst:199
msgid "Old name"
msgstr "旧名称"
#: ../../plugins.rst:199
msgid "New name"
msgstr "新名称"
#: ../../plugins.rst:201
msgid "article_generate_context"
msgstr "article_generate_context"
#: ../../plugins.rst:202
msgid "article_generate_finalized"
msgstr "article_generate_finalized"
#: ../../plugins.rst:203
msgid "article_generate_preread"
msgstr "article_generate_preread"
#: ../../plugins.rst:204
msgid "pages_generate_context"
msgstr "pages_generate_context"
#: ../../plugins.rst:205
msgid "pages_generate_preread"
msgstr "pages_generate_preread"
#: ../../plugins.rst:206
msgid "pages_generator_finalized"
msgstr "pages_generator_finalized"
#: ../../plugins.rst:207
msgid "pages_generator_init"
msgstr "pages_generator_init"
#: ../../plugins.rst:208
msgid "static_generate_context"
msgstr "static_generate_context"
#: ../../plugins.rst:209
msgid "static_generate_preread"
msgstr "static_generate_preread"
#: ../../plugins.rst:213
msgid "Recipes"
msgstr "具体使用方法举例"
#: ../../plugins.rst:215
msgid ""
"We eventually realised some of the recipes to create plugins would be "
"best shared in the documentation somewhere, so here they are!"
msgstr "下面分享了一些创建插件的具体方法,请享用!"
#: ../../plugins.rst:219
msgid "How to create a new reader"
msgstr "如何创建一个新的reader"
#: ../../plugins.rst:221
msgid ""
"One thing you might want is to add support for your very own input "
"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 "你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能但我们选择避免将此功能放在核心中而是通过插件实现不同的reader。"
#: ../../plugins.rst:226
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 "做出这个决定主要是因为实现这样的格式支持插件非常容易而且这样在不需要此功能时也不会影响Pelican自身的速度。"
#: ../../plugins.rst:229
msgid "No more talking — here is an example::"
msgstr "多说无益,下面就是例子:"
#: ../../plugins.rst:265
msgid "Adding a new generator"
msgstr "添加新的generator"
#: ../../plugins.rst:267
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 "添加一个generator也非常简单你可能会想要看一看 :doc:`internals` 其中有关于如何创建generator的内容。"
#: ../../plugins.rst:281
msgid "Adding a new writer"
msgstr "添加新的writer"
#: ../../plugins.rst:283
msgid ""
"Adding a writer will allow you to output additional file formats to disk,"
" 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 "添加writer可以让你将其他文件格式输出到磁盘或者可以改变现有格式写入磁盘的方式。请注意一次只能启用一个writer因此请确保继承了内置的Writer并且完全重新实现之。"
#: ../../plugins.rst:288
msgid "Here is a basic example of how to set up your own writer::"
msgstr "下面是启用你的自定义writer的一个基本例子"
#: ../../plugins.rst:308
msgid "Using Plugins to Inject Content"
msgstr "使用插件添加内容"
#: ../../plugins.rst:310
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 "可以通过插件以可编程的方式添加文章或页面。如果你打算从某些API获取文章这就会很有用。"
#: ../../plugins.rst:313
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 "下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号构建一个添加自定义文章的插件:"
#~ msgid ""
#~ "If multiple plugins connect to the "
#~ "same signal, there is no way to"
#~ " 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 ""
#~ "若一个信号连接有多个插件则不能保证也不能控制这些插件的执行顺序。Pelican使用 Blinker_ "
#~ "来实现信号,这个缺陷就是从此处继承而来的。"

Binary file not shown.

View file

@ -0,0 +1,326 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../publish.rst:2
msgid "Publish your site"
msgstr "发布站点"
#: ../../publish.rst:7
msgid "Site generation"
msgstr "站点生成"
#: ../../publish.rst:9
msgid ""
"Once Pelican is installed and you have some content (e.g., in Markdown or"
" reST format), you can convert your content into HTML via the ``pelican``"
" command, specifying the path to your content and (optionally) the path "
"to your :doc:`settings<settings>` file::"
msgstr ""
"您应该已经安装好Pelican并且已经创作了一些内容了吧以Markdown或是reST格式现在就可以将这些内容通过 ``pelican`` "
"命令转换为HTML了在转换时需要指定创作内容存放的路径可选 :doc:`设置<settings>` 文件的路径也可单独指定:"
#: ../../publish.rst:16
msgid ""
"The above command will generate your site and save it in the ``output/`` "
"folder, using the default theme to produce a simple site. The default "
"theme consists of very simple HTML without styling and is provided so "
"folks may use it as a basis for creating their own themes."
msgstr ""
"上面的指令会在 ``output/`` "
"目录下生成站点使用的是默认的主题。默认主题只使用一些简单的HTML并且不包含样式大家往往以这个简单主题为基础来创作自己的主题。"
#: ../../publish.rst:21
msgid ""
"You can also tell Pelican to watch for your modifications, instead of "
"manually re-running it every time you want to see your changes. To enable"
" this, run the ``pelican`` command with the ``-r`` or ``--autoreload`` "
"option. On non-Windows environments, this option can also be combined "
"with the ``-l`` or ``--listen`` option to simultaneously both auto-"
"regenerate *and* serve the output at http://localhost:8000::"
msgstr ""
"你也可以让Pelican来监听对源内容文件的修改而不是在每次修改内容后重新手动执行命令生成站点。在执行 ``pelican`` 命令时,加上 "
"``-r`` 或者 ``--autoreload`` 选项就可以做到这一点。在非Windows环境下这个选项还可以和 ``-l`` 或 "
"``--listen`` 搭配使用,这样就可以在自动重生成站点的基础上,同时提供在 http://localhost:8000 上的访问:"
#: ../../publish.rst:30
msgid ""
"Pelican has other command-line switches available. Have a look at the "
"help to see all the options you can use::"
msgstr "Pelican还有一些其他的命令行选项。可以在帮助中看到所有可用选项"
#: ../../publish.rst:36
msgid "Viewing the generated files"
msgstr "浏览生成的文件"
#: ../../publish.rst:38
msgid ""
"The files generated by Pelican are static files, so you don't actually "
"need anything special to view them. You can use your browser to open the "
"generated HTML files directly::"
msgstr "Pelican生成的文件都是静态的也就是说不需要使用什么特殊的手段就可以浏览。您可以直接使用浏览器打开生成的HTML文件"
#: ../../publish.rst:44
msgid ""
"Because the above method may have trouble locating your CSS and other "
"linked assets, running Pelican's simple built-in web server will often "
"provide a more reliable previewing experience::"
msgstr "事实上上面的这种浏览方法可能会在CSS或其他链接上出点问题可以运行Pelican自带的简易web服务器如此可以获得可靠的预览体验"
#: ../../publish.rst:50
msgid ""
"Once the web server has been started, you can preview your site at: "
"http://localhost:8000/"
msgstr "当web服务器启动后可以访问 http://localhost:8000/ 来预览您的站点。"
#: ../../publish.rst:54
msgid "Deployment"
msgstr "部署"
#: ../../publish.rst:56
msgid ""
"After you have generated your site, previewed it in your local "
"development environment, and are ready to deploy it to production, you "
"might first re-generate your site with any production-specific settings "
"(e.g., analytics, feeds, etc.) that you may have defined::"
msgstr "当您生成好站点后,可以在本地先进行预览,确认无误后,在部署前可能还需使用针对生产环境特定的配置文件重新生成站点:"
#: ../../publish.rst:63
msgid ""
"To base your publish configuration on top of your ``pelicanconf.py``, you"
" can import your ``pelicanconf`` settings by including the following line"
" in your ``publishconf.py``::"
msgstr ""
"您可以基于 ``pelicanconf.py`` 进行设置文件的配置, 在``publishconf.py`` 中import "
"``pelicanconf`` 就可实现译者注配置文件其实本质上就是一些Python变量因此import后就可以全部引入"
#: ../../publish.rst:69
msgid ""
"If you have generated a ``publishconf.py`` using ``pelican-quickstart``, "
"this line is included by default."
msgstr "如果是使用 ``pelican-quickstart`` 生成的 ``publishconf.py`` ,上面这行默认就有。"
#: ../../publish.rst:72
msgid ""
"The steps for deploying your site will depend on where it will be hosted."
" If you have SSH access to a server running Nginx or Apache, you might "
"use the ``rsync`` tool to transmit your site files::"
msgstr ""
"部署站点的方法步骤取决于网站托管的位置。对于使用SSH访问的运行着Nginx或Apache的服务器您可能需要使用 ``rsync`` "
"工具来传输站点文件:"
#: ../../publish.rst:78
msgid ""
"There are many other deployment options, some of which can be configured "
"when first setting up your site via the ``pelican-quickstart`` command. "
"See the :doc:`Tips<tips>` page for detail on publishing via GitHub Pages."
msgstr ""
"还有很多其他的部署选项,有一些在第一次通过 ``pelican-quickstart`` 命令建立站点时就已经配置。在 "
":doc:`小技巧<tips>` 中可以查看如何通过Github Pages部署站点。"
#: ../../publish.rst:83
msgid "Automation"
msgstr "自动化"
#: ../../publish.rst:85
msgid ""
"While the ``pelican`` command is the canonical way to generate your site,"
" automation tools can be used to streamline the generation and "
"publication flow. One of the questions asked during the ``pelican-"
"quickstart`` process pertains to whether you want to automate site "
"generation and publication. If you answered \"yes\" to that question, a "
"``tasks.py`` and ``Makefile`` will be generated in the root of your "
"project. These files, pre-populated with certain information gleaned from"
" other answers provided during the ``pelican-quickstart`` process, are "
"meant as a starting point and should be customized to fit your particular"
" needs and usage patterns. If you find one or both of these automation "
"tools to be of limited utility, these files can be deleted at any time "
"and will not affect usage of the canonical ``pelican`` command."
msgstr ""
"``pelican`` 命令是生成站点的标准方法,但同时也有自动化工具可以用来简化生成与发布流程。在 ``pelican-"
"quickstart`` 的过程中,其中一个问题就是是否要自动站点生成与发布。若您选择了 "
"\"yes\",在项目的根目录中会生成``tasks.py`` and ``Makefile`` 。这些文件中预填充了一些从 ``pelican-"
"quickstart`` "
"过程中收集的信息,您应该从这个生成好的文件出发来进一步根据实际需要修改。另外,如果您认为这些自动化脚本文件没什么用,完全可以将他们删除,这不会对标准命令"
"``pelican`` 产生任何影响。"
#: ../../publish.rst:98
msgid ""
"Following are automation tools that \"wrap\" the ``pelican`` command and "
"can simplify the process of generating, previewing, and uploading your "
"site."
msgstr "下面是一些用于包装 ``pelican`` 命令的自动化工具,可以简化生成、预览和上传站点的过程。"
#: ../../publish.rst:102
msgid "Invoke"
msgstr "Invoke"
#: ../../publish.rst:104
msgid ""
"The advantage of Invoke_ is that it is written in Python and thus can be "
"used in a wide range of environments. The downside is that it must be "
"installed separately. Use the following command to install Invoke, "
"prefixing with ``sudo`` if your environment requires it::"
msgstr ""
"Invoke_ 工具使用Python作为书写语言并且能够用在很多不同的环境中。它需要使用下面的命令单独安装在某些操作系统中可能需要在前面加上 "
"``sudo`` "
#: ../../publish.rst:111
msgid ""
"Take a moment to open the ``tasks.py`` file that was generated in your "
"project root. You will see a number of commands, any one of which can be "
"renamed, removed, and/or customized to your liking. Using the out-of-the-"
"box configuration, you can generate your site via::"
msgstr ""
"可以打开 ``tasks.py`` "
"文件看看其中的代码,里面的命令可以重命名、删除,可以按照您的喜好自行修改。生成好的文件是开箱即用的,您可以通过下面的命令生成站点:"
#: ../../publish.rst:118 ../../publish.rst:166
msgid ""
"If you'd prefer to have Pelican automatically regenerate your site every "
"time a change is detected (which is handy when testing locally), use the "
"following command instead::"
msgstr "若您希望Pelican在检测到变化时自动重新生成站点在本地测试的时候很实用可以使用下面的命令"
#: ../../publish.rst:124 ../../publish.rst:172
msgid ""
"To serve the generated site so it can be previewed in your browser at "
"http://localhost:8000/::"
msgstr "下面的命令则可以让您在生成后通过浏览器访问 http://localhost:8000/ 来预览站点"
#: ../../publish.rst:129
msgid ""
"To serve the generated site with automatic browser reloading every time a"
" change is detected, first ``python -m pip install livereload``, then use"
" the following command::"
msgstr ""
"在每次检测到修改重生成站点后,可以让浏览器自动进行重载。先运行 ``python -m pip install livereload`` "
"安装,再运行下面的这条命令就可以实现:"
#: ../../publish.rst:135
msgid ""
"If during the ``pelican-quickstart`` process you answered \"yes\" when "
"asked whether you want to upload your site via SSH, you can use the "
"following command to publish your site via rsync over SSH::"
msgstr ""
"如果在 ``pelican-quickstart`` 过程中对是否要通过SSH上传站点问题回答了 \"yes\" "
"您就可以使用下面的命令借助rsync在SSH上发布站点"
#: ../../publish.rst:141
msgid ""
"These are just a few of the commands available by default, so feel free "
"to explore ``tasks.py`` and see what other commands are available. More "
"importantly, don't hesitate to customize ``tasks.py`` to suit your "
"specific needs and preferences."
msgstr ""
"默认就可以使用的命令远不止这些,在 ``tasks.py`` 中可以找到更多可用的命令。更重要的是,当您有特定需求和偏好时,直接修改 "
"``tasks.py`` 即可。"
#: ../../publish.rst:147
msgid "Make"
msgstr "Make"
#: ../../publish.rst:149
msgid ""
"A ``Makefile`` is also automatically created for you when you say \"yes\""
" to the relevant question during the ``pelican-quickstart`` process. The "
"advantage of this method is that the ``make`` command is built into most "
"POSIX systems and thus doesn't require installing anything else in order "
"to use it. The downside is that non-POSIX systems (e.g., Windows) do not "
"include ``make``, and installing it on those systems can be a non-trivial"
" task."
msgstr ""
"``Makefile`` 也是自动生成的。在大多数POSIX系统中都内置了 ``make`` "
"命令无需安装即可使用。但在非POSIX系统例如Windows中并没有 ``make`` ,在这些系统中安装 ``make`` 时非常困难的。"
#: ../../publish.rst:156
msgid ""
"If you want to use ``make`` to generate your site using the settings in "
"``pelicanconf.py``, run::"
msgstr "使用 ``make`` 命令是以 ``pelicanconf.py`` 作为配置文件来生成站点的:"
#: ../../publish.rst:161
msgid ""
"To generate the site for production, using the settings in "
"``publishconf.py``, run::"
msgstr "使用 ``publishconf.py`` 作为配置文件来为生产环境生成站点:"
#: ../../publish.rst:177
msgid ""
"Normally you would need to run ``make regenerate`` and ``make serve`` in "
"two separate terminal sessions, but you can run both at once via::"
msgstr ""
"一般来说, ``make regenerate`` 和 ``make serve`` "
"需要在单独的终端会话中运行,下面的命令相当于同时运行上述两个命令:"
#: ../../publish.rst:182
msgid ""
"The above command will simultaneously run Pelican in regeneration mode as"
" well as serve the output at http://localhost:8000."
msgstr "上面的命令会让Pelican在重生成模式下持续运行同样地您可以通过 http://localhost:8000 访问生成的站点。"
#: ../../publish.rst:185
msgid ""
"When you're ready to publish your site, you can upload it via the "
"method(s) you chose during the ``pelican-quickstart`` questionnaire. For "
"this example, we'll use rsync over ssh::"
msgstr ""
"当准备好发布站点时,可以使用在 ``pelican-quickstart`` "
"过程中选择的方法进行上传。下面的例子使用rsync在ssh上完成这一工作"
#: ../../publish.rst:191
msgid "That's it! Your site should now be live."
msgstr "OK您的站点现在已经可以访问了。"
#: ../../publish.rst:193
msgid ""
"(The default ``Makefile`` and ``devserver.sh`` scripts use the ``python``"
" and ``pelican`` executables to complete its tasks. If you want to use "
"different executables, such as ``python3``, you can set the ``PY`` and "
"``PELICAN`` environment variables, respectively, to override the default "
"executable names.)"
msgstr ""
"(默认的 ``Makefile`` 和 ``devserver.sh`` 脚本执行 ``python`` 和 ``pelican`` "
"来完成任务。若您希望使用其他的可执行文件,例如 ``python3`` ,设置环境变量 ``PY`` 和 ``PELICAN`` "
"来覆盖默认的可执行文件名。)"
#~ msgid ""
#~ "When working on a single article "
#~ "or page, it is possible to "
#~ "generate only the file that corresponds"
#~ " to that content. To do this, "
#~ "use the ``--write-selected`` argument, "
#~ "like so::"
#~ msgstr "当您在处理某篇文章或页面时,可以选择只生成和该内容相关的文件,使用下面的参数就可以实现这个目的:"
#~ msgid ""
#~ "Note that you must specify the "
#~ "path to the generated *output* file "
#~ "— not the source content. To "
#~ "determine the output file name and "
#~ "location, use the ``--debug`` flag. If"
#~ " desired, ``--write-selected`` can take "
#~ "a comma-separated list of paths or"
#~ " can be configured as a setting. "
#~ "(See: :ref:`writing_only_selected_content`)"
#~ msgstr ""
#~ "可以注意到的是,指定的是已生成的 *输出* 文件,而不是源内容文件。在命令中加上 ``--debug``"
#~ " 选项就可以让Pelican显示源文件和输出文件的位置对应关系。另外 ``--write-"
#~ "selected`` 的参数可以是用逗号分隔的多个路径(具体请参阅设置: "
#~ ":ref:`writing_only_selected_content` "

Binary file not shown.

View file

@ -0,0 +1,136 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../quickstart.rst:2
msgid "Quickstart"
msgstr "快速入门"
#: ../../quickstart.rst:4
msgid ""
"Reading through all the documentation is highly recommended, but for the "
"truly impatient, following are some quick steps to get started."
msgstr "强烈建议将所有文档完整地看一遍但如果您真的非常没有耐心看完下面的步骤可以帮助您快速地开始使用Pelican。"
#: ../../quickstart.rst:8
msgid "Installation"
msgstr "安装"
#: ../../quickstart.rst:10
msgid ""
"Install Pelican (and optionally Markdown if you intend to use it) on "
"Python |min_python| by running the following command in your preferred "
"terminal, prefixing with ``sudo`` if permissions warrant::"
msgstr ""
"在命令行中执行下面的命令就可以安装Pelican了如果您需要Markdown支持的话也可以同时安装。Pelican需要使用 |min_python| 以上版本的Python当然如果需要授权请在命令前加上"
" ``sudo``"
#: ../../quickstart.rst:17
msgid "Create a project"
msgstr "创建项目"
#: ../../quickstart.rst:19
msgid ""
"First, choose a name for your project, create an appropriately-named "
"directory for your site, and switch to that directory::"
msgstr "首先,给您的项目想个名字,并以合适的名字创建一个文件夹来存放您的站点接着进入这个新创建的文件夹"
#: ../../quickstart.rst:25
msgid ""
"Create a skeleton project via the ``pelican-quickstart`` command, which "
"begins by asking some questions about your site::"
msgstr "通过 ``pelican-quickstart`` 命令创建一个项目的框架,执行这个命令后,您需要输入一些站点相关的信息"
#: ../../quickstart.rst:30
msgid ""
"For questions that have default values denoted in brackets, feel free to "
"use the Return key to accept those default values [#tzlocal_fn]_. When "
"asked for your URL prefix, enter your domain name as indicated (e.g., "
"``https://example.com``)."
msgstr ""
"对于那些在括号中写了默认值的问题,完全可以直接回车使用预先设定好的默认值 "
"[#tzlocal_fn]_。在输入站点URL的前缀prefix请根据提示的格式输入站点的域名例如 "
"``https://example.com`` )。"
#: ../../quickstart.rst:36
msgid "Create an article"
msgstr "创建文章"
#: ../../quickstart.rst:38
msgid ""
"You cannot run Pelican until you have created some content. Use your "
"preferred text editor to create your first article with the following "
"content::"
msgstr "在运行Pelican前您需要先写一些内容。您可以使用喜欢的文本编辑器来创建第一篇文章。下面是一个样例可以将它作为您的第一篇文章"
#: ../../quickstart.rst:47
msgid ""
"Given that this example article is in Markdown format, save it as "
"``~/projects/yoursite/content/keyboard-review.md``."
msgstr ""
"上面这篇文章是以Markdown的格式完成的请将它保存为注意要保存在content文件夹下``~/projects/yoursite/content"
"/keyboard-review.md``。"
#: ../../quickstart.rst:51
msgid "Generate your site"
msgstr "生成站点"
#: ../../quickstart.rst:53
msgid ""
"From your project root directory, run the ``pelican`` command to generate"
" your site::"
msgstr "在项目的根目录下,直接运行命令 ``pelican`` 就可以生成您自己的站点了:"
#: ../../quickstart.rst:57
msgid ""
"Your site has now been generated inside the ``output/`` directory. (You "
"may see a warning related to feeds, but that is normal when developing "
"locally and can be ignored for now.)"
msgstr "站点会生成在 ``output/`` 目录下。可能会显示和feeds有关的警告这和现在的本地开发环境有关目前完全可以忽略它。"
#: ../../quickstart.rst:62
msgid "Preview your site"
msgstr "预览站点"
#: ../../quickstart.rst:64
msgid ""
"Open a new terminal session, navigate to your project root directory, and"
" run the following command to launch Pelican's web server::"
msgstr "打开一个新的命令行进入刚才项目的根目录执行下面的命令让Pelican自己运行一个web服务器"
#: ../../quickstart.rst:69
msgid "Preview your site by navigating to http://localhost:8000/ in your browser."
msgstr "打开浏览器进入http://localhost:8000/就可以看到刚刚生成的站点了。"
#: ../../quickstart.rst:71
msgid ""
"Continue reading the other documentation sections for more detail, and "
"check out the Pelican wiki's Tutorials_ page for links to community-"
"published tutorials."
msgstr "请继续阅读文档中的其他部分来了解更多Pelican的用法也可以前往Pelican的wiki 教程_ 页面获取社区发布的教程。"
#: ../../quickstart.rst:78
msgid "Footnotes"
msgstr "脚注"
#: ../../quickstart.rst:80
msgid ""
"You can help localize default fields by installing the optional `tzlocal "
"<https://pypi.org/project/tzlocal/>`_ module."
msgstr "您可以安装可选模块 `tzlocal <https://pypi.org/project/tzlocal/>`_ 来本地化默认字段。"

Binary file not shown.

View file

@ -0,0 +1,224 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.12.1\n"
#: ../../report.rst:2
msgid "Some history about Pelican"
msgstr "Pelican的一些历史"
#: ../../report.rst:6
msgid ""
"This page comes from a report the original author (Alexis Métaireau) "
"wrote right after writing Pelican, in December 2010. The information may "
"not be up-to-date."
msgstr "此页面来自原作者 Alexis Métaireau 在2010年12月完成Pelican后作的一篇报告因此"
"其中的内容可能不是最新的。"
#: ../../report.rst:10
msgid ""
"Pelican is a simple static blog generator. It parses markup files "
"(Markdown or reStructuredText for now) and generates an HTML folder with "
"all the files in it. I've chosen to use Python to implement Pelican "
"because it seemed to be simple and to fit to my needs. I did not wanted "
"to define a class for each thing, but still wanted to keep my things "
"loosely coupled. It turns out that it was exactly what I wanted. From "
"time to time, thanks to the feedback of some users, it took me a very few"
" time to provide fixes on it. So far, I've re-factored the Pelican code "
"by two times; each time took less than 30 minutes."
msgstr "Pelican是一个简单的静态博客生成器。它解析标记文件目前主要是Markdown和reStructuredText"
"并生成一个文件夹其中包含了对应于标记文件的HTML。由于Python很简单并且符合需求我选择使用Python"
"来实现Pelican。我不想为每个东西定义一个类但同时又想要各部件之间低耦合。事实证明这正是我想要的。"
"在发展过程中多亏了用户给的反馈我花了些时间修复了一些问题。到目前为止我已经将Pelican的代码重构"
"了两次每次重构都不会超过30分钟。"
#: ../../report.rst:21
msgid "Use case"
msgstr "使用场景"
#: ../../report.rst:23
msgid ""
"I was previously using WordPress, a solution you can host on a web server"
" to manage your blog. Most of the time, I prefer using markup languages "
"such as Markdown or reStructuredText to type my articles. To do so, I use"
" vim. I think it is important to let the people choose the tool they want"
" to write the articles. In my opinion, a blog manager should just allow "
"you to take any kind of input and transform it to a weblog. That's what "
"Pelican does. You can write your articles using the tool you want, and "
"the markup language you want, and then generate a static HTML weblog."
msgstr "我之前使用的是WordPress你可以将它部署在Web服务器上来管理博客。大多数时候我更喜欢使用"
"Markdown或reStructuredText等标记语言来撰写文章。为此我一般用vim来写这些文章。我认为让大家自行选择"
"用于写文章的工具是很重要的。在我看来博客管理器应该能够接受任何类型的输入并将其转换为博客站。Pelican就"
"采取这一思想。您可以选择自己喜欢的工具以及标记语言来撰写文章然后生成静态的HTML博客站。"
#: ../../report.rst:34
msgid ""
"To be flexible enough, Pelican has template support, so you can easily "
"write your own themes if you want to."
msgstr "为了足够的灵活性Pelican中支持使用模板这样你就可以编写自己的主题了。"
#: ../../report.rst:38
msgid "Design process"
msgstr "设计过程"
#: ../../report.rst:40
msgid ""
"Pelican came from a need I have. I started by creating a single file "
"application, and I have make it grow to support what it does by now. To "
"start, I wrote a piece of documentation about what I wanted to do. Then, "
"I created the content I wanted to parse (the reStructuredText files) and "
"started experimenting with the code. Pelican was 200 lines long and "
"contained almost ten functions and one class when it was first usable."
msgstr "Pelican来源于我的需求。从单文件应用程序出发不断成长为现在功能丰富的应用。首先我"
"写了一份需求文档然后创建了我想要解析的内容reStructuredText文件并开始实验性的编写代码。"
"Pelican的第一个能够使用的版本包含了200行代码、10个函数以及1个类。"
#: ../../report.rst:47
msgid ""
"I have been facing different problems all over the time and wanted to add"
" features to Pelican while using it. The first change I have done was to "
"add the support of a settings file. It is possible to pass the options to"
" the command line, but can be tedious if there is a lot of them. In the "
"same way, I have added the support of different things over time: Atom "
"feeds, multiple themes, multiple markup support, etc. At some point, it "
"appears that the \"only one file\" mantra was not good enough for "
"Pelican, so I decided to rework a bit all that, and split this in "
"multiple different files."
msgstr "我不断遇到各种问题在使用过程中还想要往Pelican中添加功能。在对代码的第一次修改中添加了"
"对配置文件的支持。虽然可以在命令行中往里传入选项,但当配置项多起来后,就会变得异常冗长。同样地,"
"Pelican支持了越来越多的功能Atom订阅源、多主体支持、多标记语言支持等等。在某一时刻单文件应用"
"已经不适合Pelican了因此我决定多做些工作将应用分离到多个文件中。"
#: ../../report.rst:56
msgid "Ive separated the logic in different classes and concepts:"
msgstr "我将系统整体逻辑分为如下几个类和概念"
#: ../../report.rst:58
msgid ""
"*writers* are responsible of all the writing process of the files. They "
"are responsible of writing .html files, RSS feeds and so on. Since those "
"operations are commonly used, the object is created once, and then passed"
" to the generators."
msgstr "**Writers** 负责文件的写入工作,即负责完成 html文件、RSS订阅源等内容因为这些操作都是"
"比较常用的这个类只会被创建一次然后再传给Generators。"
#: ../../report.rst:63
msgid ""
"*readers* are used to read from various formats (Markdown and "
"reStructuredText for now, but the system is extensible). Given a file, "
"they return metadata (author, tags, category, etc) and content (HTML "
"formatted)."
msgstr "**Readers** 用于读取不同格式的文件目前支持Markdown、reStructuredText但可以继续扩展。"
"向**Readers**输入一个文件它会返回文档的元数据作者、标签、分类等等与HTML格式的文档正文内容。"
#: ../../report.rst:67
msgid ""
"*generators* generate the different outputs. For instance, Pelican comes "
"with an ArticlesGenerator and PagesGenerator, into others. Given a "
"configuration, they can do whatever you want them to do. Most of the time"
" it's generating files from inputs (user inputs and files)."
msgstr "**Generators** 用以生成不同的输出Pelican自带了 ``ArticlesGenerator`` 和 ``PageGenerator`` 。"
"给定一套配置信息, **Generators** 可以做几乎任何事。但大多数情况下,它的工作就是从输入生成文件。"
#: ../../report.rst:72
msgid ""
"I also deal with contents objects. They can be ``Articles``, ``Pages``, "
"``Quotes``, or whatever you want. They are defined in the ``contents.py``"
" module and represent some content to be used by the program."
msgstr "同样,还要处理正文对象。正文对象可以是 ``Articles`` 、 ``Pages`` 、 ``Quotes`` 或者其他"
"你想要的类型。这些对象在 ``contents.py`` 模块中完成定义,同时代表了应用中使用到的内容。"
#: ../../report.rst:77
msgid "In more detail"
msgstr "更细节的内容"
#: ../../report.rst:79
msgid "Here is an overview of the classes involved in Pelican."
msgstr "以下是Pelican中涉及的类的概述。"
#: ../../report.rst:83
msgid ""
"The interface does not really exist, and I have added it only to clarify "
"the whole picture. I do use duck typing and not interfaces."
msgstr "上图中的接口事实上并不存在,我是为了整张图的完整性才加上去的。在实际实现中,使用了"
"鸭子类型而不是接口。"
#: ../../report.rst:86
msgid "Internally, the following process is followed:"
msgstr "应用内部按以下流程进行处理:"
#: ../../report.rst:88
msgid ""
"First of all, the command line is parsed, and some content from the user "
"is used to initialize the different generator objects."
msgstr "首先解析命令行并根据用户给入的一些内容来初始化不同的generator对象。"
#: ../../report.rst:91
msgid ""
"A ``context`` is created. It contains the settings from the command line "
"and a settings file if provided."
msgstr "创建一个 ``context`` ,其中包含了来自命令行和文件的配置信息。"
#: ../../report.rst:93
msgid ""
"The ``generate_context`` method of each generator is called, updating the"
" context."
msgstr "调用各generator对象的 ``generate_context`` 方法来更新 ``context`` 。"
#: ../../report.rst:95
msgid ""
"The writer is created and given to the ``generate_output`` method of each"
" generator."
msgstr "创建 **Writers** 并将其给入generator的 ``generate_output`` 方法。"
#: ../../report.rst:98
msgid ""
"I make two calls because it is important that when the output is "
"generated by the generators, the context will not change. In other words,"
" the first method ``generate_context`` should modify the context, whereas"
" the second ``generate_output`` method should not."
msgstr "由于当generator生成输出时并不会改变上下文我进行了两次调用。换句话说第一个方法 "
"``generate_context`` 会修改上下文,而第二个方法 ``generate_output`` 不会。"
#: ../../report.rst:103
msgid ""
"Then, it is up to the generators to do what the want, in the "
"``generate_context`` and ``generate_content`` method. Taking the "
"``ArticlesGenerator`` class will help to understand some others concepts."
" Here is what happens when calling the ``generate_context`` method:"
msgstr "然后事情就取决于各generator在 ``generate_context`` 和 ``generate_content`` 中做的"
"操作了。拿 ``ArticlesGenerator`` 举例可以帮助理解其他的一些概念。下面是调用 ``generate_context`` "
"方法后会发生的事情:"
#: ../../report.rst:108
msgid ""
"Read the folder “path”, looking for restructured text files, load each of"
" them, and construct a content object (``Article``) with it. To do so, "
"use ``Reader`` objects."
msgstr "读取文件夹路径查找并加载每个restructured文件并为每个文件构建一个正文内容对象 ``Article`` )。"
"此工作是由 ``Reader`` 对象完成的。"
#: ../../report.rst:111
msgid "Update the ``context`` with all those articles."
msgstr "根据所有的文章更新 ``context`` 。"
#: ../../report.rst:113
msgid ""
"Then, the ``generate_content`` method uses the ``context`` and the "
"``writer`` to generate the wanted output."
msgstr "然后, ``generate_content`` 方法使用 ``context`` 和 ``writer`` 来生成想要的输出。"

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,60 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.12.1\n"
#: ../../_templates/page.html:68
msgid "Back to top"
msgstr "返回顶部"
#: ../../_templates/page.html:101
msgid "Next"
msgstr "下一节"
#: ../../_templates/page.html:113
msgid "Previous"
msgstr "前一节"
#: ../../_templates/page.html:116
msgid "Home"
msgstr "首页"
#: ../../_templates/page.html:129
#, python-format
msgid "<a href=\"%(path)s\">Copyright</a> &#169; %(copyright)s"
msgstr "<a href=\"%(path)s\">Copyright</a> &#169; %(copyright)s"
#: ../../_templates/page.html:133
#, python-format
msgid ""
"Copyright &#169; %(copyright)s, <a "
"href=\"https://justinmayer.com\">Justin Mayer</a>, Alexis Metaireau, and "
"contributors"
msgstr ""
"Copyright &#169; %(copyright)s, <a "
"href=\"https://justinmayer.com\">Justin Mayer</a>, Alexis Metaireau, and "
"contributors"
#: ../../_templates/page.html:141
#, python-format
msgid "Last updated on %(last_updated)s"
msgstr "最后更新于 %(last_updated)s"
#: ../../_templates/page.html:187
msgid "On this page"
msgstr "本页目录"

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,479 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102023
# This file is distributed under the same license as the Pelican package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Pelican 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\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.13.0\n"
#: ../../tips.rst:2
msgid "Tips"
msgstr "温馨提示"
#: ../../tips.rst:4
msgid "Here are some tips about Pelican that you might find useful."
msgstr "以下是一些实用的小技巧。"
#: ../../tips.rst:7 ../../tips.rst:208
msgid "Custom 404 Pages"
msgstr "自定义404页面"
#: ../../tips.rst:9
msgid ""
"When a browser requests a resource that the web server cannot find, the "
"web server usually displays a generic \"File not found\" (404) error page"
" that can be stark and unsightly. One way to provide an error page that "
"matches the theme of your site is to create a custom 404 page (*not* an "
"article), such as this Markdown-formatted example stored in "
"``content/pages/404.md``::"
msgstr "当浏览器请求的资源无法在服务器中找到时web服务器常常会显示一个通用的 \"File not found\" (404)"
"的错误页面这可能会不太美观。为了能使用一个与站点主题相匹配的404页面注意是页面而 **不是** 文章),"
"例如下面这个Markdown格式的例子将此文件存为了 ``content/pages/404.md`` "
#: ../../tips.rst:22
msgid ""
"The next step is to configure your web server to display this custom page"
" instead of its default 404 page. For Nginx, add the following to your "
"configuration file's ``location`` block::"
msgstr "下一步就是配置web服务器使其显示此自定义页面而不是默认的404页面。例如对于Nginx在配置文件的 "
"``location`` 块中添加下面的命令:"
#: ../../tips.rst:28
msgid "For Apache::"
msgstr "对于Apache"
#: ../../tips.rst:32
msgid ""
"For Amazon S3, first navigate to the ``Static Site Hosting`` menu in the "
"bucket settings on your AWS console. From there::"
msgstr "对于Amazon S3实例先在控制台的设置中找到 ``Static Site Hosting`` ,并添加:"
#: ../../tips.rst:38
msgid "Publishing to GitHub Pages"
msgstr "发布到GitHub Pages"
#: ../../tips.rst:40
msgid ""
"If you use `GitHub <https://github.com/>`_ for your Pelican site you can "
"publish your site to `GitHub Pages <https://pages.github.com/>`_ for "
"free. Your site will be published to ``https://<username>.github.io`` if "
"it's a user or organization site or to "
"``https://<username>.github.io/<repository>`` if it's a project site. "
"It's also possible to `use a custom domain with GitHub Pages "
"<https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-"
"github-pages-site>`_."
msgstr "如果将Pelican站点放在了 `GitHub <https://github.com/>`_ 上,那么你就可以将站点免费发布"
"在 `GitHub Pages <https://pages.github.com/>`_ 上。如果是用户或组织的站点,发布的地址为 "
"``https://<username>.github.io`` ;如果是某个项目的站点,发布的地址则为 ``https://<username>.github.io/<repository>`` 。"
"当然也可以 `在GitHub Pages上使用自定义域名 <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-"
"github-pages-site>`_ 。"
#: ../../tips.rst:46
msgid ""
"There are `two ways to publish a site to GitHub Pages "
"<https://docs.github.com/en/pages/getting-started-with-github-"
"pages/configuring-a-publishing-source-for-your-github-pages-site>`_:"
msgstr "总的来说,有 `两种将站点发布到GitHub Pages的方法 <https://docs.github.com/en/pages/getting-started-with-github-"
"pages/configuring-a-publishing-source-for-your-github-pages-site>`_ "
#: ../../tips.rst:48
msgid ""
"**Publishing from a branch:** run ``pelican`` locally and push the output"
" directory to a special branch of your GitHub repo. GitHub will then "
"publish the contents of this branch to your GitHub Pages site."
msgstr "**从某一分支发布:** 在本地运行 ``pelican`` 后将输出文件夹push到GitHub仓库的某一分支。GitHub"
"就会从该分支将内容发布到GitHub Pages上。"
#: ../../tips.rst:51
msgid ""
"**Publishing with a custom GitHub Actions workflow:** just push the "
"source files of your Pelican site to your GitHub repo's default branch "
"and have a custom GitHub Actions workflow run ``pelican`` for you to "
"generate the output directory and publish it to your GitHub Pages site. "
"This way you don't need to run ``pelican`` locally. You can even edit "
"your site's source files using GitHub's web interface and any changes "
"that you commit will be published."
msgstr "**从自定义GitHub Actions工作流发布** 将内容源文件推送到GitHub仓库的默认分支然后依靠GitHub Actions"
"工作流执行 ``pelican`` 以生成输出文件夹最后将其发布到你的GitHub Pages站点。此种方法下就无需在本地执行 ``pelican`` "
"命令了。甚至可以直接在GitHub的网页中在线修改站点内容源文件。"
#: ../../tips.rst:60
msgid "Publishing a Project Site to GitHub Pages from a Branch"
msgstr "从某一分支发布项目站点到GitHub Pages"
#: ../../tips.rst:62
msgid ""
"To publish a Pelican site as a Project Page you need to *push* the "
"content of the ``output`` dir generated by Pelican to a repository's "
"``gh-pages`` branch on GitHub."
msgstr "要将Pelican站点发布为项目页面你需要将Pelican生成的 ``output`` 目录 **push** 到GitHub仓库"
"的 ``gh-pages`` 分支。"
#: ../../tips.rst:66
msgid ""
"The excellent `ghp-import <https://github.com/davisp/ghp-import>`_, which"
" can be installed with ``pip``, makes this process really easy."
msgstr "可通过 ``pip`` 安装的 `ghp-import <https://github.com/davisp/ghp-import>`_ 使这一步变得非常简单。"
#: ../../tips.rst:69
msgid ""
"For example, if the source of your Pelican site is contained in a GitHub "
"repository, and if you want to publish that Pelican site in the form of "
"Project Pages to this repository, you can then use the following::"
msgstr "例如当Pelican站点的源文件已经包含在GitHub仓库中时可以将其作为此仓库的项目页面"
#: ../../tips.rst:77
msgid ""
"The ``ghp-import output`` command updates the local ``gh-pages`` branch "
"with the content of the ``output`` directory (creating the branch if it "
"doesn't already exist). The ``git push origin gh-pages`` command updates "
"the remote ``gh-pages`` branch, effectively publishing the Pelican site."
msgstr "``ghp-import output`` 命令会用 ``output`` 目录下的内容更新本地的 ``gh-pages`` 分支(如果此分支不存在"
"则会先创建)。接着再用 ``git push origin gh-pages`` 命令更新远程分支 ``gh-pages`` 如此就能够发布Pelican站点了。"
#: ../../tips.rst:84
msgid ""
"The ``github`` target of the Makefile (and the ``gh_pages`` task of "
"``tasks.py``) created by the ``pelican-quickstart`` command publishes the"
" Pelican site as Project Pages, as described above."
msgstr "``pelican-quickstart`` 在Makefile文件中所生成的 ``github`` 目标(以及为 ``gh_pages`` 任务生成的 ``tasks.py`` "
"使得Pelican站点能像上面描述的那样被发布为项目页面。"
#: ../../tips.rst:89
msgid "Publishing a User Site to GitHub Pages from a Branch"
msgstr "从某一分支发布用户站点到GitHub Pages"
#: ../../tips.rst:91
msgid ""
"To publish a Pelican site in the form of User Pages, you need to *push* "
"the content of the ``output`` dir generated by Pelican to the ``master`` "
"branch of your ``<username>.github.io`` repository on GitHub."
msgstr "要以用户页面形式发布Pelican站点你需要将Pelican生成的 ``output`` 目录内容 **push** 到 ``<username>.github.io`` "
"仓库的 ``master`` 分支上。"
#: ../../tips.rst:95
msgid "Again, you can take advantage of ``ghp-import``::"
msgstr "同样的,此处也可以使用 ``ghp-import`` "
#: ../../tips.rst:101
msgid ""
"The ``git push`` command pushes the local ``gh-pages`` branch (freshly "
"updated by the ``ghp-import`` command) to the ``elemoine.github.io`` "
"repository's ``master`` branch on GitHub."
msgstr "``git push`` 命令将本地的 ``gh-pages`` 分支(此分支在刚刚通过 ``ghp-import`` 命令进行了更新)"
"push到了GitHub仓库 ``elemoine.github.io`` 的 ``master`` 分支。"
#: ../../tips.rst:107
msgid ""
"To publish your Pelican site as User Pages, feel free to adjust the "
"``github`` target of the Makefile."
msgstr "要将Pelican站点发布为用户页面可以根据需要修改Makefile中的 ``github`` 目标"
#: ../../tips.rst:110
msgid ""
"Another option for publishing to User Pages is to generate the output "
"files in the root directory of the project."
msgstr "发布用户页面的另一种方法就是将输出文件生成在项目的根目录下。"
#: ../../tips.rst:113
msgid ""
"For example, your main project folder is ``<username>.github.io`` and you"
" can create the Pelican project in a subdirectory called ``Pelican``. "
"Then from inside the ``Pelican`` folder you can run::"
msgstr "例如,项目的主文件夹是 ``<username>.github.io`` ,你可以在子目录 ``Pelican`` 中创建一个Pelican项目。"
"然后你可以在这个 ``Pelican`` 文件夹中执行下面的命令:"
#: ../../tips.rst:119
msgid ""
"Now you can push the whole project ``<username>.github.io`` to the master"
" branch of your GitHub repository::"
msgstr "接着可以将整个项目 ``<username>.github.io`` push到GitHub仓库的master分支中"
#: ../../tips.rst:124
msgid "(assuming origin is set to your remote repository)."
msgstr "此处假设远程仓库命名为origin。"
#: ../../tips.rst:127
msgid "Publishing to GitHub Pages Using a Custom GitHub Actions Workflow"
msgstr "使用自定义GitHub Actions工作流将站点发布GitHub Pages中"
#: ../../tips.rst:129
msgid ""
"Pelican comes with a `custom workflow "
"<https://github.com/getpelican/pelican/blob/master/.github/workflows/github_pages.yml>`_"
" for publishing a Pelican site. To use it:"
msgstr "Pelican已经给你准备了一份 `自定义工作流 "
"<https://github.com/getpelican/pelican/blob/master/.github/workflows/github_pages.yml>`_ "
"你可以直接使用此工作流发布站点:"
#: ../../tips.rst:132
msgid ""
"Enable GitHub Pages in your repo: go to **Settings → Pages** and choose "
"**GitHub Actions** for the **Source** setting."
msgstr "首先为仓库开启GitHub Pages **Settings → Pages** 中有个 **Source** 设置项,"
"将其选择为 **GitHub Actions** 。"
#: ../../tips.rst:135
msgid ""
"Commit a ``.github/workflows/pelican.yml`` file to your repo with these "
"contents:"
msgstr "往你的仓库中commit一个 ``.github/workflows/pelican.yml`` 文件,文件内容如下:"
#: ../../tips.rst:154
msgid ""
"Go to the **Actions** tab in your repo "
"(``https://github.com/<username>/<repository>/actions``) and you should "
"see a **Deploy to GitHub Pages** action running."
msgstr "选中仓库的 **Actions** 标签栏( ``https://github.com/<username>/<repository>/actions`` "
"此时你应该会看到已经有一个名为 **Deploy to GitHub Pages** 的action正在运行。"
#: ../../tips.rst:158
msgid ""
"Once the action completes you should see your Pelican site deployed at "
"your repo's GitHub Pages URL: ``https://<username>.github.io`` for a user"
" or organization site or ``https://<username>.github.io/<repository>>`` "
"for a project site."
msgstr "当此action执行完成就能够通过仓库的GitHub Pages地址 ``https://<username>.github.io`` 看到部署好了"
"的用户或组织站点了,对于项目站点,通过 ``https://<username>.github.io/<repository>`` 访问"
#: ../../tips.rst:163
msgid "Notes:"
msgstr "注意事项:"
#: ../../tips.rst:165
msgid ""
"You don't need to set ``SITEURL`` in your Pelican settings: the workflow "
"will set it for you"
msgstr "无需在Pelican配置文件中设置 ``SITEURL`` ,工作流会帮你进行设置。"
#: ../../tips.rst:168
msgid ""
"You don't need to commit your ``--output`` / ``OUTPUT_PATH`` directory "
"(``output/``) to git: the workflow will run ``pelican`` to build the "
"output directory for you on GitHub Actions"
msgstr "无需commit ``--output`` 或 ``OUTPUT_PATH`` 目录( ``output/`` ):工作流会自己执行 ``pelican`` 命令"
"来构建输出目录。"
#: ../../tips.rst:172
msgid ""
"See `GitHub's docs about reusable workflows "
"<https://docs.github.com/en/actions/using-workflows/reusing-workflows>`_ "
"for more information."
msgstr "更多信息请参阅 `GitHub可重用工作流文档 <https://docs.github.com/en/actions/using-workflows/reusing-workflows>`_ 。"
#: ../../tips.rst:175
msgid ""
"A number of optional inputs can be added to the ``with:`` block when "
"calling the workflow:"
msgstr "有一些可选输入可以添加到工作流的 ``with:`` 块中:"
#: ../../tips.rst:179
msgid "Name"
msgstr "名称"
#: ../../tips.rst:179
msgid "Required"
msgstr "是否必需"
#: ../../tips.rst:179
msgid "Description"
msgstr "描述"
#: ../../tips.rst:179
msgid "Type"
msgstr "值的类型"
#: ../../tips.rst:179
msgid "Default"
msgstr "默认值"
#: ../../tips.rst:181
msgid "settings"
msgstr "settings"
#: ../../tips.rst:181
msgid "Yes"
msgstr "是"
#: ../../tips.rst:181
msgid ""
"The path to your Pelican settings file (``pelican``'s ``--settings`` "
"option), for example: ``\"publishconf.py\"``"
msgstr "Pelican配置文件的路径会被用户 ``pelican`` 命令的 ``--settings`` 选项),例如 ``\"publishconf.py\"`` 。"
#: ../../tips.rst:181 ../../tips.rst:186 ../../tips.rst:193
msgid "string"
msgstr "string"
#: ../../tips.rst:186
msgid "requirements"
msgstr "requirements"
#: ../../tips.rst:186 ../../tips.rst:193
msgid "No"
msgstr "否"
#: ../../tips.rst:186
msgid ""
"The Python requirements to install, for example to enable markdown and "
"typogrify use: ``\"pelican[markdown] typogrify\"`` or if you have a "
"requirements file: ``\"-r requirements.txt\"``"
msgstr "需要安装的Python模块例如要开启markdown和typogrify可指定 ``\"pelican[markdown] typogrify\"`` "
"或者可以指定一个requirements文件 ``\"-r requirements.txt\"`` "
#: ../../tips.rst:186
msgid "``\"pelican\"``"
msgstr "``\"pelican\"``"
#: ../../tips.rst:193
msgid "output-path"
msgstr "output-path"
#: ../../tips.rst:193
msgid "Where to output the generated files (``pelican``'s ``--output`` option)"
msgstr "生成文件的输出位置(会被用于 ``pelican`` 命令的 ``--output`` 选项)"
#: ../../tips.rst:193
msgid "``\"output/\"``"
msgstr "``\"output/\"``"
#: ../../tips.rst:198
msgid "For example:"
msgstr "一个例子:"
#: ../../tips.rst:210
msgid ""
"GitHub Pages will display the custom 404 page described above, as noted "
"in the relevant `GitHub docs "
"<https://help.github.com/articles/custom-404-pages/>`_."
msgstr "如果按前述进行配置GitHub Pages是能够正确显示自定义的404页面的相关内容在 `GitHub的文档中 "
"<https://help.github.com/articles/custom-404-pages/>`_ 也有提到。"
#: ../../tips.rst:214
msgid "Update your site on each commit"
msgstr "在每次commit后都更新站点"
#: ../../tips.rst:216
msgid ""
"To automatically update your Pelican site on each commit, you can create "
"a post-commit hook. For example, you can add the following to "
"``.git/hooks/post-commit``::"
msgstr "要想在每次commit后自动更新Pelican站点你可以创建一个post-commit钩子。例如可以将下面的内容保存"
"为 ``.git/hooks/post-commit`` "
#: ../../tips.rst:223
msgid "Copy static files to the root of your site"
msgstr "将静态文件拷贝到站点根目录"
#: ../../tips.rst:225
msgid ""
"To use a `custom domain <https://help.github.com/articles/setting-up-a"
"-custom-domain-with-pages>`_ with GitHub Pages, you need to put the "
"domain of your site (e.g., ``blog.example.com``) inside a ``CNAME`` file "
"at the root of your site. To do this, create the ``content/extra/`` "
"directory and add a ``CNAME`` file to it. Then use the ``STATIC_PATHS`` "
"setting to tell Pelican to copy this file to your output directory. For "
"example::"
msgstr "要将`自定义域名 <https://help.github.com/articles/setting-up-a-custom-domain-with-pages>`_ "
"与GitHub Pages一起使用需要将站点的域名例如 ``blog.example.com`` )添加到站点根目录的 ``CNAME`` 文件中。"
"为此,请创建 ``content/extra/`` 目录,并在里面添加一个 ``CNAME`` 文件。然后使用Pelican的 ``STATIC_PATHS`` "
"来告诉Pelican将此文件复制到输出目录"
#: ../../tips.rst:236
msgid "Note: use forward slashes, ``/``, even on Windows."
msgstr "请注意:务必使用正斜杠 ``/`` 在Windows上也是。"
#: ../../tips.rst:238
msgid ""
"You can also use the ``EXTRA_PATH_METADATA`` mechanism to place a "
"``favicon.ico`` or ``robots.txt`` at the root of any site."
msgstr "利用 ``EXTRA_PATH_METADATA`` 机制,你可以将 ``favicon.ico`` 或 ``robots.txt`` 也拷贝到站点的根目录下。"
#: ../../tips.rst:242
msgid "How to add YouTube or Vimeo Videos"
msgstr "如何添加YouTube或Vimeo视频"
#: ../../tips.rst:244
msgid ""
"The easiest way is to paste the embed code of the video from these sites "
"directly into your source content."
msgstr "最简单的方法是将这些网站的视频嵌入代码直接粘贴到您的源内容文件中。"
#: ../../tips.rst:247
msgid ""
"Alternatively, you can also use Pelican plugins like ``liquid_tags``, "
"``pelican_youtube``, or ``pelican_vimeo`` to embed videos in your "
"content."
msgstr "或者,您还可以使用例如 ``liquid_tags`` 、``pelican_youtube`` 或 ``pelican_vimeo`` 等Pelican插件"
"将视频嵌入。"
#: ../../tips.rst:250
msgid ""
"Moreover, markup languages like reST and Markdown have plugins that let "
"you embed videos in the markup. You can use `reST video directive "
"<https://gist.github.com/dbrgn/2922648>`_ for reST or `mdx_video plugin "
"<https://github.com/italomaia/mdx-video>`_ for Markdown."
msgstr "此外像reST和 Markdown这样的标记语言都有对应插件可以让你在其中嵌入视频。可以使用 `reST的视频指令 "
"<https://gist.github.com/dbrgn/2922648>`_ 或者 `Markdown的mdx_video插件 <https://github.com/italomaia/mdx-video>`_ 。"
#: ../../tips.rst:257
msgid "Develop Locally Using SSL"
msgstr "在本地使用SSL进行开发"
#: ../../tips.rst:259
msgid "Here's how you can set up your local pelican server to support SSL."
msgstr "以下描述了如何在本地Pelican服务器上配置SSL。"
#: ../../tips.rst:261
msgid ""
"First, create a self-signed certificate and key using ``openssl`` (this "
"creates ``cert.pem`` and ``key.pem``)::"
msgstr "首先,通过 ``openssl`` 创建自签名的证书和密钥,这会生成 ``cert.pem`` 和 ``key.pem`` 文件:"
#: ../../tips.rst:265
msgid ""
"And use this command to launch the server (the server starts within your "
"``output`` directory)::"
msgstr "接着使用下面的命令来开启服务器(此服务器会在 ``output`` 目录下开启):"
#: ../../tips.rst:269
msgid "If you are using ``develop-server.sh``, add this to the top::"
msgstr "如果你使用的是 ``develop-server.sh`` 脚本,在脚本的开头添加:"
#: ../../tips.rst:274
msgid "and modify the ``pelican.server`` line as follows::"
msgstr "然后修改按照下述修改 ``pelican.server`` 一行:"
#~ msgid "Publishing to GitHub"
#~ msgstr ""
#~ msgid ""
#~ "`GitHub Pages "
#~ "<https://help.github.com/categories/20/articles>`_ offer "
#~ "an easy and convenient way to "
#~ "publish Pelican sites. There are `two"
#~ " types of GitHub Pages "
#~ "<https://help.github.com/articles/user-organization-"
#~ "and-project-pages>`_: *Project Pages* and"
#~ " *User Pages*. Pelican sites can be"
#~ " published as both Project Pages and"
#~ " User Pages."
#~ msgstr ""
#~ msgid "Project Pages"
#~ msgstr ""
#~ msgid "User Pages"
#~ msgstr ""