aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Settings.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-12-25 15:06:38 +0300
committerGravatar Vitaly Takmazov2020-12-25 15:06:38 +0300
commit4ba4e27308fa963e96669912ead9bf91a06a9dba (patch)
treec0687af4d6067919588acecd7c83a91a55c2eac9 /src/main/java/com/juick/www/controllers/Settings.java
parent1a7423501e2005b332d06ec33a71f0a2d2108433 (diff)
Refactoring
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Settings.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Settings.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java
index b3750074..5cda7bc4 100644
--- a/src/main/java/com/juick/www/controllers/Settings.java
+++ b/src/main/java/com/juick/www/controllers/Settings.java
@@ -28,7 +28,6 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
@@ -84,6 +83,7 @@ public class Settings {
@GetMapping("/settings")
protected String doGet(
@Visitor User visitor,
+ Locale locale,
HttpServletRequest request,
HttpServletResponse response, ModelMap model) throws IOException {
if (visitor.isAnonymous()) {
@@ -96,8 +96,6 @@ public class Settings {
page = "main";
}
- Locale locale = LocaleContextHolder.getLocale();
-
model.addAttribute("title", ResourceBundle.getBundle("messages", locale).getString("link.settings"));
model.addAttribute("visitor", visitor);
model.addAttribute("tags", tagService.getPopularTags());