Skip to content

Commit

Permalink
Merge pull request #13259 from mollux/fix-typos-in-dsn
Browse files Browse the repository at this point in the history
Fix incorrect occurrences of dns where it should be dsn
  • Loading branch information
escopecz committed Jan 25, 2024
2 parents c08052b + 366ab0c commit 1cb9d1f
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions app/bundles/ConfigBundle/Assets/js/config.js
Expand Up @@ -75,7 +75,7 @@ Mautic.resetEmailsToNotification = function(obj) {
}
};

Mautic.configDnsTestExecute = function(element, action, key) {
Mautic.configDsnTestExecute = function(element, action, key) {
const $button = mQuery(element),
$container = $button.closest('.config-dsn-container');

Expand All @@ -90,7 +90,7 @@ Mautic.configDnsTestExecute = function(element, action, key) {
});
};

Mautic.configDnsTestDisable = function(element) {
Mautic.configDsnTestDisable = function(element) {
const $container = mQuery(element).closest('.config-dsn-container');

$container.find('.help-block .status-msg').html('');
Expand Down
6 changes: 3 additions & 3 deletions app/bundles/ConfigBundle/Form/Type/DsnType.php
Expand Up @@ -34,7 +34,7 @@ public function __construct(
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$name = $builder->getName();
$onChange = 'Mautic.configDnsTestDisable(this)';
$onChange = 'Mautic.configDsnTestDisable(this)';
$attr = [
'class' => 'form-control',
'onchange' => $onChange,
Expand Down Expand Up @@ -125,7 +125,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'required' => false,
'attr' => [
'class' => 'btn btn-info config-dsn-test-button',
'onclick' => sprintf('Mautic.configDnsTestExecute(this, "%s", "%s")', $options['test_button']['action'], $name),
'onclick' => sprintf('Mautic.configDsnTestExecute(this, "%s", "%s")', $options['test_button']['action'], $name),
],
]
);
Expand Down Expand Up @@ -153,7 +153,7 @@ public function configureOptions(OptionsResolver $resolver): void
*/
public function finishView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['currentDns'] = $this->getCurrentDsn($form->getName());
$view->vars['currentDsn'] = $this->getCurrentDsn($form->getName());
}

private function getCurrentDsn(string $name): ?Dsn
Expand Down
Expand Up @@ -34,7 +34,7 @@
<div class="form-group">
<div class="form-control-static ml-10">
<span class="text-muted">{{ 'mautic.config.dsn.using_current_dsn'|trans }}:</span>
<code>{{ form.vars.currentDns|default('n/a') }}</code>
<code>{{ form.vars.currentDsn|default('n/a') }}</code>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/EmailBundle/Assets/js/config.js
Expand Up @@ -64,5 +64,5 @@ Mautic.testMonitoredEmailServerConnection = function(mailbox) {
};

Mautic.disableSendTestEmailButton = function(element) {
mQuery(element).closest('.tab-pane').find('.config-dsn-test-container').each(function () {Mautic.configDnsTestDisable(this)});
mQuery(element).closest('.tab-pane').find('.config-dsn-test-container').each(function () {Mautic.configDsnTestDisable(this)});
};
2 changes: 1 addition & 1 deletion app/bundles/MessengerBundle/Controller/AjaxController.php
Expand Up @@ -32,7 +32,7 @@ public function sendTestMessageAction(
$bus->dispatch($message);
} catch (\Throwable $e) {
$data['success'] = 0;
$data['message'] = $this->translator->trans('mautic.messenger.config.dns.test_message_failed', ['%message%' => $e->getMessage()]);
$data['message'] = $this->translator->trans('mautic.messenger.config.dsn.test_message_failed', ['%message%' => $e->getMessage()]);
}

return $this->sendJsonResponse($data);
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/MessengerBundle/Form/Type/ConfigType.php
Expand Up @@ -22,7 +22,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$testButton = [
'action' => 'messenger:sendTestMessage',
'label' => $this->translator->trans('mautic.messenger.config.dns.send_test_message'),
'label' => $this->translator->trans('mautic.messenger.config.dsn.send_test_message'),
];

$builder->add(
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/MessengerBundle/MessageHandler/TestHandler.php
Expand Up @@ -53,7 +53,7 @@ public function handleFailed(TestFailed $message): void
private function sendNotification(int $userId, string $type): void
{
$this->notificationModel->addNotification(
$this->translator->trans('mautic.messenger.config.dns.test_message_processed', ['%type%' => $type]),
$this->translator->trans('mautic.messenger.config.dsn.test_message_processed', ['%type%' => $type]),
null,
false,
null,
Expand Down
@@ -1,12 +1,12 @@
{% block _config_messengerconfig_widget %}

<div class="alert alert-info" role="alert">
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#transport-configuration' } %}mautic.messenger.config.dns_help_general{% endtrans %}
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#transport-configuration' } %}mautic.messenger.config.dsn_help_general{% endtrans %}
</div>

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{{ 'mautic.messenger.config.dns_email'|trans }}</h3>
<h3 class="panel-title">{{ 'mautic.messenger.config.dsn_email'|trans }}</h3>
</div>
<div class="panel-body">
{{ form_row(form.messenger_dsn_email) }}
Expand All @@ -15,15 +15,15 @@

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{{ 'mautic.messenger.config.dns_hit'|trans }}</h3>
<h3 class="panel-title">{{ 'mautic.messenger.config.dsn_hit'|trans }}</h3>
</div>
<div class="panel-body">
{{ form_row(form.messenger_dsn_hit) }}
</div>
</div>

<div class="alert alert-info" role="alert">
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#retries-failures' } %}mautic.messenger.config.dns_help_retry_strategy{% endtrans %}
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#retries-failures' } %}mautic.messenger.config.dsn_help_retry_strategy{% endtrans %}
</div>

<div class="panel panel-primary">
Expand All @@ -49,12 +49,12 @@
</div>

<div class="alert alert-info" role="alert">
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#saving-retrying-failed-messages' } %}mautic.messenger.config.dns_help_failed{% endtrans %}
{% trans with {'%link%': 'https://symfony.com/doc/5.4/messenger.html#saving-retrying-failed-messages' } %}mautic.messenger.config.dsn_help_failed{% endtrans %}
</div>

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{{ 'mautic.messenger.config.dns_failed'|trans }}</h3>
<h3 class="panel-title">{{ 'mautic.messenger.config.dsn_failed'|trans }}</h3>
</div>
<div class="panel-body">
{{ form_row(form.messenger_dsn_failed) }}
Expand Down
18 changes: 9 additions & 9 deletions app/bundles/MessengerBundle/Translations/en_US/messages.ini
Expand Up @@ -4,12 +4,12 @@ mautic.messenger.config.retry_strategy.max_retries="Max retries"
mautic.messenger.config.retry_strategy.delay="Delay"
mautic.messenger.config.retry_strategy.multiplier="Multiplier"
mautic.messenger.config.retry_strategy.max_delay="Max delay"
mautic.messenger.config.dns_help_general="Queuing is not enabled by default (scheme is set to 'sync'). If you want to start using a queue, please follow the documentation at <a href="%link%">%link%</a>."
mautic.messenger.config.dns_help_retry_strategy="When the processing of a message fails, the message is sent back to the queue for another try. You can adjust this behaviour in the following section. See the documentation on <a href="%link%">%link%</a> for more details."
mautic.messenger.config.dns_help_failed="If a message fails all its retries, it's discarded by default. To avoid this happening, you can optionally configure a queue for failures. For more details see the documentation on <a href="%link%">%link%</a>."
mautic.messenger.config.dns_email="Queue for email (SMS and push messages)"
mautic.messenger.config.dns_hit="Queue for hits (page and email)"
mautic.messenger.config.dns_failed="Queue for failures"
mautic.messenger.config.dns.send_test_message="Send test message"
mautic.messenger.config.dns.test_message_failed="The test message could not be sent due to the following error: '"%message%"'."
mautic.messenger.config.dns.test_message_processed="The test message for DSN '"%type%"' was successfully processed."
mautic.messenger.config.dsn_help_general="Queuing is not enabled by default (scheme is set to 'sync'). If you want to start using a queue, please follow the documentation at <a href="%link%">%link%</a>."
mautic.messenger.config.dsn_help_retry_strategy="When the processing of a message fails, the message is sent back to the queue for another try. You can adjust this behaviour in the following section. See the documentation on <a href="%link%">%link%</a> for more details."
mautic.messenger.config.dsn_help_failed="If a message fails all its retries, it's discarded by default. To avoid this happening, you can optionally configure a queue for failures. For more details see the documentation on <a href="%link%">%link%</a>."
mautic.messenger.config.dsn_email="Queue for email (SMS and push messages)"
mautic.messenger.config.dsn_hit="Queue for hits (page and email)"
mautic.messenger.config.dsn_failed="Queue for failures"
mautic.messenger.config.dsn.send_test_message="Send test message"
mautic.messenger.config.dsn.test_message_failed="The test message could not be sent due to the following error: '"%message%"'."
mautic.messenger.config.dsn.test_message_processed="The test message for DSN '"%type%"' was successfully processed."

0 comments on commit 1cb9d1f

Please sign in to comment.