Extract strings in item detail modals

This commit is contained in:
Eike Kettner
2021-04-26 22:02:45 +02:00
parent a98211af22
commit e3053549b3
8 changed files with 138 additions and 81 deletions

View File

@@ -0,0 +1,44 @@
module Messages.Comp.ItemDetail.ConfirmModal exposing
( Texts
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, confirmReprocessItem : String -> String
, confirmReprocessFile : String -> String
, confirmDeleteItem : String
, confirmDeleteFile : String
, confirmDeleteAllFiles : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, confirmReprocessItem =
\state ->
if state == "created" then
"Reprocessing this item may change its metadata, "
++ "since it is unconfirmed. Do you want to proceed?"
else
"Reprocessing this item will not change its metadata, "
++ "since it has been confirmed. Do you want to proceed?"
, confirmReprocessFile =
\state ->
if state == "created" then
"Reprocessing this file may change metadata of "
++ "this item, since it is unconfirmed. Do you want to proceed?"
else
"Reprocessing this file will not change metadata of "
++ "this item, since it has been confirmed. Do you want to proceed?"
, confirmDeleteItem =
"Really delete this item? This cannot be undone."
, confirmDeleteFile = "Really delete this file?"
, confirmDeleteAllFiles = "Really delete these files?"
}

View File

@@ -1,10 +1,12 @@
module Messages.Comp.ItemDetail.SingleAttachment exposing (Texts, gb)
import Messages.Comp.AttachmentMeta
import Messages.Comp.ItemDetail.ConfirmModal
type alias Texts =
{ attachmentMeta : Messages.Comp.AttachmentMeta.Texts
, confirmModal : Messages.Comp.ItemDetail.ConfirmModal.Texts
, noName : String
, openFileInNewTab : String
, downloadFile : String
@@ -24,6 +26,7 @@ type alias Texts =
gb : Texts
gb =
{ attachmentMeta = Messages.Comp.AttachmentMeta.gb
, confirmModal = Messages.Comp.ItemDetail.ConfirmModal.gb
, noName = "No name"
, openFileInNewTab = "Open file in new tab"
, downloadFile = "Download file"