-
Notifications
You must be signed in to change notification settings - Fork 91
Translations
Gaël Poupard edited this page May 17, 2019
·
4 revisions
a11y.css
currently exists in English, French, Chinese, Russian, Portuguese, Arabic and Greek: you'll find all those files in the css folder. That being said, translating a11y.css
in another language is quite easy to do.
-
Add a JSON translation file in
locales
folder named after your language (e.g.fr.json
); -
Add an entry to
locales: []
intasks/helpers/options.js
using your language's code; -
Run
npm run gulp translate
to precompile JSON file to a new SCSS file (containing translated messages as a Sass map); -
Copy
sass/a11y-en.scss
, rename ita11y-<your-language>.scss
and change the first import statement to@import 'locales/<your-language>';
; -
Repeat step 4 with:
-
a11y-<your-language>_error.scss
; -
a11y-<your-language>_warning.scss
; -
a11y-<your-language>_obsolete.scss
;
- Finally run
npm run gulp
to generate new CSS files.
Your PR diff should:
- add
/locales/<your-language>.json
; - add
/sass/locales/_<your-language>.scss
; - modify
/tasks/helpers/options.js
; - add 4 SCSS files in
/sass/
; - add 4 CSS files in
/CSS/
.
Done!