From 89689b3728e05b47cb2f6685f606d1420724e97e Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 17 Jul 2021 16:01:21 -0400 Subject: [PATCH] don't log about missing l10n for every upgrade task --- CRM/Core/Resources/Common.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/CRM/Core/Resources/Common.php b/CRM/Core/Resources/Common.php index 10485234af01..68b2704632df 100644 --- a/CRM/Core/Resources/Common.php +++ b/CRM/Core/Resources/Common.php @@ -205,18 +205,20 @@ protected static function coreResourceList($region) { ]; // Dynamic localization script - $items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [ - 'cid' => $contactID, - 'includeEmailInName' => (bool) $settings->get('includeEmailInName'), - 'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'), - 'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'), - 'resourceCacheCode' => Civi::resources()->getCacheCode(), - 'locale' => CRM_Core_I18n::getLocale(), - 'lcMessages' => $settings->get('lcMessages'), - 'dateInputFormat' => $settings->get('dateInputFormat'), - 'timeInputFormat' => $settings->get('timeInputFormat'), - 'moneyFormat' => CRM_Utils_Money::format(1234.56), - ]); + if (!CRM_Core_Config::isUpgradeMode()) { + $items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [ + 'cid' => $contactID, + 'includeEmailInName' => (bool) $settings->get('includeEmailInName'), + 'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'), + 'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'), + 'resourceCacheCode' => Civi::resources()->getCacheCode(), + 'locale' => CRM_Core_I18n::getLocale(), + 'lcMessages' => $settings->get('lcMessages'), + 'dateInputFormat' => $settings->get('dateInputFormat'), + 'timeInputFormat' => $settings->get('timeInputFormat'), + 'moneyFormat' => CRM_Utils_Money::format(1234.56), + ]); + } // These scripts are only needed by back-office users if (CRM_Core_Permission::check('access CiviCRM')) {