working implementation of journal display
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -22,7 +22,7 @@ public class BookmarkEvent extends Event<Bookmark> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
return switch (eventType()){
|
||||
case CREATE -> t("New bookmark created");
|
||||
case DELETE -> t("The bookmark '{url}' has been deleted", Field.URL, payload().url());
|
||||
@@ -33,7 +33,7 @@ public class BookmarkEvent extends Event<Bookmark> {
|
||||
|
||||
@Override
|
||||
public Translatable subject() {
|
||||
return describe();
|
||||
return describe(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import static de.srsoftware.umbrella.core.constants.Field.*;
|
||||
import static java.util.Optional.*;
|
||||
|
||||
import de.srsoftware.tools.Diff;
|
||||
import de.srsoftware.umbrella.core.model.ObjectWithId;
|
||||
import de.srsoftware.umbrella.core.model.Translatable;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaObject;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public abstract class Event<Payload extends ObjectWithId> {
|
||||
public abstract class Event<Payload extends UmbrellaObject> {
|
||||
|
||||
public enum EventType {
|
||||
CREATE,
|
||||
@@ -47,7 +47,7 @@ public abstract class Event<Payload extends ObjectWithId> {
|
||||
|
||||
public abstract Collection<UmbrellaUser> audience();
|
||||
|
||||
public abstract Translatable describe();
|
||||
public abstract Translatable describe(boolean verbose);
|
||||
|
||||
private Map<String, Object> dropMarkdown(Map<String, Object> map) {
|
||||
var result = new HashMap<String, Object>();
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ItemEvent extends Event<Item>{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
return switch (eventType()){
|
||||
case CREATE -> describeCreate();
|
||||
case null, default -> null;
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.messagebus.events;
|
||||
|
||||
import static de.srsoftware.umbrella.core.Util.mapMarkdown;
|
||||
import static de.srsoftware.umbrella.core.constants.Field.*;
|
||||
import static java.time.ZoneOffset.UTC;
|
||||
|
||||
import de.srsoftware.umbrella.core.model.ObjectWithId;
|
||||
import de.srsoftware.umbrella.core.model.Translatable;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaObject;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class JournalEntry extends ObjectWithId {
|
||||
public class JournalEntry extends UmbrellaObject {
|
||||
|
||||
LocalDateTime timestamp;
|
||||
long userId, entityId;
|
||||
String action, description, module;
|
||||
String action, module;
|
||||
Translatable description;
|
||||
|
||||
public JournalEntry(long id, LocalDateTime timestamp, long userId, String module, long entityId, String action, String description){
|
||||
public JournalEntry(long id, LocalDateTime timestamp, long userId, String module, long entityId, String action, Translatable description){
|
||||
super(id);
|
||||
this.timestamp = timestamp;
|
||||
this.userId = userId;
|
||||
@@ -33,24 +35,30 @@ public class JournalEntry extends ObjectWithId {
|
||||
var module = rs.getString(MODULE);
|
||||
var entityId = rs.getLong(ENTITY_ID);
|
||||
var action = rs.getString(ACTION);
|
||||
var description = rs.getString(DESCRIPTION);
|
||||
var json = new JSONObject(rs.getString(DESCRIPTION));
|
||||
var message = json.getString(TEXT);
|
||||
var fills = json.getJSONObject(DATA).toMap();
|
||||
|
||||
return new JournalEntry(id, timestamp, userId, module, entityId, action, description);
|
||||
return new JournalEntry(id, timestamp, userId, module, entityId, action, new Translatable(message,fills));
|
||||
}
|
||||
|
||||
public long userId(){
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
public Map<String, Object> toMap(String lang){
|
||||
return map(
|
||||
TIMESTAMP, timestamp,
|
||||
USER_ID, userId,
|
||||
MODULE, module,
|
||||
ENTITY_ID, entityId,
|
||||
ACTION, action,
|
||||
DESCRIPTION, mapMarkdown(description)
|
||||
TIMESTAMP, timestamp,
|
||||
USER_ID, userId,
|
||||
MODULE, module,
|
||||
ENTITY_ID, entityId,
|
||||
ACTION, action,
|
||||
DESCRIPTION, description.translate(lang)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return toMap(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,28 +36,27 @@ public class ProjectEvent extends Event<Project>{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
return switch (eventType()){
|
||||
case CREATE -> describeCreate();
|
||||
case CREATE -> describeCreate(verbose);
|
||||
case DELETE -> t("The project '{project}' has been deleted by {user}", Field.PROJECT, payload().name(), USER, initiator().name());
|
||||
case MEMBER_ADDED -> describeMemberAdded();
|
||||
case UPDATE -> describeUpdate();
|
||||
};
|
||||
}
|
||||
|
||||
private Translatable describeCreate() {
|
||||
var head = t("You have been added to the new project '{project}', created by {user}:\n\n{body}", Field.PROJECT, payload().name(), BODY, payload().description(), USER, initiator().name());
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
private Translatable describeCreate(boolean verbose) {
|
||||
var description = t("{user} created a new project \"{project}\"",USER,initiator().name(),Field.PROJECT,payload().name());
|
||||
if (verbose) description = t("{title}:\n\n{description}", TITLE,description, DESCRIPTION, payload().description());
|
||||
return description;
|
||||
}
|
||||
|
||||
private Translatable describeMemberAdded() {
|
||||
var head = t("'{name}' has been added to '{object}' by '{user}'.",NAME,newMember.name(),Field.OBJECT,payload().name(),USER,initiator().name());
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("\"{name}\" has been added to \"{object}\" by \"{user}\"",NAME,newMember.name(),Field.OBJECT,payload().name(),USER,initiator().name());
|
||||
}
|
||||
|
||||
private Translatable describeUpdate() {
|
||||
var head = t("Changes in project '{project}':\n\n{body}",Field.PROJECT,payload().name(),BODY,diff().orElse(""));
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("Changes in project '{project}':\n\n{body}",Field.PROJECT,payload().name(),BODY,diff().orElse(""));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,10 +73,6 @@ public class ProjectEvent extends Event<Project>{
|
||||
return false;
|
||||
}
|
||||
|
||||
private Translatable link() {
|
||||
return t("You can view/edit this project at {base_url}/project/{id}/view",ID,payload().id());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long objectId() {
|
||||
return payload().id();
|
||||
|
||||
@@ -39,16 +39,16 @@ public class TaskEvent extends Event<Task>{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
return switch (eventType()){
|
||||
case CREATE -> describeCreate();
|
||||
case CREATE -> describeCreate(verbose);
|
||||
case DELETE -> t("The task '{task}' has been deleted by {user}",Field.TASK, payload().name(), USER, initiator().name());
|
||||
case MEMBER_ADDED -> describeMemberAdded();
|
||||
case UPDATE -> describeUpdate();
|
||||
};
|
||||
}
|
||||
|
||||
private Translatable describeCreate() {
|
||||
private Translatable describeCreate(boolean verbose) {
|
||||
String parentName = null;
|
||||
var pid = payload().parentTaskId();
|
||||
if (pid != null) {
|
||||
@@ -60,18 +60,17 @@ public class TaskEvent extends Event<Task>{
|
||||
if (project != null) parentName = project.name();
|
||||
}
|
||||
if (parentName == null) parentName = "?";
|
||||
var head = t("'{task}' has been added to '{object}':\n\n{body}", Field.TASK, payload().name(), OBJECT, parentName, BODY, payload().description());
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
var description = t("\"{name}\" has been added to \"{object}\" by \"{user}\"", NAME,payload().name(), OBJECT, parentName, USER, initiator().name());
|
||||
if (verbose) description = t("{title}:\n\n{description}", TITLE,description, DESCRIPTION,payload().description());
|
||||
return description;
|
||||
}
|
||||
|
||||
private Translatable describeMemberAdded() {
|
||||
var head = t("'{name}' has been added to '{object}' by '{user}'.",NAME,newMember.name(), OBJECT,payload().name(),USER,initiator().name());
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("\"{name}\" has been added to \"{object}\" by \"{user}\"",NAME,newMember.name(), OBJECT,payload().name(),USER,initiator().name());
|
||||
}
|
||||
|
||||
private Translatable describeUpdate() {
|
||||
var head = t("Changes in task '{task}':\n\n{body}",Field.TASK,payload().name(),BODY,diff().orElse(""));
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("Changes in task '{task}':\n\n{body}",Field.TASK,payload().name(),BODY,diff().orElse(""));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,11 +91,6 @@ public class TaskEvent extends Event<Task>{
|
||||
return false;
|
||||
}
|
||||
|
||||
private Translatable link() {
|
||||
return t("You can view/edit this task at {base_url}/task/{id}/view",ID,payload().id());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Translatable subject() {
|
||||
return switch (eventType()){
|
||||
|
||||
@@ -34,32 +34,33 @@ public class TransactionEvent extends Event<Transaction> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
var user = initiator().name();
|
||||
var type = t(Text.TRANSACTION);
|
||||
var entity = payload().purpose();
|
||||
return switch (eventType()){
|
||||
case CREATE -> describeDetail();
|
||||
case DELETE -> describeDetail();
|
||||
case CREATE, DELETE -> describeDetail();
|
||||
case UPDATE -> describeUpdate();
|
||||
case null, default -> t("TODO"); // TODO
|
||||
};
|
||||
}
|
||||
|
||||
private Translatable describeUpdate() {
|
||||
var head = t("Changes in {type} '{entity}':\n\n{body}",Field.TYPE,t(Text.TRANSACTION),Field.ENTITY,oldData().get(PURPOSE),BODY,diff().orElse(""));
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("Changes in {type} '{entity}':\n\n{body}",Field.TYPE,t(Text.TRANSACTION),Field.ENTITY,oldData().get(PURPOSE),BODY,diff().orElse(""));
|
||||
}
|
||||
|
||||
private Translatable describeDetail(){
|
||||
var tr = payload();
|
||||
var transaction = payload();
|
||||
|
||||
var message = "{source}: {source_name}\n{destination}: {dest_name}\n{amount}: {value}\n{purpose}: {purpose_val}\n\n{link}";
|
||||
return t(message,SOURCE,t(Text.SOURCE), "source_name",tr.source(), DESTINATION,t(Text.DESTINATION),"dest_name",tr.destination(), AMOUNT,t(Text.AMOUNT), VALUE,tr.amount(), PURPOSE,t(Text.PURPOSE),"purpose_val",tr.purpose(),"link",link());
|
||||
}
|
||||
|
||||
private Translatable link() {
|
||||
return t("You can view/edit this transaction at {base_url}/account/{id}", ID, payload().accountId());
|
||||
return t("{source}: {source_name}\n{destination}: {dest_name}\n{amount}: {value}\n{purpose}: {purpose_val}",
|
||||
SOURCE,t(Text.SOURCE),
|
||||
"source_name",transaction.source(),
|
||||
DESTINATION, t(Text.DESTINATION),
|
||||
"dest_name", transaction.destination(),
|
||||
AMOUNT, t(Text.AMOUNT),
|
||||
VALUE, transaction.amount(),
|
||||
PURPOSE, t(Text.PURPOSE),
|
||||
"purpose_val",transaction.purpose());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class WikiEvent extends Event<WikiPage>{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Translatable describe() {
|
||||
public Translatable describe(boolean verbose) {
|
||||
return switch (eventType()){
|
||||
case CREATE -> describeCreate();
|
||||
case DELETE -> describeDelete();
|
||||
@@ -46,8 +46,7 @@ public class WikiEvent extends Event<WikiPage>{
|
||||
}
|
||||
|
||||
public Translatable describeCreate(){
|
||||
var head = t("New wiki page {name} has been created");
|
||||
return t("{head}:\n\n{object}\n\n{link}","head",head,OBJECT,payload().content(),"link",link());
|
||||
return t("New wiki page {name} has been created");
|
||||
}
|
||||
|
||||
public Translatable describeDelete(){
|
||||
@@ -55,17 +54,11 @@ public class WikiEvent extends Event<WikiPage>{
|
||||
}
|
||||
|
||||
public Translatable describeMemberAdded(){
|
||||
var head = t("'{name}' has been added to '{object}' by '{user}'.",NAME,newMember.name(), OBJECT,payload().title(),USER,initiator().name());
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
return t("\"{name}\" has been added to \"{object}\" by \"{user}\"",NAME,newMember.name(), OBJECT,payload().title(),USER,initiator().name());
|
||||
}
|
||||
|
||||
private Translatable describeUpdate() {
|
||||
var head = t("Changes in wiki page '{id}':\n\n{body}",Field.ID,payload().title(),BODY,diff().orElse(""));
|
||||
return t("{head}\n\n{link}","head",head,"link",link());
|
||||
}
|
||||
|
||||
private Translatable link() {
|
||||
return t("You can view/edit this wiki page at {base_url}/wiki/{id}/view",ID,payload().id());
|
||||
return t("Changes in wiki page '{id}':\n\n{body}",Field.ID,payload().title(),BODY,diff().orElse(""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public final class Bookmark extends ObjectWithId {
|
||||
public final class Bookmark extends UmbrellaObject {
|
||||
private final String url;
|
||||
private final String comment;
|
||||
private final LocalDateTime timestamp;
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Item extends ObjectWithId {
|
||||
public class Item extends UmbrellaObject {
|
||||
private long ownerNumber; // id is the database key, number the owner-relative id
|
||||
private final Owner owner;
|
||||
private String code, description, name;
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Project extends ObjectWithId {
|
||||
public class Project extends UmbrellaObject {
|
||||
private final Map<Long,Member> members;
|
||||
private final Collection<Status> allowedStates;
|
||||
private boolean showClosed;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Task extends ObjectWithId {
|
||||
public class Task extends UmbrellaObject {
|
||||
public static final System.Logger LOG = System.getLogger(Task.class.getSimpleName());
|
||||
private final long projectId;
|
||||
private Long parentTaskId;
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class Transaction extends ObjectWithId {
|
||||
public class Transaction extends UmbrellaObject {
|
||||
private final long accountId;
|
||||
private LocalDateTime date;
|
||||
private IdOrString source, destination;
|
||||
|
||||
@@ -3,11 +3,13 @@ package de.srsoftware.umbrella.core.model;
|
||||
|
||||
import static de.srsoftware.tools.Optionals.*;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import de.srsoftware.umbrella.core.ModuleRegistry;
|
||||
import de.srsoftware.umbrella.core.constants.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Translatable {
|
||||
public class Translatable implements Mappable {
|
||||
protected final String message;
|
||||
private final Map<String, Object> fills;
|
||||
private final HashMap<String,String> translated = new HashMap<>();
|
||||
@@ -40,6 +42,11 @@ public class Translatable {
|
||||
return new Translatable(message,args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return Map.of(Field.TEXT,message,Field.DATA,fills);
|
||||
}
|
||||
|
||||
public String translate(String language){
|
||||
var translation = language == null ? null : translated.get(language);
|
||||
if (translation == null){
|
||||
|
||||
+11
-7
@@ -7,10 +7,10 @@ import java.security.InvalidParameterException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class ObjectWithId implements Mappable {
|
||||
public abstract class UmbrellaObject implements Mappable {
|
||||
private long id;
|
||||
|
||||
public ObjectWithId(long id){
|
||||
public UmbrellaObject(long id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,6 @@ public abstract class ObjectWithId implements Mappable {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ObjectWithId setId(long newValue){
|
||||
id = newValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
protected Map<String, Object> map(Object ... keysAndValues) {
|
||||
if (keysAndValues.length % 2 != 0) throw new InvalidParameterException("Expected even number of keys and parameters!");
|
||||
var map = new HashMap<String, Object>();
|
||||
@@ -30,4 +25,13 @@ public abstract class ObjectWithId implements Mappable {
|
||||
for (var idx = 0; idx<keysAndValues.length; idx+=2) map.put(keysAndValues[idx].toString(),keysAndValues[idx+1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
public String path(){
|
||||
return getClass().getSimpleName().toLowerCase()+"/"+id()+"/view";
|
||||
}
|
||||
|
||||
public UmbrellaObject setId(long newValue){
|
||||
id = newValue;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class WikiPage extends ObjectWithId {
|
||||
public class WikiPage extends UmbrellaObject {
|
||||
|
||||
private String title;
|
||||
private int version;
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
<span class="date">{entry.timestamp.replace('T',' ')}</span>
|
||||
<span class="actor">{data.user_list[entry.user_id].name}</span>:
|
||||
<span class="action">{t(entry.action)}</span>
|
||||
<div>
|
||||
{@html entry.description.rendered}
|
||||
</div>
|
||||
<pre>{entry.description}</pre>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
@@ -21,7 +21,6 @@ import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.model.Token;
|
||||
import de.srsoftware.umbrella.messagebus.EventListener;
|
||||
import de.srsoftware.umbrella.messagebus.events.Event;
|
||||
import de.srsoftware.umbrella.messagebus.events.JournalEntry;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -59,7 +58,7 @@ public class JournalModule extends BaseHandler implements EventListener {
|
||||
for (var entry : entries) userMap.put(entry.userId(),loader.get(entry.userId()).toMap());
|
||||
return sendContent(ex,Map.of(
|
||||
Field.USER_LIST,userMap,
|
||||
Field.JOURNAL,entries.stream().map(JournalEntry::toMap).toList()
|
||||
Field.JOURNAL,entries.stream().map(entry -> entry.toMap(user.get().language())).toList()
|
||||
));
|
||||
} catch (NumberFormatException e) {
|
||||
throw invalidField(Field.ENTITY_ID, Text.NUMBER);
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class SqliteDb extends BaseDb implements JournalDb{
|
||||
public SqliteDb(Connection connection) {
|
||||
@@ -74,8 +75,9 @@ public class SqliteDb extends BaseDb implements JournalDb{
|
||||
public void logEvent(Event<?> event) {
|
||||
try {
|
||||
var timestamp = LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
|
||||
var description = new JSONObject(event.describe(false).toMap()).toString(2);
|
||||
insertInto(TABLE_JOURNAL,TIMESTAMP,USER_ID,MODULE,ENTITY_ID,ACTION,DESCRIPTION)
|
||||
.values(timestamp,event.initiator().id(), event.module(), event.objectId(), event.eventType(), event.describe())
|
||||
.values(timestamp,event.initiator().id(), event.module(), event.objectId(), event.eventType(), description)
|
||||
.execute(db).close();
|
||||
} catch (SQLException e) {
|
||||
throw databaseException(ERROR_WRITE_EVENT,event.eventType(),event.initiator().name());
|
||||
|
||||
@@ -172,8 +172,12 @@ public class MessageSystem extends BaseHandler implements PostBox, EventListener
|
||||
|
||||
@Override
|
||||
public void onEvent(Event<?> event) {
|
||||
var message = new TranslatableMessage(event.initiator(),event.subject(),event.describe(),null);
|
||||
var audience = new HashSet<>(event.audience());
|
||||
var description = event.describe(true);
|
||||
var payload = event.payload();
|
||||
var location = t("You can view/edit this {object} at {base_url}/{path}", OBJECT,t(payload.getClass().getSimpleName()), PATH,payload.path());
|
||||
var body = t("{description}\n\n{location}", DESCRIPTION,description, LOCATION,location);
|
||||
var message = new TranslatableMessage(event.initiator(),event.subject(),body,null);
|
||||
var audience = new HashSet<>(event.audience());
|
||||
audience.remove(event.initiator());
|
||||
send(new Envelope<>(0,message,audience));
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
"my files": "Meine Dateien",
|
||||
|
||||
"name": "Name",
|
||||
"'{name}' has been added to '{object}' by '{user}'.": "'{name}' wurde von {user} zu '{object}' hinzugefügt.",
|
||||
"\"{name}\" has been added to \"{object}\" by \"{user}\"": "„{name}“ wurde von „{user}“ zu „{object}“ hinzugefügt",
|
||||
"net_price": "Nettopreis",
|
||||
"net_sum": "Netto-Summe",
|
||||
"new_contact": "neuer Kontakt",
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
"my files": "my files",
|
||||
|
||||
"name": "Name",
|
||||
"'{name}' has been added to '{object}' by '{user}'.": "'{name}' has been added to '{object}' by '{user}'.",
|
||||
"\"{name}\" has been added to \"{object}\" by \"{user}\"": "\"{name}\" has been added to \"{object}\" by \"{user}\"",
|
||||
"net_price": "net price",
|
||||
"net_sum": "net sum",
|
||||
"new_contact": "new contact",
|
||||
|
||||
Reference in New Issue
Block a user