microsoft/vscode-loc

Public

mirrored fromhttps://github.com/microsoft/vscode-locAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
39cc7566481f2cd4aa4966e4d625a462b9cf683c

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

README.md

93lines · modecode

1# Visual Studio Code Language Packs
2
3This repository contains all of the localized Language Pack extensions for Visual Studio Code. A Language Pack contains the localized string resources for a particular language.
4
5Localized resource files are managed in [Transifex](https://www.transifex.com/microsoft-oss/).
6
7There are 9 "core" languages for Visual Studio Code and, currently, 4 addtional, community driven languages:
8
9|Language|VS Code LanguageID|Transifex LanguageCode|Type|
10|--------|--------|--------|--------|
11|**French**|fr|French (fr)|Core
12|**Italian**|it|Italian (it)|Core
13|**German**|de|German (de)|Core
14|**Spanish**|es|Spanish (es)|Core
15|**Russian**|ru|Russian (ru)|Core
16|**Chinese (Simplified)**|zh-CN|Chinese Simplified (zh-Hans) |Core
17|**Chinese (Traditional)**|zh-TW|Chinese Traditional (zh-Hant) |Core
18|**Japanese**|ja|Japanese (ja)|Core
19|**Korean**|ko|Korean (ko)|Core
20|**Bulgarian**|bg|Bulgarian (bg)|Community
21|**Hungarian**|hu|Hungarian (hu)|Community
22|**Portugese (Brazil)**|pt-br|Portugese (Brazil) (pt_BR)) |Community
23|**Turkish**|tr|Turkish (tr)|Community
24
25Language pack extensions are published to the [VS Code Marketplace](https://marketplace.visualstudio.com/VSCode)
26
27## Creating a Language Pack
28
29* Install the next version of the VS Code yeoman generator
30
31``` bash
32npm install -g generator-code@next
33```
34
35Create a new Language Pack by running `yo code` and choosing `New Language Pack (Localization)`:
36
37``` bash
38yo code
39```
40
41![yeoman generator for VS Code](media/yocode.png)
42
43After answering the prompts, you will have a new folder called `vscode-language-pack-[language code]` containing all the files you need to get started with the extension.
44
45You will use a script from the VS Code repostiory to generate the translations, so we need to clone that repository (see [Contributing to Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source) for more information).
46
47``` bash
48git clone https://github.com/microsoft/vscode
49cd vscode
50yarn
51```
52
53Now, download the language files from Transifex and generate the translations:
54
55* Get a Transifex API token from [https://www.transifex.com/user/settings/api](https://www.transifex.com/user/settings/api) that has access to projects `vscode-editor`, `vscode-workbench` and `vscode-extensions`.
56* Set the API token to the environment variable `TRANSIFEX_API_TOKEN`.
57* run the `update-localization-extension` script from VS Code:
58
59``` bash
60export TRANSIFEX_API_TOKEN=<<< Transifex Token >>>
61npm run update-localization-extension {path_to_lang_pack_ext}
62```
63
64This will add new files to `path_to_lang_pack_ext/translations` and will add a list of paths to the translations to `package.json`. You can now build and test your extension.
65
66You can now build and test your extension.
67
68``` bash
69cd [path to your extension]
70vsce package
71code --install-extension [name of your extension.vsix]
72code --locale [the new locale id, e.g. tr]
73```
74
75## Contributing Translations
76
77VS Code translations are done in the [VS Code Project in Transifex](https://aka.ms/vscodeloc). Transifex is the single source of "truth", therefore any changes need to be made there. This repository is for building the language pack extensions.
78
79## Issue Reporting
80
81If you want to give feedback or report issue, please create a [new GitHub issue](https://github.com/Microsoft/vscode-loc/issuesnew). Please check if a topic about your issue already exists!).
82
83## Legal
84Before we can accept your pull request you will need to sign a **Contribution License Agreement**. All you need to do is to submit a pull request, then the PR will get appropriately labelled (e.g. `cla-required`, `cla-norequired`, `cla-signed`, `cla-already-signed`). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as `cla-signed`.
85
86# Microsoft Open Source Code of Conduct
87
88This project has adopted the [**Microsoft Open Source Code of Conduct**](https://opensource.microsoft.com/codeofconduct/).
89For more information see the [**Code of Conduct FAQ**](https://opensource.microsoft.com/codeofconduct/faq/) or
90contact [**opencode@microsoft.com**](mailto:opencode@microsoft.com) with any additional questions or comments.
91
92## License
93[MIT](LICENSE.md)
94