From f72d72a28a8c4565d2d6755db4af36331ed0e86c Mon Sep 17 00:00:00 2001 From: John Oleksowicz Date: Tue, 19 Apr 2022 11:21:59 -0500 Subject: [PATCH] Remove quotes from find/replace strings These quotes were causing issues with translations where quote styles are changed to anything other than double quotes. This was affecting at least German and French translations. Because the translations get applied before the search/replace, changing to something other than standard double quotes meant that the search string would never be found, leaving the characters %1$s in the UI. [MAILPOET-4185] --- mailpoet/assets/js/src/newsletters/listings/welcome.jsx | 4 ++-- mailpoet/views/newsletters.html | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mailpoet/assets/js/src/newsletters/listings/welcome.jsx b/mailpoet/assets/js/src/newsletters/listings/welcome.jsx index 0d514fb3b5..658cd93518 100644 --- a/mailpoet/assets/js/src/newsletters/listings/welcome.jsx +++ b/mailpoet/assets/js/src/newsletters/listings/welcome.jsx @@ -248,7 +248,7 @@ class NewsletterListWelcomeComponent extends Component { } else { sendingEvent = ReactStringReplace( MailPoet.I18n.t('welcomeEventWPUserWithRole'), - '"%1$s"', + '%1$s', (match, i) => ( {mailpoetRoles[newsletter.options.role]} @@ -278,7 +278,7 @@ class NewsletterListWelcomeComponent extends Component { sendingEvent = ReactStringReplace( MailPoet.I18n.t('welcomeEventSegment'), - '"%1$s"', + '%1$s', (match, i) => ( {segment.name} diff --git a/mailpoet/views/newsletters.html b/mailpoet/views/newsletters.html index 52f95497d7..49837d79b4 100644 --- a/mailpoet/views/newsletters.html +++ b/mailpoet/views/newsletters.html @@ -311,11 +311,9 @@ 'reEngagementEmailActivationFailed': __('Your ReEngagement Email could not be activated, please check the settings.'), 'postNotificationActivated': __('Your post notification is now active!'), 'postNotificationActivationFailed': __('Your Post Notification could not be activated, check the settings.'), - 'welcomeEventSegment': __('Sent when someone subscribes to the list: "%1$s".'), - 'welcomeEventSegment_new': __('Sent when someone subscribes to the list: %1$s.'), + 'welcomeEventSegment': __('Sent when someone subscribes to the list: %1$s.'), 'welcomeEventWPUserAnyRole': __('Sent when a new WordPress user is added to your site.'), - 'welcomeEventWPUserWithRole': __('Sent when a new WordPress user with the role "%1$s" is added to your site.'), - 'welcomeEventWPUserWithRole_new': __('Sent when a new WordPress user with the role %1$s is added to your site.'), + 'welcomeEventWPUserWithRole': __('Sent when a new WordPress user with the role %1$s is added to your site.'), 'sendingDelayMinutes': __('%1$d minute(s) later'), 'sendingDelayHours': __('%1$d hour(s) later'), 'sendingDelayDays': __('%1$d day(s) later'),