Adding Translations
This document gives you a step by step guide for how to add your own translations to Tabliss!
- Fork and checkout the repository
- Run
npm installto download the dependencies - Add your language code to the languages array in
scripts/translations.js - Run
npm run translationsto generate your language files insrc/locales/lang - With the help of the default messages and descriptions, edit the JSON file with your translated messages
- Import your new translations into the
src/locales/locales.tsfile - Finally, add your language to the select dropdown in
src/views/settings/System.tsx - Commit your updated files
- Submit a Pull Request back to the Tabliss repository!
You can test your changes at anytime by running a local development build of Tabliss with npm run dev.
About Whitelist Files
In the src/locales/lang directory, you'll find files named like whitelist_fr.json, whitelist_en-CA.json, etc. These whitelist files tell the translation system which strings should be kept in English and don't need translation for each language.
For example, if widgets appears in whitelist_fr.json, the system won't prompt you to translate "widgets" into French - it will keep the English word. This is useful if the work does not change in your language or its a word that should remain in English across all languages.