Add a hint for possible errors in the custom CSS for the dark mode
authorAlexander Ebert <ebert@woltlab.com>
Mon, 17 Apr 2023 16:43:21 +0000 (18:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 17 Apr 2023 16:43:21 +0000 (18:43 +0200)
Fixes #5378

wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php
wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 2b322c1ace4b0df5c8bf4b1de5b1c4d73b18f41e..1fc290d67d4d7105cafb814b0c794b00f0c97834 100644 (file)
@@ -522,6 +522,7 @@ class StyleAddForm extends AbstractForm
 
             throw new UserInputException('individualScss', [
                 'message' => $result->getMessage(),
+                'hasDarkMode' => false,
             ]);
         }
     }
index cacdf0f756e788b72a04f633ad0ee6db7ae241db..d41f1571bf62f49995d18e86f3ce053746ea9642 100644 (file)
@@ -145,6 +145,7 @@ class StyleEditForm extends StyleAddForm
 
             throw new UserInputException('individualScss', [
                 'message' => $result->getMessage(),
+                'hasDarkMode' => $this->style->hasDarkMode,
             ]);
         }
     }
index a63eddd59ca00b664e64f67ab33c3739cb83ae31..767afefb3aaf7b00165edd1c645432c22cb419c5 100644 (file)
@@ -2856,7 +2856,7 @@ Abschnitte dürfen nicht leer sein und nur folgende Zeichen enthalten: <kbd>[a-z
                <item name="wcf.acp.style.advanced.overrideScss.error.invalid"><![CDATA[Eingabe „{$error[text]}“ ungültig]]></item>
                <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[Variable „{$error[text]}“ wird bereits durch den Stil-Editor gesetzt]]></item>
                <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[Variable „{$error[text]}“ unbekannt]]></item>
-               <item name="wcf.acp.style.advanced.individualScss.error"><![CDATA[Der SCSS-Code enthält einen Fehler: {$errorType.message}.]]></item>
+               <item name="wcf.acp.style.advanced.individualScss.error"><![CDATA[Dieser SCSS-Code{if $errorType[hasDarkMode]} (oder der Code für das dunkle Farbschema){/if} enthält einen Fehler: {$errorType[message]}.]]></item>
                <item name="wcf.acp.style.authorName"><![CDATA[Autor]]></item>
                <item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
                <item name="wcf.acp.style.button.exportStyle"><![CDATA[Export starten]]></item>
index 9cd6b937435282d40c1a4c11ed791140f6a75bfb..c74e80b35fec327f8dbcd0f02aa08b81a66b58b1 100644 (file)
@@ -2788,7 +2788,7 @@ If you have <strong>already bought the licenses for the listed apps</strong>, th
                <item name="wcf.acp.style.advanced.overrideScss.error.invalid"><![CDATA[The input for “{$error[text]}” invalid.]]></item>
                <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[The variable “{$error[text]}” is already defined by the style editor.]]></item>
                <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[The variable “{$error[text]}” is not recognized.]]></item>
-               <item name="wcf.acp.style.advanced.individualScss.error"><![CDATA[The SCSS code contains an error: {$errorType.message}.]]></item>
+               <item name="wcf.acp.style.advanced.individualScss.error"><![CDATA[This SCSS code{if $errorType[hasDarkMode]} (or the code for the dark color scheme){/if} contains an error: {$errorType[message]}.]]></item>
                <item name="wcf.acp.style.authorName"><![CDATA[Author]]></item>
                <item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
                <item name="wcf.acp.style.button.exportStyle"><![CDATA[Start Export]]></item>