Login language field is incorrect

    • Resolved
    • OMV 4.x
    • Login language field is incorrect

      Hi,

      I'm on OMV 4.1.23-1 and access it from Firefox 68.0.2 (64-Bit, Windows and Linux).
      The Login Window offers a GUI language selector. I configured German as preferred language in Firefox (in one test German only, in other tests German as primary language, English (en) and English (en-us) as fallback languages).
      OMV defaults to German after logging out from OMV and then logging back in. However, after each start of Firefox, OMV's language selector defaults to English again.
      This happens in Firefox only. Opera and Chrome work fine.

      I already tried to investigate the problem in the source code and at runtime:
      Login.js with the language field calls LanguageCombo.js calls i18n.js. I18n.js stores the detected language in the cookie X-OPENMEDIAVAULT-LOCALE, which is empty at startup (for privacy reasons I configured Firefox to flush all cookies at the end). Therefore i18n.getlocale() returns an empty value, causing LanguageComboBox.js to default to English.
      I think to overcome this issue OMV.util.i18n.getLocale() should be called at initialization before displaying the Login window.

      Despite development experience I have not developed in JS yet, so I might be wrong.

      What do you think, shall I file a bug in the tracker or how can we overcome this issue?

      Kind regards,

      Hippe
    • That seems to be a bug in Firefox. With Chrome the browser reports (the required) language 'de_DE' in the navigator.languages variable, Firefox does this not.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Hippe wrote:

      OMV defaults to German after logging out from OMV and then logging back in. However, after each start of Firefox, OMV's language selector defaults to English again.
      Do you delete the cookies when closing firefox? In OMV3 the language selection seems to be stored in a cookie. I have FF configured to delete all cookies at the end of the session. The next time I get a login screen of OMV with English default language.
      OMV 3.0.99 (Gray style)
      ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304

      The post was edited 1 time, last by cabrio_leo: Incorrect statement ().

    • Yes, I configured Firefox to delete ("flush") all cookies when I close Firefox (see my original post).
      Therefore i18n.getlocale() returns an empty value, causing LanguageComboBox.js to default to English.
      I thought it over last week. Having a language selector in a login form is quite unusual. Why is it there at all?
    • Hippe wrote:

      Having a language selector in a login form is quite unusual. Why is it there at all?
      I agree. Openmediavault is the only application I know which handles it this way.

      Personally the language selector inside the WebUI would be sufficient. The language option in the login form is actually unnecessary.
      OMV 3.0.99 (Gray style)
      ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304