mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 10:29:34 +00:00
Fix translation for direction
This commit is contained in:
parent
d6bff7b2e6
commit
6d8bd530cb
@ -694,15 +694,15 @@ view2 texts attr settings model =
|
||||
(viewIntern2 texts settings True model)
|
||||
|
||||
|
||||
formHeading : String -> Model -> Html msg
|
||||
formHeading classes model =
|
||||
formHeading : Texts -> String -> Model -> Html msg
|
||||
formHeading texts classes model =
|
||||
let
|
||||
heading =
|
||||
fold (\_ -> "Add Tag")
|
||||
(\_ -> "Add Person")
|
||||
(\_ -> "Add Organization")
|
||||
(\_ -> "Add Equipment")
|
||||
(\_ -> "Add Custom Field")
|
||||
fold (\_ -> texts.addTagHeader)
|
||||
(\_ -> texts.addPersonHeader)
|
||||
(\_ -> texts.addOrgHeader)
|
||||
(\_ -> texts.addEquipmentHeader)
|
||||
(\_ -> texts.addCustomFieldHeader)
|
||||
|
||||
headIcon =
|
||||
fold (\_ -> Icons.tagIcon2 "mr-2")
|
||||
@ -724,11 +724,11 @@ viewModal2 texts settings mm =
|
||||
mm == Nothing
|
||||
|
||||
heading =
|
||||
fold (\_ -> "Add Tag")
|
||||
(\_ -> "Add Person")
|
||||
(\_ -> "Add Organization")
|
||||
(\_ -> "Add Equipment")
|
||||
(\_ -> "Add Custom Field")
|
||||
fold (\_ -> texts.addTagHeader)
|
||||
(\_ -> texts.addPersonHeader)
|
||||
(\_ -> texts.addOrgHeader)
|
||||
(\_ -> texts.addEquipmentHeader)
|
||||
(\_ -> texts.addCustomFieldHeader)
|
||||
|
||||
headIcon =
|
||||
fold (\_ -> Icons.tagIcon2 "mr-2")
|
||||
|
@ -117,7 +117,7 @@ formTabs texts flags settings model =
|
||||
directionCfg =
|
||||
{ makeOption =
|
||||
\entry ->
|
||||
{ text = Data.Direction.toString entry
|
||||
{ text = texts.direction entry
|
||||
, additional = ""
|
||||
}
|
||||
, placeholder = texts.chooseDirection
|
||||
|
@ -104,7 +104,7 @@ multiUpdate flags ids change receive =
|
||||
DirectionChange dir ->
|
||||
let
|
||||
data =
|
||||
ItemsAndDirection items (Data.Direction.toString dir)
|
||||
ItemsAndDirection items (Data.Direction.asString dir)
|
||||
in
|
||||
Api.setDirectionMultiple flags data receive
|
||||
|
||||
|
@ -688,7 +688,7 @@ renderEditForm2 texts flags cfg settings model =
|
||||
directionCfg =
|
||||
{ makeOption =
|
||||
\entry ->
|
||||
{ text = Data.Direction.toString entry
|
||||
{ text = texts.direction entry
|
||||
, additional = ""
|
||||
}
|
||||
, placeholder = texts.chooseDirection
|
||||
|
@ -1628,7 +1628,7 @@ setDirection flags model =
|
||||
in
|
||||
case dir of
|
||||
Just d ->
|
||||
Api.setDirection flags model.item.id (DirectionValue (Data.Direction.toString d)) SaveResp
|
||||
Api.setDirection flags model.item.id (DirectionValue (Data.Direction.asString d)) SaveResp
|
||||
|
||||
Nothing ->
|
||||
Cmd.none
|
||||
|
@ -314,7 +314,7 @@ addDetailForm texts settings model =
|
||||
[ class "flex flex-col px-2 py-2 mb-4"
|
||||
, class S.box
|
||||
]
|
||||
[ Comp.DetailEdit.formHeading S.header3 mm
|
||||
[ Comp.DetailEdit.formHeading texts.detailEdit S.header3 mm
|
||||
, Html.map ModalEditMsg (Comp.DetailEdit.view2 texts.detailEdit [] settings mm)
|
||||
]
|
||||
|
||||
|
@ -303,7 +303,7 @@ makeSettings model =
|
||||
, deleteMail = model.deleteMail
|
||||
, targetFolder = model.targetFolder
|
||||
, folders = folders
|
||||
, direction = Maybe.map Data.Direction.toString model.direction
|
||||
, direction = Maybe.map Data.Direction.asString model.direction
|
||||
, schedule = Data.CalEvent.makeEvent timer
|
||||
, itemFolder = model.itemFolderId
|
||||
, fileFilter = model.fileFilter
|
||||
|
@ -1120,7 +1120,7 @@ searchTabs texts ddd flags settings model =
|
||||
directionCfg =
|
||||
{ makeOption =
|
||||
\entry ->
|
||||
{ text = Data.Direction.toString entry
|
||||
{ text = texts.direction entry
|
||||
, additional = ""
|
||||
}
|
||||
, placeholder = texts.chooseDirection
|
||||
|
@ -1,6 +1,7 @@
|
||||
module Data.Direction exposing
|
||||
( Direction(..)
|
||||
, all
|
||||
, asString
|
||||
, fromString
|
||||
, icon
|
||||
, icon2
|
||||
@ -8,7 +9,6 @@ module Data.Direction exposing
|
||||
, iconFromMaybe2
|
||||
, iconFromString
|
||||
, iconFromString2
|
||||
, toString
|
||||
)
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ all =
|
||||
]
|
||||
|
||||
|
||||
toString : Direction -> String
|
||||
toString dir =
|
||||
asString : Direction -> String
|
||||
asString dir =
|
||||
case dir of
|
||||
Incoming ->
|
||||
"Incoming"
|
||||
|
@ -24,6 +24,11 @@ type alias Texts =
|
||||
, httpError : Http.Error -> String
|
||||
, submitSuccessful : String
|
||||
, missingRequiredFields : String
|
||||
, addTagHeader : String
|
||||
, addPersonHeader : String
|
||||
, addOrgHeader : String
|
||||
, addEquipmentHeader : String
|
||||
, addCustomFieldHeader : String
|
||||
}
|
||||
|
||||
|
||||
@ -38,6 +43,11 @@ gb =
|
||||
, httpError = Messages.Comp.HttpError.gb
|
||||
, submitSuccessful = "Successfully saved."
|
||||
, missingRequiredFields = "Please fill required fields."
|
||||
, addTagHeader = "Add Tag"
|
||||
, addPersonHeader = "Add Person"
|
||||
, addOrgHeader = "Add Organization"
|
||||
, addEquipmentHeader = "Add Equipment"
|
||||
, addCustomFieldHeader = "Add Custom Field"
|
||||
}
|
||||
|
||||
|
||||
@ -52,4 +62,9 @@ de =
|
||||
, httpError = Messages.Comp.HttpError.de
|
||||
, submitSuccessful = "Erfolgreich gespeichert."
|
||||
, missingRequiredFields = "Bitte erforderliche Felder ausfüllen."
|
||||
, addTagHeader = "Tag anlegen"
|
||||
, addPersonHeader = "Person anlegen"
|
||||
, addOrgHeader = "Organisation anlegen"
|
||||
, addEquipmentHeader = "Zubehör anlegen"
|
||||
, addCustomFieldHeader = "Benutzer-Feld anlegen"
|
||||
}
|
||||
|
@ -4,8 +4,10 @@ module Messages.Comp.ItemDetail.EditForm exposing
|
||||
, gb
|
||||
)
|
||||
|
||||
import Data.Direction exposing (Direction)
|
||||
import Messages.Basics
|
||||
import Messages.Comp.CustomFieldMultiInput
|
||||
import Messages.Data.Direction
|
||||
import Messages.DateFormat as DF
|
||||
import Messages.UiLanguage
|
||||
|
||||
@ -27,6 +29,7 @@ type alias Texts =
|
||||
, editEquipment : String
|
||||
, suggestions : String
|
||||
, formatDate : Int -> String
|
||||
, direction : Direction -> String
|
||||
}
|
||||
|
||||
|
||||
@ -48,6 +51,7 @@ gb =
|
||||
, editEquipment = "Edit equipment"
|
||||
, suggestions = "Suggestions"
|
||||
, formatDate = DF.formatDateLong Messages.UiLanguage.English
|
||||
, direction = Messages.Data.Direction.gb
|
||||
}
|
||||
|
||||
|
||||
@ -69,4 +73,5 @@ de =
|
||||
, editEquipment = "Zubehör ändern"
|
||||
, suggestions = "Vorschläge"
|
||||
, formatDate = DF.formatDateLong Messages.UiLanguage.German
|
||||
, direction = Messages.Data.Direction.de
|
||||
}
|
||||
|
@ -4,8 +4,10 @@ module Messages.Comp.ItemDetail.MultiEditMenu exposing
|
||||
, gb
|
||||
)
|
||||
|
||||
import Data.Direction exposing (Direction)
|
||||
import Messages.Basics
|
||||
import Messages.Comp.CustomFieldMultiInput
|
||||
import Messages.Data.Direction
|
||||
|
||||
|
||||
type alias Texts =
|
||||
@ -20,6 +22,7 @@ type alias Texts =
|
||||
, unconfirm : String
|
||||
, changeTagMode : String
|
||||
, dueDateTab : String
|
||||
, direction : Direction -> String
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +39,7 @@ gb =
|
||||
, unconfirm = "Unconfirm"
|
||||
, changeTagMode = "Change tag edit mode"
|
||||
, dueDateTab = "Due Date"
|
||||
, direction = Messages.Data.Direction.gb
|
||||
}
|
||||
|
||||
|
||||
@ -52,4 +56,5 @@ de =
|
||||
, unconfirm = "Widerufe Betätigung"
|
||||
, changeTagMode = "Wechsel den Änderungs-Modus für Tags"
|
||||
, dueDateTab = "Fälligkeits-Datum"
|
||||
, direction = Messages.Data.Direction.de
|
||||
}
|
||||
|
@ -4,10 +4,12 @@ module Messages.Comp.SearchMenu exposing
|
||||
, gb
|
||||
)
|
||||
|
||||
import Data.Direction exposing (Direction)
|
||||
import Messages.Basics
|
||||
import Messages.Comp.CustomFieldMultiInput
|
||||
import Messages.Comp.FolderSelect
|
||||
import Messages.Comp.TagSelect
|
||||
import Messages.Data.Direction
|
||||
|
||||
|
||||
type alias Texts =
|
||||
@ -36,6 +38,7 @@ type alias Texts =
|
||||
, dueTo : String
|
||||
, sourceTab : String
|
||||
, searchInItemSource : String
|
||||
, direction : Direction -> String
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +69,7 @@ gb =
|
||||
, dueTo = "Due To"
|
||||
, sourceTab = "Source"
|
||||
, searchInItemSource = "Search in item source…"
|
||||
, direction = Messages.Data.Direction.gb
|
||||
}
|
||||
|
||||
|
||||
@ -96,4 +100,5 @@ de =
|
||||
, dueTo = "Fällig bis"
|
||||
, sourceTab = "Quelle"
|
||||
, searchInItemSource = "Suche in Dokument Quelle…"
|
||||
, direction = Messages.Data.Direction.de
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user