From 6924d45a7f287c697af83fe1e692c500197e7b6a Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Tue, 6 Oct 2026 20:06:27 -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_inserticonifyscript.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ext.php b/ext.php index 8209d49..1f157aa 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_inserticonifyscript', 'phpbbmodders/inserticonifyscript'); + + return $language->lang('INSERTICONIFYSCRIPT_DISABLE_OLD', self::OLD_EXT_NAME); } return true; diff --git a/language/en/install_inserticonifyscript.php b/language/en/install_inserticonifyscript.php index a78cce9..f029d4a 100644 --- a/language/en/install_inserticonifyscript.php +++ b/language/en/install_inserticonifyscript.php @@ -39,4 +39,5 @@ $lang = array_merge($lang, [ 'INSERTICONIFYSCRIPT_NOT_ENABLEABLE' => 'Insert Iconify Script could not be enabled. The minimum requirements of phpBB 3.3.19 and/or PHP 7.4.0 were not satisfied.', + 'INSERTICONIFYSCRIPT_DISABLE_OLD' => 'Disable the old ā€œ%sā€ extension first.', ]);