Simplify syntax of running translation generation tool (#1867) (#1868)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
pull/1869/head
github-actions[bot] 2022-07-27 22:41:39 +02:00 committed by GitHub
parent 72abd5260e
commit 631c995538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -444,6 +444,17 @@ The custom keys are a very good practice to translate bundle dependent error mes
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, "@text/offline.communication-error");
```
## Generating I18N properties file
To automatically generate an I18N properties file from XML files, the following command can be run:
```shell
mvn i18n:generate-default-translations
```
This tool can also be used to update an existing file.
Custom texts will be preserved when doing this.
## I18n Text Provider API
To programmatically resolve texts for certain languages openHAB provides the OSGi service `TranslationProvider`.