Add and use ObjectActionFunctionTemplatePlugin
authorMatthias Schmidt <gravatronics@live.com>
Thu, 18 Mar 2021 10:04:08 +0000 (11:04 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 21 Mar 2021 09:21:40 +0000 (10:21 +0100)
16 files changed:
com.woltlab.wcf/templates/__objectActionDeleteIcon.tpl [deleted file]
com.woltlab.wcf/templates/__objectActionToogleIcon.tpl [deleted file]
syncTemplates.json
wcfsetup/install/files/acp/templates/adList.tpl
wcfsetup/install/files/acp/templates/bbcodeList.tpl
wcfsetup/install/files/acp/templates/bbcodeMediaProviderList.tpl
wcfsetup/install/files/acp/templates/boxList.tpl
wcfsetup/install/files/acp/templates/captchaQuestionList.tpl
wcfsetup/install/files/acp/templates/contactSettings.tpl
wcfsetup/install/files/acp/templates/cronjobList.tpl
wcfsetup/install/files/acp/templates/devtoolsMissingLanguageItemList.tpl
wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl
wcfsetup/install/files/acp/templates/tagList.tpl
wcfsetup/install/files/lib/system/template/plugin/ObjectActionFunctionTemplatePlugin.class.php [new file with mode: 0644]
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

diff --git a/com.woltlab.wcf/templates/__objectActionDeleteIcon.tpl b/com.woltlab.wcf/templates/__objectActionDeleteIcon.tpl
deleted file mode 100644 (file)
index 3e98179..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<span class="icon icon16 fa-times jsObjectAction jsTooltip pointer" {*
-    *}title="{lang}wcf.global.button.delete{/lang}"  {*
-    *}data-object-action="delete" {*
-    *}{if $objectActionConfirmMessage}data-confirm-message="{lang __encode=true}{$objectActionConfirmMessage}{/lang}" {/if}{*
-*}></span>
diff --git a/com.woltlab.wcf/templates/__objectActionToogleIcon.tpl b/com.woltlab.wcf/templates/__objectActionToogleIcon.tpl
deleted file mode 100644 (file)
index b4c22f9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<span class="icon icon16 fa-{if !$object->isDisabled}check-{/if}square-o jsObjectAction jsTooltip pointer" {*
-    *}title="{lang}wcf.global.button.{if !$object->isDisabled}disable{else}enable{/if}{/lang}" {*
-    *}data-object-action="toggle"{*
-*}></span>
index df54e5617c933bc6cf35dfbf613bcebdba82be5c..4de5d1deec21eda36bc619c09cd58b4d8c779eee 100644 (file)
@@ -33,8 +33,6 @@
     "__multipleSelectionFormField",
     "__nonEmptyFormFieldDependency",
     "__numericFormField",
-    "__objectActionDeleteIcon",
-    "__objectActionToogleIcon",
     "__pollOptionsFormField",
     "__radioButtonFormField",
     "__ratingFormField",
index 1d94fa77d2a51880818d25e7a7a8191898ed3580..d0362a7ce0c895265e3163b6a3c35a6a11593e49 100644 (file)
@@ -40,9 +40,9 @@
                                                
                                                <span class="statusDisplay sortableButtonContainer">
                                                        <span class="icon icon16 fa-arrows sortableNodeHandle"></span>
-                                                       {include file='__objectActionToogleIcon' object=$ad}
+                                                       {objectAction action="toggle" isDisabled=$ad->isDisabled}
                                                        <a href="{link controller='AdEdit' object=$ad}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                       {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.ad.delete.confirmMessage'}
+                                                       {objectAction action="delete" objectTitle=$ad->getTitle()}
                                                        
                                                        {event name='itemButtons'}
                                                </span>
index 1a777753840528ba10f5beffbcc1bcd8d5f81dec..348b3cf7be689180fd3eace1c9ddcf9d6e41fd37 100644 (file)
@@ -39,7 +39,7 @@
                                                <td class="columnIcon">
                                                        <a href="{link controller='BBCodeEdit' object=$bbcode}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
                                                        {if $bbcode->canDelete()}
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.bbcode.delete.sure'}
+                                                               {objectAction action="delete" objectTitle=$bbcode->getTitle()}
                                                        {else}
                                                                <span class="icon icon16 fa-times disabled"></span>
                                                        {/if}
index a025dd2707e9d028a49d8a41209828df13626a2c..65fbd314955a764fe241e90772baee4fc9e30117 100644 (file)
@@ -36,9 +36,9 @@
                                {foreach from=$objects item='mediaProvider'}
                                        <tr class="jsMediaProviderRow jsObjectActionObject" data-object-id="{@$mediaProvider->getObjectID()}">
                                                <td class="columnIcon">
-                                                       {include file='__objectActionToogleIcon' object=$mediaProvider}
+                                                       {objectAction action="toggle" isDisabled=$mediaProvider->isDisabled}
                                                        <a href="{link controller='BBCodeMediaProviderEdit' object=$mediaProvider}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                       {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.bbcode.mediaProvider.delete.sure'}
+                                                       {objectAction action="delete" objectTitle=$mediaProvider->getTitle()}
                                                        
                                                        {event name='rowButtons'}
                                                </td>
index f4855f6ed8c82b33af5ce85bb9dcedf304450120..9edcfa28bab298dce791f97190bc3c11d87fe71b 100644 (file)
                                {foreach from=$objects item=box}
                                        <tr class="jsBoxRow jsObjectActionObject" data-object-id="{@$box->getObjectID()}">
                                                <td class="columnIcon">
-                                                       {include file='__objectActionToogleIcon' object=$box}
+                                                       {objectAction action="toggle" isDisabled=$box->isDisabled}
                                                        <a href="{link controller='BoxEdit' id=$box->boxID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
                                                        {if $box->canDelete()}
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.box.delete.confirmMessage'}
-
+                                                               {objectAction action="delete" objectTitle=$box->name}
                                                        {else}
                                                                <span class="icon icon16 fa-times disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
                                                        {/if}
index 94c94f09a62728adc9debd7810e44dce68c2324c..c6eb65e6e6d11b750cc79cfcbb1bf053d03251a8 100644 (file)
@@ -37,9 +37,9 @@
                                        {foreach from=$objects item='question'}
                                                <tr class="jsQuestionRow jsObjectActionObject" data-object-id="{@$question->getObjectID()}">
                                                        <td class="columnIcon">
-                                                               {include file='__objectActionToogleIcon' object=$question}
+                                                               {objectAction action="toggle" isDisabled=$question->isDisabled}
                                                                <a href="{link controller='CaptchaQuestionEdit' id=$question->questionID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.captcha.question.delete.confirmMessage'}
+                                                               {objectAction action="delete" objectTitle=$question->getQuestion()}
                                                                
                                                                {event name='rowButtons'}
                                                        </td>
index 8b41322e91d98a99bd8f785199dc07b2f1f11998..297dd6a093aaed7a9e274e6f06120cfb23e1e6b0 100644 (file)
                                {foreach from=$optionList item=option}
                                        <tr class="sortableNode jsOptionRow jsObjectActionObject" data-object-id="{@$option->optionID}">
                                                <td class="columnIcon">
-                                                       {include file='__objectActionToogleIcon' object=$option}
+                                                       {objectAction action="toggle" isDisabled=$option->isDisabled}
                                                        <a href="{link controller='ContactOptionEdit' id=$option->optionID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
                                                        {if $option->canDelete()}
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.customOption.delete.confirmMessage'}
+                                                               {objectAction action="delete" objectTitle=$option->getTitle()}
                                                        {else}
                                                                <span class="icon icon16 fa-times disabled"></span>
                                                        {/if}
                                                
                                                <span class="statusDisplay sortableButtonContainer">
                                                        <span class="icon icon16 fa-arrows sortableNodeHandle"></span>
-                                                       {include file='__objectActionToogleIcon' object=$recipient}
+                                                       {objectAction action="toggle" isDisabled=$recipient->isDisabled}
                                                        <a href="{link controller='ContactRecipientEdit' id=$recipient->recipientID}{/link}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 fa-pencil"></a>
                                                        {if $recipient->originIsSystem}
                                                                <span class="icon icon16 fa-times disabled"></span>
                                                        {else}
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.contact.recipient.delete.confirmMessage'}
+                                                               {objectAction action="delete" objectTitle=$recipient->getName()}
                                                        {/if}
                                                        
                                                        {event name='itemButtons'}
index 56d2d3914718038773cde3139c5fafcef7c70124..fc102d7fbd08fd561bd269854497691128415d7e 100644 (file)
@@ -53,7 +53,7 @@
                                                                <span class="icon icon16 fa-play jsExecuteButton jsTooltip pointer" title="{lang}wcf.acp.cronjob.execute{/lang}" data-object-id="{@$cronjob->cronjobID}"></span>
                                                                
                                                                {if $cronjob->canBeDisabled()}
-                                                                       {include file='__objectActionToogleIcon' object=$cronjob}
+                                                                       {objectAction action="toggle" isDisabled=$cronjob->isDisabled}
                                                                {else}
                                                                        {if !$cronjob->isDisabled}
                                                                                <span class="icon icon16 fa-check-square-o disabled" title="{lang}wcf.global.button.disable{/lang}"></span>
@@ -68,7 +68,7 @@
                                                                        <span class="icon icon16 fa-pencil disabled" title="{lang}wcf.global.button.edit{/lang}"></span>
                                                                {/if}
                                                                {if $cronjob->isDeletable()}
-                                                                       {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.cronjob.delete.sure'}
+                                                                       {objectAction action="delete" objectTitle=$cronjob->getDescription()}
                                                                {else}
                                                                        <span class="icon icon16 fa-times disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
                                                                {/if}
index 5c26d0db8677afded84fee6434e741b02cf2b198..70c75c0efdccc0c78359a7a512de2aef70c4f275 100644 (file)
@@ -47,7 +47,7 @@
                                {foreach from=$objects item=logEntry}
                                        <tr class="jsObjectRow jsObjectActionObject" data-object-id="{@$logEntry->getObjectID()}">
                                                <td class="columnIcon">
-                                                       {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.devtools.missingLanguageItem.delete.confirmMessage'}
+                                                       {objectAction action="delete" confirmMessage='wcf.acp.devtools.missingLanguageItem.delete.confirmMessage'}
                                                        <span class="icon icon16 fa-align-justify jsStackTraceButton jsTooltip pointer" title="{lang}wcf.acp.devtools.missingLanguageItem.showStackTrace{/lang}" data-stack-trace="{$logEntry->getStackTrace()}"></span>
                                                </td>
                                                <td class="columnID">{@$logEntry->getObjectID()}</td>
index 28d6b97d857ac81dda60941feb4a3115809c028b..27da5aa0e338523e7b90e6f39789ef3d9d1210b7 100644 (file)
@@ -48,7 +48,7 @@
                                                        </td>
                                                        <td class="columnIcon">
                                                                <a href="{link controller='DevtoolsProjectEdit' id=$object->getObjectID()}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                               {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.devtools.project.delete.confirmMessage'}
+                                                               {objectAction action="delete" objectTitle=$object->name}
                                                        </td>
                                                        <td class="columnID">{@$object->getObjectID()}</td>
                                                        <td class="columnText"><a href="{link controller='DevtoolsProjectEdit' id=$object->getObjectID()}{/link}">{$object->name}</a></td>
index baf60d7ebe7adcbd9e3d596f989d376057ce609d..87993046700fa0b06b1bcac61c25c00222a351ba 100644 (file)
@@ -74,7 +74,7 @@
                                                <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$tag->tagID}"></td>
                                                <td class="columnIcon">
                                                        <a href="{link controller='TagEdit' object=$tag}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                       {include file='__objectActionDeleteIcon' objectActionConfirmMessage='wcf.acp.tag.delete.sure'}
+                                                       {objectAction action="delete" objectTitle=$tag->getTitle()}
                                                        
                                                        {event name='rowButtons'}
                                                </td>
diff --git a/wcfsetup/install/files/lib/system/template/plugin/ObjectActionFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/ObjectActionFunctionTemplatePlugin.class.php
new file mode 100644 (file)
index 0000000..90685ff
--- /dev/null
@@ -0,0 +1,118 @@
+<?php
+
+namespace wcf\system\template\plugin;
+
+use wcf\system\language\LanguageFactory;
+use wcf\system\template\TemplateEngine;
+use wcf\util\StringUtil;
+
+/**
+ * Template function plugin which generate delete and toggle buttons for objects to be used in
+ * combination with `WoltLabSuite/Core/Ui/Object/Action`.
+ * 
+ * TODO: More information and examples
+ *
+ * @author  Matthias Schmidt
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Template\Plugin
+ * @since   5.4
+ */
+class ObjectActionFunctionTemplatePlugin implements IFunctionTemplatePlugin
+{
+    private const SUPPORTED_ACTIONS = [
+        'delete',
+        'toggle',
+    ];
+    
+    /**
+     * @inheritDoc
+     */
+    public function execute($tagArgs, TemplateEngine $tplObj)
+    {
+        if (!isset($tagArgs['action'])) {
+            throw new \InvalidArgumentException("Missing 'action' argument.");
+        }
+        $action = $tagArgs['action'];
+        if (!in_array($action, static::SUPPORTED_ACTIONS)) {
+            throw new \InvalidArgumentException("Unsupported action '{$action}'.");
+        }
+
+        $additionalAttributes = '';
+        if (isset($tagArgs['objectId'])) {
+            $additionalAttributes .= " data-object-id=\"{$tagArgs['objectId']}\"";
+        }
+        $className = null;
+        if (isset($tagArgs['className'])) {
+            $additionalAttributes .= " data-object-action-class-name=\"{$tagArgs['className']}\"";
+        }
+        foreach ($tagArgs as $key => $value) {
+            if (\preg_match('~^parameter.+$~', $key)) {
+                $additionalAttributes .= sprintf(
+                    ' data-object-action-%s="%s"',
+                    \strtolower(\preg_replace(
+                        '~([A-Z])~',
+                        '-$1',
+                        $key
+                    )),
+                    StringUtil::encodeHTML($value)
+                );
+            }
+        }
+
+        $language = LanguageFactory::getInstance()->getLanguage($tplObj->languageID);
+
+        switch ($action) {
+            case 'delete':
+                if (isset($tagArgs['objectTitle'])) {
+                    $confirmMessage = StringUtil::encodeHTML($tplObj->fetchString(
+                        $tplObj->getCompiler()->compileString(
+                            'wcf.global.button.delete.confirmMessage',
+                            $language->get('wcf.global.button.delete.confirmMessage')
+                        )['template'],
+                        [
+                            'objectTitle' => $tagArgs['objectTitle'],
+                        ]
+                    ));
+                }
+                else if (isset($tagArgs['confirmMessage'])) {
+                    $confirmMessage = StringUtil::encodeHTML($tplObj->fetchString(
+                        $tplObj->getCompiler()->compileString(
+                            $tagArgs['confirmMessage'],
+                            $language->get($tagArgs['confirmMessage'])
+                        )['template']));
+                }
+                else {
+                    throw new \InvalidArgumentException("Missing 'objectTitle' or 'confirmMessage' argument for 'delete' action.");
+                }
+
+                $title = $language->getDynamicVariable('wcf.global.button.delete');
+
+                return <<<HTML
+<span class="icon icon16 fa-times jsObjectAction jsTooltip pointer" title="{$title}" data-object-action="delete" data-confirm-message="{$confirmMessage}"{$additionalAttributes}></span>
+HTML;
+                
+                break;
+                
+            case 'toggle':
+                if (!isset($tagArgs['isDisabled'])) {
+                    throw new \InvalidArgumentException("Missing 'isDisabled' argument for 'toggle' action.");
+                }
+                
+                $icon = 'fa-check-square-o';
+                $title = $language->getDynamicVariable('wcf.global.button.disable');
+                if ($tagArgs['isDisabled']) {
+                    $icon = 'fa-square-o';
+                    $title = $language->getDynamicVariable('wcf.global.button.enable');
+                }
+                $title = StringUtil::encodeHTML($title);
+                
+                return <<<HTML
+<span class="icon icon16 {$icon} jsObjectAction jsTooltip pointer" title="{$title}" data-object-action="toggle"{$additionalAttributes}></span>
+HTML;
+                
+            default:
+                throw new \LogicException("Unreachable.");
+        }
+    }
+}
index 932578f18c4ffb12f1ceb437eec232d5b14157e4..9e574a72237e682eade2950cfb2d5ef93f99fb69 100644 (file)
@@ -37,7 +37,6 @@
                <item name="wcf.acp.ad.conditions.pointInTime.description"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Leg{else}Legen Sie{/if} den Zeitpunkt fest, zu dem die Werbung angezeigt werden soll.]]></item>
                <item name="wcf.acp.ad.conditions.user"><![CDATA[Aktiver Benutzer]]></item>
                <item name="wcf.acp.ad.conditions.user.description"><![CDATA[Der aktive Benutzer muss die folgenden Bedingungen erfüllen, damit die Werbung angezeigt wird.]]></item>
