Fix the generated code of `{jsphrase}`
authorAlexander Ebert <ebert@woltlab.com>
Thu, 8 Dec 2022 16:37:30 +0000 (17:37 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 8 Dec 2022 16:37:30 +0000 (17:37 +0100)
wcfsetup/install/files/lib/system/template/plugin/JsphrasePrefilterTemplatePlugin.class.php

index 5069d1b6a93540a73941312b63fd7f49c797dc9e..4cfb310c3115dff6c990e57fbc1b19a25d1902f5 100644 (file)
@@ -31,7 +31,7 @@ final class JsphrasePrefilterTemplatePlugin implements IPrefilterTemplatePlugin
                 $name = $match['name'];
 
                 return \sprintf(
-                    "WoltLabLanguage.add('%s', '{jslang}%s{/jslang}');",
+                    "WoltLabLanguage.registerPhrase('%s', '{jslang}%s{/jslang}');",
                     $name,
                     $name,
                 );