Skip to content

Commit

Permalink
Merge branch 'fixesInviteLabels-850' into 'main'
Browse files Browse the repository at this point in the history
Adjusts summary text and add organizer

See merge request softwares-pkp/plugins_ojs/reviewReminder!2
  • Loading branch information
YvesLepidus committed Jul 15, 2024
2 parents 2e8a6d1 + 99e3d6f commit 099e6ff
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ReviewReminderPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public function getReviewMetadata($hookName, $args)
$reviewDueDate,
$submission->getLocalizedTitle(),
$context->getData('contactEmail'),
$context->getData('contactName')
$context->getData('contactName'),
$context->getLocalizedName()
);

$reviewReminderService->sendReviewReminder();
Expand Down
10 changes: 8 additions & 2 deletions classes/ReviewReminderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ class ReviewReminderService
private $submissionTitle;
private $contactEmail;
private $contactName;
private $journalName;

public function __construct(string $reviewerEmail, string $reviewDueDate, string $submissionTitle, string $contactEmail, string $contactName)
public function __construct(string $reviewerEmail, string $reviewDueDate, string $submissionTitle, string $contactEmail, string $contactName, string $journalName)
{
$this->reviewerEmail = $reviewerEmail;
$this->reviewDueDate = $reviewDueDate;
$this->submissionTitle = $submissionTitle;
$this->contactEmail = $contactEmail;
$this->contactName = $contactName;
$this->journalName = $journalName;
}

public function sendReviewReminder()
Expand All @@ -46,7 +48,11 @@ private function createICalendarFile()
),
'dtstart' => 'now',
'dtend' => $this->reviewDueDate,
'summary' => __('plugins.generic.reviewReminder.displayName')
'summary' => __(
'plugins.generic.reviewReminder.ics.summary',
['journalName' => $this->journalName]
),
'organizer' => $this->journalName . ':mailto:' . $this->contactEmail
));

return ReminderFile::create($ics);
Expand Down
3 changes: 2 additions & 1 deletion lib/ICS.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class ICS
'dtstart',
'location',
'summary',
'organizer',
'url'
);

Expand Down Expand Up @@ -131,7 +132,7 @@ private function build_props()

// Append properties
foreach ($props as $k => $v) {
$ics_props[] = "$k:$v";
$ics_props[] = $k === 'ORGANIZER' ? "$k;CN=$v" : "$k:$v";
}

// Build ICS properties - add footer
Expand Down
3 changes: 3 additions & 0 deletions locale/en/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ msgstr "Sends a review reminder email to assigned reviewers."
msgid "plugins.generic.reviewReminder.ics.description"
msgstr "Deadline for submission review: {$submissionTitle}"

msgid "plugins.generic.reviewReminder.ics.summary"
msgstr "{$journalName} - Schedule Your Review"

msgid "plugins.generic.reviewReminder.email.body"
msgstr "You can use the attached reminder to add to the calendar of your choice."
3 changes: 3 additions & 0 deletions locale/es/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ msgstr "Envía un correo electrónico de recordatorio de revisión a los revisor
msgid "plugins.generic.reviewReminder.ics.description"
msgstr "Plazo para la revisión de la sumisión: {$submissionTitle}"

msgid "plugins.generic.reviewReminder.ics.summary"
msgstr "{$journalName} - Programar su Revisión"

msgid "plugins.generic.reviewReminder.email.body"
msgstr "Puede utilizar el recordatorio adjunto para añadirlo al calendario de su preferencia."
3 changes: 3 additions & 0 deletions locale/pt_BR/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ msgstr "Envia e-mail com lembrete de avaliação para avaliadores designados."
msgid "plugins.generic.reviewReminder.ics.description"
msgstr "Prazo para avaliação da sumissão: {$submissionTitle}"

msgid "plugins.generic.reviewReminder.ics.summary"
msgstr "{$journalName} - Agende sua avaliação"

msgid "plugins.generic.reviewReminder.email.body"
msgstr "Você pode utilizar o lembrete em anexo para adicionar no calendário de sua preferência."

0 comments on commit 099e6ff

Please sign in to comment.