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