noushadali / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

Shortcuts localization is not changed when changing language #655

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure some locale shortcuts
2. login
3. go to shortcuts
4. Change language from the footer language button
5. Shortcuts does not changed

What is the expected output? What do you see instead?

Shortcuts need to be changed

What version of PWM are you using?
1.7.1

What ldap directory and version are you using?

edirectory

The problem is that the shortcuts items are being loaded on when the shortcuts 
sevlet is first loaded. Then they are stored in the session bean:

final Collection<String> configValues = 
pwmApplication.getConfig().readSettingAsLocalizedStringArray(PwmSetting.SHORTCUT
_ITEMS, pwmSession.getSessionStateBean().getLocale());

.
.
.

final Map<String, ShortcutItem> visibleItems = 
figureVisibleShortcuts(pwmSession, pwmApplication, req);
            pwmSession.getSessionStateBean().setVisibleShortcutItems(visibleItems);

These are not changed if we switch locales.

Original issue reported on code.google.com by tomerazran on 4 Mar 2015 at 3:51