From fcc04a9c41cec30608980e1fe06b38889a985500 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Fri, 11 Oct 2024 08:24:34 -0700 Subject: [PATCH] Tweak --- src/Plugin.php | 11 +++++++++-- src/translations/en/commerce.php | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index 01cc707778..f95348fafd 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -120,6 +120,7 @@ use craft\helpers\Cp; use craft\helpers\Db; use craft\helpers\FileHelper; +use craft\helpers\Html; use craft\helpers\UrlHelper; use craft\models\FieldLayout; use craft\redactor\events\RegisterLinkOptionsEvent; @@ -291,10 +292,16 @@ private function _checkUpgradeCommandHasFinished() } } - if ($columnsExist) { + if ($columnsExist || true) { Event::on(Cp::class, Cp::EVENT_REGISTER_ALERTS, static function($event) { $event->alerts[] = [ - 'content' => Craft::t('commerce', 'Craft Commerce 4 upgrade incomplete. Please ensure the upgrade command has finished running.'), + 'content' => + Html::tag('strong', Craft::t('commerce', '{name} upgrade incomplete.', [ + 'name' => 'Craft Commerce 4', + ])) . ' ' . + Craft::t('commerce', 'Please ensure the upgrade command has finished running.', [ + 'url' => 'https://craftcms.com/docs/commerce/4.x/upgrading.html#performing-the-upgrade', + ]) ]; }); } diff --git a/src/translations/en/commerce.php b/src/translations/en/commerce.php index 68afe74b03..3b3d97cba9 100644 --- a/src/translations/en/commerce.php +++ b/src/translations/en/commerce.php @@ -238,7 +238,6 @@ 'Coupon removed: {explanation}' => 'Coupon removed: {explanation}', 'Coupons' => 'Coupons', 'Craft Commerce' => 'Craft Commerce', - 'Craft Commerce 4 upgrade incomplete. Please ensure the upgrade command has finished running.' => 'Craft Commerce 4 upgrade incomplete. Please ensure the upgrade command has finished running.', 'Create a Discount' => 'Create a Discount', 'Create a Product Type' => 'Create a Product Type', 'Create a Subscription Plan' => 'Create a Subscription Plan', @@ -754,6 +753,7 @@ 'Plan' => 'Plan', 'Plans reordered.' => 'Plans reordered.', 'Plans' => 'Plans', + 'Please ensure the upgrade command has finished running.' => 'Please ensure the upgrade command has finished running.', 'Post Date' => 'Post Date', 'Postal Code Formula' => 'Postal Code Formula', 'Pounds (lb)' => 'Pounds (lb)', @@ -1202,6 +1202,7 @@ '{description} is no longer available.' => '{description} is no longer available.', '{description} only has {stock} in stock.' => '{description} only has {stock} in stock.', '{name} (Primary)' => '{name} (Primary)', + '{name} upgrade incomplete.' => '{name} upgrade incomplete.', '{num, plural, =1{Order} other{Orders}} updated.' => '{num, plural, =1{order} other{orders}} updated.', '{number} more…' => '{number} more…', '{pct} off the discounted item price' => '{pct} off the discounted item price',