Usermin Date / Locale problem

I think he is logged in as root maybe. Usermin looks different.

Joe, it’s down to Usermin displaying US dates in eg Inbox mail list, that can only be rectified by Logging into webmail, then selecting Usermin, Change Language, set Locale Configuration to Manual, then select English (Australia). This has to be done for every email account, there appears to be no way to do it system wide or even by domain.

Some of the other stuff mentioned can be cured by to Webmin configuration or Usermin configuration, but not this.

Best yet if Webmin and Usermin honoured the OS selected Locale.

How the hell are we 42 comments into a discussion about that?

This is a theme issue, it appears. When I set locale to manual, I find the following configuration in /etc/usermin:

# grep -R locale 
authentic-theme/settings-joe.js:config_portable_theme_locale_format_time='LTS';
authentic-theme/settings-joe.js:config_portable_theme_locale_language=0;
authentic-theme/settings-joe.js:config_portable_theme_locale_languages='en-au';
authentic-theme/settings-joe.js:config_portable_theme_locale_format_long='LL';
authentic-theme/settings-joe.js:config_portable_theme_locale_format_short='L';
authentic-theme/settings-joe.js:config_portable_theme_locale_format_full='LLLL';

Removing the manual option and switching back to Usermin default, based on language leaves this behind. So, that’s a bug. I’m not sure why Usermin settings are changing theme config options, but they definitely aren’t working right (unsetting that should undo the change to en-au). @Ilia are you aware of that issue? (In addition to being buggy, this does not seem like it should be in the theme. It seems like it should be core Usermin behavior.)

For the original problem, in the meantime, until things behave like they should, I guess you can just add that to every user’s authentic-theme/settings-<username>.js file. It may be possible to add it to the settings.js file just once (instead of for every user), but I’m not sure about that
maybe Ilia can clarify.

Thanks Joe, for now I will keep editing Users Locale, at least that way I know what I have done.

Yes, correct. Although, it would only affect those users without custom settings-*.js file, because latter overrides everything put in settings.js.

I was not sure exactly what wasn’t working. But it seems that the user wants to globally (for all users) set locale to en-au in Usermin (to be default). Up to this moment I would say that it is possible to do in Webmin ⇟ Usermin Configuration: Language page, but it appears that it isn’t. For now, the best solution to affect all Usermin users would be is to put it to /etc/usermin/authentic-theme/settings.js file.

Honestly, I don’t like very much how it’s all designed right now. I will look today into completely reworking it, and using server side processed date/time based on locale (if and hopefully possible to do in Perl). It should work in a straight forward way without any shenanigans!

I said what wasn’t working: When switching back to global default, the setting remains. Setting it to something custom adds the lines I showed above, and setting it back to global default does not remove them.

I will rework completely how locales are handled in Webmin and Usermin. It shouldn’t be done on the theme (UI) side.

1 Like

A new upcoming Webmin (versions higher than currently available 2.013) and Usermin (higher than 1.861) releases will have locale handled correctly on all contemporary systems.

Anyone (advanced users only) who is ready to give it a try right now by installing a beta package, can PM me and I will share the link for the packages.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.