-
Notifications
You must be signed in to change notification settings - Fork 52
How to add a language
Interested in adding a new language to the WCAG-EM Report Tool? These are the steps to follow.
- Indicate you'd like to translate, by opening an issue for translation.
- Fork this repository (See Fork a repo) and download the files to your file system
- Create a new branch for your translations
Add a language code (lang
) and name (title
) in src/locales/index.json
.
Example:
{
"lang": "de",
"title": "Deutsch"
}
This tells the application this translation exists.
If some terms are left untranslated (for example, if the WCAG 2.2 success criteria are not translated yet), add "status": "draft"
Copy the en
folder in src/locales
and rename it to the language code you've just added, for instance de
.
If you want to see the translations in action, you can start a local server. This is how: in a console, run npm install
to install dependencies (this requires NodeJS) to be installed). Then, run npm run dev
to start a server that serves your local version of the WCAG-EM Report Tool.
These files have keys and values. Only the values should be translated. The keys are in capitals.
Example:
"ASSERTION_RESULT_DESCRIPTION_LABEL": "Observations"
In the above example, you would translate “Observations”, not “ASSERTION_RESULT_DESCRIPTION_LABEL”.
You will need to add translations for WCAG 2.0, WCAG 2.1 and WCAG 2.2.
If an Authorized WCAG Translation already exists for the new langage, please match the translation of any words and phrases that are in that WCAG translation.
If you have done all the changes, add the files to git (see git add), then commit them (see git commit) and push them (see git push). Make sure to push to your fork.
Then, open a pull request from your fork to this repository.