Skip to content

Commit

Permalink
fix: add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbrink committed Dec 6, 2023
1 parent e50b6f1 commit b209e8b
Show file tree
Hide file tree
Showing 7 changed files with 298 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,9 @@ wp-content
.devcontainer/wp-config-local.php

# .vscode settings
!.vscode
!.vscode

# Translation backup files
*.po~
*.mo~
*.pot~
Binary file added languages/webhooks-manager-sv_SE.mo
Binary file not shown.
150 changes: 150 additions & 0 deletions languages/webhooks-manager-sv_SE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
msgid ""
msgstr ""
"Project-Id-Version: Webhooks Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-06 09:36+0000\n"
"PO-Revision-Date: 2023-12-06 10:08+0000\n"
"Last-Translator: \n"
"Language-Team: Svenska\n"
"Language: sv_SE\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.6.6; wp-6.4.1\n"
"X-Domain: webhooks-manager"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:78
msgid "Action"
msgstr "Action"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:103
msgid "Action Priority"
msgstr "Action Prioritet"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:161
msgid "Active"
msgstr "Aktiv"

#. Description of the plugin
msgid "Create and manage webhooks from WordPress action hooks"
msgstr "Skapa och hantera webhooks från WordPress action hooks"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:189
msgid "Header"
msgstr "Header"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:168
msgid "Headers"
msgstr "Headers"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:53
msgid "HTTP Method"
msgstr "HTTP-metod"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:57
msgid "HTTP method used when making the request to the given payload url."
msgstr "HTTP-metod som används när begäran görs till den angivna url:en."

#. Author URI of the plugin
msgid "https://github.com/helsingborg-stad"
msgstr "https://github.com/helsingborg-stad"

#. URI of the plugin
msgid "https://github.com/helsingborg-stad/webhooks-manager"
msgstr "https://github.com/helsingborg-stad/webhooks-manager"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:48
msgid "https://my.client.site/api/$1"
msgstr "https://my.client.site/api/$1"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:162
msgid "Inactive"
msgstr "Inaktiv"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:29
#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:184
msgid "Lägg till rad"
msgstr "Lägg till rad"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:34
msgid "Payload URL"
msgstr "URL för anrop"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:67
msgid "POST"
msgstr "POST"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:107
msgid "Priority passed to add_action for the selected action hook."
msgstr "Prioritet som skickas till add_action för din valda webhook."

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:126
msgid "Send payload"
msgstr "Skicka anrop"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:147
msgid "Status"
msgstr "Status"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:38
msgid ""
"Target url used for the request made when the selected hook is fired. The "
"url can contain placeholders that will be replaced with hook arguments "
"before request is sent. Placeholder format is the \"$\" character followed "
"by the index of the hooks parameter. E.g. to use the first parameter in the "
"hook, the placeholder should be \"$1\".\n"
"Note that only hook arguments of type string or int can be used by "
"placeholders, all other will be omitted."
msgstr ""
"Url som används för anrop som görs när den valda webhooken körs. Url:en kan "
"innehålla platshållare som erstätts med hook-argument innan begäran skickas. "
"Platshållarens format är tecknet \"$\" följt av index för parametern i "
"hooken. Om du t.ex. vill använda den första parametern i hooken ska "
"platshållaren vara \"$1\".\n"
"Observera att endast hook-argument av typen string eller int kan användas av "
"platshållare, alla andra utelämnas."

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:172
msgid ""
"This field allows you to define multiple HTTP headers for your requests. "
"Each row represents a single header, and you should enter both the header "
"name and its corresponding value in the same row. Use the \"Add Row\" button "
"to create additional headers as needed. For example, to include an "
"\"Authorization: Basic 123\" header, add a row with \"Authorization: Basic "
"123\" in the field."
msgstr ""
"I detta fält kan du definiera flera HTTP-headers för dina anrop. Varje rad "
"representerar en enskild header, och du bör ange både headernamnet och dess "
"motsvarande värde på samma rad. Använd knappen \"Lägg till rad\" för att "
"skapa ytterligare headers efter behov. Om du till exempel vill inkludera en "
"\"Authorization: Basic 123\" lägger du till en rad med \"Authorization: "
"Basic 123\" i fältet."

#. Author of the plugin
msgid "Thor Brink @ Helsingborg Stad"
msgstr "Thor Brink @ Helsingborg Stad"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:8
#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:12
msgid "Webhooks"
msgstr "Webhooks"

