Contributions are very welcome.
Same steps works on Windows (powershell) and Linux. Just needs Node.js installed.
Please fork this repository to add new dictionaries.
In the vscode-cspell-dict-extensions
repository root directory
npm run create:extension
OR
yo cspell-dict-extensions <language>
Yeoman will ask you a series of questions most of which default suggestion is ok (to select default suggestion press enter without typing):
Field | Description |
---|---|
name | this is the dictionary. i.e. swedish , ruby , or rust |
friendly name | this is the friendly name, like Swedish |
display name | this is the name shown on the VS Code Extensions page. |
description | short description of the extension. |
Source Dictionary | This is the NPM install name of the source eg. dictionary @cspell/dict-sv (@ is needed). Available dictionaries could be found here https://github.com/streetsidesoftware/cspell-dicts#all-dictionaries |
Add Enable / Disable Commands | This is used for adding helper commands for human language locals like fr for French or fr,fr_CA for Canadian French. This option is not necessary for word lists like companies or programming languages. |
Base Name For Commands | This is added as a suffix onto the command names. |
Language Locale | This is the two letter language code supported by the dictionary included in the Source Dictionary step. |
Target Directory | Where to create the extension |
NPM Package Name | name added to the package.json |
After all the information is entered, the extension should be generated.
Please fix any errors and make sure the following two commands run:
cd extensions/<language>
npm install
npm run build
Please update files:
-
README.md
-
Add yourself as contributor under
## Contributors
header_Language_ - [Username](https://github.com/Username)
-
-
extensions/<language>/samples/seattle.md
- Go to Seattle wikipedia page translated to your language and copy some content to
seattle.md
. It's later used to test if plugin recognizes words
- Go to Seattle wikipedia page translated to your language and copy some content to
Please update files if necessary (leave it as unless you know why you're changing it):
extensions/<language>/README.md
extensions/<language>/package.json
extensions/<language>/LICENSE
There are other .json
and README
files where new extension is referenced but those are automatically generated after pull request so don't edit any other files.
Note: the preferred licenses are either MIT or GPL3.
The safest to use is GPL3, but it is the most sticky.
Since these extensions bundle the dictionary as part of the extension (falls under static linking clauses), the license must match the bundled dictionary / dictionaries. If the bundled dictionary is GPL3, then the extension must be GPL3 or later.
cd extensions/<language> # Might be already done in in previous step
code . # Opens vscode in current directory
Within VS Code Debug -> Start Debugging
with the Launch Extension
configuration.
This will open new VSCode window. Inside it open previously edited seattle.md
. If most words of your language are now recognized (no blue squiggly line) you can open pull request to main
branch. Build files are already in .gitignore so you can commit all changes.
Shortly after pull request is merged extension will appear in vscode extensions marketplace.
This extension is based on cspell-dicts. Many languages have a file dictionaries/*/src/*additional-words.txt
(example: en_shared
) in which changes can be proposed through a GitHub PR. The next release of cspell
should then contain your changes, and will be automatically bumped in the next release of this VS Code extension.