-               <item name="wcf.acp.ad.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} die Werbung <span class="confirmationObject">{$ad->adName}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.ad.edit"><![CDATA[Werbung bearbeiten]]></item>
                <item name="wcf.acp.ad.isDisabled"><![CDATA[Werbung deaktivieren]]></item>
                <item name="wcf.acp.ad.list"><![CDATA[Werbung]]></item>
                <item name="wcf.acp.bbcode.buttonLabel"><![CDATA[Button-Beschriftung]]></item>
                <item name="wcf.acp.bbcode.className"><![CDATA[Klassen-Name]]></item>
                <item name="wcf.acp.bbcode.className.error.notFound"><![CDATA[Diese Klasse wurde nicht gefunden.]]></item>
-               <item name="wcf.acp.bbcode.delete.sure"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den BBCode <span class="confirmationObject">[{$bbcode->bbcodeTag}]</span> wirklich löschen?]]></item>
                <item name="wcf.acp.bbcode.edit"><![CDATA[BBCode bearbeiten]]></item>
                <item name="wcf.acp.bbcode.htmlClose"><![CDATA[Schließendes HTML-Tag]]></item>
                <item name="wcf.acp.bbcode.htmlOpen"><![CDATA[Öffnendes HTML-Tag]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.add"><![CDATA[Medienanbieter hinzufügen]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.className"><![CDATA[Klassen-Name]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.className.error.notFound"><![CDATA[Diese Klasse wurde nicht gefunden.]]></item>
-               <item name="wcf.acp.bbcode.mediaProvider.delete.sure"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den Medienanbieter <span class="confirmationObject">{$mediaProvider->title}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.edit"><![CDATA[Medienanbieter bearbeiten]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.html"><![CDATA[HTML-Code]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.html.description"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Gib{else}Geben Sie{/if}{literal} hier den HTML-Code für das Medium an. Variablen im Format <kbd>{$variable}</kbd> werden durch die entsprechend benannte Untergruppe des regulären Ausdrucks ersetzt.<br>
                <item name="wcf.acp.box.content"><![CDATA[Inhalt]]></item>
                <item name="wcf.acp.box.contents"><![CDATA[Inhalte]]></item>
                <item name="wcf.acp.box.cssClassName"><![CDATA[CSS-Klassen]]></item>
-               <item name="wcf.acp.box.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} die Box <span class="confirmationObject">{$box->name}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.box.edit"><![CDATA[Box bearbeiten]]></item>
                <item name="wcf.acp.box.image"><![CDATA[Box-Bild]]></item>
                <item name="wcf.acp.box.i18n"><![CDATA[Mehrsprachigkeit]]></item>
                <item name="wcf.acp.captcha.question.answers"><![CDATA[Antworten]]></item>
                <item name="wcf.acp.captcha.question.answers.description"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Gib{else}Geben Sie{/if} pro Zeile eine mögliche Antwort ein. Antworten, die mit „~“ beginnen und enden, werden als reguläre Ausdrücke interpretiert.]]></item>
                <item name="wcf.acp.captcha.question.answers.error.invalidRegex"><![CDATA[Der reguläre Ausdruck „{$invalidRegex}“ ist ungültig.]]></item>
-               <item name="wcf.acp.captcha.question.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} die Frage <span class="confirmationObject">{$question->getQuestion()}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.captcha.question.edit"><![CDATA[Captcha-Frage bearbeiten]]></item>
                <item name="wcf.acp.captcha.question.isDisabled"><![CDATA[Frage deaktivieren]]></item>
                <item name="wcf.acp.captcha.question.list"><![CDATA[Captcha-Fragen]]></item>
                <item name="wcf.acp.contact.option.edit"><![CDATA[Eingabefeld bearbeiten]]></item>
                <item name="wcf.acp.contact.recipients"><![CDATA[Empfänger]]></item>
                <item name="wcf.acp.contact.recipient.add"><![CDATA[Empfänger hinzufügen]]></item>
-               <item name="wcf.acp.contact.recipient.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den Empfänger <span class="confirmationObject">{$recipient}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.contact.recipient.edit"><![CDATA[Empfänger bearbeiten]]></item>
                <item name="wcf.acp.contact.recipient.isDisabled"><![CDATA[Empfänger deaktivieren]]></item>
                <item name="wcf.acp.contact.recipient.name"><![CDATA[Angezeigter Name]]></item>
                <item name="wcf.acp.cronjob.execute"><![CDATA[Cronjob jetzt ausführen]]></item>
                <item name="wcf.acp.cronjob.className.error.doesNotExist"><![CDATA[Eine Klasse mit dem angegebenen Namen existiert nicht.]]></item>
                <item name="wcf.acp.cronjob.timing.error.invalid"><![CDATA[Das Zeitformat ist ungültig.]]></item>
-               <item name="wcf.acp.cronjob.delete.sure"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den Cronjob <span class="confirmationObject">{$cronjob->getDescription()}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.cronjob.log"><![CDATA[Protokoll der ausgeführten Cronjobs]]></item>
                <item name="wcf.acp.cronjob.log.clear"><![CDATA[Protokoll leeren]]></item>
                <item name="wcf.acp.cronjob.log.clear.confirm"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} alle Protokoll-Einträge wirklich löschen?]]></item>
        <category name="wcf.acp.devtools">
                <item name="wcf.acp.devtools.project.add"><![CDATA[Projekt hinzufügen]]></item>
                <item name="wcf.acp.devtools.project.edit"><![CDATA[Projekt bearbeiten]]></item>
