1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-21 13:38:56 +02:00

Enhance Readme To Explain How To Contribute Translations (#4918)

* feature/translations-contribution adding steps on how to contribute a translation

* feature/translations-contribution added fruther detail of location of json file

* feature/translations-contribution updating snapshots

* feature/translations-contribution adding step to run updating snapshot command

* feature/translations-contribution reverting snapshot changes

* feature/translations-contribution reverting snapshot changes
This commit is contained in:
Tomer Ben-Rachel 2023-10-31 15:53:44 +02:00 committed by GitHub
parent 134422df4d
commit 28ec2b361a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,19 @@ Before checking in commits, run `make ci`, which is similar to the `.gitlab-ci.y
### Translating
Help translate Focalboard! The plugin is already translated into several languages. We welcome corrections and new language translations submitted against the [appropriate language JSON file](https://github.com/mattermost/focalboard/tree/main/webapp/i18n) in this repository.
Help translate Focalboard! The plugin is already translated into several languages. We welcome corrections and new language translations submitted against the [appropriate language JSON file](https://github.com/mattermost/focalboard/tree/main/webapp/i18n) in this repository. To add a new language, follow the steps below:
- Create a new file with the language code (I.E. `en.json`) inside `webapp/i18n` directory
- Copy the contents of the en.json file into your newly created file
- Leave the keys in this file as they are and replace all the values with the translated strings
- Go to `webapp/src/constants.ts` and add an entry for the language you are translating into under the **languages** array
- This array needs to consist of three keys: the language code, the name of the language and the display name of the language
- Go to `webapp/src/i18n.tsx`:
- import the json of the language translation you have just added
- Add the language code to the `supportedLanguages` array
- Add another case to the switch case matching the language you added inside `getMessages`
- Once you are done, you need to update the snapshot by using this command `npm run updatesnapshot`
### Staying informed