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

microsoft/TypeScript-Website-Localizations: A repo for the TypeScript Website lo ...

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

开源软件名称(OpenSource Name):

microsoft/TypeScript-Website-Localizations

开源软件地址(OpenSource Url):

https://github.com/microsoft/TypeScript-Website-Localizations

开源编程语言(OpenSource Language):

JavaScript 92.7%

开源软件介绍(OpenSource Introduction):

TypeScript Website Localizations

A repo for handling localized versions of the TypeScript website content

Setting up

git clone https://github.com/microsoft/TypeScript-Website-Localizations
cd TypeScript-Website-Localizations

# Setup
yarn

# Optional: Grab the English files to make translation easier
yarn pull-en

# Optional: Verify your changes will correctly replace the english files
yarn lint
# Alternative: Run the lint watcher
yarn lint --watch

That's it, you've got a copy of all the documentation and now can write documentation which follows the existing patterns. There's a longer intro in welcome.md.

How translations work

The TypeScript website handles translations by having language specific files with matching filepaths:

E.g: /packages/documentation/copy/en/reference/JSX.md

Has existing translations in different languages:

/packages/documentation/copy/id/reference/JSX.md
/packages/documentation/copy/ja/reference/JSX.md
/packages/documentation/copy/pt/reference/JSX.md

Same path, just switched en for id, ja & pt.

This repo

This repo contains all of the non-English locale files. It means you can clone and translate without all the infrastructure overhead of the pretty complex TypeScript-Website.

For example if you wanted to translate a new handbook page you would:

  • Clone this repo (see above)
  • Pull in the English files yarn pull-en (these will be gitignored)
  • Find your english file: docs/documentation/en/handbook-v2/Basics.md
  • Recreate the same folder path in your language: docs/documentation/it/handbook-v2/Basics.md
  • Translate the file!
  • Validate your changes: yarn lint (or yarn lint docs/documentation/it/handbook-v2/Basics.md)
  • Create a pull request to this repo
  • Once merged, the translation will appear on the next website deploy

Language owners

When a new language is created, we ask for a few people to become language owners. These owners are able to merge pull requests to files in their language via code-owner-self-merge in a pull request. They will be pinged on PRs which affect them, you can see the flow in PRs like this or this.

The TypeScript team generally only know English, and can answer clarifying questions if needed! For quick questions, you can use the ts-website-translation channel in the TypeScript Discord.

Secure

This repo has extensive CI to ensure that you can't accidentally break the TypeScript website.

There are local, fast checks that it won't break via yarn test and then the full TypeScript website test suite runs with the changes, and a website build is generated to ensure that nothing breaks.

The checks may not seem obvious to an outsider, because the website is complex, so there is a watch mode which you can run via yarn link --watch to get instant feedback.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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