aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java2
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/CommandsManager.java9
2 files changed, 1 insertions, 10 deletions
diff --git a/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java b/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java
index 0e7569ab..7275a9da 100644
--- a/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java
+++ b/juick-common/src/main/java/com/juick/formatters/PlainTextFormatter.java
@@ -29,7 +29,7 @@ import java.util.Locale;
* Created by vitalyster on 12.10.2016.
*/
public class PlainTextFormatter {
- static PrettyTime pt = new PrettyTime(new Locale("ru"));
+ static PrettyTime pt = new PrettyTime(new Locale("en"));
public static String formatPost(Message jmsg) {
return formatPost(jmsg, false);
diff --git a/juick-server-xmpp/src/main/java/com/juick/server/CommandsManager.java b/juick-server-xmpp/src/main/java/com/juick/server/CommandsManager.java
index e2be6aaf..38b8e254 100644
--- a/juick-server-xmpp/src/main/java/com/juick/server/CommandsManager.java
+++ b/juick-server-xmpp/src/main/java/com/juick/server/CommandsManager.java
@@ -34,14 +34,12 @@ import com.juick.service.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.lang3.reflect.MethodUtils;
-import org.ocpsoft.prettytime.PrettyTime;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import rocks.xmpp.addr.Jid;
import javax.annotation.Nonnull;
-import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -57,7 +55,6 @@ import java.util.stream.Collectors;
*/
@Component
public class CommandsManager {
- private PrettyTime pt;
@Inject
private MessagesService messagesService;
@Inject
@@ -79,12 +76,6 @@ public class CommandsManager {
@Inject
private ApplicationEventPublisher applicationEventPublisher;
- @PostConstruct
- public void init() {
- pt = new PrettyTime(new Locale("ru"));
- }
-
-
public Optional<CommandResult> processCommand(User user, Jid from, String input, @Nonnull URI attachment) throws InvocationTargetException,
IllegalAccessException, NoSuchMethodException {
Optional<Method> cmd = MethodUtils.getMethodsListWithAnnotation(getClass(), UserCommand.class).stream()