-               <item name="wcf.acp.devtools.project.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} das Projekt <span class="confirmationObject">{$object->name}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.devtools.project.introduction"><![CDATA[Bitte {if LANGUAGE_USE_INFORMAL_VARIANT}beachte{else}beachten Sie{/if} die <a href="https://docs.woltlab.com/getting-started_quick-start.html#developer-tools" class="externalURL">Hinweise zur Benutzung</a> in der Entwickler-Dokumentation.]]></item>
                <item name="wcf.acp.devtools.project.list"><![CDATA[Projekte]]></item>
                <item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
@@ -1807,7 +1799,6 @@ Die Datenbestände werden sorgfältig gepflegt, aber es ist nicht ausgeschlossen
                <item name="wcf.acp.customOption.edit"><![CDATA[Eingabefeld bearbeiten]]></item>
                <item name="wcf.acp.customOption.error.validationFailed"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} einen ungültigen Inhalt eingegeben.]]></item>
                <item name="wcf.acp.customOption.showOrder"><![CDATA[Reihenfolge]]></item>
-               <item name="wcf.acp.customOption.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} das Eingabefeld <span class="confirmationObject">{$option->getTitle()}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.customOption.defaultValue"><![CDATA[Standardwert]]></item>
                <item name="wcf.acp.customOption.defaultValue.description"><![CDATA[Wert, der beim erstmaligen Ausfüllen als Standard vorgegeben ist.]]></item>
                <item name="wcf.acp.customOption.typeData"><![CDATA[Eigenschaften]]></item>
