Thank you for considering contributing to Witsy! Here are some guidelines to help you get started.
For contributions to be accepted into Witsy, you first need sign the Contributor License Agreement.
- Node.js version:
22.20.0 - npm version:
11.6.0
Use nvm to switch between Node.js versions.
- Keep
package-lock.json:electronandelectron-forgeare picky things and the versions of the packages used are important. - Installing dependencies: Run
npm cito ensure you install the exact versions listed inpackage-lock.json - Linting: Run
npm run lintto check for and fix any linting issues. - Testing: Add/Update required tests. Coverage varies betwen 80% and 82% and I would like to keep it that way (or more!). Run
npm run testto ensure all tests pass before submitting your changes.
Beware that when API Keys Safe Storage is activated, your DEBUG build and RELEASE build will store API keys in distinct locations as one variant cannot read API keys written by the other variant. To handle that you have two options:
- Accept to enter your API keys twice (for each variant)
- Disable API keys Safe Storage in Settings | Advanced
- Generate Translation File: Use the script
./tools/i18n_auto.tswith the two-letter language code (e.g., "es") and the name of the language in English (e.g., "Spanish"). - Review Translation: Copy the generated file to a
localessubfolder of the data folder. You need to create this folder in:
- Windows:
%APPDATA%/Witsy - macOS:
~/Library/Application\ Support/Witsy - Linux:
~/.config/Witsy
- Reload the App: Reload the application to review the translation.
- Select your language: You should see your language in Settings | General. If you do not see the proper flag and name for your language you can add it to
src/components/LangSelect.vue - Final Review: Before committing you can run
./tools/i18n_check.tswhcih should return no errors and finally./tools/i18n_sort.tsto clean your file! - Create a Pull Request: Once you are satisfied with the translation, create a pull request for review.
Thank you for your contributions!