electronjs.org-new/i18n
Erick Zhao 785b14ef54 feat: link to external Releases homepage in navbar 2021-09-15 13:41:51 -07:00
..
en-US feat: link to external Releases homepage in navbar 2021-09-15 13:41:51 -07:00
readme.md feat: add pre-commit hook to keep l10n in sync 2021-07-14 09:26:35 -07:00

readme.md

About en-US

TL;DR; Do not manually modify the contents of i18n/en-US.

Docusaurus translations for anything that is not markdown are stored in several JSON files. These files are generated for each locale from the contents of docusaurus.config.js, sidebars.js, and installed plugins using the yarn write-translations --locale [locale] script. Some of the files that are generated are code.json, navbar.json, footer.json, etc.

For the website's source language (en-US), these JSON files are not used by Docusaurus. Rather, they serve as source files for our Crowdin internationalization (i18n) workflow. The electron/i18n repository periodically updates these source strings on Crowdin via GitHub Actions.

To keep everything in sync, there is a pre-commit hook that automatically deletes and creates again the en-US folder and its contents when docusaurus.config.js or sidebars.js are modified. The script the hook invokes is in /scripts/update-l10n-sources.js.