@@ -3002,7 +2993,6 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen
        <category name="wcf.acp.tag">
                <item name="wcf.acp.tag.add"><![CDATA[Tag hinzufügen]]></item>
                <item name="wcf.acp.tag.edit"><![CDATA[Tag bearbeiten]]></item>
-               <item name="wcf.acp.tag.delete.sure"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den Tag <span class="confirmationObject">{$tag}</span> wirklich löschen?]]></item>
                <item name="wcf.acp.tag.error.languageID.notFound"><![CDATA[Die gewählte Sprache ist ungültig]]></item>
                <item name="wcf.acp.tag.languageID"><![CDATA[Sprache]]></item>
                <item name="wcf.acp.tag.list"><![CDATA[Tags]]></item>
@@ -3880,6 +3870,7 @@ Dateianhänge:
                <item name="wcf.global.button.close"><![CDATA[Schließen]]></item>
                <item name="wcf.global.button.collapsible"><![CDATA[Auf- und Zuklappen]]></item>
                <item name="wcf.global.button.delete"><![CDATA[Löschen]]></item>
+               <item name="wcf.global.button.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} <span class="confirmationObject">{$objectTitle}</span> wirklich löschen?]]></item>
                <item name="wcf.global.button.disable"><![CDATA[Deaktivieren]]></item>
                <item name="wcf.global.button.disabledI18n"><![CDATA[einsprachig]]></item>
                <item name="wcf.global.button.edit"><![CDATA[Bearbeiten]]></item>
