Describe generation of i18n properties using tool (#1833)
* Describe generation of i18n properties using tool Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Bumped heading up one level Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Comply with rule: Fenced code blocks should be surrounded by blank lines Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove plugin version from command Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>pull/1969/head
parent
b7ff3129af
commit
cef98dd9c4
|
@ -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 org.openhab.core.tools:i18n-maven-plugin: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`.
|
||||
|
@ -478,7 +489,7 @@ For Binding Info and ConfigDescription, the localized objects can be retrieved v
|
|||
|
||||
## Managing translations
|
||||
|
||||
Localization is managed with the cloud service [Crowdin](https://crowdin.com/) where translators can contribute translations.
|
||||
Localization is managed with the cloud service [Crowdin](https://crowdin.com/) where translators can contribute translations in different languages.
|
||||
|
||||
This is the process:
|
||||
|
||||
|
|
Loading…
Reference in New Issue