This repository maintains the canonical, translated message catalog that is utilized across all eno implementations in different (programming-)languages. These messages are by about 90% made up of the errors that can occur during tokenization, analysis, dependency resolution and validation of an eno document. The remaining 10% are separate strings that name the elements of an eno document as well as miscellaneous labels used by the error reporters.
Prerequisites for making changes
- Install node from https://nodejs.org
npm installto install the one required package dependency (
gettext-parser, used to read in the
How to add new locales
- Add the locale code and name to the list in
npm run update(A
.pofile for your locale will be created in the
- Translate all messages in your newly created
npm run updateagain, this adds your translations to the generated catalogs in
- If you missed any translations, the update script will inform you with a warning.
How to update existing locales
[insert your locale].poin the
- Make the changes
npm run update, this adds your changes to the generated catalogs in
How to add a new catalog for a not yet supported programming language
Duplicate one of the generators in
generators/* and adapt it, also add a call to the new generator at the bottom of
update.js. Then run and re-run
How to add/update messages, e.g. introducing a new type of error
In coordination with the ecosystem! Changing or adding messages means that the various implementations of eno might need to be updated to reflect the new specification, so this is something that might affect everyone, and thus should be communicated, and if necessary also discussed, broadly.
Starting point: Document and explain your plans, open an issue on github, contact the maintainer(s), basically ... get in touch, and have something to show!
File overview for this repository
These are automatically generated message catalogs for various programming languages, created by the
update.js script, based on the catalog specification in
specification.eno and the actual translations in the
These generator scripts are called by the
update.js script to generate the catalog code for all supported programming languages.
translations/ directory you can find the actual translations for each locale in gettext
.po format. These files are both automatically generated/updated by the
update.js script, as well as manually filled by the translators.
On the one hand this contains the list of all locales currently available to eno implementations. On the other hand and more importantly, this is the central specification of messages for eno implementations, alongside their english reference translation. This part is (rarely) manually edited to add, update or remove messages, after which the changes to the specification should be subsequentially picked up by the various implementations.
This script reads all specified locales and messages from
.po files for all locales that are not yet present in the
translations/ directory, adds missing
msgid entries to already existing
.po files and removes those translations from
.po files that are no longer present in the specification. It also generates the final catalog code in
node update.js or
npm run update inside this directory to run the script.