diff --git a/.changeset/fast-starfishes-perform.md b/.changeset/fast-starfishes-perform.md new file mode 100644 index 0000000000000..d799f448ef9d4 --- /dev/null +++ b/.changeset/fast-starfishes-perform.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes broken link and improves messaging for invalid apps banner. diff --git a/apps/meteor/ee/server/apps/cron.ts b/apps/meteor/ee/server/apps/cron.ts index 7800d7077c2c3..3ae1afdb5a6a9 100644 --- a/apps/meteor/ee/server/apps/cron.ts +++ b/apps/meteor/ee/server/apps/cron.ts @@ -22,14 +22,14 @@ const notifyAdminsAboutInvalidApps = async function _notifyAdminsAboutInvalidApp const id = 'someAppInInvalidState'; const title = 'Warning'; - const text = 'There is one or more apps in an invalid state. Click here to review.'; - const rocketCatMessage = 'There is one or more apps in an invalid state. Go to Administration > Apps to review.'; - const link = '/admin/apps'; + const link = '/marketplace/installed'; await sendMessagesToAdmins({ msgs: async ({ adminUser }) => ({ - msg: `*${i18n.t(title, { lng: adminUser.language || 'en' })}*\n${i18n.t(rocketCatMessage, { + msg: `*${i18n.t(title, { lng: adminUser.language || 'en' })}*\n${i18n.t('Invalid_apps_admin_message', { lng: adminUser.language || 'en', + marketplace: i18n.t('Marketplace', { lng: adminUser.language || 'en' }), + installed: i18n.t('Installed', { lng: adminUser.language || 'en' }), })}`, }), banners: async ({ adminUser }) => { @@ -40,7 +40,7 @@ const notifyAdminsAboutInvalidApps = async function _notifyAdminsAboutInvalidApp id, priority: 10, title, - text, + text: i18n.t('Invalid_apps_banner_text', { lng: adminUser.language || 'en' }), modifiers: ['danger'], link, }, @@ -64,10 +64,14 @@ const notifyAdminsAboutRenewedApps = async function _notifyAdminsAboutRenewedApp return; } - const rocketCatMessage = 'There is one or more disabled apps with valid licenses. Go to Administration > Apps to review.'; - await sendMessagesToAdmins({ - msgs: async ({ adminUser }) => ({ msg: `${i18n.t(rocketCatMessage, { lng: adminUser.language || 'en' })}` }), + msgs: async ({ adminUser }) => ({ + msg: i18n.t('Disabled_apps_admin_message', { + lng: adminUser.language || 'en', + marketplace: i18n.t('Marketplace', { lng: adminUser.language || 'en' }), + installed: i18n.t('Installed', { lng: adminUser.language || 'en' }), + }), + }), }); }; diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 9389f841f2285..2ef172c1b9ffe 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -1768,6 +1768,7 @@ "Disable_two-factor_authentication": "Disable two-factor authentication via TOTP", "Disable_two-factor_authentication_email": "Disable two-factor authentication via Email", "Disabled": "Disabled", + "Disabled_apps_admin_message": "There are one or more disabled apps with valid licenses. Go to {{marketplace}} > {{installed}} to review.", "Disable_voice_calling": "Disable voice calling", "Disallow_reacting": "Disallow Reacting", "Disallow_reacting_Description": "Disallows reacting", @@ -2923,6 +2924,8 @@ "Invalid_setting_s": "Invalid setting: %s", "Invalid_two_factor_code": "Invalid two factor code", "Invalid_username": "The username entered is invalid", + "Invalid_apps_banner_text": "There are one or more apps in an invalid state. Click here to review.", + "Invalid_apps_admin_message": "There are one or more apps in an invalid state. Go to {{marketplace}} > {{installed}} to review.", "invisible": "invisible", "Invisible": "Invisible", "Invitation": "Invitation",