Merge pull request #87 from Plume-org/new-langs

Explain how to add new languages to the app
stable
Mina Galić 4 years ago committed by GitHub
commit 8de3225a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -156,6 +156,24 @@ There is no need to provide individual translations of `i18n!`-wrapped strings
The strings will be uploaded to a third-party web service and translated automatically as
a separate step.
### Adding a language
Managers of the Crowdin project may add new languages to the list of target languages.
But for these new languages to be visible in the interface as well, some changes need to be made to the code.
First of all, make sure that the corresponding `.po` file is present in `po/plume`, and in `po/plume-front`.
If it is not, ask someone who has access to the Crowdin API key (like a Crowdin manager or owner) to pull it with the Crowdin CLI tool.
To find a manager, look at the list [in the sidebar of this page](https://crowdin.com/project/plume).
These people are managers because they were involved enough in the project, and especially in the translation process.
If you want to become a manager on Crowdin too, ask us [on Matrix](https://matrix.to/#/#plume:disroot.org).
Then, in `src/main.rs` and `plume-front/src/main.rs`, add the code corresponding to the language in the `init_i18n!` macro.
If you don't know the code for the language: it is the name of the `.po` file, without the extension.
Here is an exemple of [a Pull Request adding Persian](https://github.com/Plume-org/Plume/pull/782).
`cargo check` to make sure everything compiles, and you are good to go!
## Working with the front-end
When working with the front-end, we try limit our use of JavaScript as much as possible.

Loading…
Cancel
Save