Skip to content

Commit

Permalink
README: update internationalization part
Browse files Browse the repository at this point in the history
  • Loading branch information
graue committed Aug 30, 2024
1 parent 709341e commit b32feea
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,17 @@ If you're actively making changes to [our fork of GraphHopper](https://github.co

3. Edit the relevant variable in your `.env.development.local` to point to local GraphHopper.

## Internationalization (WIP)
## Internationalization

This is not entirely working yet, but currently, when you add a new message into the code, run `npm run extract` to extract the default message and its description to the English-language file.
All user-facing strings should be wrapped in either `<FormattedMessage>`
instances or calls to `intl.formatMessage`, so that they can be translated. As
of August 2024 we translate to Spanish and most but not all of the app is
translated.

And after syncing translations from Weblate, run the script `compile-langs.sh`. The lack of symmetry is just because this command was too complex to be put into package.json.
This is not yet automated, so currently, when you add a new string into the
code, or modify one, you should run `npm run extract` to extract the default
message and its description to the English-language file.

And after syncing translations from Weblate, run the script `compile-langs.sh`.
(The lack of symmetry is because this command was too complex to be put into
package.json.)

0 comments on commit b32feea

Please sign in to comment.