A crowdsourced journey to translate ProtonDB (News post)
ProtonDB loads its text using react-i18next (version 10) resource bundles in JSON.
Each language, as represented by their 'xx-XX' BCP-47 language tag, lives within locales
. Within each locale's directory are two files:
contribute.json
(translations for the reporting flow)translation.json
(everything else)
None! You can browse this repository and edit the files manually. But editing language files can be fiddly and typos are common. It's preferable to grab some tools:
- Node.js
- yarn (if you want to skip this,
npm
is included with node and will probably work fine as a substitute). - A text editor, ideally one with colored formatting for JSON.
All native speakers are welcome to contribute! Please do not make pull requests with automated translations.
- Fork this repo
- Download your fork
- In your downloaded directory, run
yarn install
- If starting a new locale, create the directory named after your language tag within
locales
and copy over files from thelocales/en-US
directory - Make your changes/additions
- Review them visually (see Verify Your Changes below)
- Run
yarn lint:json
to validate everything is alphabetized and formatted properly - Commit, push, and open a pull request!
Any questions? Ask us on Discord
Keep an eye out for page rendering issues if your text is smaller or larger than the English equivalent, and open an issue with a screenshot if you cannot fit readable words for your language.
- Learn how to modify your browser's local storage (here are instructions for Chrome and Firefox)
- Visit ProtonDB
- If you're not already, switch to English
- Copy the contents of your
contribute.json
file into a local storage entry asi18next:en-US-contribute
- Copy the contents of your
translation.json
file into a local storage entry asi18next:en-US-translation
- Reload and review
Maybe you?
- German (de-DE): @NoXPhasma
- An expanded ProtonDB help section will need translations too!