With these changes the proper translations file will be created.
The updated comments should prevent review comments and rework.
Signed-off-by: Wouter Born <github@maindrain.net>
Needed for Java 17 source level. This also removes build errors with wrong scope and an unused dependency.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Also escape special characters in state option values
And escaped space, = and : symbols (all legal according to properties documentation).
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
* Properly escape : and \ in option
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
This fixes the build being broken when building on Windows.
It also contains many fixes for timing issues which seem to impact macOS and Windows more than Linux.
* Fix .gitattributes and add *.xml_gen to fix line ending issues on Windows
* Derive fork count from CPU details in org.openhab.core tests for more stable tests on machines with fewer cores
* Adjust SafeCallerImplTest timings
* Increase ExecUtilTest timeout
* Increase SchedulerImplTest timeouts
* Increase AudioConsoleTest serveStream timeout
* Increase AudioServletTest serveStream timeout
* Increase SchedulerImplTest test timeouts
* Increase ExpireManagerTest timeout used for checking published events
* Increase PeriodicSchedulerImplTest max allowed delta
* Increase SchedulerImplTest timeouts
* Fix BundleInfoReader file stream not closed causing temp dir deletion issues on Windows
* Fix GenerateDefaultTranslationsMojoTest Windows line endings issues
* Fix GenerateDefaultTranslationsMojoTest Windows temp dir deletion problem
* Fix GenericItemProviderTest tearDown sometimes fails because of queued events
* Fix ChannelLinkNotifierOSGiTest wait for channel link events
* Fix ChannelCommandDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix ChannelStateDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix GenericItemChannelLinkProviderTest not waiting for async updated state to become true
* Fix GenericThingProviderTest failing due to events of previous test
* Fix InboxOSGiTest sometimes fails because of queued events
* Fix ScriptEngineOSGiTest failing because items are not yet added to registry
* Fix ThingManagerOSGiTest failing due to async handleRemoval call
Signed-off-by: Wouter Born <github@maindrain.net>
* Support multi bundle bindings in i18n-maven-plugin
The plugin did not generate translations for bundles of bindings that do not have a binding.xml file.
With this change it should also be possible to generate the default translations of the modbus and mqtt bindings.
Related to openhab/openhab-addons#12220
Signed-off-by: Wouter Born <github@maindrain.net>
* [skeleton] Add Thing config table to readme; minor improvements
- put each sentence in a seperate line
- add note that only PNG images are supported. See https://github.com/openhab/openhab-addons/pull/11116#discussion_r775838188
- add examples to "Supported Things"
- add RW column to example Channel table
- add advanced and default config value
- add note that textual config examples are mandatory
- make .sitemap example optional (see small internal discussion)
- put emphasis on initialize() shall return quickly
- add note about logging to INFO
- fix compiler warning
- Add default config value for initialization
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Update groovy license headers to 2022
* Reuse existing header file and use Groovy 3.0.9
Updates the year in a few groovy file headers that were missed in #2671.
Signed-off-by: Wouter Born <github@maindrain.net>
* Add i18n-maven-plugin to make internationalization easier
This plugin simplifies generating the default translation .properties files from the add-on XML information files.
It reuses the same XStream parsing classes that are used by openhab-core for parsing the binding/config/thing XML files.
It will also keep any existing default translations already present in property files for translations using `@text/`.
Furthermore it will nicely group and sort the translations.
After building this Maven plugin you can use it on add-ons using:
`mvn org.openhab.core.tools:i18n-maven-plugin:3.2.0-SNAPSHOT:generate-default-translations`
Signed-off-by: Wouter Born <github@maindrain.net>
* Exclude JUnit 4 from Whiteboard and update imports to JUnit 5
Excludes the transitive JUnit 4 dependency from the Aries JAX-RS Whiteboard.
The Whiteboard should not have a compile scope dependency on JUnit so I've created https://github.com/apache/aries-jax-rs-whiteboard/pull/135 to fix this.
The wrong scope has resulted in some tests using JUnit 4 imports which is also fixed in this PR.
Signed-off-by: Wouter Born <github@maindrain.net>
* Add commonly used JUnit 4 classes to forbidden packages
Signed-off-by: Wouter Born <github@maindrain.net>
* [skeleton] Use real world examples in thing-types.xml
* Added some examples as many new bindings don't make use of context tags or supported bridges.
* Adapt config DTO, i18n. Add refresh param. Cleanup imports.
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
When generating a new binding with the maven archetype it should refer to openhab core via the variable `ohc.version` In the feature.xml.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Suppresses the SystemPrintln SAT findings because this class is a Karaf shell command which prints to the console.
Signed-off-by: Wouter Born <github@maindrain.net>