From 8255315f15d9eefa2f9e00d979191ace5d5ceee2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 5 Jul 2024 13:07:42 +0200 Subject: [PATCH] Stop reporting the pseudo options category as missing phrase --- .../files/lib/data/acp/menu/item/ACPMenuItem.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php b/wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php index 980bc24666..4c297cdcbd 100644 --- a/wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php +++ b/wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php @@ -118,6 +118,14 @@ class ACPMenuItem extends DatabaseObject implements ITreeMenuItem */ public function __toString(): string { + // This is a placeholder category that represents the dynamic menu items + // generated by categories in the `options.xml`. It has no title and + // trying to access its name causes a false-positive for missing phrases + // with every ACP request. + if ($this->menuItem === 'wcf.acp.menu.link.option.category') { + return 'wcf.acp.menu.link.option.category'; + } + return WCF::getLanguage()->get($this->menuItem); } -- 2.20.1