sramazzina opened a new pull request, #8159: URL: https://github.com/apache/hop/pull/8159
* The interface language was installed as the JVM-wide default locale, so it also decided decimal separator, grouping separator, currency and date formats. The language now writes only Locale.Category.DISPLAY and the regional settings write Locale.Category.FORMAT. * Regional settings had no representation of their own. Added RegionalSettings in core, resolving a single source - OPERATING_SYSTEM (the default), CUSTOM or LANGUAGE - from RegionalSettingsSource and RegionalSettingsLocale in hop-config.json; an unreadable or unknown configuration degrades to OPERATING_SYSTEM. * Locale.setDefault lived in HopGui.main, so hop-run and hop-server never applied it and the same pipeline formatted differently in the editor and in production. The regional settings are now applied from HopEnvironment.init(), the bootstrap common to every entry point. * Const.DEFAULT_DECIMAL_SEPARATOR and its siblings are static final, computed at class load before any locale was installed, and ValueMetaBase copied them into every value, overwriting correctly localised symbols. Added getDefaultDecimalSeparator(), getDefaultGroupingSeparator(), getDefaultCurrencySymbol() and getDefaultNumberFormat(), which read the live FORMAT category and cache the symbols against the locale they were built from; the constants are kept and deprecated because they are public API. * The setting was not reachable from the GUI. Added a Regional settings tab carrying the interface language combo moved out of GUI options, two mutually exclusive checkboxes, a type-to-filter combo over the available locales and a live preview of the resulting formats. * ValueMetaBase and ValueMetaTimestamp compared an explicitly chosen date format locale against Locale.getDefault(), so a field locale that happened to match the interface language was discarded and the date rendered with the regional locale instead. The comparison now reads the FORMAT category. Fixes #2814 ------------------------ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`. - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [ ] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
