]> source.dussan.org Git - gitblit.git/commit
Fix user preferences selecting the wrong preferred locale. 1324/head
authorFlorian Zschocke <florian.zschocke@devolo.de>
Mon, 11 Nov 2019 17:13:11 +0000 (18:13 +0100)
committerFlorian Zschocke <florian.zschocke@devolo.de>
Mon, 11 Nov 2019 17:13:11 +0000 (18:13 +0100)
commite5f29381eca3f28ef5792225516bbea7a3773898
treed0ddbdfde94baefca4d1e2f9547bd685898d5672
parentc4698341d75ef4adc38ebbc3bfbca81bf0ed80dc
Fix user preferences selecting the wrong preferred locale.

Due to a wrong comparison, when loading the preferred locale in the
user preferences page, in cases like `zh_CN` or `de_DE` the wrong
locale would be chosen.

As with too many things, the code is duplicated on the `UserPage`
and the `EditUserPage`. And they differ. So extract the choosing of
the preferred language for display into a method in the (more up-to-date)
`UserPage` and call that from the `EditUserPage`.
src/main/java/com/gitblit/wicket/pages/EditUserPage.java
src/main/java/com/gitblit/wicket/pages/UserPage.java