Fix WordPress.WP.I18n.MissingArgDomain
[MAILPOET-4524]
This commit is contained in:
@@ -106,8 +106,9 @@ class Settings {
|
||||
if (isset($_GET['enable-customizer-notice'])) {
|
||||
$notice = new WPNotice(WPNotice::TYPE_ERROR, _x(
|
||||
'You need to have WooCommerce active to access the MailPoet email customizer for WooCommerce.',
|
||||
'Notice in Settings when WooCommerce is not enabled'
|
||||
), 'mailpoet');
|
||||
'Notice in Settings when WooCommerce is not enabled',
|
||||
'mailpoet'
|
||||
));
|
||||
$notice->displayWPNotice();
|
||||
}
|
||||
$this->pageRenderer->displayPage('settings.html', $data);
|
||||
|
@@ -27,7 +27,7 @@ class SegmentSubscribedTrigger implements Trigger {
|
||||
}
|
||||
|
||||
public function getName(): string {
|
||||
return __('Subscribed to segment');
|
||||
return __('Subscribed to segment', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getArgsSchema(): ObjectSchema {
|
||||
|
@@ -103,7 +103,7 @@ class Renderer {
|
||||
} catch (\RuntimeException $e) {
|
||||
throw new \Exception(sprintf(
|
||||
// translators: %1$s is the name of the render, %2$s the folder path, %3$s the error message.
|
||||
__('Failed to render template "%1$s". Please ensure the template cache folder "%2$s" exists and has write permissions. Terminated with error: "%3$s"'),
|
||||
__('Failed to render template "%1$s". Please ensure the template cache folder "%2$s" exists and has write permissions. Terminated with error: "%3$s"', 'mailpoet'),
|
||||
$template,
|
||||
$this->cachePath,
|
||||
$e->getMessage()
|
||||
|
@@ -75,7 +75,7 @@ class Migration extends SimpleWorker {
|
||||
$mailerLog = MailerLog::setError(
|
||||
$mailerLog,
|
||||
'migration',
|
||||
__('Your sending queue data is being migrated to allow better performance, sending is paused while the migration is in progress and will resume automatically upon completion. This may take a few minutes.')
|
||||
__('Your sending queue data is being migrated to allow better performance, sending is paused while the migration is in progress and will resume automatically upon completion. This may take a few minutes.', 'mailpoet')
|
||||
);
|
||||
return MailerLog::pauseSending($mailerLog);
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ class Widget extends \WP_Widget {
|
||||
// Select the first one from the list if none selected
|
||||
if ($selectedForm === 0 && !empty($forms)) $selectedForm = $forms[0]->getId();
|
||||
foreach ($forms as $form) {
|
||||
$formName = $form->getName() ? $this->wp->escHtml($form->getName()) : '(' . _x('no name', 'fallback for forms without a name in a form list') . ')';
|
||||
$formName = $form->getName() ? $this->wp->escHtml($form->getName()) : '(' . _x('no name', 'fallback for forms without a name in a form list', 'mailpoet') . ')';
|
||||
$formName .= $form->getStatus() === FormEntity::STATUS_DISABLED ? ' (' . __('inactive', 'mailpoet') . ')' : '';
|
||||
?>
|
||||
<option value="<?php echo esc_attr((string)$form->getId()); ?>" <?php echo ($selectedForm === $form->getId()) ? 'selected="selected"' : ''; ?>><?php echo esc_html($formName); ?></option>
|
||||
|
@@ -158,7 +158,7 @@ class Newsletter extends Model {
|
||||
if (!$this->body || empty(json_decode($this->getBodyString()))) {
|
||||
$this->setError(
|
||||
Helpers::replaceLinkTags(
|
||||
__('This is an empty email without any content and it cannot be sent. Please update [link]the email[/link].'),
|
||||
__('This is an empty email without any content and it cannot be sent. Please update [link]the email[/link].', 'mailpoet'),
|
||||
'admin.php?page=mailpoet-newsletter-editor&id=' . $this->id
|
||||
)
|
||||
);
|
||||
|
@@ -32,7 +32,7 @@ class AutomationEmailScheduler {
|
||||
if ($email->getType() !== NewsletterEntity::TYPE_AUTOMATION) {
|
||||
throw InvalidStateException::create()->withMessage(
|
||||
// translators: %s is the type which was given.
|
||||
sprintf(__("Email with type 'automation' expected, '%s' given."), $email->getType())
|
||||
sprintf(__("Email with type 'automation' expected, '%s' given.", 'mailpoet'), $email->getType())
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -207,7 +207,7 @@ class API {
|
||||
|
||||
$errorResponseData = json_decode($errorBody, true);
|
||||
// translators: %d is the error code.
|
||||
$fallbackError = sprintf(__('An error has happened while performing a request, the server has responded with response code %d'), $code);
|
||||
$fallbackError = sprintf(__('An error has happened while performing a request, the server has responded with response code %d', 'mailpoet'), $code);
|
||||
|
||||
$errorData = is_array($errorResponseData) && isset($errorResponseData['error']) ? $errorResponseData['error'] : $fallbackError;
|
||||
return ['error' => $errorData, 'status' => false];
|
||||
|
Reference in New Issue
Block a user