Skip to content

Commit 8088b72

Browse files
erikjanwestendorpmikecp
authored andcommitted
localize webhook edit view
1 parent 2e61d64 commit 8088b72

File tree

4 files changed

+35
-13
lines changed

4 files changed

+35
-13
lines changed

src/Umbraco.Core/EmbeddedResources/Lang/en.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,14 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
20112011
<key alias="types">Types</key>
20122012
<key alias="webhookKey">Webhook key</key>
20132013
<key alias="retryCount">Retry count</key>
2014+
<key alias="urlDescription">The url to call when the webhook is triggered.</key>
2015+
<key alias="eventDescription">The events for which the webhook should be triggered.</key>
2016+
<key alias="contentTypeDescription">Only trigger the webhook for a specific content type.</key>
2017+
<key alias="enabledDescription">Is the webhook enabled?</key>
2018+
<key alias="headersDescription">Custom headers to include in the webhook request.</key>
2019+
<key alias="contentType">Content Type</key>
2020+
<key alias="headers">Headers</key>
2021+
<key alias="selectEventFirst">Please select an event first.</key>
20142022
</area>
20152023
<area alias="languages">
20162024
<key alias="addLanguage">Add language</key>

src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,6 +2032,14 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
20322032
<key alias="types">Types</key>
20332033
<key alias="webhookKey">Webhook key</key>
20342034
<key alias="retryCount">Retry count</key>
2035+
<key alias="urlDescription">The url to call when the webhook is triggered.</key>
2036+
<key alias="eventDescription">The events for which the webhook should be triggered.</key>
2037+
<key alias="contentTypeDescription">Only trigger the webhook for a specific content type.</key>
2038+
<key alias="enabledDescription">Is the webhook enabled?</key>
2039+
<key alias="headersDescription">Custom headers to include in the webhook request.</key>
2040+
<key alias="contentType">Content Type</key>
2041+
<key alias="headers">Headers</key>
2042+
<key alias="selectEventFirst">Please select an event first.</key>
20352043
</area>
20362044
<area alias="languages">
20372045
<key alias="addLanguage">Add language</key>

src/Umbraco.Web.UI.Client/src/views/webhooks/edit.controller.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@
3333
"treeHeaders_webhooks",
3434
"webhooks_addWebhook",
3535
"defaultdialogs_confirmSure",
36-
"defaultdialogs_editWebhook"
36+
"defaultdialogs_editWebhook",
37+
"webhooks_selectEventFirst",
38+
"general_name",
39+
"general_value"
3740
]).then(function (values) {
3841
vm.labels.webhooks = values[0];
3942
vm.labels.addWebhook = values[1];
4043
vm.labels.areYouSure = values[2];
4144
vm.labels.editWebhook = values[3];
45+
vm.labels.selectEventFirst = values[4];
46+
vm.labels.headerName = values[5];
47+
vm.labels.headerValue = values[6];
4248

4349
if ($routeParams.create) {
4450
vm.isNew = true;

src/Umbraco.Web.UI.Client/src/views/webhooks/edit.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<umb-box-content>
2727

2828
<umb-control-group
29-
label="Url"
30-
description="The url to call when the webhook is triggered."
29+
label="@webhooks_url"
30+
description="@webhooks_urlDescription"
3131
alias="webhookUrl"
3232
required="true">
3333

@@ -45,8 +45,8 @@
4545
</umb-control-group>
4646

4747
<umb-control-group
48-
label="Events"
49-
description="The events for which the webhook should be triggered."
48+
label="@webhooks_events"
49+
description="@webhooks_eventDescription"
5050
alias="webhookEvents"
5151
required="true">
5252

@@ -70,8 +70,8 @@
7070
</umb-control-group>
7171

7272
<umb-control-group
73-
label="Content Type"
74-
description="Only trigger the webhook for a specific content type."
73+
label="@webhooks_contentType"
74+
description="@webhooks_contentTypeDescription"
7575
alias="webhookContentType">
7676

7777
<umb-node-preview
@@ -94,30 +94,30 @@
9494
<localize key="general_add">Add</localize>
9595
</span>
9696
<span ng-if="!vm.webhook.events || vm.webhook.events.length === 0">
97-
Please select an event first.
97+
{{vm.labels.selectEventFirst}}
9898
</span>
9999
</button>
100100

101101
</umb-control-group>
102102

103-
<umb-control-group label="Enabled" description="Is the webhook enabled?" alias="webhookEnabled">
103+
<umb-control-group label="@webhooks_enabled" description="@webhooks_enabledDescription" alias="webhookEnabled">
104104
<umb-toggle
105105
checked="vm.webhook.enabled"
106106
on-click="vm.webhook.enabled = !vm.webhook.enabled">
107107
</umb-toggle>
108108
</umb-control-group>
109109

110110
<umb-control-group
111-
label="Headers"
112-
description="Custom headers to include in the webhook request."
111+
label="@webhooks_headers"
112+
description="@webhooks_headersDescription"
113113
alias="webhookHeaders">
114114

115115
<div class="umb-property-editor--limit-width">
116116
<table class="table table-hover">
117117
<thead>
118118
<tr>
119-
<th>Name</th>
120-
<th>Value</th>
119+
<th>{{vm.labels.headerName}}</th>
120+
<th>{{vm.labels.headerValue}}</th>
121121
</tr>
122122
</thead>
123123
<tbody>

0 commit comments

Comments
 (0)