Upcoming internationalization for date/time and numbers in HABPanel

Hi all,

I’m (finally) adding a long-requested feature to HABPanel - support for date/time and number formats according to your locale settings. I didn’t want to rush this to include it in 2.2 because there might be some residual errors.

Please read the PR comments in the link above and note my last remark - time and dates might partly revert from DMY/24h to US English MDY/12h if the locale is left unconfigured.

Before I merge it, may I ask users with knowledge of (mostly non-Latin/Germanic) languages to verify whether there are blatant mistakes in the date/time displays? Note that I might not be able to fix every error, some formats are simply how the angular-locale authors decided it.

You need shell access with git installed.

  1. cd to your conf/html folder

  2. Run:
    git clone -b i18n https://github.com/ghys/habpanel.git habpanel-i18n

  3. Make sure you selected your language and region in Paper UI under Configuration > System

  4. Navigate to http://openhab:8080/static/habpanel-i18n/web/ and see the results.

I will merge the PR in about a week unless there are severe errors or regressions.
Thanks in advance!

1 Like

Снимок экрана (19)

everything looks good!

Снимок экрана (20)
extra letter. Should be: декабря

Thanks @Olymp!
Apparently the extra letter is present in the locale file for the ‘fullDate’ format:

I have a regexp to try to remove the year, I suppose that’s why it appears like this; I will handle this case explicitely and remove it.

I also had a quick look at other languages with Cyrillic script, it appears to be similar in Ukrainian and Bulgarian so I will deal with it too.


Oddly enough Belarusian looks ok though:

Also I’m realizing there are far less languages appearing in Paper UI’s combobox than the 136 languages from angular-locale I added, so maybe I should only support those that can actually be selected… :smile: