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

@ -4,6 +4,7 @@ import Http
import Messages.Comp.DetailEdit
import Messages.Comp.HttpError
import Messages.Comp.ItemDetail.AddFilesForm
import Messages.Comp.ItemDetail.ConfirmModal
import Messages.Comp.ItemDetail.ItemInfoHeader
import Messages.Comp.ItemDetail.Notes
import Messages.Comp.ItemDetail.SingleAttachment
@ -21,6 +22,7 @@ type alias Texts =
, notes : Messages.Comp.ItemDetail.Notes.Texts
, itemMail : Messages.Comp.ItemMail.Texts
, detailEdit : Messages.Comp.DetailEdit.Texts
, confirmModal : Messages.Comp.ItemDetail.ConfirmModal.Texts
, httpError : Http.Error -> String
, key : String
, backToSearchResults : String
@ -53,6 +55,7 @@ gb =
, notes = Messages.Comp.ItemDetail.Notes.gb
, itemMail = Messages.Comp.ItemMail.gb
, detailEdit = Messages.Comp.DetailEdit.gb
, confirmModal = Messages.Comp.ItemDetail.ConfirmModal.gb
, httpError = Messages.Comp.HttpError.gb
, key = "Key"
, backToSearchResults = "Back to search results"

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"