Skip to content

Commit

Permalink
Merge branch 'craft-4' of https://github.com/verbb/workflow into craft-5
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	composer.json
#	src/translations/en/workflow.php
#	src/translations/nb/workflow.php
  • Loading branch information
engram-design committed May 18, 2024
2 parents f8e3212 + 8ce4a13 commit 0cd886a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
- Now requires PHP `8.2.0+`.
- Now requires Craft `5.0.0+`.

## 2.0.10 - 2024-05-18

### Changed
- Update non-English translations.
- Update English translations.

### Fixed
- Fix an error when trying to resolve an entry from front-end submissions.

## 2.0.9 - 2024-03-04

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion src/controllers/ElementsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ private function _getEntryFromResponse($response, $siteId)
if ($redirectUrl) {
$urlParams = parse_url($redirectUrl);
$pathParts = explode('/', $urlParams['path']);
$elementId = end($pathParts);
$elementIdSlug = end($pathParts);
$elementId = explode('-', $elementIdSlug)[0] ?? null;
$queryParams = [];

foreach (explode('&', $urlParams['query']) as $urlParam) {
Expand Down
7 changes: 5 additions & 2 deletions src/translations/en/workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"Your entry {{ submission.ownerTitle }} has been published {{ review.dateCreated | date }} on {{ submission.ownerSite }}.\n\n" .
"View your entry by logging into your control panel.\n\n" .
"{{ submission.ownerCpUrl }}",

'Action #{num}' => 'Action #{num}',
'All submissions' => 'All submissions',
'Approve and publish' => 'Approve and publish',
Expand All @@ -55,6 +55,10 @@
'Entry' => 'Entry',
'Entry approved and published.' => 'Entry approved and published.',
'Entry submitted for approval.' => 'Entry submitted for approval.',
'Failed to send editor notification to {value} - “{message}” {file}:{line}' => 'Failed to send editor notification to {value} - “{message}” {file}:{line}',
'Failed to send published author notification to {value} - “{message}” {file}:{line}' => 'Failed to send published author notification to {value} - “{message}” {file}:{line}',
'Failed to send publisher notification to {value} - “{message}” {file}:{line}' => 'Failed to send publisher notification to {value} - “{message}” {file}:{line}',
'Failed to send reviewer notification to {value} - “{message}” {file}:{line}' => 'Failed to send reviewer notification to {value} - “{message}” {file}:{line}',
'Last Reviewed' => 'Last Reviewed',
'Last Reviewed By' => 'Last Reviewed By',
'No review exists with the ID “{id}”.' => 'No review exists with the ID “{id}”.',
Expand All @@ -78,7 +82,6 @@
'Select all, or specific publishers to receive email notifications. By default, all will be notified.' => 'Select all, or specific publishers to receive email notifications. By default, all will be notified.',
'Select a Publisher User Group first.' => 'Select a Publisher User Group first.',
'Set status' => 'Set status',
'Settings' => 'Settings',
'Site' => 'Site',
'Status' => 'Status',
'Statuses updated.' => 'Statuses updated.',
Expand Down
37 changes: 18 additions & 19 deletions src/translations/nb/workflow.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?php

return [
//
// Email Messages
//
//
// Email Messages
//
'workflow_publisher_notification_heading' => 'Når en skribent sender et utkast til godkjenning:',
'workflow_publisher_notification_subject' => '"{{ submission.owner.title }}" har blitt sendt inn for godkjenning på {{ siteName }}.',
'workflow_publisher_notification_body' => "Hei {{ user.friendlyName }},\n\n" .
"{{ submission.editor }} har sendt utkastet \"{{ submission.owner.title }}\" til godkjenning på {{ siteName }}.\n\n" .
"{% if submission.editorNotes %}Merknad: \"{{ submission.editorNotes }}\"\n\n{% endif %}" .
"For å gå gjennom det, vennligst logg inn i kontrollpanelet.\n\n" .
"{{ submission.cpEditUrl }}",

'workflow_publisher_notification_heading' => 'Når en skribent sender et utkast til godkjenning:',
'workflow_publisher_notification_subject' => '"{{ submission.owner.title }}" har blitt sendt inn for godkjenning på {{ siteName }}.',
'workflow_publisher_notification_body' => "Hei {{ user.friendlyName }},\n\n" .
"{{ submission.editor }} har sendt utkastet \"{{ submission.owner.title }}\" til godkjenning på {{ siteName }}.\n\n" .
"{% if submission.editorNotes %}Merknad: \"{{ submission.editorNotes }}\"\n\n{% endif %}" .
"For å gå gjennom det, vennligst logg inn i kontrollpanelet.\n\n" .
"{{ submission.getCpEditUrl() }}",

'workflow_editor_notification_heading' => 'Når en redaktør godkjenner eller avslår et utkast fra en skribent:',
'workflow_editor_notification_subject' => 'Ditt utkast til "{{ submission.owner.title }}" har blitt {{ submission.status }} på {{ siteName }}.',
'workflow_editor_notification_body' => "Hei {{ user.friendlyName }},\n\n" .
"Ditt utkast til {{ submission.owner.title }} har blitt {{ submission.status }} {{ (submission.status == 'approved') ? submission.dateApproved | date : submission.dateRejected | date }} på {{ siteName }}.\n\n" .
"{% if submission.publisherNotes %}Merknad: \"{{ submission.publisherNotes }}\"\n\n{% endif %}" .
"Se ditt utkast ved å logge inn i kontrollpanelet.\n\n" .
"{{ submission.getCpEditUrl() }}",
];
'workflow_editor_notification_heading' => 'Når en redaktør godkjenner eller avslår et utkast fra en skribent:',
'workflow_editor_notification_subject' => 'Ditt utkast til "{{ submission.owner.title }}" har blitt {{ submission.status }} på {{ siteName }}.',
'workflow_editor_notification_body' => "Hei {{ user.friendlyName }},\n\n" .
"Ditt utkast til {{ submission.owner.title }} har blitt {{ submission.status }} {{ (submission.status == 'approved') ? submission.dateApproved | date : submission.dateRejected | date }} på {{ siteName }}.\n\n" .
"{% if submission.publisherNotes %}Merknad: \"{{ submission.publisherNotes }}\"\n\n{% endif %}" .
"Se ditt utkast ved å logge inn i kontrollpanelet.\n\n" .
"{{ submission.cpEditUrl }}",
];

0 comments on commit 0cd886a

Please sign in to comment.