fixed texts

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-03-25 18:30:05 +01:00
parent 9e363cc0e8
commit 49ecacc797
8 changed files with 72 additions and 73 deletions

View File

@@ -160,7 +160,7 @@ public class Web extends TemplateServlet {
return loadTemplate(INDEX,Map.of(USER,listMember.user().safeMap(),NOTES,"Confirmed list subscription!"),resp);
}
return t("Unknown user or token");
return t("Unknown user or token!");
} catch (Exception e) {
LOG.debug("Failed to confirm list membership:",e);
return t("Confirmation of list membership failed!");
@@ -260,7 +260,7 @@ public class Web extends TemplateServlet {
return loadTemplate(ADMIN,data,resp);
} catch (SQLException e) {
LOG.warn("Editing list {} by {} failed",list.email(),user.email(),e);
return t("Editing list {} by {} failed",list.email(),user.email());
return t("Editing list {} by {} failed!",list.email(),user.email());
}
}
@@ -294,7 +294,7 @@ public class Web extends TemplateServlet {
return post(req,resp);
case RELOAD:
loadTemplates();
data.put(NOTES,t("Templates have been reloaded"));
data.put(NOTES,t("Templates have been reloaded!"));
path = INDEX;
case CSS:
case INDEX:
@@ -402,7 +402,7 @@ public class Web extends TemplateServlet {
if (!error && !list.mayBeAlteredBy(user)) {
error = true;
data.put(ERROR,t("You are not alter settings of this list!"));
data.put(ERROR,t("You are not allowed to alter settings of this list!"));
}
if (!error){
@@ -463,9 +463,9 @@ public class Web extends TemplateServlet {
if (email == null || email.isBlank() ||
name == null || name.isBlank() ||
pass == null || pass.isBlank() ||
pass_repeat == null || pass_repeat.isBlank()) return loadTemplate(REGISTER,Map.of(ERROR,"Fill all fields, please!",NAME,name,EMAIL,email),resp);
if (!pass.equals(pass_repeat)) return loadTemplate(REGISTER,Map.of(ERROR,"Passwords do not match!",NAME,name,EMAIL,email),resp);
if (Util.simplePassword(pass)) return loadTemplate(REGISTER,Map.of(ERROR,"Password to short or to simple!",NAME,name,EMAIL,email),resp);
pass_repeat == null || pass_repeat.isBlank()) return loadTemplate(REGISTER,Map.of(ERROR,t"Fill all fields, please!"),NAME,name,EMAIL,email),resp);
if (!pass.equals(pass_repeat)) return loadTemplate(REGISTER,Map.of(ERROR,t("Passwords do not match!"),NAME,name,EMAIL,email),resp);
if (Util.simplePassword(pass)) return loadTemplate(REGISTER,Map.of(ERROR,t("Password to short or to simple!"),NAME,name,EMAIL,email),resp);
var firstUser = false;
try {
@@ -565,12 +565,12 @@ public class Web extends TemplateServlet {
data.put(EMAIL,email);
if (user != null) data.put(USER,user.safeMap());
if (list == null){
data.put(ERROR,"No list provided by form data!");
data.put(ERROR,t("No list provided by form data!"));
return loadTemplate(UNSUBSCRIBE,data,resp);
} else data.put(LIST,list.email());
if (user == null) {
if (email == null || email.isBlank()) {
data.put(ERROR, "Email is required for list un-subscription!");
data.put(ERROR, t("Email is required for list un-subscription!"));
return loadTemplate(UNSUBSCRIBE, data, resp);
}
var pass = req.getParameter(PASSWORD);
@@ -581,7 +581,7 @@ public class Web extends TemplateServlet {
req.getSession().setAttribute(USER,user);
data.put(USER,user.safeMap());
} catch (InvalidKeyException | SQLException e) {
data.put(ERROR,"Invalid email/password combination!");
data.put(ERROR,t("Invalid email/password combination!"));
return loadTemplate(UNSUBSCRIBE,data,resp);
}
}