Skip to content

Commit ce02f77

Browse files
boneliferclaude
andauthored
Translate the old-extension message in ext.php (#8)
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 <noreply@anthropic.com>
1 parent ac72462 commit ce02f77

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎ext.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public function is_enableable()
4242

4343
if ($ext_manager->is_enabled(self::OLD_EXT_NAME))
4444
{
45-
return ['Disable the old "' . self::OLD_EXT_NAME . '" extension first.'];
45+
$language = $this->container->get('language');
46+
$language->add_lang('install_inserticonifyscript', 'phpbbmodders/inserticonifyscript');
47+
48+
return $language->lang('INSERTICONIFYSCRIPT_DISABLE_OLD', self::OLD_EXT_NAME);
4649
}
4750

4851
return true;

‎language/en/install_inserticonifyscript.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@
3939

4040
$lang = array_merge($lang, [
4141
'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.',
42+
'INSERTICONIFYSCRIPT_DISABLE_OLD' => 'Disable the old “%s” extension first.',
4243
]);

0 commit comments

Comments
 (0)