-
Notifications
You must be signed in to change notification settings - Fork 306
How to create language pack extension
Daniel Ye edited this page Oct 5, 2021
·
5 revisions
1. Clone vscode repository
2. Follow VS Code how to contribute instruction to prepare machine.
Please complete all steps in Prerequisites section. Actions include but not limited to below.
- Clone vscode repository.
- Install Git.
- Install Node.JS.
- Install Yarn.
- Install Python.
- Install C/C++ compiler tool chain.
3. Clone vscode-loc repository
1. If your language is not available, make a copy of one existing language, for example vscode-language-pack-de in local clone.
- Name the folder as vscode-language-pack-[languageID]. See existing languages for reference.
- Reference existing languages for example.
- Use VS Code to edit package.json in your language pack folder.
- run 'gulp vscode-translations-export' to export strings from VSCode source code to .xlf.
- Source .xlf can be found under 'vscode-translations-export' in same level with your vscode local clone.
- Get .xlf localized in the process and tool you choose.
- After loc complete, organize files under 'vscode-translations-import/[languageID]'
1. Update local language pack folder (in vscode-loc) with latest translation (from vscode-translations-import)
- Change directory to local vscode repository
git checkout master
git pull
npm run update-localization-extension {path_to_lang_pack_ext}
- For example:
npm run update-localization-extension -- --location ../vscodeloc/localization de
- Change directory to local vscode-loc repository
npm install -g vsce
- Change directory to vscode-language-pack[languageID]
-
vsce package
this will produce vsix package in vscode-language-pack[languageID] folder
- Install VS Code Insiders
- Load vsix to test
code --install-extension [name of your extension.vsix]
code --locale [the new locale id, e.g. tr]
git add i18/vscode-language-pack[languageID]/*
git commit -m "message/description"
git push -u origin yourbranchname -vv
- Visit vscode-loc and create pull request against master branch.
- Please create a new GitHub issue