Skip to content

Commit 1d89c98

Browse files
committed
Fix translation category and message params
1 parent f590692 commit 1d89c98

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Webhook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function(string $attribute, array $params = null, Validator $validator) {
118118
}
119119
}
120120
if (!$foundEvent) {
121-
$validator->addError($this, $attribute, Craft::t('webhooks', "Class {$this->class} doesn’t appear to have a {value} event."));
121+
$validator->addError($this, $attribute, Craft::t('webhooks', 'Class {class} doesn’t appear to have a {value} event.', ['class' => $this->class]));
122122
}
123123
}
124124
}

src/controllers/WebhooksController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function actionEdit(int $id = null, int $groupId = null, Webhook $webhook
7878

7979
// Groups
8080
$groupOptions = [
81-
['value' => null, 'label' => '(Ungrouped)']
81+
['value' => null, 'label' => Craft::t('webhooks', '(Ungrouped)')]
8282
];
8383

8484
foreach ($manager->getAllGroups() as $group) {

src/templates/_edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
{% endif %}
150150

151151
{{ forms.lightswitchField({
152-
label: 'Enabled',
152+
label: 'Enabled'|t('webhooks'),
153153
id: 'enabled',
154154
name: 'enabled',
155155
on: webhook.enabled

src/templates/_index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
{% block actionButton %}
88
{% set newWebhookUrl = url('webhooks/new', (groupId is defined ? { groupId: groupId } : null)) %}
9-
<a href="{{ newWebhookUrl }}" class="submit btn add icon">{{ "New webhook"|t('app') }}</a>
9+
<a href="{{ newWebhookUrl }}" class="submit btn add icon">{{ "New webhook"|t('webhooks') }}</a>
1010
{% endblock %}
1111

1212
{% block sidebar %}
1313
<nav>
1414
<ul id="groups">
15-
<li><a href="{{ url('webhooks') }}"{% if not groupId %} class="sel"{% endif %}>{{ 'Ungrouped'|t('app') }}</a></li>
15+
<li><a href="{{ url('webhooks') }}"{% if not groupId %} class="sel"{% endif %}>{{ 'Ungrouped'|t('webhooks') }}</a></li>
1616
{% for group in groups %}
1717
<li><a href="{{ url('webhooks/group/'~group.id) }}"{% if groupId is defined and group.id == groupId %} class="sel"{% endif %} data-id="{{ group.id }}">{{ group.name|t('site') }}</a></li>
1818
{% endfor %}

0 commit comments

Comments
 (0)