aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/controllers')
-rw-r--r--src/main/java/com/juick/www/controllers/Settings.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java
index 70e550bb..b3750074 100644
--- a/src/main/java/com/juick/www/controllers/Settings.java
+++ b/src/main/java/com/juick/www/controllers/Settings.java
@@ -28,6 +28,7 @@ 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;
@@ -48,6 +49,8 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -93,7 +96,9 @@ public class Settings {
page = "main";
}
- model.addAttribute("title", "Настройки");
+ Locale locale = LocaleContextHolder.getLocale();
+
+ model.addAttribute("title", ResourceBundle.getBundle("messages", locale).getString("link.settings"));
model.addAttribute("visitor", visitor);
model.addAttribute("tags", tagService.getPopularTags());
model.addAttribute("auths", userService.getAuthCodes(visitor));