unified translation of events and event-related emails

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-01-16 23:37:35 +01:00
parent 30651af62f
commit 5c36ab23bf
14 changed files with 94 additions and 74 deletions

View File

@@ -16,6 +16,7 @@ import static de.srsoftware.umbrella.core.constants.Field.STATE;
import static de.srsoftware.umbrella.core.constants.Field.USER;
import static de.srsoftware.umbrella.core.constants.Path.*;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.*;
import static de.srsoftware.umbrella.core.model.Translatable.t;
import static de.srsoftware.umbrella.user.Constants.*;
import static de.srsoftware.umbrella.user.Paths.*;
import static de.srsoftware.umbrella.user.Paths.IMPERSONATE;
@@ -502,11 +503,10 @@ public class UserModule extends BaseHandler implements UserService {
if (oldToken != null) tokenMap.remove(oldToken);
tokenMap.put(token,email);
tokenMap.put(email,token);
var subject = "user.your_password_reset_token";
var content = "user.go_to_url_to_reset_password";
var url = url(ex).replace("/api/user/reset_pw","/user/reset/pw")+"?token="+token;
var fills = Map.of("url",url);
var message = new Message(user,subject,content,fills,null);
var subject = t("Your token to create a new password");
var content = t("To receive a new password, open the following link: {url}",URL,url);
var message = new Message(user,subject,content,null);
var envelope = new Envelope(message,user);
postBox().send(envelope);
} catch (UmbrellaException e){