From 08f5f9d477543635315c579d5817abae6e387766 Mon Sep 17 00:00:00 2001 From: ducica Date: Tue, 26 Nov 2024 11:41:19 +0100 Subject: [PATCH] allow html for request description --- .../translations/cs/LC_MESSAGES/messages.mo | Bin 15434 -> 15417 bytes .../translations/cs/LC_MESSAGES/messages.po | 2 +- .../translations/en/LC_MESSAGES/messages.mo | Bin 1085 -> 1068 bytes .../translations/en/LC_MESSAGES/messages.po | 2 +- oarepo_requests/translations/messages.mo | Bin 395 -> 395 bytes oarepo_requests/translations/messages.pot | 2 +- .../common/components/RequestCommentInput.jsx | 21 +++++++++++++-- .../common/components/RequestModalContent.jsx | 14 ++++++++-- .../RequestModalContentAndActions.jsx | 5 ++++ .../components/CreateRequestModalContent.jsx | 25 +++++++++++++++--- .../components/RequestDetail.jsx | 17 +++++++++++- .../messages/cs/LC_MESSAGES/translations.json | 2 +- .../messages/en/LC_MESSAGES/translations.json | 2 +- 13 files changed, 79 insertions(+), 13 deletions(-) diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo b/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo index 0737086f4ccf2bbb67182caa4f190ee2f983821f..f44edf0782c56d91e719d21e26e1bd518bb7754b 100644 GIT binary patch delta 78 zcmX?Av9n^s9xhv61_p*mYX$~wAe|1RHG%YGAguwU_d@y4fHVt`FJQyK08%dsq(yE5Ts0zO~@wNb3gxlNJxZ diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po index b1eceec6..5d527d16 100644 --- a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po +++ b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po @@ -623,7 +623,7 @@ msgid "requestDeleted" msgstr "{{creatorLabel}} 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" diff --git a/oarepo_requests/translations/en/LC_MESSAGES/messages.mo b/oarepo_requests/translations/en/LC_MESSAGES/messages.mo index 853531e106a043950646c40dbdcb1af8a195a329..d7a84f644d1c6c1b171007f4c6aee782821b5a64 100644 GIT binary patch delta 52 wcmdnXv4&&95>-wH28MQK1_o6iJrPK&0qN~f{yiYA4&<|JJh_i)@(kvs0QvU{Jpcdz delta 56 zcmZ3(v6o}Q5>+V%28MQK1_o6iy$DFF0qGM^{(B&;4&;k&Jh_i)asso^\n" "Language-Team: LANGUAGE \n" diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx index bc2dafea..50a45fb3 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx @@ -2,17 +2,32 @@ import React from "react"; import { RichEditor } from "react-invenio-forms"; import sanitizeHtml from "sanitize-html"; import PropTypes from "prop-types"; +import { useQueryClient } from "@tanstack/react-query"; export const RequestCommentInput = ({ comment, handleChange, initialValue, }) => { + // when focused move the cursor at the end of any existing content const handleFocus = (event, editor) => { editor.selection.select(editor.getBody(), true); editor.selection.collapse(false); }; + const queryClient = useQueryClient(); + // the request for request specific info, shall be already fetched at this point + const data = queryClient.getQueriesData({ + queryKey: ["applicableCustomFields"], + }); + + let allowedHtmlAttrs; + let allowedHtmlTags; + if (data.length > 0) { + allowedHtmlAttrs = data[0][1]?.data?.allowedHtmlAttrs; + allowedHtmlTags = data[0][1]?.data?.allowedHtmlTags; + } + return ( { - console.log(editor.getContent()); - const cleanedContent = sanitizeHtml(editor.getContent()); + const cleanedContent = sanitizeHtml(editor.getContent(), { + allowedTags: allowedHtmlTags, + allowedAttributes: allowedHtmlAttrs, + }); handleChange(event, cleanedContent); }} onFocus={handleFocus} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx index 9df19ab8..7305aa20 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx @@ -1,13 +1,13 @@ import React from "react"; import PropTypes from "prop-types"; import { Grid } from "semantic-ui-react"; -import {} from "react-invenio-forms"; import { SideRequestInfo, RequestCustomFields, Timeline, } from "@js/oarepo_requests_common"; import { i18next } from "@translations/oarepo_requests_ui/i18next"; +import sanitizeHtml from "sanitize-html"; /** * @typedef {import("../../record-requests/types").Request} Request @@ -20,16 +20,24 @@ export const RequestModalContent = ({ request, customFields, modalActions, + allowedHtmlAttrs, + allowedHtmlTags, }) => { /** @type {{requests: Request[], setRequests: (requests: Request[]) => void}} */ const description = request?.stateful_description || request?.description; + + const sanitizedDescription = sanitizeHtml(description, { + allowedTags: allowedHtmlTags, + allowedAttributes: allowedHtmlAttrs, + }); + return ( {description && ( - {description}{" "} + {" "} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/record-requests/components/CreateRequestModalContent.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/record-requests/components/CreateRequestModalContent.jsx index 37d1504e..9e44df33 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/record-requests/components/CreateRequestModalContent.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/record-requests/components/CreateRequestModalContent.jsx @@ -2,6 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import { Form, Divider } from "semantic-ui-react"; import { CustomFields } from "react-invenio-forms"; +import sanitizeHtml from "sanitize-html"; /** * @typedef {import("../../record-requests/types").RequestType} RequestType @@ -9,19 +10,35 @@ import { CustomFields } from "react-invenio-forms"; */ /** @param {{ requestType: RequestType, customSubmitHandler: (e) => void }} props */ -export const CreateRequestModalContent = ({ requestType, customFields }) => { +export const CreateRequestModalContent = ({ + requestType, + customFields, + allowedHtmlAttrs, + allowedHtmlTags, +}) => { const description = requestType?.stateful_description || requestType?.description; + + const sanitizedDescription = sanitizeHtml(description, { + allowedTags: allowedHtmlTags, + allowedAttributes: allowedHtmlAttrs, + }); + return ( <> - {description &&

{description}

} + {description && ( +

+ )} {customFields?.ui && (
import(`@templates/custom_fields/${widget}.js`), - () => import(`react-invenio-forms`), + (widget) => import(`react-invenio-forms`), ]} fieldPathPrefix="payload" /> @@ -35,4 +52,6 @@ export const CreateRequestModalContent = ({ requestType, customFields }) => { CreateRequestModalContent.propTypes = { requestType: PropTypes.object.isRequired, customFields: PropTypes.object, + allowedHtmlAttrs: PropTypes.object, + allowedHtmlTags: PropTypes.array, }; diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/request-detail/components/RequestDetail.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/request-detail/components/RequestDetail.jsx index 1c6ebd23..bb21c2c4 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/request-detail/components/RequestDetail.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/request-detail/components/RequestDetail.jsx @@ -25,6 +25,7 @@ import { } from "@js/oarepo_requests_common"; import { Formik } from "formik"; import _isEmpty from "lodash/isEmpty"; +import sanitizeHtml from "sanitize-html"; export const RequestDetail = ({ request, @@ -45,6 +46,9 @@ export const RequestDetail = ({ } ); const customFields = data?.data?.custom_fields; + const allowedHtmlAttrs = data?.data?.allowedHtmlAttrs; + const allowedHtmlTags = data?.data?.allowedHtmlTags; + const requestTypeProperties = data?.data?.request_type_properties; const actions = mapLinksToActions( request, @@ -72,6 +76,11 @@ export const RequestDetail = ({ const requestHeader = request?.stateful_name || request?.name; const description = request?.stateful_description || request?.description; + const sanitizedDescription = sanitizeHtml(description, { + allowedTags: allowedHtmlTags, + allowedAttributes: allowedHtmlAttrs, + }); + return (
{requestHeader}
- {description &&

{description}

} + {description && ( +

+ )}
diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/cs/LC_MESSAGES/translations.json b/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/cs/LC_MESSAGES/translations.json index f330d65d..cf1b17a1 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/cs/LC_MESSAGES/translations.json +++ b/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/cs/LC_MESSAGES/translations.json @@ -1 +1 @@ -{"status":"Stav","Create Request":"Vytvořit žádost","Open dialog for request":"Otevřít dialogové okno pro žádost","My Requests":"Moje žádosti","Requests to Approve":"Žádosti ke schválení","Are you sure?":"Jste si jistí?","Cancel":"Zrušit","OK":"OK","Create request":"Vytvořit žádost","Submit request":"Odeslat žádost","Delete request":"Smazat žádost","Delete":"Smazat","Accept request":"Přijmout žádost","Accept":"Přijmout","Decline request":"Zamítnout žádost","Decline":"Zamítnout","Create and submit request":"Vytvořit a odeslat žádost","Create and submit":"Vytvořit a odeslat","Error sending request":"Chyba při odesílání žádosti","Submit":"Odeslat","Save drafted request":"Uložit koncept žádosti","Save":"Uložit","Create":"Vytvořit","Creator":"Tvůrce","Receiver":"Příjemce","Request type":"Typ žádosti","Created":"Vytvořeno","Timeline":"Časová osa","Submit event":"Odeslat událost","No requests to show":"Žádné žádosti k zobrazení","api.requests":"API pro žádosti záznamu","Request deletion of published record":"Žádost o smazání zveřejněného záznamu","Request re-opening of published record":"Žádost o znovuotevření zveřejněného záznamu","Request publishing of a draft":"Žádost o kontrolu a zveřejnění konceptu","No status":"Beze stavu","Cannot send request. Please try again later.":"Nemohu poslat žádost. Prosím, zkuste později.","Cancel request":"Zrušit žádost","Submitted":"Odeslána","Expired":"Expirována","Accepted":"Přijata","Declined":"Zamítnuta","Cancelled":"Zrušena","Status":"Stav","Type":"Typ","Loading request types":"Načítám typy žádostí","Error loading request types":"Chyba při načítání typů žádostí","No new requests to create":"Nejsou dostupné žádné žádosti","Requests":"Žádosti","Error loading requests":"Chyba při načítání žádostí","Loading requests":"Načítám žádosti","Delete record":"Smazat záznam","Edit record":"Upravit záznam","Publish draft":"Publikovat","Close":"Zavřít","Request":"Žádost","Pending":"Schvalována","request":"žádost","Error while submitting comment.":"Chyba při odesílání komentáře.","Add comment":"Přidat komentář","optional":"nepovinné","Your comment here...":"Váš komentář...","Comment was not created successfully.":"Komentář nebyl úspěšně vytvořen.","Comment":"Komentář","Error while submitting the comment":"Chyba při odesílání komentáře","Back to requests":"Zpět na žádosti","Record":"Záznam","preview":"náhled","to top":"na začátek stránky","Loading timeline...":"Načítám časovou osu...","Error while fetching timeline events":"Chyba při načítání událostí časové osy","commented":"komnetoval","icon":"ikona","this request":"tato žádost","Comment must be at least 1 character long.":"Komentář musí být alespoň 1 znak dlouhý.","Invalid format.":"Neplatný formát.","Request status":"Stav žádosti","Request record deletion":"Zažádat smazání záznamu","Record deletion requested":"Zažádáno smazání záznamu","Click to permanently delete the record.":"Klikněte pro trvalé smazání záznamu.","Request permission to delete the record.":"Zažádat o povolení smazat záznam.","Permission to delete record requested. You will be notified about the decision by email.":"Zažádáno o povolení k smazání záznamu. O rozhodnutí budete informováni e-mailem.","You have been asked to approve the request to permanently delete the record. You can approve or reject the request.":"Byl jste požádán o schválení žádosti o trvalé smazání záznamu. Můžete žádost schválit nebo zamítnout.","Permission to delete record (including files) requested. ":"Zažádáno o povolení ke smazání záznamu (včetně souborů).","Submit request to get permission to delete the record.":"Odeslat žádost o povolení ke smazání záznamu.","Request edit access":"Žádost o úpravu záznamu","Edit access requested":"Zažádáno o úpravu záznamu","Click to start editing the metadata of the record.":"Klikněte pro začátek úprav metadat záznamu.","Request edit access to the record. You will be notified about the decision by email.":"Zažádat o úpravu záznamu. O rozhodnutí budete informováni e-mailem.","Edit access requested. You will be notified about the decision by email.":"Zažádáno o úpravu záznamu. O rozhodnutí budete informováni e-mailem.","You have been requested to grant edit access to the record.":"Byl jste požádán o udělení práva na upravení záznamu.","Edit access requested.":"Zažádáno o úpravu záznamu.","New Version":"Nová verze","Request requesting creation of new version of a published record.":"Žádost o vytvoření nové verze zveřejněného záznamu.","Request new version access":"Zažádat o vytvoření nové verzi","New version access requested":"Zažádáno o vytvoření nové verze","Click to start creating a new version of the record.":"Kliněte pro začátek vytváření nové verze záznamu.","Request permission to update record (including files). You will be notified about the decision by email.":"Zažádat o povolení aktualizace záznamu (včetně souborů). O rozhodnutí budete informováni e-mailem.","Permission to update record (including files) requested. You will be notified about the decision by email.":"Zažádáno o povolení aktualizace záznamu (včetně souborů). O rozhodnutí budete informováni e-mailem.","You have been asked to approve the request to update the record. You can approve or reject the request.":"Byl jste požádán o schválení žádosti o aktualizaci záznamu. Můžete žádost schválit nebo zamítnout.","Permission to update record (including files) requested. ":"Zažádáno o povolení aktualizace záznamu (včetně souborů).","Submit request to get edit access to the record.":"Odeslat žádost o povolení aktualizace záznamu (včetně souborů).","Resource version":"Verze záznamu","Write down the version (first, second…).":"Napište verzi (první, druhá…).","Submit for review":"Odeslat ke kontrole","Submitted for review":"Odesláno ke kontrole","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.":"Klikněte pro okamžité zveřejnění konceptu. Bylo-li zvoleno, záznam může podléhat embargu. Upozornění: Tuto akci není možno vzít zpět.","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 until the request is accepted or declined. You will be notified about the decision by email.":"Odesláním konceptu ke kontrole žádáte o zveřejnění konceptu. Koncept bude uzamčen a další změny nebudou možné, dokud nebude žádost přijata nebo zamítnuta. O rozhodnutí budete informováni e-mailem.","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.":"Koncept byl odeslán ke kontrole. Nyní je uzamčen a další změny nejsou možné. O rozhodnutí budete informováni e-mailem.","The draft has been submitted for review. You can now accept or decline the request.":"Koncept Vám byl odeslán ke kontrole. Žádost můžete přijmout nebo zamítnout.","The draft has been submitted for review.":"Koncept byl odeslán ke kontrole.","Submit for review. After submitting the draft for review, it will be locked and no further modifications will be possible.":"Odeslat ke kontrole. Po odeslání konceptu ke kontrole bude záznam uzamčen a další změny nebudou možné.","Request not yet submitted.":"Žádost zatím nebyla odeslána.","Delete draft":"Smazat koncept","Request draft deletion":"Zažádat o smazání konceptu","Draft deletion requested":"Zažádáno o smazání konceptu","Click to permanently delete the draft.":"Klikněte pro trvalé smazání konceptu.","Request permission to delete the draft.":"Zažádat o povolení ke smazání konceptu.","Permission to delete draft requested. You will be notified about the decision by email.":"Zažádáno o povolení ke smazání konceptu. O rozhodnutí budete informováni emailem.","You have been asked to approve the request to permanently delete the draft. You can approve or reject the request.":"Byli jste požádáni o schválení žádosti o trvalé smazání konceptu. Můžete žádost schválit nebo odmítnout.","Permission to delete draft (including files) requested. ":"Zažádáno o povolení ke smazání konceptu (včetně souborů).","Submit request to get permission to delete the draft.":"Odeslat žádost o povolení ke smazání konceptu.","Request not created successfully. Please try again in a moment.":"Žádost nebyla úspěšně vytvořena. Zkuste to prosím za chvíli znovu.","Form fields could not be fetched.":"Formulářová pole nebyla načtena.","Request details":"Podrobnosti žádosti","Topic":"Téma","Request topic":"Téma žádosti","Are you sure you want to proceed? Once the action is completed, it will not be possible to undo it.":"Jste si jisti, že chcete pokračovat? Po dokončení akce ji nebude možné vrátit zpět.","Are you sure you wish to":"Jste si jisti, že chcete","Proceed":"Pokračovat","Are you sure you wish to proceed? After this request is accepted, it will not be possible to reverse the action.":"Jste si jisti, že chcete pokračovat? Po přijetí této žádosti nebude možné akci zvrátit.","The request could not be created due to validation errors. Please correct the errors and try again.":"Žádost nemohla být vytvořena kvůli validačním chybám. Prosím opravte chyby a zkuste to znovu.","The action could not be executed. Please try again in a moment.":"Akce nebyla úspěšně provedena. Zkuste to prosím za chvíli znovu.","Record has validation errors. Redirecting to form...":"Záznam obsahuje validační chyby. Přesměrování na formulář...","Comment was not submitted successfully.":"Komentář nebyl úspěšně odeslán.","Leave comment":"Zanechat komentář","Request deletion of draft":"Zažádat o smazání konceptu","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 request timeline.":"Důrazně doporučujeme poskytnout vysvětlení zamítnutí žádosti. Všimněte si, že je vždy možné poskytnout vysvětlení později v rámci časové osy žádosti.","Record preview":"Náhled záznamu","This action is irreversible. Are you sure you wish to accept this request?":"Tato akce je nevratná. Opravdu si přejete tuto žádost přijmout?","requestCreated":"{{creatorLabel}} vytvořil(a) tuto žádost","requestSubmitted":"{{creatorLabel}} odeslal(a) tuto žádost","requestCancelled":"{{creatorLabel}} zrušil(a) tuto žádost","requestAccepted":"{{creatorLabel}} přijal(a) tuto žádost","requestDeclined":"{{creatorLabel}} odmítl(a) tuto žádost","Request expired.":"Žádost vypršela","requestDeleted":"{{creatorLabel}} smazal(a) tuto žádost","requestCommented":"{{creatorLabel}} komentoval(a)","Permanently delete":"Trvale smazat","Keep the record":"Ponechat záznam","Publish":"Publikovat","Return for correction":"Vrátit k opravě","api.applicable-requests":"API pro vytváření žádostí","System user":"Systémový uživatel","Keep files.":"Ponechat soubory.","Keep files in the new version?":"Ponechat soubory v nové verzi?","You do not have permission to delete the draft.":"Nemáte právo smazat rozpracovaný záznam.","You do not have permission to delete the record.":"Nemáte právo smazat záznam.","You do not have permission to update the record.":"Nemáte právo zažádat o aktualizaci záznamu.","Edit metadata":"Upravit metadata","Keep files:":"Ponechat soubory:","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.":"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.","No":"Ne","Yes":"Ano","Comment was not submitted successfully. Please try again in a moment.":"Komentář nebyl úspěšně odeslán. Zkuste to prosím za chvíli znovu.","User avatar":"Uživatelský avatar","Actions":"Akce","Edit":"Upravit","Comment was not edited successfully. Please try again in a moment.":"Komentář nebyl úspěšně upraven. Zkuste to prosím za chvíli znovu.","Comment was not deleted successfully. Please try again in a moment.":"Komentář nebyl úspěšně smazán. Zkuste to prosím za chvíli znovu.","Edited":"Upraveno","Delete comment":"Smazat komentář","Are you sure you want to delete this comment?":"Opravdu chcete tento komentář smazat?","deleted comment":"smazal(a) komentář"} \ No newline at end of file +{"status":"Stav","Create Request":"Vytvořit žádost","Open dialog for request":"Otevřít dialogové okno pro žádost","My Requests":"Moje žádosti","Requests to Approve":"Žádosti ke schválení","Are you sure?":"Jste si jistí?","Cancel":"Zrušit","OK":"OK","Create request":"Vytvořit žádost","Submit request":"Odeslat žádost","Delete request":"Smazat žádost","Delete":"Smazat","Accept request":"Přijmout žádost","Accept":"Přijmout","Decline request":"Zamítnout žádost","Decline":"Zamítnout","Create and submit request":"Vytvořit a odeslat žádost","Create and submit":"Vytvořit a odeslat","Error sending request":"Chyba při odesílání žádosti","Submit":"Odeslat","Save drafted request":"Uložit koncept žádosti","Save":"Uložit","Create":"Vytvořit","Creator":"Tvůrce","Receiver":"Příjemce","Request type":"Typ žádosti","Created":"Vytvořeno","Timeline":"Časová osa","Submit event":"Odeslat událost","No requests to show":"Žádné žádosti k zobrazení","api.requests":"API pro žádosti záznamu","Request deletion of published record":"Žádost o smazání zveřejněného záznamu","Request re-opening of published record":"Žádost o znovuotevření zveřejněného záznamu","Request publishing of a draft":"Žádost o kontrolu a zveřejnění konceptu","No status":"Beze stavu","Cannot send request. Please try again later.":"Nemohu poslat žádost. Prosím, zkuste později.","Cancel request":"Zrušit žádost","Submitted":"Odeslána","Expired":"Expirována","Accepted":"Přijata","Declined":"Zamítnuta","Cancelled":"Zrušena","Status":"Stav","Type":"Typ","Loading request types":"Načítám typy žádostí","Error loading request types":"Chyba při načítání typů žádostí","No new requests to create":"Nejsou dostupné žádné žádosti","Requests":"Žádosti","Error loading requests":"Chyba při načítání žádostí","Loading requests":"Načítám žádosti","Delete record":"Smazat záznam","Edit record":"Upravit záznam","Publish draft":"Publikovat","Close":"Zavřít","Request":"Žádost","Pending":"Schvalována","request":"žádost","Error while submitting comment.":"Chyba při odesílání komentáře.","Add comment":"Přidat komentář","optional":"nepovinné","Your comment here...":"Váš komentář...","Comment was not created successfully.":"Komentář nebyl úspěšně vytvořen.","Comment":"Komentář","Error while submitting the comment":"Chyba při odesílání komentáře","Back to requests":"Zpět na žádosti","Record":"Záznam","preview":"náhled","to top":"na začátek stránky","Loading timeline...":"Načítám časovou osu...","Error while fetching timeline events":"Chyba při načítání událostí časové osy","commented":"komnetoval","icon":"ikona","this request":"tato žádost","Comment must be at least 1 character long.":"Komentář musí být alespoň 1 znak dlouhý.","Invalid format.":"Neplatný formát.","Request status":"Stav žádosti","Request record deletion":"Zažádat smazání záznamu","Record deletion requested":"Zažádáno smazání záznamu","Click to permanently delete the record.":"Klikněte pro trvalé smazání záznamu.","Request permission to delete the record.":"Zažádat o povolení smazat záznam.","Permission to delete record requested. You will be notified about the decision by email.":"Zažádáno o povolení k smazání záznamu. O rozhodnutí budete informováni e-mailem.","You have been asked to approve the request to permanently delete the record. You can approve or reject the request.":"Byl jste požádán o schválení žádosti o trvalé smazání záznamu. Můžete žádost schválit nebo zamítnout.","Permission to delete record (including files) requested. ":"Zažádáno o povolení ke smazání záznamu (včetně souborů).","Submit request to get permission to delete the record.":"Odeslat žádost o povolení ke smazání záznamu.","Request edit access":"Žádost o úpravu záznamu","Edit access requested":"Zažádáno o úpravu záznamu","Click to start editing the metadata of the record.":"Klikněte pro začátek úprav metadat záznamu.","Request edit access to the record. You will be notified about the decision by email.":"Zažádat o úpravu záznamu. O rozhodnutí budete informováni e-mailem.","Edit access requested. You will be notified about the decision by email.":"Zažádáno o úpravu záznamu. O rozhodnutí budete informováni e-mailem.","You have been requested to grant edit access to the record.":"Byl jste požádán o udělení práva na upravení záznamu.","Edit access requested.":"Zažádáno o úpravu záznamu.","New Version":"Nová verze","Request requesting creation of new version of a published record.":"Žádost o vytvoření nové verze zveřejněného záznamu.","Request new version access":"Zažádat o vytvoření nové verzi","New version access requested":"Zažádáno o vytvoření nové verze","Click to start creating a new version of the record.":"Kliněte pro začátek vytváření nové verze záznamu.","Request permission to update record (including files). You will be notified about the decision by email.":"Zažádat o povolení aktualizace záznamu (včetně souborů). O rozhodnutí budete informováni e-mailem.","Permission to update record (including files) requested. You will be notified about the decision by email.":"Zažádáno o povolení aktualizace záznamu (včetně souborů). O rozhodnutí budete informováni e-mailem.","You have been asked to approve the request to update the record. You can approve or reject the request.":"Byl jste požádán o schválení žádosti o aktualizaci záznamu. Můžete žádost schválit nebo zamítnout.","Permission to update record (including files) requested. ":"Zažádáno o povolení aktualizace záznamu (včetně souborů).","Submit request to get edit access to the record.":"Odeslat žádost o povolení aktualizace záznamu (včetně souborů).","Resource version":"Verze záznamu","Write down the version (first, second…).":"Napište verzi (první, druhá…).","Submit for review":"Odeslat ke kontrole","Submitted for review":"Odesláno ke kontrole","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.":"Klikněte pro okamžité zveřejnění konceptu. Bylo-li zvoleno, záznam může podléhat embargu. Upozornění: Tuto akci není možno vzít zpět.","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 until the request is accepted or declined. You will be notified about the decision by email.":"Odesláním konceptu ke kontrole žádáte o zveřejnění konceptu. Koncept bude uzamčen a další změny nebudou možné, dokud nebude žádost přijata nebo zamítnuta. O rozhodnutí budete informováni e-mailem.","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.":"Koncept byl odeslán ke kontrole. Nyní je uzamčen a další změny nejsou možné. O rozhodnutí budete informováni e-mailem.","The draft has been submitted for review. You can now accept or decline the request.":"Koncept Vám byl odeslán ke kontrole. Žádost můžete přijmout nebo zamítnout.","The draft has been submitted for review.":"Koncept byl odeslán ke kontrole.","Submit for review. After submitting the draft for review, it will be locked and no further modifications will be possible.":"Odeslat ke kontrole. Po odeslání konceptu ke kontrole bude záznam uzamčen a další změny nebudou možné.","Request not yet submitted.":"Žádost zatím nebyla odeslána.","Delete draft":"Smazat koncept","Request draft deletion":"Zažádat o smazání konceptu","Draft deletion requested":"Zažádáno o smazání konceptu","Click to permanently delete the draft.":"Klikněte pro trvalé smazání konceptu.","Request permission to delete the draft.":"Zažádat o povolení ke smazání konceptu.","Permission to delete draft requested. You will be notified about the decision by email.":"Zažádáno o povolení ke smazání konceptu. O rozhodnutí budete informováni emailem.","You have been asked to approve the request to permanently delete the draft. You can approve or reject the request.":"Byli jste požádáni o schválení žádosti o trvalé smazání konceptu. Můžete žádost schválit nebo odmítnout.","Permission to delete draft (including files) requested. ":"Zažádáno o povolení ke smazání konceptu (včetně souborů).","Submit request to get permission to delete the draft.":"Odeslat žádost o povolení ke smazání konceptu.","Request not created successfully. Please try again in a moment.":"Žádost nebyla úspěšně vytvořena. Zkuste to prosím za chvíli znovu.","Form fields could not be fetched.":"Formulářová pole nebyla načtena.","Request details":"Podrobnosti žádosti","Topic":"Téma","Request topic":"Téma žádosti","Are you sure you want to proceed? Once the action is completed, it will not be possible to undo it.":"Jste si jisti, že chcete pokračovat? Po dokončení akce ji nebude možné vrátit zpět.","Are you sure you wish to":"Jste si jisti, že chcete","Proceed":"Pokračovat","Are you sure you wish to proceed? After this request is accepted, it will not be possible to reverse the action.":"Jste si jisti, že chcete pokračovat? Po přijetí této žádosti nebude možné akci zvrátit.","The request could not be created due to validation errors. Please correct the errors and try again.":"Žádost nemohla být vytvořena kvůli validačním chybám. Prosím opravte chyby a zkuste to znovu.","The action could not be executed. Please try again in a moment.":"Akce nebyla úspěšně provedena. Zkuste to prosím za chvíli znovu.","Record has validation errors. Redirecting to form...":"Záznam obsahuje validační chyby. Přesměrování na formulář...","Comment was not submitted successfully.":"Komentář nebyl úspěšně odeslán.","Leave comment":"Zanechat komentář","Request deletion of draft":"Zažádat o smazání konceptu","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 request timeline.":"Důrazně doporučujeme poskytnout vysvětlení zamítnutí žádosti. Všimněte si, že je vždy možné poskytnout vysvětlení později v rámci časové osy žádosti.","Record preview":"Náhled záznamu","This action is irreversible. Are you sure you wish to accept this request?":"Tato akce je nevratná. Opravdu si přejete tuto žádost přijmout?","requestCreated":"{{creatorLabel}} vytvořil(a) tuto žádost","requestSubmitted":"{{creatorLabel}} odeslal(a) tuto žádost","requestCancelled":"{{creatorLabel}} zrušil(a) tuto žádost","requestAccepted":"{{creatorLabel}} přijal(a) tuto žádost","requestDeclined":"{{creatorLabel}} odmítl(a) tuto žádost","Request expired.":"Žádost vypršela","requestDeleted":"{{creatorLabel}} smazal(a) tuto žádost","requestCommented":"komentoval(a)","Permanently delete":"Trvale smazat","Keep the record":"Ponechat záznam","Publish":"Publikovat","Return for correction":"Vrátit k opravě","api.applicable-requests":"API pro vytváření žádostí","System user":"Systémový uživatel","Keep files.":"Ponechat soubory.","Keep files in the new version?":"Ponechat soubory v nové verzi?","You do not have permission to delete the draft.":"Nemáte právo smazat rozpracovaný záznam.","You do not have permission to delete the record.":"Nemáte právo smazat záznam.","You do not have permission to update the record.":"Nemáte právo zažádat o aktualizaci záznamu.","Edit metadata":"Upravit metadata","Keep files:":"Ponechat soubory:","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.":"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.","No":"Ne","Yes":"Ano","Comment was not submitted successfully. Please try again in a moment.":"Komentář nebyl úspěšně odeslán. Zkuste to prosím za chvíli znovu.","User avatar":"Uživatelský avatar","Actions":"Akce","Edit":"Upravit","Comment was not edited successfully. Please try again in a moment.":"Komentář nebyl úspěšně upraven. Zkuste to prosím za chvíli znovu.","Comment was not deleted successfully. Please try again in a moment.":"Komentář nebyl úspěšně smazán. Zkuste to prosím za chvíli znovu.","Edited":"Upraveno","Delete comment":"Smazat komentář","Are you sure you want to delete this comment?":"Opravdu chcete tento komentář smazat?","deleted comment":"smazal(a) komentář"} \ No newline at end of file diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/en/LC_MESSAGES/translations.json b/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/en/LC_MESSAGES/translations.json index 451c9835..9435ab05 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/en/LC_MESSAGES/translations.json +++ b/oarepo_requests/ui/theme/assets/semantic-ui/translations/oarepo_requests_ui/messages/en/LC_MESSAGES/translations.json @@ -1 +1 @@ -{"api.requests":"Requests API","requestCreated":"{{creatorLabel}} created this request","requestSubmitted":"{{creatorLabel}} submitted this request","requestCancelled":"{{creatorLabel}} canceled this request","requestAccepted":"{{creatorLabel}} accepted this request","requestDeclined":"{{creatorLabel}} declined this request","Request expired.":"Request expired","requestDeleted":"{{creatorLabel}} deleted this request","requestCommented":"{{creatorLabel}} commented","api.applicable-requests":"Applicable requests API"} \ No newline at end of file +{"api.requests":"Requests API","requestCreated":"{{creatorLabel}} created this request","requestSubmitted":"{{creatorLabel}} submitted this request","requestCancelled":"{{creatorLabel}} canceled this request","requestAccepted":"{{creatorLabel}} accepted this request","requestDeclined":"{{creatorLabel}} declined this request","Request expired.":"Request expired","requestDeleted":"{{creatorLabel}} deleted this request","requestCommented":"commented","api.applicable-requests":"Applicable requests API"} \ No newline at end of file