diff --git a/README.md b/README.md index 8a8eba6864fa1a652dbf17e4f9985e42c1e42bae..694afb11efc4c1ef828769e9afcc0f009eeb782c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ # NotificationConfiguration -This project contains the configuration for actions and channels for the notification system. \ No newline at end of file +This project contains the configuration for actions and channels for the notification system. + + + + +## Placeholder +Placeholders can be used to extend the the provided texts with custom information. This is done be including the place holder within the language specific template, like this `{{examplePlaceholder}}` There are two types of placeholders that can be used: derived palceholders and custom placeholes. Derived placeholders are taken from the affected user or the project, currently the following information can be used, they are identified by an underscore: + +- _targetUserName +- _projectName + +Custom placeholders must be provided in the JObject that is sent to the NotificationBus: +``` +var obj = new JObject +{ + ["args"] = new JObject + { + ["placeholder"] = new JObject + { + ["examplePlaceholder"] = "exampleText" + } + } +}; +``` +To provide a clear destinction they should not use an underscore. Keep in mind that placeholders are not localized diff --git a/src/NotificationConfiguration.Test/Properties/AssemblyInfo.cs b/src/NotificationConfiguration.Test/Properties/AssemblyInfo.cs index dbd82eee9276e70c398441ca327ae16a4aead263..6ef8467c6db36f49a81500665c1afe18cf21cd53 100644 --- a/src/NotificationConfiguration.Test/Properties/AssemblyInfo.cs +++ b/src/NotificationConfiguration.Test/Properties/AssemblyInfo.cs @@ -9,8 +9,8 @@ using System.Reflection; [assembly: AssemblyDescription("NotificationConfiguration.Test is a part of the CoScInE group.")] [assembly: AssemblyCompany("IT Center, RWTH Aachen University")] [assembly: AssemblyProduct("NotificationConfiguration.Test")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] -[assembly: AssemblyInformationalVersion("1.1.0-topic-828-notifi0009")] +[assembly: AssemblyVersion("1.2.0")] +[assembly: AssemblyFileVersion("1.2.0")] +[assembly: AssemblyInformationalVersion("1.2.0-topic-1064-exten0001")] [assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")] diff --git a/src/NotificationConfiguration/Actions.json b/src/NotificationConfiguration/Actions.json index b1beffc5b6a77134c5955ce0a834f79f3453cf00..dbeb53364b4c679d31c7838ee251b25c43cc6b11 100644 --- a/src/NotificationConfiguration/Actions.json +++ b/src/NotificationConfiguration/Actions.json @@ -9,11 +9,11 @@ "email": { "de": { "subject": "[CoScInE] Projekt gelöscht", - "body": "Das Projekt wurde gelöscht." + "body": "Das Projekt {{_projectName}} wurde gelöscht." }, "en": { "subject": "[CoScInE] Project deleted", - "body": "Project was deleted." + "body": "Project {{_projectName}} was deleted." } } }, @@ -37,11 +37,11 @@ "email": { "de": { "subject": "[CoScInE] Projekt erstellt", - "body": "Ein Projekt wurde erstellt." + "body": "Das Projekt {{_projectName}} wurde erstellt." }, "en": { "subject": "[CoScInE] Project created", - "body": "A project was created." + "body": "The project {{_projectName}} was created." } } }, @@ -93,11 +93,11 @@ "email": { "de": { "subject": "[CoScInE] Benutzerrolle in Projekt geändert", - "body": "Ihre Rolle in einem Projekt wurde geändert." + "body": "Ihre Rolle in dem Projekt {{_projectName}} wurde geändert." }, "en": { "subject": "[CoScInE] User role changed in project", - "body": "Your role in a project was changed." + "body": "Your role in the project {{_projectName}} was changed." } } }, @@ -121,11 +121,11 @@ "email": { "de": { "subject": "[CoScInE] Ressource entfernt", - "body": "Es wurde eine Ressource aus einem Ihrer Projekte entfernt." + "body": "Es wurde eine Ressource im Projekt {{_projectName}} entfernt." }, "en": { "subject": "[CoScInE] Resource removed", - "body": "A resource was removed from one of your projects." + "body": "A resource was removed from the project {{_projectName}}." } } }, @@ -149,11 +149,11 @@ "email": { "de": { "subject": "[CoScInE] Ressource erstellt", - "body": "Es wurde eine Ressource in einem Ihrer Projekte erstellt." + "body": "Es wurde eine Ressource in dem Projekt {{_projectName}} erstellt." }, "en": { "subject": "[CoScInE] Resource created", - "body": "A resource was created in one of your projects." + "body": "A resource was created in the project {{_projectName}}." } } }, diff --git a/src/NotificationConfiguration/Properties/AssemblyInfo.cs b/src/NotificationConfiguration/Properties/AssemblyInfo.cs index be67c58c5909ca5ce994cb7ee7299408800ade4b..2131a1026dd3abda886fc3a87a72527093c4c7bb 100644 --- a/src/NotificationConfiguration/Properties/AssemblyInfo.cs +++ b/src/NotificationConfiguration/Properties/AssemblyInfo.cs @@ -9,8 +9,8 @@ using System.Reflection; [assembly: AssemblyDescription("NotificationConfiguration is a part of the CoScInE group.")] [assembly: AssemblyCompany("IT Center, RWTH Aachen University")] [assembly: AssemblyProduct("NotificationConfiguration")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] -[assembly: AssemblyInformationalVersion("1.1.0-topic-828-notifi0009")] +[assembly: AssemblyVersion("1.2.0")] +[assembly: AssemblyFileVersion("1.2.0")] +[assembly: AssemblyInformationalVersion("1.2.0-topic-1064-exten0001")] [assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]