翻译¶
¥Translations¶
令人难以置信的是——在国际社区的贡献下,Material for MkDocs 已被翻译成 60 多种语言。可以想象,我们维护人员不可能确保所有语言都保持最新,而新功能有时也需要新的翻译。
¥It's unbelievable – with the help of international community contributions, Material for MkDocs has been translated into 60+ languages. As you can imagine, it's impossible for us maintainers to keep all languages up-to-date, and new features sometimes require new translations.
如果您想帮助我们使 Material for MkDocs 在全球范围内更加易于访问,并且注意到您的语言缺少翻译,或者想要添加新语言,您可以按照以下指南的步骤来帮助我们。
¥If you would like to help us to make Material for MkDocs even more globally accessible and have noticed a missing translation in your language, or would like to add a new language, you can help us by following the steps of the guide below.
在创建问题之前¶
¥Before creating an issue¶
翻译版本经常更改,因此我们希望确保您不会浪费时间进行重复工作。添加翻译版本之前,请检查以下事项:
¥Translations change frequently, which is why we want to make sure that you don't invest your time in duplicating work. Before adding translations, please check the following things:
检查语言可用性¶
¥Check language availability¶
Material for MkDocs 支持超过 60 种语言,您的语言很可能已经受支持。您可以通过检查支持的语言列表来检查您的语言是否可用,或者是否需要改进或添加其他翻译:
¥With more than 60 languages, the chances are good that your language is already supported by Material for MkDocs. You can check if your language is available, or needs improvements or additional translations by inspecting the list of supported languages:
您的语言已受支持- 在这种情况下,您可以检查是否缺少翻译,然后单击您的语言下方的链接添加它们,这需要 5 分钟。
您的语言缺失——在这种情况下,您可以帮助我们在 Material for MkDocs 中添加对您的语言的支持!继续阅读,了解如何操作。
搜索我们的问题追踪器¶
¥Search our issue tracker¶
其他用户可能已经创建了问题,补充了您所用语言缺少的翻译,但仍需我们维护人员进行集成。为了避免重复劳动,请事先搜索问题跟踪器。
¥Your language is already supported – in this case, you can check if there are translations missing, and click the link underneath your language to add them, which takes 5 minutes.
此时,当您确定 Material for MkDocs 尚不支持您的语言时,您可以按照问题模板为其添加新的翻译。
¥Your language is missing – in that case, you can help us add support for your language to Material for MkDocs! Read on, to learn how to do this.
问题模板¶
¥Issue template¶
我们创建了一个问题模板,使贡献翻译变得尽可能简单。它是我们过去几年 60 多种语言贡献和更新经验的总结,包含以下部分:
¥Another user might have already created an issue supplying the missing translations for your language that still needs to be integrated by us maintainers. To avoid investing your time in duplicated work, please search the issue tracker beforehand.
标题¶
¥Title¶
更新现有语言时,标题可以保留原样。要添加新语言支持,请将预填充标题中的“ ...替换为你的语言名称。
¥At this point, when you have made sure that Material for MkDocs doesn't already support your language, you can add new translations for it by following the issue template.
例子 ¥Example | |
|---|---|
清除 ¥ Clear | 添加德语翻译 ¥Add translations for German |
不清楚 ¥ Unclear | 添加翻译... ¥Add translations ... |
无用 ¥ Useless | 帮助 ¥Help |
翻译¶
¥Translations¶
如果翻译右侧有图标,则表示该行缺失。您可以翻译此行并移除图标。如果您不知道如何翻译某些行,请将其留给其他贡献者完成。为了确保翻译的准确性,请参考我们的英文翻译,仔细检查上下文。
¥We have created an issue template that makes contributing translations as simple as possible. It is the result of our experience with 60+ language contributions and updates over the last couple of years, and consists of the following parts:
国旗可选¶
¥Country flag optional¶
为了更好地概览,我们支持的语言列表在语言名称旁边添加了国旗。您可以在此字段中添加国旗的短代码,以帮助我们为您的语言选择国旗。前往我们的表情符号搜索,输入flag即可查找所有可用的短代码。
¥When you update an already existing language, you can just leave the title as it is. Adding support for a new language, replace the ... in the pre-filled title with the name of your language.
如果我的旗帜不可用怎么办?
¥If a translation contains an icon on the right side, it is missing. You can translate this line and remove the
icon. If you don't know how to translate specific lines, simply leave them for other contributors to complete. To ensure the accuracy of your translation, consider double-checking the context of the words by looking at our English translations.
Twemoji提供 260 个国家/地区的国旗表情符号,但不支持国家/地区的细分区域,例如州、省或地区。如果您要为细分区域添加翻译,请选择最合适的可用国旗。
¥For a better overview, our list of supported languages includes country flags next to the language names. You can help us select a flag for your language by adding the shortcode for the country flag to this field. Go to our emoji search and enter flag to find all available shortcodes.
这可能有帮助:在国家名称旁边添加国旗,可以帮助您和其他人更快、更轻松地在支持语言列表中找到该语言。如果您的国家国旗不支持Twemoji ,您可以帮助我们选择替代方案。
¥
Why this might be helpful: adding a country flag next to the country name can be helpful for you and for others to find the language in the list of supported languages faster and easier. If your country's flag is not supported by Twemoji, you can help us choose an alternative.
清单¶
¥Checklist¶
感谢您遵循本指南并帮助我们为 Material for MkDocs 添加新的翻译——您即将完成。这份清单确保您已阅读本指南,并已尽最大努力向我们提供整合您贡献所需的一切。
¥What if my flag is not available?
我们就从这里开始。
¥Twemoji provides flag emojis for 260 countries – subdivisions of countries, such as states, provinces, or regions, are not supported. If you're adding translations for a subdivision, please choose the most appropriate available flag.
归因¶
¥Attribution¶
如果您使用上述模板提交翻译,您将在提交中被记为共同作者,因此您无需创建拉取请求。您为项目做出了重大贡献,让 Material for MkDocs 能够被全球更多人使用。谢谢!
¥Why this might be helpful: adding a country flag next to the country name can be helpful for you and for others to find the language in the list of supported languages faster and easier. If your country's flag is not supported by Twemoji, you can help us choose an alternative.