getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

Default Panel language not respected in language selector on install screen/user create dialog #1940

Closed texnixe closed 5 years ago

texnixe commented 5 years ago

Describe the bug When the default Panel language via the config is set to anything but English in the config like this

return [
    'panel' => [
      'language' => 'de'
    ]
];

this setting should be reflected in the preselected language select on the installation screen as well as in the user create dialog. Currently English is always the preselected language.

To Reproduce Steps to reproduce the behavior:

  1. Set Panel language to a language other than English in the config
  2. Visit the Panel installation screen (before new users are created)
  3. See English preselected in language select field.
  4. Alternatively, if there are already accounts, create a new user.

Expected behavior The config Panel language should be respected when creating users.

Screenshots

Bildschirmfoto 2019-07-22 um 13 29 17

Kirby Version Tested with 3.2.2 but I guess it's not a new issue.

bastianallgeier commented 5 years ago

afbora commented 5 years ago

FireShot Capture 760 - Installation - Mægazi_ - http___localhost_test_kirby_3 2 5_panel_installation

Language required but not selected. This is normal? I expected as selected english, If no setting default panel language.

distantnative commented 5 years ago

That's weird.

For me, when I have set a default language in config, it is preselected correctly and there is no empty option (the one with the dashes present.

Screen Shot 2019-09-17 at 18 57 16 Screen Shot 2019-09-17 at 18 57 23

When I remove the config, the same only that English is preselected.

afbora commented 5 years ago

Hmm try to access /panel not /panel/installation without setting

distantnative commented 5 years ago

Oh wow, that shouldn't make a difference 🤯

afbora commented 5 years ago

I realized that doesn't work even if default panel language defined when accessing /panel address

distantnative commented 5 years ago

Yea, the problem does not seem to be the change per se, but rather that some Vuex calls (or watchers) aren't activated the same way.

bastianallgeier commented 5 years ago

✅ It was pretty simple to fix. The watched translation prop needed to be evaluated immediately when the component is created.

afbora commented 5 years ago

We made corrections to the RC. Can you render the source files so we can test them again?

bastianallgeier commented 5 years ago

@afbora I will release a new RC with new dist files in a few minutes.