Skip to content

Commit

Permalink
Merge branch 'fixActivityLogMessages-888' into 'main'
Browse files Browse the repository at this point in the history
Changes Activity Log messages to user action.

See merge request softwares-pkp/plugins_ojs/OASwitchboard!42
  • Loading branch information
YvesLepidus committed Sep 25, 2024
2 parents b3193e9 + 44f1856 commit 23cc9e3
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 5 deletions.
3 changes: 2 additions & 1 deletion classes/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ public function sendToOASwitchboard($hookName, $args)

private function registerSubmissionEventLog($request, $submission, $error)
{
$activityLogLocale = $error . '.activityLog';
$eventLog = Repo::eventLog()->newDataObject([
'assocType' => Application::ASSOC_TYPE_SUBMISSION,
'assocId' => $submission->getId(),
'eventType' => PKPSubmissionEventLogEntry::SUBMISSION_LOG_CREATE_VERSION,
'userId' => Validation::loggedInAs() ?? $request->getUser()->getId(),
'message' => $error,
'message' => $activityLogLocale,
'isTranslated' => false,
'dateLogged' => Core::getCurrentDate(),
]);
Expand Down
18 changes: 18 additions & 0 deletions locale/en/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,21 @@ msgstr "The article must have a DOI associated."
msgid "plugins.generic.OASwitchboard.postRequirementsError.issn"
msgstr "The journal must have a ISSN or eISSN assigned."

msgid "plugins.generic.OASwitchboard.sendMessageWithSuccess.activityLog"
msgstr "Successfully sent a message to the OA Switchboard."

msgid "plugins.generic.OASwitchboard.rorRecommendation.activityLog"
msgstr "Received a notification from the OA Switchboard: At least one author must have a ROR ID linked to their affiliation (requires ROR plugin) for the message to be sent to the affiliation."

msgid "plugins.generic.OASwitchboard.postRequirementsError.familyName.activityLog"
msgstr "Tried to deposit with OA Switchboard, which returned: The family name of an author must be present."

msgid "plugins.generic.OASwitchboard.postRequirementsError.affiliation.activityLog"
msgstr "Tried to deposit with OA Switchboard, which returned: Affiliation of an author must be set."

msgid "plugins.generic.OASwitchboard.postRequirementsError.doi.activityLog"
msgstr "Tried to deposit with OA Switchboard, which returned: The article must have a DOI associated."

msgid "plugins.generic.OASwitchboard.postRequirementsError.issn.activityLog"
msgstr "Tried to deposit with OA Switchboard, which returned: The journal must have an ISSN or eISSN assigned."

20 changes: 19 additions & 1 deletion locale/es/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,22 @@ msgid "plugins.generic.OASwitchboard.postRequirementsError.doi"
msgstr "El artículo debe tener un DOI asociado."

msgid "plugins.generic.OASwitchboard.postRequirementsError.issn"
msgstr "La revista debe tener un ISSN o eISSN asignado."
msgstr "La revista debe tener un ISSN o eISSN asignado."

msgid "plugins.generic.OASwitchboard.sendMessageWithSuccess.activityLog"
msgstr "Mensaje enviado con éxito al OA Switchboard."

msgid "plugins.generic.OASwitchboard.rorRecommendation.activityLog"
msgstr "Recibió una notificación del OA Switchboard: Al menos un autor debe tener un ID ROR vinculado a su afiliación (requiere el plugin ROR) para que el mensaje sea enviado a la afiliación."

msgid "plugins.generic.OASwitchboard.postRequirementsError.familyName.activityLog"
msgstr "Intentó depositar en la OA Switchboard, lo que devolvió: El apellido de un autor debe estar presente."

msgid "plugins.generic.OASwitchboard.postRequirementsError.affiliation.activityLog"
msgstr "Intentó depositar en la OA Switchboard, lo que devolvió: La afiliación de un autor debe establecerse."

msgid "plugins.generic.OASwitchboard.postRequirementsError.doi.activityLog"
msgstr "Intentó depositar en la OA Switchboard, lo que devolvió: El artículo debe tener un DOI asociado."

msgid "plugins.generic.OASwitchboard.postRequirementsError.issn.activityLog"
msgstr "Intentó depositar en la OA Switchboard, lo que devolvió: La revista debe tener un ISSN o eISSN asignado."
20 changes: 19 additions & 1 deletion locale/pt_BR/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,22 @@ msgid "plugins.generic.OASwitchboard.postRequirementsError.doi"
msgstr "O artigo deve ter um DOI associado."

msgid "plugins.generic.OASwitchboard.postRequirementsError.issn"
msgstr "A revista deve ter um ISSN ou eISSN atribuído."
msgstr "A revista deve ter um ISSN ou eISSN atribuído."

msgid "plugins.generic.OASwitchboard.sendMessageWithSuccess.activityLog"
msgstr "Enviou mensagem com sucesso para o OA Switchboard"

msgid "plugins.generic.OASwitchboard.rorRecommendation.activityLog"
msgstr "Recebeu um informe do OA Switchboard: Pelo menos um autor deve ter um ID ROR vinculado à sua afiliação (requer o plugin ROR) para que a mensagem seja enviada à afiliação."

msgid "plugins.generic.OASwitchboard.postRequirementsError.familyName.activityLog"
msgstr "Tentou depositar na OA Switchboard, o que retornou: O sobrenome de um autor deve estar presente."

msgid "plugins.generic.OASwitchboard.postRequirementsError.affiliation.activityLog"
msgstr "Tentou depositar na OA Switchboard, o que retornou: A afiliação de um autor deve ser definida."

msgid "plugins.generic.OASwitchboard.postRequirementsError.doi.activityLog"
msgstr "Tentou depositar na OA Switchboard, o que retornou: O artigo deve ter um DOI associado."

msgid "plugins.generic.OASwitchboard.postRequirementsError.issn.activityLog"
msgstr "Tentou depositar na OA Switchboard, o que retornou: O periódico deve ter um ISSN ou eISSN atribuído."
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<version>
<application>OASwitchboard</application>
<type>plugins.generic</type>
<release>2.0.1.8</release>
<date>2024-09-23</date>
<release>2.0.1.9</release>
<date>2024-09-25</date>
</version>

0 comments on commit 23cc9e3

Please sign in to comment.