This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new 3d58130e4b Fix usage of deprecated locale configuration 3d58130e4b is described below commit 3d58130e4bae03aa00caef80ebb23e7a553668a4 Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Fri Jan 17 10:25:27 2025 +0000 Fix usage of deprecated locale configuration --- .../ROOT/pages/reference/extensions/bindy.adoc | 23 ++++++++++++++++------ .../modules/ROOT/pages/user-guide/native-mode.adoc | 14 ++++++++----- .../bindy/runtime/src/main/doc/limitations.adoc | 23 ++++++++++++++++------ .../src/main/resources/application.properties | 7 ++----- 4 files changed, 45 insertions(+), 22 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc index 5cc24cfa71..ddf341318b 100644 --- a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc @@ -52,13 +52,24 @@ endif::[] When using camel-quarkus-bindy in native mode, only the build machine's locale is supported. -For instance, on build machines with french locale, the code below: -``` +For instance, on build machines with French locale, the code below: + +[source,java] +---- + BindyDataFormat dataFormat = new BindyDataFormat(); dataFormat.setLocale("ar"); -``` -formats numbers the arabic way in JVM mode as expected. However, it formats numbers the french way in native mode. +---- + +formats numbers the arabic way in JVM mode as expected. However, it formats numbers the French way in native mode. -Without further tuning, the build machine's default locale would be used. Another locale could be specified with -the https://quarkus.io/guides/building-native-image#quarkus-native-pkg-native-config_quarkus.native.user-language[quarkus.native.user-language] and https://quarkus.io/guides/building-native-image#quarkus-native-pkg-native-config_quarkus.native.user-country[quarkus.native.user-country] configuration properties. +Without further tuning, the build machine's default locale would be used. Another locale can be specified with +the `quarkus.default-locale` configuration property. + +For example, to make the above example work, the default locale could be set as follows. + +[source,properties] +---- +quarkus.default-locale=ar-MA +---- diff --git a/docs/modules/ROOT/pages/user-guide/native-mode.adoc b/docs/modules/ROOT/pages/user-guide/native-mode.adoc index 4c0bda1a19..93f9b980e7 100644 --- a/docs/modules/ROOT/pages/user-guide/native-mode.adoc +++ b/docs/modules/ROOT/pages/user-guide/native-mode.adoc @@ -26,13 +26,17 @@ Quarkus provides a way to set the locale via `application.properties`, so that y [source,properties] ---- -quarkus.native.user-country=US -quarkus.native.user-language=en +quarkus.default-locale=en-US ---- -There is also support for embedding multiple locales into the native image -and for selecting the default locale via GraalVM command line options `-H:IncludeLocales=fr,en`, `H:+IncludeAllLocales` and `-H:DefaultLocale=de`. -You can set those via the Quarkus `quarkus.native.additional-build-args` property. +There is also support for embedding multiple locales into the native image. + +[source,properties] +---- +quarkus.locales=en-US,es-ES,fr-FR +---- + +Using a value of `all` will include all available locales into the native image. [[embedding-resource-in-native-executable]] == Embedding resources in the native executable diff --git a/extensions/bindy/runtime/src/main/doc/limitations.adoc b/extensions/bindy/runtime/src/main/doc/limitations.adoc index f51ff83a73..a3bb162623 100644 --- a/extensions/bindy/runtime/src/main/doc/limitations.adoc +++ b/extensions/bindy/runtime/src/main/doc/limitations.adoc @@ -1,11 +1,22 @@ When using camel-quarkus-bindy in native mode, only the build machine's locale is supported. -For instance, on build machines with french locale, the code below: -``` +For instance, on build machines with French locale, the code below: + +[source,java] +---- + BindyDataFormat dataFormat = new BindyDataFormat(); dataFormat.setLocale("ar"); -``` -formats numbers the arabic way in JVM mode as expected. However, it formats numbers the french way in native mode. +---- + +formats numbers the arabic way in JVM mode as expected. However, it formats numbers the French way in native mode. + +Without further tuning, the build machine's default locale would be used. Another locale can be specified with +the `quarkus.default-locale` configuration property. + +For example, to make the above example work, the default locale could be set as follows. -Without further tuning, the build machine's default locale would be used. Another locale could be specified with -the https://quarkus.io/guides/building-native-image#quarkus-native-pkg-native-config_quarkus.native.user-language[quarkus.native.user-language] and https://quarkus.io/guides/building-native-image#quarkus-native-pkg-native-config_quarkus.native.user-country[quarkus.native.user-country] configuration properties. +[source,properties] +---- +quarkus.default-locale=ar-MA +---- diff --git a/integration-tests/minio/src/main/resources/application.properties b/integration-tests/minio/src/main/resources/application.properties index 19082f395a..2c0257c0a6 100644 --- a/integration-tests/minio/src/main/resources/application.properties +++ b/integration-tests/minio/src/main/resources/application.properties @@ -15,8 +15,5 @@ ## limitations under the License. ## --------------------------------------------------------------------------- -# Ensure the same locale en_US is used in native as io.minio.Time -quarkus.native.user-country=US -quarkus.native.user-language=en - - +# Ensure the same locale en_US is used in native as io.minio.Time +quarkus.default-locale=en-US