diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo b/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo index 01d79aa4..0e7a2eb3 100644 Binary files a/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo and b/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo differ diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po index 89ccdca9..f525554f 100644 --- a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po +++ b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po @@ -602,28 +602,28 @@ msgid "" msgstr "Tato akce je nevratná. Opravdu si přejete tuto žádost přijmout?" msgid "requestCreated" -msgstr "{{creatorLabel}} vytvořil(a) tuto žádost" +msgstr "vytvořil(a) tuto žádost" msgid "requestSubmitted" -msgstr "{{creatorLabel}} odeslal(a) tuto žádost" +msgstr "odeslal(a) tuto žádost" msgid "requestCancelled" -msgstr "{{creatorLabel}} zrušil(a) tuto žádost" +msgstr "zrušil(a) tuto žádost" msgid "requestAccepted" -msgstr "{{creatorLabel}} přijal(a) tuto žádost" +msgstr "přijal(a) tuto žádost" msgid "requestDeclined" -msgstr "{{creatorLabel}} odmítl(a) tuto žádost" +msgstr "odmítl(a) tuto žádost" msgid "Request expired." msgstr "Žádost vypršela" msgid "requestDeleted" -msgstr "{{creatorLabel}} smazal(a) tuto žádost" +msgstr "smazal(a) tuto žádost" msgid "requestCommented" -msgstr "{{creatorLabel}} komentoval(a)" +msgstr "komentoval(a)" #: /home/ron/prace/oarepo-requests/oarepo_requests/actions/delete_published_record.py:9 msgid "Permanently delete" @@ -668,3 +668,61 @@ msgstr "Nemáte právo smazat záznam." #: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:161 msgid "You do not have permission to update the record." msgstr "Nemáte právo zažádat o aktualizaci záznamu." + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:45 +msgid "Edit metadata" +msgstr "Upravit metadata" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:69 +msgid "Keep files:" +msgstr "Ponechat soubory:" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:71 +msgid "" +"If you choose yes, the current record's files will be linked to the new " +"version of the record. Then you will be able to add/remove files in the " +"form." +msgstr "" +"Pokud zvolíte ano, soubory aktuálního záznamu budou propojeny s novou verzí " +"záznamu. Poté budete moci přidávat/odstraňovat soubory ve formuláři." + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:74 +msgid "No" +msgstr "Ne" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:75 +msgid "Yes" +msgstr "Ano" + +msgid "Comment was not submitted successfully. Please try again in a moment." +msgstr "Komentář nebyl úspěšně odeslán. Zkuste to prosím za chvíli znovu." + +msgid "User avatar" +msgstr "Uživatelský avatar" + +msgid "Actions" +msgstr "Akce" + +msgid "Edit" +msgstr "Upravit" + +msgid "Comment was not edited successfully. Please try again in a moment." +msgstr "Komentář nebyl úspěšně upraven. Zkuste to prosím za chvíli znovu." + +msgid "Comment was not deleted successfully. Please try again in a moment." +msgstr "Komentář nebyl úspěšně smazán. Zkuste to prosím za chvíli znovu." + +msgid "Edited" +msgstr "Upraveno" + +msgid "Delete comment" +msgstr "Smazat komentář" + +msgid "Are you sure you want to delete this comment?" +msgstr "Opravdu chcete tento komentář smazat?" + +msgid "deleted comment" +msgstr "smazal(a) komentář" + +msgid "Remaining characters: " +msgstr "Zbývající znaky: " diff --git a/oarepo_requests/translations/en/LC_MESSAGES/messages.mo b/oarepo_requests/translations/en/LC_MESSAGES/messages.mo index 08a6623a..dc66058d 100644 Binary files a/oarepo_requests/translations/en/LC_MESSAGES/messages.mo and b/oarepo_requests/translations/en/LC_MESSAGES/messages.mo differ diff --git a/oarepo_requests/translations/en/LC_MESSAGES/messages.po b/oarepo_requests/translations/en/LC_MESSAGES/messages.po index f13e89af..bf69c689 100644 --- a/oarepo_requests/translations/en/LC_MESSAGES/messages.po +++ b/oarepo_requests/translations/en/LC_MESSAGES/messages.po @@ -566,28 +566,28 @@ msgid "" msgstr "" msgid "requestCreated" -msgstr "{{creatorLabel}} created this request" +msgstr "created this request" msgid "requestSubmitted" -msgstr "{{creatorLabel}} submitted this request" +msgstr "submitted this request" msgid "requestCancelled" -msgstr "{{creatorLabel}} canceled this request" +msgstr "canceled this request" msgid "requestAccepted" -msgstr "{{creatorLabel}} accepted this request" +msgstr "accepted this request" msgid "requestDeclined" -msgstr "{{creatorLabel}} declined this request" +msgstr "declined this request" msgid "Request expired." msgstr "Request expired" msgid "requestDeleted" -msgstr "{{creatorLabel}} deleted this request" +msgstr "deleted this request" msgid "requestCommented" -msgstr "{{creatorLabel}} commented" +msgstr "commented" #: /home/ron/prace/oarepo-requests/oarepo_requests/actions/delete_published_record.py:9 msgid "Permanently delete" @@ -637,5 +637,64 @@ msgstr "" msgid "You do not have permission to update the record." msgstr "" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:45 +msgid "Edit metadata" +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:69 +msgid "Keep files:" +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:71 +msgid "" +"If you choose yes, the current record's files will be linked to the new " +"version of the record. Then you will be able to add/remove files in the " +"form." +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:74 +msgid "No" +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:75 +msgid "Yes" +msgstr "" + +msgid "Comment was not submitted successfully. Please try again in a moment." +msgstr "" + +msgid "User avatar" +msgstr "" + +msgid "deleted a comment" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Comment was not edited successfully. Please try again in a moment." +msgstr "" + +msgid "Comment was not deleted successfully. Please try again in a moment." +msgstr "" + +msgid "Edited" +msgstr "" + +msgid "Delete comment" +msgstr "" + +msgid "Are you sure you want to delete this comment?" +msgstr "" + +msgid "deleted comment" +msgstr "" + +msgid "Remaining characters: " +msgstr "" + #~ msgid "No status" #~ msgstr "" diff --git a/oarepo_requests/translations/messages.mo b/oarepo_requests/translations/messages.mo index 7965e2b4..52ff21d8 100644 Binary files a/oarepo_requests/translations/messages.mo and b/oarepo_requests/translations/messages.mo differ diff --git a/oarepo_requests/translations/messages.pot b/oarepo_requests/translations/messages.pot index 6cbadeb1..815dd945 100644 --- a/oarepo_requests/translations/messages.pot +++ b/oarepo_requests/translations/messages.pot @@ -8,425 +8,440 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-21 12:37+0100\n" +"POT-Creation-Date: 2024-11-28 23:02+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.15.0\n" +"Generated-By: Babel 2.16.0\n" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:163 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:163 msgid "Submitted" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:164 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:164 msgid "Expired" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:165 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:165 msgid "Accepted" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:166 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:166 msgid "Declined" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:167 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:167 msgid "Cancelled" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:169 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:169 msgid "Request status" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/invenio_patches.py:175 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:175 msgid "Type" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/delete_published_record.py:30 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/delete_published_record.py:30 msgid "Permanently delete" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/delete_published_record.py:52 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/delete_published_record.py:52 msgid "Keep the record" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/generic.py:138 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:28 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:138 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:28 msgid "Submit" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/generic.py:144 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:24 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:144 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:24 msgid "Decline" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/generic.py:150 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:22 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:150 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:22 msgid "Accept" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/publish_draft.py:59 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/publish_draft.py:59 msgid "Publish" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/actions/publish_draft.py:92 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/publish_draft.py:92 msgid "Return for correction" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/resolvers/ui.py:333 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/resolvers/ui.py:333 msgid "System user" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/services/ui_schema.py:159 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/services/ui_schema.py:159 msgid "status" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:10 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:10 msgid "Create Request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:11 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:11 msgid "Open dialog for request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:12 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:12 msgid "My Requests" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:13 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:13 msgid "Requests to Approve" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:14 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:14 msgid "Are you sure?" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:15 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:15 msgid "Cancel" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:16 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:16 msgid "OK" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:17 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:17 msgid "Create request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:18 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:18 msgid "Submit request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:19 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:19 msgid "Delete request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:20 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:20 msgid "Delete" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:21 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:21 msgid "Accept request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:23 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:23 msgid "Decline request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:25 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:25 msgid "Create and submit request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:26 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:26 msgid "Create and submit" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:27 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:27 msgid "Error sending request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:29 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:29 msgid "Save drafted request" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:30 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:30 msgid "Save" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:31 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:31 msgid "Create" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:32 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:32 msgid "Creator" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:33 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:33 msgid "Receiver" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:34 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:34 msgid "Request type" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:35 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:35 msgid "Created" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:36 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:36 msgid "Timeline" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:37 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:37 msgid "Submit event" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:38 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:38 msgid "No requests to show" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:39 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:39 msgid "api.requests" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:40 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:40 msgid "api.applicable-requests" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:34 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:34 msgid "Delete draft" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:46 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:46 msgid "Request deletion of draft" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:63 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:68 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:63 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:68 msgid "Request draft deletion" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:66 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:66 msgid "Draft deletion requested" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:81 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:81 msgid "Click to permanently delete the draft." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:84 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:84 msgid "Request permission to delete the draft." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:88 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:88 msgid "" "Permission to delete draft requested. You will be notified about the " "decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:93 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:93 msgid "" "You have been asked to approve the request to permanently delete the draft. " "You can approve or reject the request." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:97 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:97 msgid "Permission to delete draft (including files) requested. " msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:100 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:100 msgid "Submit request to get permission to delete the draft." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_draft.py:101 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:101 msgid "You do not have permission to delete the draft." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:38 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:38 msgid "Delete record" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:51 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:51 msgid "Request deletion of published record" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:68 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:73 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:68 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:73 msgid "Request record deletion" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:71 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:71 msgid "Record deletion requested" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:86 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:86 msgid "Click to permanently delete the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:89 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:89 msgid "Request permission to delete the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:93 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:93 msgid "" "Permission to delete record requested. You will be notified about the " "decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:98 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:98 msgid "" "You have been asked to approve the request to permanently delete the record." " You can approve or reject the request." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:102 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:102 msgid "Permission to delete record (including files) requested. " msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:105 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:105 msgid "Submit request to get permission to delete the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/delete_published_record.py:106 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:106 msgid "You do not have permission to delete the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:45 -msgid "Edit record" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:45 +msgid "Edit metadata" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:65 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:65 msgid "Request re-opening of published record" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:122 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:127 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:122 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:127 msgid "Request edit access" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:125 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:125 msgid "Edit access requested" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:140 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:140 msgid "Click to start editing the metadata of the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:143 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:160 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:143 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:160 msgid "" "Request edit access to the record. You will be notified about the decision " "by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:150 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:150 msgid "" "Edit access requested. You will be notified about the decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:155 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:155 msgid "You have been requested to grant edit access to the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/edit_record.py:158 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:158 msgid "Edit access requested." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:40 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:40 msgid "New Version" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:61 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:61 msgid "Request requesting creation of new version of a published record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:69 -msgid "Keep files." +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:69 +msgid "Keep files:" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:70 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:70 msgid "Keep files in the new version?" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:120 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:125 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:71 +msgid "" +"If you choose yes, the current record's files will be linked to the new " +"version of the record. Then you will be able to add/remove files in the " +"form." +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:74 +msgid "No" +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:75 +msgid "Yes" +msgstr "" + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:123 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:128 msgid "Request new version access" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:123 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:126 msgid "New version access requested" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:138 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:141 msgid "Click to start creating a new version of the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:141 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:144 msgid "" "Request permission to update record (including files). You will be notified " "about the decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:148 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:151 msgid "" "Permission to update record (including files) requested. You will be " "notified about the decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:153 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:156 msgid "" "You have been asked to approve the request to update the record. You can " "approve or reject the request." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:157 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:160 msgid "Permission to update record (including files) requested. " msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:160 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:163 msgid "Submit request to get edit access to the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/new_version.py:161 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:164 msgid "You do not have permission to update the record." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:46 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:128 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:46 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:128 msgid "Publish draft" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:63 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:63 msgid "Resource version" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:64 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:64 msgid "Write down the version (first, second…)." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:79 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:79 msgid "Request publishing of a draft" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:130 -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:135 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:130 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:135 msgid "Submit for review" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:133 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:133 msgid "Submitted for review" msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:148 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:148 msgid "" "Click to immediately publish the draft. The draft will be a subject to " "embargo as requested in the side panel. Note: The action is irreversible." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:155 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:155 msgid "" "By submitting the draft for review you are requesting the publication of the" " draft. The draft will become locked and no further changes will be possible" @@ -434,33 +449,33 @@ msgid "" "decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:163 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:163 msgid "" "The draft has been submitted for review. It is now locked and no further " "changes are possible. You will be notified about the decision by email." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:169 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:169 msgid "" "The draft has been submitted for review. You can now accept or decline the " "request." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:173 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:173 msgid "The draft has been submitted for review." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:176 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:176 msgid "" "Submit for review. After submitting the draft for review, it will be locked " "and no further modifications will be possible." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/types/publish_draft.py:180 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:180 msgid "Request not yet submitted." msgstr "" -#: /Users/m/w/cesnet/oarepo-requests/oarepo_requests/ui/templates/semantic-ui/oarepo_requests_ui/RequestDetail.jinja:3 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/ui/templates/semantic-ui/oarepo_requests_ui/RequestDetail.jinja:3 msgid "Request" msgstr "" @@ -470,10 +485,13 @@ msgstr "" msgid "Request not created successfully. Please try again in a moment." msgstr "" -msgid "Your comment here..." +msgid "Comment was not submitted successfully. Please try again in a moment." +msgstr "" + +msgid "Leave comment" msgstr "" -msgid "Comment" +msgid "Remaining characters: " msgstr "" msgid "Request details" @@ -500,6 +518,36 @@ msgstr "" msgid "Error while fetching timeline events" msgstr "" +msgid "User avatar" +msgstr "" + +msgid "deleted comment" +msgstr "" + +msgid "requestCommented" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Comment was not edited successfully. Please try again in a moment." +msgstr "" + +msgid "Comment was not deleted successfully. Please try again in a moment." +msgstr "" + +msgid "Edited" +msgstr "" + +msgid "Delete comment" +msgstr "" + +msgid "Are you sure you want to delete this comment?" +msgstr "" + msgid "" "Are you sure you want to proceed? Once the action is completed, it will not " "be possible to undo it." @@ -517,12 +565,6 @@ msgid "" "This action is irreversible. Are you sure you wish to accept this request?" msgstr "" -msgid "Add comment" -msgstr "" - -msgid "optional" -msgstr "" - msgid "" "It is highly recommended to provide an explanation for the rejection of the " "request. Note that it is always possible to provide explanation later on the" @@ -564,9 +606,6 @@ msgstr "" msgid "requestDeleted" msgstr "" -msgid "requestCommented" -msgstr "" - msgid "Error loading request types" msgstr "" @@ -576,12 +615,6 @@ msgstr "" msgid "Record has validation errors. Redirecting to form..." msgstr "" -msgid "Comment was not submitted successfully." -msgstr "" - -msgid "Leave comment" -msgstr "" - msgid "Back to requests" msgstr "" @@ -590,9 +623,3 @@ msgstr "" msgid "to top" msgstr "" - -msgid "commented" -msgstr "" - -msgid "icon" -msgstr "" diff --git a/oarepo_requests/types/edit_record.py b/oarepo_requests/types/edit_record.py index ce48ca82..200669bb 100644 --- a/oarepo_requests/types/edit_record.py +++ b/oarepo_requests/types/edit_record.py @@ -42,7 +42,7 @@ class EditPublishedRecordRequestType(NonDuplicableOARepoRequestType): """ type_id = "edit_published_record" - name = _("Edit record") + name = _("Edit metadata") payload_schema = { "draft_record.links.self": ma.fields.Str( attribute="draft_record:links:self", diff --git a/oarepo_requests/types/new_version.py b/oarepo_requests/types/new_version.py index 6a5b2d3d..c818a88d 100644 --- a/oarepo_requests/types/new_version.py +++ b/oarepo_requests/types/new_version.py @@ -66,10 +66,13 @@ def available_actions(cls) -> dict[str, type[RequestAction]]: "field": "keep_files", "ui_widget": "BooleanCheckbox", "props": { - "label": _("Keep files."), + "label": _("Keep files:"), "placeholder": _("Keep files in the new version?"), - "required": False, - "default": True, + "description": _( + "If you choose yes, the current record's files will be linked to the new version of the record. Then you will be able to add/remove files in the form." + ), + "falseLabel": _("No"), + "trueLabel": _("Yes"), }, } diff --git a/oarepo_requests/ui/resource.py b/oarepo_requests/ui/resource.py index 948d5b91..087cfdbc 100644 --- a/oarepo_requests/ui/resource.py +++ b/oarepo_requests/ui/resource.py @@ -206,6 +206,7 @@ def not_found(self, error: Exception, *args: Any, **kwargs: Any) -> Response: default_macro="NotFound", ), pid=getattr(error, "pid_value", None) or getattr(error, "pid", None), + error=error, ) def permission_denied( @@ -219,4 +220,5 @@ def permission_denied( default_macro="PermissionDenied", ), pid=getattr(error, "pid_value", None) or getattr(error, "pid", None), + error=error, ) diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx index 087f8f7b..a4febd72 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx @@ -28,9 +28,14 @@ export const RequestActionButton = ({ formik, modalControl, }); + const handleClick = () => { if (requireConfirmation) { - confirmAction(() => requestAction(), requestActionName, extraData); + confirmAction( + (value) => requestAction(value), + requestActionName, + extraData + ); } else { requestAction(); } diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/CommentSubmitForm.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/CommentSubmitForm.jsx new file mode 100644 index 00000000..76f0e7be --- /dev/null +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/CommentSubmitForm.jsx @@ -0,0 +1,79 @@ +import React, { useState } from "react"; +import PropTypes from "prop-types"; +import { i18next } from "@translations/oarepo_requests_ui/i18next"; +import { Button, Message, Form } from "semantic-ui-react"; +import { RequestCommentInput } from "@js/oarepo_requests_common"; + +export const CommentSubmitForm = ({ commentSubmitMutation }) => { + const { + mutate: submitComment, + isLoading, + isError, + reset: resetSendCommentMutation, + } = commentSubmitMutation; + + const [comment, setComment] = useState({ + payload: { content: "", format: "html" }, + }); + + const handleCommentChange = (event, value) => { + setComment({ + payload: { + content: value, + format: "html", + }, + }); + }; + + const handleFormReset = () => { + setComment({ + payload: { content: "", format: "html" }, + }); + }; + + const handleCommentSubmit = () => { + submitComment(comment, { + onSuccess: () => { + handleFormReset(); + }, + onError: () => { + setTimeout(() => resetSendCommentMutation(), 3000); + }, + }); + }; + + return ( +
+ + {isError && ( + + + {i18next.t( + "Comment was not submitted successfully. Please try again in a moment." + )} + + + )} +