Skip to content

Commit

Permalink
added translations
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Kumar <[email protected]>
  • Loading branch information
abhinavkrin committed Feb 13, 2025
1 parent 2b17839 commit 1524abc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
18 changes: 11 additions & 7 deletions apps/meteor/ee/server/apps/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 Marketplace > Installed to review.';
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 }) => {
Expand All @@ -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,
},
Expand All @@ -64,10 +64,14 @@ const notifyAdminsAboutRenewedApps = async function _notifyAdminsAboutRenewedApp
return;
}

const rocketCatMessage = 'There is one or more disabled apps with valid licenses. Go to Marketplace > Installed 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' }),
}),
}),
});
};

Expand Down
3 changes: 3 additions & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 1524abc

Please sign in to comment.