From 631c995538d3fd6dbf453d7cd9f1eeb6c188928c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 22:41:39 +0200 Subject: [PATCH] Simplify syntax of running translation generation tool (#1867) (#1868) Signed-off-by: Jacob Laursen Co-authored-by: Jacob Laursen --- developers/utils/i18n.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/developers/utils/i18n.md b/developers/utils/i18n.md index e4b5deae4..34f04f2b9 100644 --- a/developers/utils/i18n.md +++ b/developers/utils/i18n.md @@ -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`.