pelican/docs/locale/zh_CN/LC_MESSAGES/contribute.po
2025-07-13 16:40:13 +08:00

669 lines
34 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 20102024
# This file is distributed under the same license as the PELICAN package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: PELICAN 4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-13 11:46+0800\n"
"PO-Revision-Date: 2024-06-27 19:00+0800\n"
"Last-Translator: GeorgeHu <dhxxhch@163.com>\n"
"Language: zh_CN\n"
"Language-Team: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"
#: ../../contribute.rst:2 848b6c0ec944440791d56b25e314a8ab
msgid "Contributing and feedback guidelines"
msgstr "项目贡献与意见反馈"
#: ../../contribute.rst:4 e8b8762778fd461db0934f07e4fc1fc5
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 103b2f2862c4469695e4c6aff2321a8d
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 5ad44a6fdf0b45eaaa800023139694f8
msgid "Filing issues"
msgstr "提出issue"
#: ../../../CONTRIBUTING.rst:4 c7e2bb966f49419aba7ed7027a977043
msgid "Before you submit a new issue, try `asking for help`_ first."
msgstr "在你提交一个新的issue之前可以先尝试 `请求他人帮助`_ 。"
#: ../../../CONTRIBUTING.rst:5 a287bb06699b4db79d6dd7491bbe031b
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 d4a600f2338b458e822aba90e54d4cfd
msgid "How to get help"
msgstr "如何获取帮助"
#: ../../../CONTRIBUTING.rst:16 db3264afde384c2891d9be7205578556
msgid "Before you ask for help, please make sure you do the following:"
msgstr "在寻求帮助之前,请先尝试如下步骤:"
#: ../../../CONTRIBUTING.rst:18 3581147764244a548cd2898faaa7799a
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 d8e467909ec64ba7900da93b3765bfa6
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:`plugins` 或配置一系列的设置选项。"
#: ../../../CONTRIBUTING.rst:25 2011839b36504c41b307cc9f817c4a46
msgid "Try reproducing the issue in a clean environment, ensuring you are using:"
msgstr "尝试在一个尽可能简单的环境中重现问题,并确保以下几点:"
#: ../../../CONTRIBUTING.rst:27 2d64217ea3e54dc58a371fc11a6ece8e
msgid ""
"latest Pelican release (or an up-to-date Git clone of Pelican ``main`` "
"branch)"
msgstr "使用最新版本的Pelican或是用Git克隆Pelican的main分支"
#: ../../../CONTRIBUTING.rst:28 721ca09c5a9a495b9fbb6aa86df8be28
msgid "latest releases of libraries used by Pelican"
msgstr "将Pelican使用的库升级到最新版本"
#: ../../../CONTRIBUTING.rst:29 bbe722bd2be748219d38c134f29569dd
msgid "no plugins or only those related to the issue"
msgstr "此环境中没有使用插件或是只使用和问题相关的插件"
#: ../../../CONTRIBUTING.rst:31 e9f337f01ca546be93bd1d18884a1685
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 1420bb3dd096480289b3da1534d7bf64
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 bdb7575fa4c74c0891fd686794cc84fd
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 b559dc6ca72649baa754cb14d1ac77ca
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 d09a0393a4c1462b878c1adf31a7537d
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 720ee9dbccc74dccbabb994a2d36638d
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 34bdc49c617643d8ae7adb6a433a88fe
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 03c88e23c7b54117aa69e003c8bbef6e
msgid ""
"Upload detailed and **complete** output logs and backtraces (remember to "
"add the ``--debug`` flag: ``pelican --debug content [...]``)"
msgstr ""
"上传详细 **完整** 的输出日志以及backtraces信息记得在执行pelican命令时加上 ``--debug`` 标记: "
"``pelican --debug content [...]`` "
#: ../../../CONTRIBUTING.rst:71 953240a12cd64be7b9375a4571193314
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 e9f48bdfc6c744f282c70da3ac581052
msgid "Contributing code"
msgstr "贡献代码"
#: ../../../CONTRIBUTING.rst:77 888be6bde2de42a49705f29443a519c1
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 6e1329bbd8354c30b8ffa07f18894d3f
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 bca476812a33487c98d6aa840820671b
msgid "Using Git and GitHub"
msgstr "使用Git与GitHub"
#: ../../../CONTRIBUTING.rst:89 51f8df6063a544baabf35ef3bae28e83
msgid ""
"`Create a new branch`_ specific to your change (as opposed to making your"
" commits in the ``main`` branch)."
msgstr "`创建一个新的分支`_ 来标记你做的修改(而不是直接在主分支中提交)。"
#: ../../../CONTRIBUTING.rst:91 6c419972402444d5976574902311e2d7
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 ced35621749d426a8e39fdeb9b0f7c90
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 ca6b2bf54f5248cbb7d90edb678478fc
msgid ""
"Check for unnecessary whitespace via ``git diff --check`` before "
"committing."
msgstr "在提交前使用 ``git diff --check`` 来检查是否有无意义的空白字符。"
#: ../../../CONTRIBUTING.rst:105 48776b48e4924398b7632b8f05141e78
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 75acb68d9eaa4230ae230f016bf77b6c
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 51e3a16f76364d91a9abf219c731ff80
msgid ""
"`Squash your commits`_ to eliminate merge commits and ensure a clean and "
"readable commit history."
msgstr "`压缩commit`_ 来消除合并commits确保你的commit历史记录是干净可读的。"
#: ../../../CONTRIBUTING.rst:114 01ddd9df01024d38a8de79122a91cc07
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 "在你发出PR后持续集成CI系统会在所有支持的Python版本上运行测试套件并且检查代码风格的合规性。如果出现了错误你应该将其修复。如果没有通过CI系统上的测试但是本地测试通过了请再检查一下确保在本地进行了所有CI系统中的检查"
#: ../../../CONTRIBUTING.rst:121 bc27587df397410a9bb272f0851756a3
msgid "Contribution quality standards"
msgstr "贡献的质量标准"
#: ../../../CONTRIBUTING.rst:123 2cf100b3e98b43e5b841493887a1d8be
msgid ""
"Adhere to the project's code style standards. See: `Development "
"Environment`_"
msgstr "遵循项目的代码风格标准。详见 `开发环境`_"
#: ../../../CONTRIBUTING.rst:124 fffad000d6ca490291bd09cb18fcc75a
msgid ""
"Ensure your code is compatible with the `officially-supported Python "
"releases`_."
msgstr "确保你的代码可以兼容 `python的官方发布版本`_"
#: ../../../CONTRIBUTING.rst:125 907e4426cbc643fb9075e32be169ba42
msgid ""
"Add docs and tests for your changes. Undocumented and untested features "
"will not be accepted."
msgstr "请为你修改的内容添加文档与测试。未注有文档或没有对应测试的特性会被拒绝。"
#: ../../../CONTRIBUTING.rst:127 d2bcbeeb9c0541c2a5ac5ec589a16ca4
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 26daa76aea674039be278882a95422f5
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 b4a94275e9c14d8795fa54473ee2f05b
msgid "Setting up the development environment"
msgstr "配置开发环境"
#: ../../contribute.rst:17 a0eb6948883742d2a00665a576ef6aba
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 4c5c4d91e6964d709d01102e32310642
msgid "Please note that Python |min_python| is required for Pelican development."
msgstr "请注意要进行Pelican的开发至少需要Python |min_python|"
#: ../../contribute.rst:24 5419157e28984a618fc1f0df81deb620
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 a9d08dc294cb4857a58d2c63eae98a15
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 4c8ebbf9839441ca9364eeb1d25b180f
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:186
#: 2afe046c20814fe5b3de9a65606505f1 6ec60e6a37b642edb68af7ed1bc82c0b
msgid "Install the needed dependencies and set up the project::"
msgstr "安装必需的依赖并配置项目:"
#: ../../contribute.rst:50 59d5dabaab1d409c8873187e5664fe67
msgid "Your local environment should now be ready to go!"
msgstr "现在,你的本地开发环境就配置完成了!"
#: ../../contribute.rst:57 6fdce76f8ec64275b24366ff03cc6340
msgid "Development"
msgstr "开发"
#: ../../contribute.rst:59 1d1a814a5dba40bcb84ce824d6312805
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 773cdd3a48894e11a62cb24b25ef4829
msgid ""
"Now you can make changes to Pelican, its documentation, and/or other "
"aspects of the project."
msgstr "在切换到新建的分支后就可以开始对Pelican的文档或其他内容做更改了。"
#: ../../contribute.rst:68 bb120553218b4d0699998fbaf00d32c0
msgid "Setting up ``git blame`` (optional)"
msgstr "配置 ``git blame`` (可选)"
#: ../../contribute.rst:70 644fae63e5ea4e66a24e35a7ada3524c
msgid ""
"``git blame`` annotates lines in a file with information about the pull "
"request that last modified it. Sweeping shallow changes (like formatting)"
" can make that information less useful, so we keep a list of such changes"
" to be ignored. Run the following command to set this up in your "
"repository, adding ``--global`` if you want this setting to apply to all "
"repositories::"
msgstr ""
"``git blame`` "
"会在文件中的行上标注有关最后一次修改该行的PR信息。对浅层变化如格式化进行批量更改可能会使这些信息变得不那么有用因此我们维护一个包含此类更改的列表以便忽略它们。运行以下命令在您的存储库中设置此配置如果希望此设置适用于所有存储库请添加"
" ``--global`` "
#: ../../contribute.rst:78 68b7031047e94e03b0e1b0ea39d0355e
msgid ""
"As noted in a `useful article`_ about ``git blame``, there are other "
"related settings you may find to be beneficial::"
msgstr "就像在 `这篇文章`_ 中提到的,还可以进行一些可能有用的额外设置:"
#: ../../contribute.rst:89 c33fd6178fb044dda7073f1fc2cce979
msgid "Running the test suite"
msgstr "运行测试套件"
#: ../../contribute.rst:91 5b51e49bc1ca42c6916c4dceed476057
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:98 0e03b29d89cc408e9374cb51f7147611
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:101 70aad8c721c64d2b8d32488dd9da851e
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:106 ../../contribute.rst:200
#: b0ff008dde5e4e0b892e0fc2fa959b6a
msgid ""
"If style violations are found, many of them can be addressed "
"automatically via::"
msgstr "若存在不合规范风格的代码,大多数情况下可以通过下述命令自动纠正:"
#: ../../contribute.rst:111 ebad1e2cb63a45d999d2d3e510711972
msgid ""
"If code style violations are found in lines you changed, correct those "
"lines and re-run the ``invoke 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:115 e208ada16ab8425e9fbbcd5f135f6574
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:125 a4a3e16c3e0345c99cb2d8b674627afa
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:130 dd6db784c2534b0ea0842cb736dca7c3
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 ""
"你应该在Pelican支持的所有Python版本下运行测试套件。一般会通过为每一个Python版本创建一个虚拟环境来实现这一点。Tox_ "
"是一个用于在 ``virtualenv`` 环境中自动运行测试的工具。"
#: ../../contribute.rst:138 58fd644b4b7248ebb9c8ff899a2f90b1
msgid "Running a code coverage report"
msgstr "运行代码测试覆盖报告"
#: ../../contribute.rst:140 abe50ab68fef48dea42aa269743fc172
msgid ""
"Code is more likely to stay robust if it is tested. Coverage_ is a "
"library that measures how much of the code is tested. To run it::"
msgstr "经过测试的代码往往具有更好的健壮性。 Coverage_ 是一个用于衡量代码测试覆盖率的库执行下面的命令以调取之:"
#: ../../contribute.rst:145 9d5ba28c240f464c92db9869c01e3917
msgid ""
"This will show overall coverage, coverage per file, and even line-by-line"
" coverage. There is also an HTML report available::"
msgstr "该命令会展示总体覆盖率以及在每个文件上的覆盖率甚至还会展示每一行的覆盖情况。同样也会有一份HTML格式的报告供您查看"
#: ../../contribute.rst:153 45e095f0c0fd4a5b9f75027d12dd891f
msgid "Building the docs"
msgstr "构建文档"
#: ../../contribute.rst:155 e1e8bb56a9c8449a8da8e10fcf45da2a
msgid ""
"If you make changes to the documentation, you should build and inspect "
"your changes before committing them::"
msgstr "若你对文档进行过修改请在commit前完成构建和检查"
#: ../../contribute.rst:160 9482dc5bee484f0c9f05af197b49ed70
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:166 82343c9684bb440eb260110d98bb0e59
msgid "Plugin development"
msgstr "插件开发"
#: ../../contribute.rst:168 8697f547344e4973ad34f9c619ddf22e
msgid ""
"To create a *new* Pelican plugin, please refer to the `plugin template`_ "
"repository for detailed instructions."
msgstr "要创建一个 *新的* Pelican插件请参阅 `插件模板`_ 仓库以获得更为详细的指导。"
#: ../../contribute.rst:171 3c505e3035c143c89efd3e648fe00e8e
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:177 5523421ea2664b1ab0859216a1c8a463
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:190 e5178eb4654a44919c743d37f00ff4c3
msgid "Create a topic branch for your plugin bug fix or feature::"
msgstr "同样地为你想要进行的bug修复或特性添加创建一个分支"
#: ../../contribute.rst:194 af04dad9f528473caa4c4c0f4c33042a
msgid ""
"After writing new tests for your plugin changes, run the plugin test "
"suite and check for code style compliance via::"
msgstr "完成修改并添加测试后,运行测试套件,并检查代码风格:"
#: ../../contribute.rst:205 06d00f61d5c344d587baa85116b3c1e0
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:213 9a0831b06abd494fad469b7df71c489f
msgid "Submitting your changes"
msgstr "提交更改"
#: ../../contribute.rst:215 23b5d147059b4cea99a213f50d63097a
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:224 6794c41ebe2c4937ba4f3f8e16e7a9d9
msgid "Commit your changes and push your topic branch::"
msgstr "commit你的更改并push对应分支"
#: ../../contribute.rst:230 daa69b097fc14739be924714f8070cf6
msgid ""
"Finally, browse to your repository fork on GitHub and submit a pull "
"request."
msgstr "最后前往Github从你fork的仓库向原仓库提出PR。"
#: ../../contribute.rst:234 b71524be74c84517a12fcdecb51bc55e
msgid "Logging tips"
msgstr "日志技巧"
#: ../../contribute.rst:236 a0b70f864ce144eabe0f89d78844c395
msgid "Try to use logging with appropriate levels."
msgstr "请仔细斟酌合适的日志等级。"
#: ../../contribute.rst:238 3b44fa3ec9b3493e97c310207e5dce91
msgid "For logging messages that are not repeated, use the usual Python way::"
msgstr "对于不重复的日志消息,使用一般的方式即可:"
#: ../../contribute.rst:247 49d4e407310348838660e8c74c6e3fb6
#, 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:252 4ac501dff8bc4554998d3f03486cce0e
msgid "Limiting extraneous log messages"
msgstr "限制低关联日志消息"
#: ../../contribute.rst:254 c4dfb487945341cda6c0858954a2ed40
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:261 4090a3bc71e3441e8a7efd639d36ec1e
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:264 dd6530ceb29d4a91902046a3d4e63af6
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:269 50bdb3405a964740aeb91a7d559ba9b5
msgid ""
"For example, if you want to log missing resources, use the following "
"code::"
msgstr "例如,如果你想要用日志记录资源缺失的信息,可以使用下面的代码:"
#: ../../contribute.rst:277 0303387eccd842f9aa57eb3192252dba
msgid "The log messages will be displayed as follows::"
msgstr "最终的日志消息看起来会像这样:"
#: ../../contribute.rst:287 281637c4520d4755993e8bfa46b0326b
msgid "Outputting traceback in the logs"
msgstr "在日志中输出traceback信息"
#: ../../contribute.rst:289 8bd9319a7a6c4f77bd651057d1cc7c75
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 "latest Pelican release (or an up-to-date Git clone of Pelican master)"
#~ msgstr ""
#~ msgid ""
#~ "`Create a new branch`_ specific to "
#~ "your change (as opposed to making "
#~ "your commits in the master branch)."
#~ msgstr ""