Add note on how to add a new translation key (#2536)
* Add note on how to add a new translation key * Lint * Nit
This commit is contained in:
22
README.md
22
README.md
@@ -141,6 +141,28 @@ Run backend components:
|
||||
yarn backend
|
||||
```
|
||||
|
||||
### Add a new translation key
|
||||
|
||||
To add a new translation key you can do these steps:
|
||||
|
||||
1. Add the new key entry to the code where the new key is used: `t("some_new_key")`
|
||||
1. Run `yarn i18n` to extract the new key and update the translation files. This will add a skeleton entry to the `public/locales/en-GB/app.json` file:
|
||||
```jsonc
|
||||
{
|
||||
...
|
||||
"some_new_key": "",
|
||||
...
|
||||
}
|
||||
```
|
||||
1. Update the skeleton entry in the `public/locales/en-GB/app.json` file with the English translation:
|
||||
```jsonc
|
||||
{
|
||||
...
|
||||
"some_new_key": "Some new key",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Usage and other technical details about the project can be found here:
|
||||
|
||||
Reference in New Issue
Block a user