Fix translation for direction

This commit is contained in:
eikek
2021-06-07 10:08:15 +02:00
parent d6bff7b2e6
commit 6d8bd530cb
13 changed files with 52 additions and 22 deletions

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)
]

View File

@ -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

View File

@ -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