• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

netdata/localization: Translation files

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

netdata/localization

开源软件地址(OpenSource Url):

https://github.com/netdata/localization

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

Localization

This project contains translation files for the Netdata HTML documentation. All contributions will be made via GitHub Pull Requests.

Add translations for a new language

Under the root directory, you will need to add a subdirectory with the language abbreviation as shown at https://squidfunk.github.io/mkdocs-material/getting-started/#localization. If your language does not appear in the mkdocs-material translations table, you will see a link that lets you provide a new translation in 5 minutes. Once your language is included in a release of mkdocs-material, let us know, so we can ensure our build mechanism uses the version that contains your language.

Underneath your directory you will add markdown files, using the precise structure of the netdata/netdataproject directory tree. You can translate as many files as you like. The files you provide will be is used to override the existing English markdown file in the localized version. Of course the names of the files need to match precisely.

For example, to provide a Chinese translation on how to update Netdata, the file should be zh/packaging/installer/UPDATE.md.

When you do a pull request with your PR, you will see that a Netlify check is automatically executed for your language as well. If you click on deploy preview, the HTML documentation at https://docs.netdata.cloud will also be available under https://docs.netdata.cloud/[abbreviation], with only the files you provided translated. For the previous example, the translated page would be available at https://docs.netdata.cloud/zh/packaging/installer/UPDATE.md.

The generated documentation has a language switcher tool, which we will extend with your language, once your PR is successfully merged. You may submit a PR yourself, by adding an option for your language.
You can see an example in PR 7004 of project netdata/netdata.

Translate more documents

If you already see your language in https://docs.netdata.cloud, you will notice that many files are still shown in English. Pressing the 'edit' file will lead you to an invalid location, because no one had added a translation for that file. To provide one yourself:

  • Find the relevant .md document in the netdata/netdata repo.
  • Copy it to the exact same location under netdata/localization/[abbreviation].
  • Translate it and create a PR.

Caution regarding header translations

Headers in markdown documents have a dual use as a section description and a link to a specific part of the document. When you translate a header, you will need to find where else in the documentation that header is referenced and change that reference as well. An alternative workaround to modifying all links to a section is to keep the original, English headers as well. This will result in duplicate headings, one in English and one in your language, so it's not a proper solution.

As soon as the issue with the build process is resolved, the check for broken links will be done for you by the build process (checklinks.sh). So you'll be able to easily find the additional files that need to be modified, in order to get a successful build.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap