From 687b83ed399097ef3915e68afc08753b3a6394a6 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Wed, 30 Oct 2024 20:32:45 +0000 Subject: [PATCH] Update EmailRenderer.js --- ghost/email-service/lib/EmailRenderer.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ghost/email-service/lib/EmailRenderer.js b/ghost/email-service/lib/EmailRenderer.js index aba30e3250..79c1efcb90 100644 --- a/ghost/email-service/lib/EmailRenderer.js +++ b/ghost/email-service/lib/EmailRenderer.js @@ -12,15 +12,18 @@ const {EmailAddressParser} = require('@tryghost/email-addresses'); const {registerHelpers} = require('./helpers/register-helpers'); const crypto = require('crypto'); +// Wrapper function so that i18next-parser can find these strings +const t = (x) => return x; + const messages = { subscriptionStatus: { - free: '', - expired: 'Your subscription has expired.', - canceled: 'Your subscription has been canceled and will expire on {date}. You can resume your subscription via your account settings.', - active: 'Your subscription will renew on {date}.', - trial: 'Your free trial ends on {date}, at which time you will be charged the regular price. You can always cancel before then.', - complimentaryExpires: 'Your subscription will expire on {date}.', - complimentaryInfinite: '' + free: t(''), + expired: t('Your subscription has expired.'), + canceled: t('Your subscription has been canceled and will expire on {date}. You can resume your subscription via your account settings.'), + active: t('Your subscription will renew on {date}.'), + trial: t('Your free trial ends on {date}, at which time you will be charged the regular price. You can always cancel before then.'), + complimentaryExpires: t('Your subscription will expire on {date}.'), + complimentaryInfinite: t('') } };