Add further variables to the language variables
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 21 Mar 2024 09:40:28 +0000 (10:40 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 21 Mar 2024 09:40:28 +0000 (10:40 +0100)
wcfsetup/install/files/lib/system/user/notification/event/ReportModerationQueueUserNotificationEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 4ff92bf18706b46aaedb7a509d8a04877945d722..a2864a016cf9b60300c5cd9bd814e89ade219c12 100644 (file)
@@ -43,6 +43,11 @@ final class ReportModerationQueueUserNotificationEvent extends AbstractUserNotif
                 'author' => $this->author,
                 'notification' => $this->notification,
                 'moderationQueue' => $this->getViewableModerationQueue(),
+                'title' => $this->getViewableModerationQueue()->getTitle(),
+                'objectLink' => $this->getViewableModerationQueue()->getLink(),
+                'typeName' => $this->getLanguage()->getDynamicVariable(
+                    "wcf.moderation.type." . $this->getViewableModerationQueue()->getObjectTypeName()
+                )
             ]
         );
     }
@@ -63,6 +68,11 @@ final class ReportModerationQueueUserNotificationEvent extends AbstractUserNotif
                 'author' => $this->author,
                 'notification' => $this->notification,
                 'moderationQueue' => $this->getViewableModerationQueue(),
+                'title' => $this->getViewableModerationQueue()->getTitle(),
+                'objectLink' => $this->getViewableModerationQueue()->getLink(),
+                'typeName' => $this->getLanguage()->getDynamicVariable(
+                    "wcf.moderation.type." . $this->getViewableModerationQueue()->getObjectTypeName()
+                )
             ],
         ];
     }
index b704ead3b3f56494007062fce3c7b4242853036a..9b80b72def159cbf272544c57863d4542a6425e1 100644 (file)
@@ -4390,9 +4390,9 @@ Dateianhänge:
                <item name="wcf.moderation.report.changeJustifiedStatus.markAsJustified"><![CDATA[Meldung als „Berechtigt“ markieren]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den „Berechtigt“-Status dieser Meldung wirklich ändern?]]></item>
                <item name="wcf.moderation.report.notification.title"><![CDATA[Neue Meldung]]></item>
-               <item name="wcf.moderation.report.notification.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat <strong>{$moderationQueue->getTitle()}</strong>({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}) gemeldet.]]></item>
-               <item name="wcf.moderation.report.notification.mail.plaintext"><![CDATA[{if $author->userID}{$author}{else}Ein Gast{/if} hat {$moderationQueue->getTitle()} ({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}) gemeldet [URL:{$moderationQueue->getLink()}].]]></item>
-               <item name="wcf.moderation.report.notification.mail.html"><![CDATA[<p>{if $author->userID}{$author}{else}Ein Gast{/if} hat <a href="{$moderationQueue->getLink()}">{$moderationQueue->getTitle()}</a> ({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}) gemeldet.</p>]]></item>
+               <item name="wcf.moderation.report.notification.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat <strong>{$title}</strong>({$typeName}) gemeldet.]]></item>
+               <item name="wcf.moderation.report.notification.mail.plaintext"><![CDATA[{if $author->userID}{$author}{else}Ein Gast{/if} hat {$title} ({$typeName}) gemeldet [URL:{$objectLink}].]]></item>
+               <item name="wcf.moderation.report.notification.mail.html"><![CDATA[<p>{if $author->userID}{$author}{else}Ein Gast{/if} hat <a href="{$objectLink}">{$title}</a> ({$typeName}) gemeldet.</p>]]></item>
        </category>
        <category name="wcf.notice">
                <item name="wcf.notice.button.dismiss"><![CDATA[Hinweis dauerhaft ausblenden]]></item>
index 895fb3de7900a182c2d0f8f01001dedb79ccdc7e..90135426c9efe1fe0a2325277a89f49d86d462e1 100644 (file)
@@ -4342,9 +4342,9 @@ Attachments:
                <item name="wcf.moderation.report.changeJustifiedStatus.markAsJustified"><![CDATA[Mark report as “Justified”]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.confirmMessage"><![CDATA[Do you really want to change the “Justified” status of this report?]]></item>
                <item name="wcf.moderation.report.notification.title"><![CDATA[New report]]></item>
-               <item name="wcf.moderation.report.notification.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} has reported <strong>{$moderationQueue->getTitle()}</strong>({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}).]]></item>
-               <item name="wcf.moderation.report.notification.mail.plaintext"><![CDATA[{if $author->userID}{$author}{else}A guest{/if} has reported {$moderationQueue->getTitle()} ({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}) [URL:{$moderationQueue->getLink()}].]]></item>
-               <item name="wcf.moderation.report.notification.mail.html"><![CDATA[<p>{if $author->userID}{$author}{else}A guest{/if} has reported <a href="{$moderationQueue->getLink()}">{$moderationQueue->getTitle()}</a> ({lang}wcf.moderation.type.{@$moderationQueue->getObjectTypeName()}{/lang}):</p>]]></item>
+               <item name="wcf.moderation.report.notification.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} has reported <strong>{$title}</strong>({$typeName}).]]></item>
+               <item name="wcf.moderation.report.notification.mail.plaintext"><![CDATA[{if $author->userID}{$author}{else}A guest{/if} has reported {$title} ({$typeName}) [URL:{$objectLink}].]]></item>
+               <item name="wcf.moderation.report.notification.mail.html"><![CDATA[<p>{if $author->userID}{$author}{else}A guest{/if} has reported <a href="{$objectLink}">{$title}</a> ({$typeName}):</p>]]></item>
        </category>
        <category name="wcf.notice">
                <item name="wcf.notice.button.dismiss"><![CDATA[Permanently dismiss this notice]]></item>