index ebb8428f175a475290ee6d8172d93f3564236803..29b6e4173e5269f669d86522fea85a16bcab5bcd 100644 (file)
@@ -37,7 +37,6 @@
                <item name="wcf.acp.ad.conditions.pointInTime.description"><![CDATA[Sets the point in time at which the ad is displayed.]]></item>
                <item name="wcf.acp.ad.conditions.user"><![CDATA[Active user]]></item>
                <item name="wcf.acp.ad.conditions.user.description"><![CDATA[The active user has to fulfill the following conditions to see the ad.]]></item>
-               <item name="wcf.acp.ad.delete.confirmMessage"><![CDATA[Do you really want to delete the ad <span class="confirmationObject">{$ad->adName}</span>?]]></item>
                <item name="wcf.acp.ad.edit"><![CDATA[Edit Ad]]></item>
                <item name="wcf.acp.ad.isDisabled"><![CDATA[Disable Ad]]></item>
                <item name="wcf.acp.ad.list"><![CDATA[Ads]]></item>
                <item name="wcf.acp.bbcode.buttonLabel"><![CDATA[Button Label]]></item>
                <item name="wcf.acp.bbcode.className"><![CDATA[PHP Class Name]]></item>
                <item name="wcf.acp.bbcode.className.error.notFound"><![CDATA[Unable to find specified class.]]></item>