#. Name of the plugin
#: workspaces/webhooks-manager/source/php/SettingsPage.php:23
#: workspaces/webhooks-manager/source/php/SettingsPage.php:24
msgid "Webhooks Manager"
msgstr "Webhooks Manager"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:130
msgid ""
"Wether to send the data passed to the selected action hook in the request to "
"the payload ur or not."
msgstr ""
"Om de data som skickas till vald action hook ska skickas med i anropet eller "
"ej."

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:82
msgid "WordPress hook that determines when to fire the webhook."
msgstr "WordPress-hook som avgör när webhooken ska skickas."
3 changes: 1 addition & 2 deletions source/php/AcfFields/json/webhooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"name": "headers",
"aria-label": "",
"type": "repeater",
"instructions": "Description: This field allows you to define multiple HTTP headers for your requests. Each row represents a single header, and you should enter both the header name and its corresponding value in the same row. Use the \"Add Row\" button to create additional headers as needed. For example, to include an \"Authorization: Basic 123\" header, add a row with \"Authorization: Basic 123\" in the field.",
"instructions": "This field allows you to define multiple HTTP headers for your requests. Each row represents a single header, and you should enter both the header name and its corresponding value in the same row. Use the \"Add Row\" button to create additional headers as needed. For example, to include an \"Authorization: Basic 123\" header, add a row with \"Authorization: Basic 123\" in the field.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
Expand All @@ -170,7 +170,6 @@
"id": ""
},
"layout": "table",
"pagination": 0,
"min": 0,
"max": 0,
"collapsed": "",
Expand Down
3 changes: 1 addition & 2 deletions source/php/AcfFields/php/webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
'name' => 'headers',
'aria-label' => '',
'type' => 'repeater',
'instructions' => __('Description: This field allows you to define multiple HTTP headers for your requests. Each row represents a single header, and you should enter both the header name and its corresponding value in the same row. Use the "Add Row" button to create additional headers as needed. For example, to include an "Authorization: Basic 123" header, add a row with "Authorization: Basic 123" in the field.', 'webhooks-manager'),
'instructions' => __('This field allows you to define multiple HTTP headers for your requests. Each row represents a single header, and you should enter both the header name and its corresponding value in the same row. Use the "Add Row" button to create additional headers as needed. For example, to include an "Authorization: Basic 123" header, add a row with "Authorization: Basic 123" in the field.', 'webhooks-manager'),
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
Expand All @@ -176,7 +176,6 @@
'id' => '',
),
'layout' => 'table',
'pagination' => 0,
'min' => 0,
'max' => 0,
'collapsed' => '',
Expand Down
8 changes: 4 additions & 4 deletions webhooks-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
$acfExportManager->import();
});

// Start application
$plugin = new WebhooksManager\Plugin();
$plugin->initialize();

add_action('plugins_loaded', function () {
load_plugin_textdomain('webhooks-manager', false, dirname(plugin_basename(__FILE__)) . '/languages');
});

// Start application
$plugin = new WebhooksManager\Plugin();
$plugin->initialize();
136 changes: 136 additions & 0 deletions webhooks-manager.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Webhooks Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-06 10:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n"
"Language: \n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/\n"
"X-Loco-Version: 2.6.6; wp-6.4.1\n"
"X-Domain: webhooks-manager"

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:78
msgid "Action"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:103
msgid "Action Priority"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:161
msgid "Active"
msgstr ""

#. Description of the plugin
msgid "Create and manage webhooks from WordPress action hooks"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:189
msgid "Header"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:168
msgid "Headers"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:53
msgid "HTTP Method"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:57
msgid "HTTP method used when making the request to the given payload url."
msgstr ""

#. Author URI of the plugin
msgid "https://github.com/helsingborg-stad"
msgstr ""

#. URI of the plugin
msgid "https://github.com/helsingborg-stad/webhooks-manager"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:48
msgid "https://my.client.site/api/$1"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:162
msgid "Inactive"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:29
#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:184
msgid "Lägg till rad"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:34
msgid "Payload URL"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:67
msgid "POST"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:107
msgid "Priority passed to add_action for the selected action hook."
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:126
msgid "Send payload"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:147
msgid "Status"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:38
msgid ""
"Target url used for the request made when the selected hook is fired. The "
"url can contain placeholders that will be replaced with hook arguments "
"before request is sent. Placeholder format is the \"$\" character followed "
"by the index of the hooks parameter. E.g. to use the first parameter in the "
"hook, the placeholder should be \"$1\".\n"
"Note that only hook arguments of type string or int can be used by "
"placeholders, all other will be omitted."
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:172
msgid ""
"This field allows you to define multiple HTTP headers for your requests. "
"Each row represents a single header, and you should enter both the header "
"name and its corresponding value in the same row. Use the \"Add Row\" button "
"to create additional headers as needed. For example, to include an "
"\"Authorization: Basic 123\" header, add a row with \"Authorization: Basic "
"123\" in the field."
msgstr ""

#. Author of the plugin
msgid "Thor Brink @ Helsingborg Stad"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:8
#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:12
msgid "Webhooks"
msgstr ""

#. Name of the plugin
#: workspaces/webhooks-manager/source/php/SettingsPage.php:23
#: workspaces/webhooks-manager/source/php/SettingsPage.php:24
msgid "Webhooks Manager"
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:130
msgid ""
"Wether to send the data passed to the selected action hook in the request to "
"the payload ur or not."
msgstr ""

#: workspaces/webhooks-manager/source/php/AcfFields/php/webhooks.php:82
msgid "WordPress hook that determines when to fire the webhook."
msgstr ""

0 comments on commit b209e8b

Please sign in to comment.