Update the notice message to fix consistency

MAILPOET-6022
This commit is contained in:
Oluwaseun Olorunsola
2024-06-06 16:06:03 +01:00
committed by Aschepikov
parent f877918c19
commit 070fd30b6e
2 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import { useState, useCallback } from 'react';
import { createInterpolateElement } from '@wordpress/element';
import { sprintf, __ } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
export const useNotices = () => {
const [state, setState] = useState({
@ -67,15 +67,12 @@ export const useNotices = () => {
<p key={err.message}>
{err.error === 'reinstall_plugin'
? createInterpolateElement(
sprintf(
__(
'The plugin has encountered an unexpected error. Please reload the page. If that does not help, re-install the MailPoet Plugin. See: %s for more information',
'The plugin has encountered an unexpected error. Please reload the page. If that does not help, <link>re-install the MailPoet Plugin.</link>',
'mailpoet',
),
'<a> https://kb.mailpoet.com/article/258-re-installing-updating-the-plugin-via-ftp </a>',
),
{
a: (
link: (
<a
aria-label={err.error}
href="https://kb.mailpoet.com/article/258-re-installing-updating-the-plugin-via-ftp"

View File

@ -274,7 +274,7 @@ class API {
];
if ($errorType === Error::BAD_REQUEST) {
$mpReinstallErrorMessage = __('The plugin has encountered an unexpected error. Please reload the page. If that does not help, re-install the MailPoet Plugin. See: [link] https://kb.mailpoet.com/article/258-re-installing-updating-the-plugin-via-ftp [/link] for more information', 'mailpoet');
$mpReinstallErrorMessage = __('The plugin has encountered an unexpected error. Please reload the page. If that does not help, [link]re-install the MailPoet Plugin.[/link]', 'mailpoet');
$mpReinstallErrorMessage = Helpers::replaceLinkTags(
$mpReinstallErrorMessage,
'https://kb.mailpoet.com/article/258-re-installing-updating-the-plugin-via-ftp',