From 8af5d1168b8c72b65434cc8f04ef08e7affe05aa Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Tue, 6 Oct 2026 20:06:26 -0500 Subject: [PATCH] Translate the old-extension message in ext.php ext.php refused to enable with a hard-coded English message while the old extension was still enabled. The message now comes from the install language file, as phpBB's validation policy requires. Co-Authored-By: Claude Opus 5.5 --- ext.php | 5 ++++- language/en/install_menu.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ext.php b/ext.php index 47edd35..4d0a4d7 100644 --- a/ext.php +++ b/ext.php @@ -42,7 +42,10 @@ public function is_enableable() if ($ext_manager->is_enabled(self::OLD_EXT_NAME)) { - return ['Disable the old "' . self::OLD_EXT_NAME . '" extension first.']; + $language = $this->container->get('language'); + $language->add_lang('install_menu', 'phpbbmodders/menu'); + + return $language->lang('MENU_DISABLE_OLD', self::OLD_EXT_NAME); } return true; diff --git a/language/en/install_menu.php b/language/en/install_menu.php index 075bc43..286c8c0 100644 --- a/language/en/install_menu.php +++ b/language/en/install_menu.php @@ -39,4 +39,5 @@ $lang = array_merge($lang, [ 'MENU_NOT_ENABLEABLE' => 'phpBB Modders Menu could not be enabled. The minimum requirements of phpBB 3.3.19 and/or PHP 7.4.0 were not satisfied.', + 'MENU_DISABLE_OLD' => 'Disable the old ā€œ%sā€ extension first.', ]);