-               <item name="wcf.acp.bbcode.delete.sure"><![CDATA[Do you really want to delete the BBCode <span class="confirmationObject">[{$bbcode->bbcodeTag}]</span>?]]></item>
                <item name="wcf.acp.bbcode.edit"><![CDATA[Edit BBCode]]></item>
                <item name="wcf.acp.bbcode.htmlClose"><![CDATA[Closing HTML tag]]></item>
                <item name="wcf.acp.bbcode.htmlOpen"><![CDATA[Opening HTML tag]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.add"><![CDATA[Add Media Provider]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.className"><![CDATA[PHP Class Name]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.className.error.notFound"><![CDATA[Unable to find specified class.]]></item>
-               <item name="wcf.acp.bbcode.mediaProvider.delete.sure"><![CDATA[Do you really want to delete the media provider <span class="confirmationObject">{$mediaProvider->title}</span>?]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.edit"><![CDATA[Edit Media Provider]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.html"><![CDATA[HTML Code]]></item>
                <item name="wcf.acp.bbcode.mediaProvider.html.description"><![CDATA[{literal}Enter the media’s HTML code here. Variables are recognized as <kbd>{$variable}</kbd> and will be replaced with the regular expression’s matching named group.<br>
                <item name="wcf.acp.box.content"><![CDATA[Content]]></item>
                <item name="wcf.acp.box.contents"><![CDATA[Contents]]></item>
                <item name="wcf.acp.box.cssClassName"><![CDATA[CSS Class Name]]></item>
-               <item name="wcf.acp.box.delete.confirmMessage"><![CDATA[Do you really want to delete the box <span class="confirmationObject">{$box->name}</span>?]]></item>
                <item name="wcf.acp.box.edit"><![CDATA[Edit Box]]></item>
                <item name="wcf.acp.box.image"><![CDATA[Box Image]]></item>
                <item name="wcf.acp.box.i18n"><![CDATA[Multilingualism]]></item>
                <item name="wcf.acp.captcha.question.answers"><![CDATA[Answers]]></item>
                <item name="wcf.acp.captcha.question.answers.description"><![CDATA[Answers beginning and ending with “~” will be interpreted as regular expressions. Enter one answer per line.]]></item>
                <item name="wcf.acp.captcha.question.answers.error.invalidRegex"><![CDATA[The regular expression “{$invalidRegex}” is invalid.]]></item>
-               <item name="wcf.acp.captcha.question.delete.confirmMessage"><![CDATA[Do you really want to delete the question <span class="confirmationObject">{$question->getQuestion()}</span>?]]></item>
                <item name="wcf.acp.captcha.question.edit"><![CDATA[Edit Captcha Question]]></item>
                <item name="wcf.acp.captcha.question.isDisabled"><![CDATA[Disable Captcha Question]]></item>
                <item name="wcf.acp.captcha.question.list"><![CDATA[Captcha Questions]]></item>
                <item name="wcf.acp.cronjob.execute"><![CDATA[Run Cronjob]]></item>
                <item name="wcf.acp.cronjob.className.error.doesNotExist"><![CDATA[Unable to find the specified class.]]></item>
                <item name="wcf.acp.cronjob.timing.error.invalid"><![CDATA[Invalid time format.]]></item>
-               <item name="wcf.acp.cronjob.delete.sure"><![CDATA[Do you really want to delete the cronjob <span class="confirmationObject">{$cronjob->getDescription()}</span>?]]></item>
                <item name="wcf.acp.cronjob.log"><![CDATA[Cronjob Log]]></item>
                <item name="wcf.acp.cronjob.log.clear"><![CDATA[Clear Protocol]]></item>
                <item name="wcf.acp.cronjob.log.clear.confirm"><![CDATA[Do you really want to clear the cronjob log?]]></item>
        <category name="wcf.acp.devtools">
                <item name="wcf.acp.devtools.project.add"><![CDATA[Add Project]]></item>
                <item name="wcf.acp.devtools.project.edit"><![CDATA[Edit Project]]></item>
-               <item name="wcf.acp.devtools.project.delete.confirmMessage"><![CDATA[Do you really want to delete the project <span class="confirmationObject">{$object->name}</span>?]]></item>
                <item name="wcf.acp.devtools.project.introduction"><![CDATA[Please read the <a href="https://docs.woltlab.com/getting-started_quick-start.html#developer-tools" class="externalURL">usage instructions</a> in the developer documentation.]]></item>
                <item name="wcf.acp.devtools.project.list"><![CDATA[Projects]]></item>
                <item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
@@ -1791,7 +1784,6 @@ The database is carefully maintained, but there will be always be a margin of er
                <item name="wcf.acp.customOption.edit"><![CDATA[Edit Option Field]]></item>
                <item name="wcf.acp.customOption.error.validationFailed"><![CDATA[You have entered an invalid value.]]></item>
                <item name="wcf.acp.customOption.showOrder"><![CDATA[Display Order]]></item>
-               <item name="wcf.acp.customOption.delete.confirmMessage"><![CDATA[Do you really want to delete the option field <span class="confirmationObject">{$option->getTitle()}</span>?]]></item>
                <item name="wcf.acp.customOption.defaultValue"><![CDATA[Default Value]]></item>
                <item name="wcf.acp.customOption.defaultValue.description"><![CDATA[Default option value suggested on initial request.]]></item>
                <item name="wcf.acp.customOption.typeData"><![CDATA[Properties]]></item>
@@ -2930,7 +2922,6 @@ If you have <strong>already bought the licenses for the listed apps</strong>, th
        <category name="wcf.acp.tag">
                <item name="wcf.acp.tag.add"><![CDATA[Add Tag]]></item>
                <item name="wcf.acp.tag.edit"><![CDATA[Edit Tag]]></item>
-               <item name="wcf.acp.tag.delete.sure"><![CDATA[Do you really want to delete the tag <span class="confirmationObject">{$tag}</span>?]]></item>
                <item name="wcf.acp.tag.error.languageID.notFound"><![CDATA[Selected language is invalid.]]></item>
                <item name="wcf.acp.tag.languageID"><![CDATA[Language]]></item>
                <item name="wcf.acp.tag.list"><![CDATA[Tags]]></item>
@@ -3487,7 +3478,6 @@ Attachments:
                <item name="wcf.acp.contact.option.edit"><![CDATA[Edit Input Field]]></item>
                <item name="wcf.acp.contact.recipients"><![CDATA[Recipients]]></item>
                <item name="wcf.acp.contact.recipient.add"><![CDATA[Add Recipient]]></item>
-               <item name="wcf.acp.contact.recipient.delete.confirmMessage"><![CDATA[Do you really want to delete the recipient <span class="confirmationObject">{$recipient}</span>?]]></item>
                <item name="wcf.acp.contact.recipient.edit"><![CDATA[Edit Recipient]]></item>
                <item name="wcf.acp.contact.recipient.isDisabled"><![CDATA[Disable recipient]]></item>
                <item name="wcf.acp.contact.recipient.name"><![CDATA[Display Name]]></item>
@@ -3826,6 +3816,7 @@ Attachments:
                <item name="wcf.global.button.close"><![CDATA[Close]]></item>
                <item name="wcf.global.button.collapsible"><![CDATA[Expand and Collapse]]></item>
                <item name="wcf.global.button.delete"><![CDATA[Delete]]></item>
+               <item name="wcf.global.button.delete.confirmMessage"><![CDATA[Do you really want to delete <strong>{$objectTitle}</strong>?]]></item>
                <item name="wcf.global.button.disable"><![CDATA[Disable]]></item>
                <item name="wcf.global.button.disabledI18n"><![CDATA[monolingual]]></item>
                <item name="wcf.global.button.edit"><![CDATA[Edit]]></item>