From f882a56804543fb6ae2fae2a0756d6bae4da9a5e Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 7 Jun 2024 12:24:32 +0200 Subject: [PATCH 1/2] working on translation Signed-off-by: Stephan Richter --- src/main/java/de/srsoftware/widerhall/web/Web.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/srsoftware/widerhall/web/Web.java b/src/main/java/de/srsoftware/widerhall/web/Web.java index 16a2cde..0388388 100644 --- a/src/main/java/de/srsoftware/widerhall/web/Web.java +++ b/src/main/java/de/srsoftware/widerhall/web/Web.java @@ -539,7 +539,7 @@ public class Web extends TemplateServlet { return loadTemplate("reset_link_sent",null,resp); } } catch (Exception e){ - return loadTemplate(Util.getPath(req),Map.of(EMAIL,email,ERROR,"Failed to send reset email: "+e.getMessage()),resp); + return loadTemplate(Util.getPath(req),Map.of(EMAIL,email,ERROR,t("Failed to send reset email:")+" "+e.getMessage()),resp); } return null; } From 1b610042381bb6892d51f44c7238a4fc2075acc6 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 7 Jun 2024 12:33:43 +0200 Subject: [PATCH 2/2] working on translations Signed-off-by: Stephan Richter --- src/main/java/de/srsoftware/widerhall/web/Web.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/srsoftware/widerhall/web/Web.java b/src/main/java/de/srsoftware/widerhall/web/Web.java index 0388388..703f712 100644 --- a/src/main/java/de/srsoftware/widerhall/web/Web.java +++ b/src/main/java/de/srsoftware/widerhall/web/Web.java @@ -376,12 +376,12 @@ public class Web extends TemplateServlet { if (token != null){ try { user = User.byToken(req.getParameter(TOKEN)); - if (user == null) return loadTemplate(path,Map.of(ERROR,"Failed to find user for token!"),resp); + if (user == null) return loadTemplate(path,Map.of(ERROR,t("Failed to find user for token!")),resp); user.dropPasswordToken(); req.getSession().setAttribute("user",user); return redirectTo(NEW_PASSWORD_FORM,resp); } catch (SQLException sqle){ - return loadTemplate(path,Map.of(ERROR,"Failed to add user for token!"),resp); + return loadTemplate(path,Map.of(ERROR,t("Failed to add user for token!")),resp); } } var email = req.getParameter(EMAIL);