From 92ae22a68d1cdc100b8672f0a0c0774cb57c95b6 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 10 Apr 2021 16:02:34 +0200 Subject: [PATCH] Externalize more strings missed before --- .../webapp/src/main/elm/Comp/ColorTagger.elm | 8 +++-- .../src/main/elm/Comp/CustomFieldForm.elm | 2 +- .../src/main/elm/Comp/EmailSettingsForm.elm | 2 +- .../src/main/elm/Comp/EmailSettingsTable.elm | 2 +- .../src/main/elm/Comp/EquipmentForm.elm | 12 +++---- .../src/main/elm/Comp/EquipmentTable.elm | 2 +- .../webapp/src/main/elm/Comp/FolderDetail.elm | 2 +- .../webapp/src/main/elm/Comp/FolderTable.elm | 2 +- .../src/main/elm/Comp/ImapSettingsForm.elm | 2 +- .../src/main/elm/Comp/ImapSettingsTable.elm | 2 +- modules/webapp/src/main/elm/Comp/ItemCard.elm | 22 ++++++------- .../src/main/elm/Comp/ItemDetail/EditForm.elm | 22 ++++++------- .../elm/Comp/ItemDetail/ItemInfoHeader.elm | 6 ++-- .../elm/Comp/ItemDetail/MultiEditMenu.elm | 22 ++++++------- modules/webapp/src/main/elm/Comp/OrgForm.elm | 4 +-- modules/webapp/src/main/elm/Comp/OrgTable.elm | 2 +- .../webapp/src/main/elm/Comp/PersonForm.elm | 6 ++-- .../webapp/src/main/elm/Comp/PersonTable.elm | 8 ++--- .../webapp/src/main/elm/Comp/SearchMenu.elm | 20 ++++++------ .../webapp/src/main/elm/Comp/SourceForm.elm | 6 ++-- modules/webapp/src/main/elm/Comp/TagForm.elm | 4 +-- modules/webapp/src/main/elm/Comp/TagTable.elm | 2 +- .../src/main/elm/Comp/UiSettingsForm.elm | 3 +- .../webapp/src/main/elm/Data/Direction.elm | 8 ----- .../webapp/src/main/elm/Data/ItemTemplate.elm | 32 ------------------- .../webapp/src/main/elm/Messages/Basics.elm | 20 ++++++++++++ .../elm/Messages/Comp/CustomFieldForm.elm | 2 -- .../elm/Messages/Comp/EmailSettingsForm.elm | 9 +++--- .../elm/Messages/Comp/EmailSettingsTable.elm | 6 ++-- .../main/elm/Messages/Comp/EquipmentForm.elm | 15 +++++++-- .../main/elm/Messages/Comp/EquipmentTable.elm | 5 +-- .../main/elm/Messages/Comp/FolderDetail.elm | 2 -- .../main/elm/Messages/Comp/FolderTable.elm | 2 -- .../elm/Messages/Comp/ImapSettingsForm.elm | 9 +++--- .../elm/Messages/Comp/ImapSettingsTable.elm | 6 ++-- .../src/main/elm/Messages/Comp/ItemCard.elm | 16 ++++++++-- .../elm/Messages/Comp/ItemDetail/EditForm.elm | 16 ---------- .../Comp/ItemDetail/ItemInfoHeader.elm | 14 ++++---- .../Comp/ItemDetail/MultiEditMenu.elm | 20 ------------ .../src/main/elm/Messages/Comp/OrgForm.elm | 9 +++--- .../src/main/elm/Messages/Comp/OrgTable.elm | 2 -- .../src/main/elm/Messages/Comp/PersonForm.elm | 11 +++---- .../main/elm/Messages/Comp/PersonTable.elm | 4 +-- .../src/main/elm/Messages/Comp/SearchMenu.elm | 18 ----------- .../src/main/elm/Messages/Comp/SourceForm.elm | 4 --- .../src/main/elm/Messages/Comp/TagForm.elm | 10 +++--- .../src/main/elm/Messages/Comp/TagTable.elm | 6 ++-- .../main/elm/Messages/Comp/UiSettingsForm.elm | 29 +++++++++++++++++ .../src/main/elm/Messages/Comp/UserTable.elm | 2 -- .../src/main/elm/Messages/Data/Color.elm | 2 +- .../src/main/elm/Messages/Page/ManageData.elm | 10 ------ .../src/main/elm/Page/ManageData/View2.elm | 20 ++++++------ 52 files changed, 219 insertions(+), 253 deletions(-) diff --git a/modules/webapp/src/main/elm/Comp/ColorTagger.elm b/modules/webapp/src/main/elm/Comp/ColorTagger.elm index d9097abc..3fa42a20 100644 --- a/modules/webapp/src/main/elm/Comp/ColorTagger.elm +++ b/modules/webapp/src/main/elm/Comp/ColorTagger.elm @@ -90,6 +90,7 @@ update msg model = type alias ViewOpts = { renderItem : ( String, Color ) -> Html Msg + , colorLabel : Color -> String , label : String , description : Maybe String } @@ -116,6 +117,7 @@ view2 data opts model = ) , div [ class "field" ] [ chooseColor2 + opts.colorLabel (AddPair data) Data.Color.all Nothing @@ -169,8 +171,8 @@ renderFormData2 opts data = (List.map valueItem values) -chooseColor2 : (Color -> msg) -> List Color -> Maybe String -> Html msg -chooseColor2 tagger colors mtext = +chooseColor2 : (Color -> String) -> (Color -> msg) -> List Color -> Maybe String -> Html msg +chooseColor2 colorLabel tagger colors mtext = let renderLabel color = a @@ -180,7 +182,7 @@ chooseColor2 tagger colors mtext = , onClick (tagger color) ] [ Maybe.withDefault - (Data.Color.toString color) + (colorLabel color) mtext |> text ] diff --git a/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm b/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm index 30843bf3..ff6f783f 100644 --- a/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm +++ b/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm @@ -253,7 +253,7 @@ view2 texts viewSettings model = [ class S.inputLabel , for "fieldname" ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input diff --git a/modules/webapp/src/main/elm/Comp/EmailSettingsForm.elm b/modules/webapp/src/main/elm/Comp/EmailSettingsForm.elm index 83bc04a1..11d2f975 100644 --- a/modules/webapp/src/main/elm/Comp/EmailSettingsForm.elm +++ b/modules/webapp/src/main/elm/Comp/EmailSettingsForm.elm @@ -190,7 +190,7 @@ view2 texts settings model = [ label [ class S.inputLabel ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input diff --git a/modules/webapp/src/main/elm/Comp/EmailSettingsTable.elm b/modules/webapp/src/main/elm/Comp/EmailSettingsTable.elm index 40a39446..44748906 100644 --- a/modules/webapp/src/main/elm/Comp/EmailSettingsTable.elm +++ b/modules/webapp/src/main/elm/Comp/EmailSettingsTable.elm @@ -54,7 +54,7 @@ view2 texts model = [ thead [] [ tr [] [ th [ class "" ] [] - , th [ class "text-left mr-2" ] [ text texts.name ] + , th [ class "text-left mr-2" ] [ text texts.basics.name ] , th [ class "text-left mr-2" ] [ text texts.hostPort ] , th [ class "text-left mr-2 hidden sm:table-cell" ] [ text texts.from ] ] diff --git a/modules/webapp/src/main/elm/Comp/EquipmentForm.elm b/modules/webapp/src/main/elm/Comp/EquipmentForm.elm index 48448844..12764637 100644 --- a/modules/webapp/src/main/elm/Comp/EquipmentForm.elm +++ b/modules/webapp/src/main/elm/Comp/EquipmentForm.elm @@ -115,13 +115,13 @@ view2 texts model = [ for "equipname" , class S.inputLabel ] - [ text "Name" + [ text texts.basics.name , B.inputRequired ] , input [ type_ "text" , onInput SetName - , placeholder "Name" + , placeholder texts.basics.name , value model.name , name "equipname" , class S.textInput @@ -137,21 +137,21 @@ view2 texts model = [ label [ class S.inputLabel ] - [ text "Use" ] + [ text texts.use ] , Html.map UseDropdownMsg (Comp.FixedDropdown.viewStyled2 equipUseCfg False (Just model.use) model.useModel) , span [ class "opacity-50 text-sm" ] [ case model.use of Data.EquipmentUse.Concerning -> - text "Use as concerning equipment" + text texts.useAsConcerning Data.EquipmentUse.Disabled -> - text "Do not use for suggestions." + text texts.useNotSuggestions ] ] , div [ class "mb-4" ] [ h3 [ class S.header3 ] - [ text "Notes" + [ text texts.notes ] , div [ class "" ] [ textarea diff --git a/modules/webapp/src/main/elm/Comp/EquipmentTable.elm b/modules/webapp/src/main/elm/Comp/EquipmentTable.elm index be77e921..7162025a 100644 --- a/modules/webapp/src/main/elm/Comp/EquipmentTable.elm +++ b/modules/webapp/src/main/elm/Comp/EquipmentTable.elm @@ -61,7 +61,7 @@ view2 texts model = , th [ class "text-left pr-1 md:px-2 w-20" ] [ text texts.use ] - , th [ class "text-left" ] [ text texts.name ] + , th [ class "text-left" ] [ text texts.basics.name ] ] ] , tbody [] diff --git a/modules/webapp/src/main/elm/Comp/FolderDetail.elm b/modules/webapp/src/main/elm/Comp/FolderDetail.elm index 1d134020..7c8f4cd8 100644 --- a/modules/webapp/src/main/elm/Comp/FolderDetail.elm +++ b/modules/webapp/src/main/elm/Comp/FolderDetail.elm @@ -321,7 +321,7 @@ view2 texts flags model = [ class S.inputLabel , for "folder-name" ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , div [ class "flex flex-row space-x-2" ] diff --git a/modules/webapp/src/main/elm/Comp/FolderTable.elm b/modules/webapp/src/main/elm/Comp/FolderTable.elm index 8b41c823..f598cf71 100644 --- a/modules/webapp/src/main/elm/Comp/FolderTable.elm +++ b/modules/webapp/src/main/elm/Comp/FolderTable.elm @@ -52,7 +52,7 @@ view2 texts _ items = [ tr [] [ th [ class "w-px whitespace-nowrap pr-1 md:pr-3" ] [] , th [ class "text-left" ] - [ text texts.name + [ text texts.basics.name ] , th [ class "text-left hidden sm:table-cell" ] [ text "Owner" ] , th [ class "text-center" ] diff --git a/modules/webapp/src/main/elm/Comp/ImapSettingsForm.elm b/modules/webapp/src/main/elm/Comp/ImapSettingsForm.elm index cea5546b..3b7b6a73 100644 --- a/modules/webapp/src/main/elm/Comp/ImapSettingsForm.elm +++ b/modules/webapp/src/main/elm/Comp/ImapSettingsForm.elm @@ -181,7 +181,7 @@ view2 texts settings model = [ class "grid grid-cols-4 gap-y-4 gap-x-2" ] [ div [ class "col-span-4" ] [ label [ class S.inputLabel ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input diff --git a/modules/webapp/src/main/elm/Comp/ImapSettingsTable.elm b/modules/webapp/src/main/elm/Comp/ImapSettingsTable.elm index 436b4377..d0070578 100644 --- a/modules/webapp/src/main/elm/Comp/ImapSettingsTable.elm +++ b/modules/webapp/src/main/elm/Comp/ImapSettingsTable.elm @@ -54,7 +54,7 @@ view2 texts model = [ thead [] [ tr [] [ th [] [] - , th [ class "text-left mr-2" ] [ text texts.name ] + , th [ class "text-left mr-2" ] [ text texts.basics.name ] , th [ class "text-left mr-2" ] [ text texts.hostPort ] ] ] diff --git a/modules/webapp/src/main/elm/Comp/ItemCard.elm b/modules/webapp/src/main/elm/Comp/ItemCard.elm index 709bdf67..175ef0e6 100644 --- a/modules/webapp/src/main/elm/Comp/ItemCard.elm +++ b/modules/webapp/src/main/elm/Comp/ItemCard.elm @@ -204,7 +204,7 @@ view2 texts cfg settings model item = , metaDataContent2 texts settings item , notesContent2 settings item , fulltextResultsContent2 item - , previewMenu2 settings model item (currentAttachment model item) + , previewMenu2 texts settings model item (currentAttachment model item) , selectedDimmer ] ) @@ -234,7 +234,7 @@ metaDataContent2 texts settings item = [ ( "hidden", fieldHidden Data.Fields.Folder ) ] , class "hover:opacity-60" - , title texts.folder + , title texts.basics.folder ] [ Icons.folderIcon2 "mr-2" , Comp.LinkTarget.makeFolderLink item @@ -311,7 +311,7 @@ mainContent2 texts cardAction cardColor isConfirmed settings _ item = && fieldHidden Data.Fields.CorrPerson ) ] - , title "Correspondent" + , title texts.basics.correspondent ] (Icons.correspondentIcon2 "mr-2 w-4 text-center" :: Comp.LinkTarget.makeCorrLink item [ ( "hover:opacity-75", True ) ] SetLinkTarget @@ -323,7 +323,7 @@ mainContent2 texts cardAction cardColor isConfirmed settings _ item = && fieldHidden Data.Fields.ConcEquip ) ] - , title "Concerning" + , title texts.basics.concerning ] (Icons.concernedIcon2 "mr-2 w-4 text-center" :: Comp.LinkTarget.makeConcLink item [ ( "hover:opacity-75", True ) ] SetLinkTarget @@ -340,7 +340,7 @@ mainContent2 texts cardAction cardColor isConfirmed settings _ item = , ( cardColor, True ) , ( "hidden", isConfirmed ) ] - , title "New" + , title texts.new ] [ i [ class "ml-2 fa fa-exclamation-circle" ] [] ] @@ -440,8 +440,8 @@ previewImage2 settings cardAction model item = ] -previewMenu2 : UiSettings -> Model -> ItemLight -> Maybe AttachmentLight -> Html Msg -previewMenu2 settings model item mainAttach = +previewMenu2 : Texts -> UiSettings -> Model -> ItemLight -> Maybe AttachmentLight -> Html Msg +previewMenu2 texts settings model item mainAttach = let pageCount = Maybe.andThen .pageCount mainAttach @@ -478,7 +478,7 @@ previewMenu2 settings model item mainAttach = ) ] , class "label font-semibold text-sm border-gray-300 dark:border-bluegray-600" - , title ("Due on " ++ dueDate) + , title (texts.dueOn ++ " " ++ dueDate) ] [ Icons.dueDateIcon2 "mr-2" , text (" " ++ dueDate) @@ -490,7 +490,7 @@ previewMenu2 settings model item mainAttach = , class "px-2 py-1 border rounded " , href attachUrl , target "_self" - , title "Open attachment file" + , title texts.openAttachmentFile ] [ i [ class "fa fa-eye" ] [] ] @@ -498,7 +498,7 @@ previewMenu2 settings model item mainAttach = [ class S.secondaryBasicButtonPlain , class "px-2 py-1 border rounded ml-2" , Page.href (ItemDetailPage item.id) - , title "Go to detail view" + , title texts.gotoDetail ] [ i [ class "fa fa-edit" ] [] ] @@ -518,7 +518,7 @@ previewMenu2 settings model item mainAttach = [ a [ class S.secondaryBasicButtonPlain , class "px-2 py-1 border rounded-l block" - , title "Cycle attachments" + , title texts.cycleAttachments , href "#" , onClick (CyclePreview item) ] diff --git a/modules/webapp/src/main/elm/Comp/ItemDetail/EditForm.elm b/modules/webapp/src/main/elm/Comp/ItemDetail/EditForm.elm index bc43f7fe..cae38fcd 100644 --- a/modules/webapp/src/main/elm/Comp/ItemDetail/EditForm.elm +++ b/modules/webapp/src/main/elm/Comp/ItemDetail/EditForm.elm @@ -147,7 +147,7 @@ formTabs texts flags settings model = } in [ { name = FTabState.tabName TabName - , title = texts.nameTab + , title = texts.basics.name , titleRight = [] , info = Nothing , body = @@ -174,7 +174,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabDate - , title = texts.dateTab + , title = texts.basics.date , titleRight = [] , info = Nothing , body = @@ -224,7 +224,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabFolder - , title = texts.folderTab + , title = texts.basics.folder , titleRight = [] , info = Nothing , body = @@ -247,7 +247,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabCustomFields - , title = texts.customFieldsTab + , title = texts.basics.customFields , titleRight = [] , info = Nothing , body = @@ -288,7 +288,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabCorrespondent - , title = texts.correspondentTab + , title = texts.basics.correspondent , titleRight = [] , info = Nothing , body = @@ -296,7 +296,7 @@ formTabs texts flags settings model = div [ class "mb-4" ] [ label [ class S.inputLabel ] [ Icons.organizationIcon2 "mr-2" - , text texts.organization + , text texts.basics.organization , addIconLink texts.addNewOrg StartCorrOrgModal , editIconLink texts.editOrg model.corrOrgModel StartEditCorrOrgModal ] @@ -312,7 +312,7 @@ formTabs texts flags settings model = div [ class "mb-4" ] [ label [ class S.inputLabel ] [ Icons.personIcon2 "mr-2" - , text "Person" + , text texts.basics.person , addIconLink texts.addNewCorrespondentPerson StartCorrPersonModal , editIconLink texts.editPerson model.corrPersonModel @@ -338,7 +338,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabConcerning - , title = texts.concerningTab + , title = texts.basics.concerning , titleRight = [] , info = Nothing , body = @@ -346,7 +346,7 @@ formTabs texts flags settings model = div [ class "mb-4" ] [ label [ class S.inputLabel ] [ Icons.personIcon2 "mr-2" - , text "Person" + , text texts.basics.person , addIconLink texts.addNewConcerningPerson StartConcPersonModal , editIconLink texts.editPerson model.concPersonModel @@ -364,7 +364,7 @@ formTabs texts flags settings model = div [ class "mb-4" ] [ label [ class S.inputLabel ] [ Icons.equipmentIcon2 "mr-2" - , text "Equipment" + , text texts.basics.equipment , addIconLink texts.addNewEquipment StartEquipModal , editIconLink texts.editEquipment model.concEquipModel @@ -381,7 +381,7 @@ formTabs texts flags settings model = ] } , { name = FTabState.tabName TabDirection - , title = texts.directionTab + , title = texts.basics.direction , titleRight = [] , info = Nothing , body = diff --git a/modules/webapp/src/main/elm/Comp/ItemDetail/ItemInfoHeader.elm b/modules/webapp/src/main/elm/Comp/ItemDetail/ItemInfoHeader.elm index 69016724..08142a41 100644 --- a/modules/webapp/src/main/elm/Comp/ItemDetail/ItemInfoHeader.elm +++ b/modules/webapp/src/main/elm/Comp/ItemDetail/ItemInfoHeader.elm @@ -62,7 +62,7 @@ view texts settings model = corr = ( div [ class itemStyle - , title texts.correspondent + , title texts.basics.correspondent ] (Icons.correspondentIcon2 "mr-2" :: Comp.LinkTarget.makeCorrLink model.item @@ -76,7 +76,7 @@ view texts settings model = conc = ( div [ class itemStyle - , title texts.concerning + , title texts.basics.concerning ] (Icons.concernedIcon2 "mr-2" :: Comp.LinkTarget.makeConcLink model.item @@ -90,7 +90,7 @@ view texts settings model = itemfolder = ( div [ class itemStyle - , title texts.folder + , title texts.basics.folder ] [ Icons.folderIcon2 "mr-2" , Comp.LinkTarget.makeFolderLink model.item diff --git a/modules/webapp/src/main/elm/Comp/ItemDetail/MultiEditMenu.elm b/modules/webapp/src/main/elm/Comp/ItemDetail/MultiEditMenu.elm index d6972c65..3a8d6279 100644 --- a/modules/webapp/src/main/elm/Comp/ItemDetail/MultiEditMenu.elm +++ b/modules/webapp/src/main/elm/Comp/ItemDetail/MultiEditMenu.elm @@ -753,7 +753,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabFolder - , title = texts.folderTab + , title = texts.basics.folder , titleRight = [] , info = Nothing , body = @@ -769,7 +769,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabCustomFields - , title = texts.customFieldsTab + , title = texts.basics.customFields , titleRight = [] , info = Nothing , body = @@ -782,7 +782,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabDate - , title = texts.dateTab + , title = texts.basics.date , titleRight = [] , info = Nothing , body = @@ -828,7 +828,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabCorrespondent - , title = texts.correspondentTab + , title = texts.basics.correspondent , titleRight = [] , info = Nothing , body = @@ -837,7 +837,7 @@ renderEditForm2 texts flags cfg settings model = [ label [ class S.inputLabel ] [ Icons.organizationIcon2 "" , span [ class "ml-2" ] - [ text texts.organization + [ text texts.basics.organization ] ] , Html.map OrgDropdownMsg @@ -852,7 +852,7 @@ renderEditForm2 texts flags cfg settings model = [ label [ class S.inputLabel ] [ Icons.personIcon2 "" , span [ class "ml-2" ] - [ text texts.person + [ text texts.basics.person ] ] , Html.map CorrPersonMsg @@ -865,7 +865,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabConcerning - , title = texts.concerningTab + , title = texts.basics.concerning , titleRight = [] , info = Nothing , body = @@ -874,7 +874,7 @@ renderEditForm2 texts flags cfg settings model = [ label [ class S.inputLabel ] [ Icons.personIcon2 "" , span [ class "ml-2" ] - [ text texts.person ] + [ text texts.basics.person ] ] , Html.map ConcPersonMsg (Comp.Dropdown.view2 idNameCfg settings model.concPersonModel) ] @@ -883,7 +883,7 @@ renderEditForm2 texts flags cfg settings model = [ label [ class S.inputLabel ] [ Icons.equipmentIcon2 "" , span [ class "ml-2" ] - [ text texts.equipment ] + [ text texts.basics.equipment ] ] , Html.map ConcEquipMsg (Comp.Dropdown.view2 idNameCfg @@ -894,7 +894,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabDirection - , title = texts.directionTab + , title = texts.basics.direction , titleRight = [] , info = Nothing , body = @@ -902,7 +902,7 @@ renderEditForm2 texts flags cfg settings model = ] } , { name = tabName TabName - , title = texts.nameTab + , title = texts.basics.name , titleRight = [] , info = Nothing , body = diff --git a/modules/webapp/src/main/elm/Comp/OrgForm.elm b/modules/webapp/src/main/elm/Comp/OrgForm.elm index 2c77bfe1..63916044 100644 --- a/modules/webapp/src/main/elm/Comp/OrgForm.elm +++ b/modules/webapp/src/main/elm/Comp/OrgForm.elm @@ -168,13 +168,13 @@ view2 texts mobile settings model = [ for "orgname" , class S.inputLabel ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input [ type_ "text" , onInput SetName - , placeholder texts.name + , placeholder texts.basics.name , value model.name , name "orgname" , class S.textInput diff --git a/modules/webapp/src/main/elm/Comp/OrgTable.elm b/modules/webapp/src/main/elm/Comp/OrgTable.elm index 3db5b21c..68e377d4 100644 --- a/modules/webapp/src/main/elm/Comp/OrgTable.elm +++ b/modules/webapp/src/main/elm/Comp/OrgTable.elm @@ -64,7 +64,7 @@ view2 texts model = [ text "Use" ] , th [ class "text-left" ] - [ text texts.name + [ text texts.basics.name ] , th [ class "text-left hidden md:table-cell" ] [ text texts.address diff --git a/modules/webapp/src/main/elm/Comp/PersonForm.elm b/modules/webapp/src/main/elm/Comp/PersonForm.elm index f0006af5..9ada6a32 100644 --- a/modules/webapp/src/main/elm/Comp/PersonForm.elm +++ b/modules/webapp/src/main/elm/Comp/PersonForm.elm @@ -201,13 +201,13 @@ view2 texts mobile settings model = [ class S.inputLabel , for "personname" ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input [ type_ "text" , onInput SetName - , placeholder texts.name + , placeholder texts.basics.name , value model.name , class S.textInput , classList @@ -244,7 +244,7 @@ view2 texts mobile settings model = [ label [ class S.inputLabel ] - [ text texts.organization + [ text texts.basics.organization ] , Html.map OrgDropdownMsg (Comp.Dropdown.view2 diff --git a/modules/webapp/src/main/elm/Comp/PersonTable.elm b/modules/webapp/src/main/elm/Comp/PersonTable.elm index 1e7e14c8..9afb1acb 100644 --- a/modules/webapp/src/main/elm/Comp/PersonTable.elm +++ b/modules/webapp/src/main/elm/Comp/PersonTable.elm @@ -60,11 +60,11 @@ view2 texts model = [ tr [] [ th [ class "w-px whitespace-nowrap" ] [] , th [ class "text-left pr-1 md:px-2" ] - [ text "Use" + [ text texts.use ] - , th [ class "text-left" ] [ text "Name" ] - , th [ class "text-left hidden sm:table-cell" ] [ text "Organization" ] - , th [ class "text-left hidden md:table-cell" ] [ text "Contact" ] + , th [ class "text-left" ] [ text texts.basics.name ] + , th [ class "text-left hidden sm:table-cell" ] [ text texts.basics.organization ] + , th [ class "text-left hidden md:table-cell" ] [ text texts.contact ] ] ] , tbody [] diff --git a/modules/webapp/src/main/elm/Comp/SearchMenu.elm b/modules/webapp/src/main/elm/Comp/SearchMenu.elm index 00176bda..b0355286 100644 --- a/modules/webapp/src/main/elm/Comp/SearchMenu.elm +++ b/modules/webapp/src/main/elm/Comp/SearchMenu.elm @@ -1223,7 +1223,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabFolder - , title = texts.folderTab + , title = texts.basics.folder , titleRight = [] , info = Nothing , body = @@ -1235,7 +1235,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabCorrespondent - , title = texts.correspondentTab + , title = texts.basics.correspondent , titleRight = [] , info = Nothing , body = @@ -1244,7 +1244,7 @@ searchTabs texts ddd flags settings model = , classList [ ( "hidden", isHidden Data.Fields.CorrOrg ) ] ] [ label [ class S.inputLabel ] - [ text texts.organization ] + [ text texts.basics.organization ] , Html.map OrgMsg (Comp.Dropdown.view2 (Comp.Dropdown.orgFormViewSettings texts.chooseOrganization DS.sidebarStyle) @@ -1256,7 +1256,7 @@ searchTabs texts ddd flags settings model = [ class "mb-4" , classList [ ( "hidden", isHidden Data.Fields.CorrPerson ) ] ] - [ label [ class S.inputLabel ] [ text texts.person ] + [ label [ class S.inputLabel ] [ text texts.basics.person ] , Html.map CorrPersonMsg (Comp.Dropdown.view2 personCfg @@ -1267,7 +1267,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabConcerning - , title = texts.concerningTab + , title = texts.basics.concerning , titleRight = [] , info = Nothing , body = @@ -1275,7 +1275,7 @@ searchTabs texts ddd flags settings model = [ class "mb-4" , classList [ ( "hidden", isHidden Data.Fields.ConcPerson ) ] ] - [ label [ class S.inputLabel ] [ text texts.person ] + [ label [ class S.inputLabel ] [ text texts.basics.person ] , Html.map ConcPersonMsg (Comp.Dropdown.view2 personCfg @@ -1287,7 +1287,7 @@ searchTabs texts ddd flags settings model = [ class "mb-4" , classList [ ( "hidden", isHidden Data.Fields.ConcEquip ) ] ] - [ label [ class S.inputLabel ] [ text texts.equipment ] + [ label [ class S.inputLabel ] [ text texts.basics.equipment ] , Html.map ConcEquipmentMsg (Comp.Dropdown.view2 concEquipCfg @@ -1298,7 +1298,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabCustomFields - , title = texts.customFieldsTab + , title = texts.basics.customFields , titleRight = [] , info = Nothing , body = @@ -1316,7 +1316,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabDate - , title = texts.dateTab + , title = texts.basics.date , titleRight = [] , info = Nothing , body = @@ -1418,7 +1418,7 @@ searchTabs texts ddd flags settings model = ] } , { name = tabName TabDirection - , title = texts.directionTab + , title = texts.basics.direction , titleRight = [] , info = Nothing , body = diff --git a/modules/webapp/src/main/elm/Comp/SourceForm.elm b/modules/webapp/src/main/elm/Comp/SourceForm.elm index 76a31b3a..8f402588 100644 --- a/modules/webapp/src/main/elm/Comp/SourceForm.elm +++ b/modules/webapp/src/main/elm/Comp/SourceForm.elm @@ -347,14 +347,14 @@ view2 flags texts settings model = [ for "source-abbrev" , class S.inputLabel ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input [ type_ "text" , id "source-abbrev" , onInput SetAbbrev - , placeholder texts.name + , placeholder texts.basics.name , value model.abbrev , class S.textInput , classList [ ( S.inputErrorBorder, not (isValid model) ) ] @@ -424,7 +424,7 @@ view2 flags texts settings model = ] , div [ class "mb-4" ] [ label [ class S.inputLabel ] - [ text texts.folder + [ text texts.basics.folder ] , Html.map FolderDropdownMsg (Comp.Dropdown.view2 diff --git a/modules/webapp/src/main/elm/Comp/TagForm.elm b/modules/webapp/src/main/elm/Comp/TagForm.elm index af351a9d..c176f862 100644 --- a/modules/webapp/src/main/elm/Comp/TagForm.elm +++ b/modules/webapp/src/main/elm/Comp/TagForm.elm @@ -136,13 +136,13 @@ view2 texts model = [ for "tagname" , class S.inputLabel ] - [ text texts.name + [ text texts.basics.name , B.inputRequired ] , input [ type_ "text" , onInput SetName - , placeholder texts.name + , placeholder texts.basics.name , value model.name , id "tagname" , class S.textInput diff --git a/modules/webapp/src/main/elm/Comp/TagTable.elm b/modules/webapp/src/main/elm/Comp/TagTable.elm index 6a77aaac..3e0ad3ac 100644 --- a/modules/webapp/src/main/elm/Comp/TagTable.elm +++ b/modules/webapp/src/main/elm/Comp/TagTable.elm @@ -57,7 +57,7 @@ view2 texts model = [ thead [] [ tr [] [ th [ class "" ] [] - , th [ class "text-left" ] [ text texts.name ] + , th [ class "text-left" ] [ text texts.basics.name ] , th [ class "text-left" ] [ text texts.category ] ] ] diff --git a/modules/webapp/src/main/elm/Comp/UiSettingsForm.elm b/modules/webapp/src/main/elm/Comp/UiSettingsForm.elm index 49eb7973..d7f8c6a0 100644 --- a/modules/webapp/src/main/elm/Comp/UiSettingsForm.elm +++ b/modules/webapp/src/main/elm/Comp/UiSettingsForm.elm @@ -466,6 +466,7 @@ tagColorViewOpts2 texts = \( _, v ) -> span [ class (" label " ++ Data.Color.toString2 v) ] [ text (texts.colorLabel v) ] + , colorLabel = texts.colorLabel , label = texts.chooseTagColorLabel , description = Just texts.tagColorDescription } @@ -626,7 +627,7 @@ settingFormTabs texts flags _ model = , ( "hidden", not model.showPatternHelp ) ] ] - IT.helpMessage + texts.templateHelpMessage ] } , { name = "search-menu" diff --git a/modules/webapp/src/main/elm/Data/Direction.elm b/modules/webapp/src/main/elm/Data/Direction.elm index 648f183f..b7230f6f 100644 --- a/modules/webapp/src/main/elm/Data/Direction.elm +++ b/modules/webapp/src/main/elm/Data/Direction.elm @@ -8,7 +8,6 @@ module Data.Direction exposing , iconFromMaybe2 , iconFromString , iconFromString2 - , labelFromMaybe , toString ) @@ -102,10 +101,3 @@ iconFromMaybe2 : Maybe String -> String iconFromMaybe2 ms = Maybe.map iconFromString2 ms |> Maybe.withDefault unknownIcon2 - - -labelFromMaybe : Maybe String -> String -labelFromMaybe ms = - Maybe.andThen fromString ms - |> Maybe.map toString - |> Maybe.withDefault "Direction" diff --git a/modules/webapp/src/main/elm/Data/ItemTemplate.elm b/modules/webapp/src/main/elm/Data/ItemTemplate.elm index 30fbf43d..8924ad8e 100644 --- a/modules/webapp/src/main/elm/Data/ItemTemplate.elm +++ b/modules/webapp/src/main/elm/Data/ItemTemplate.elm @@ -17,7 +17,6 @@ module Data.ItemTemplate exposing , folder , from , fromMaybe - , helpMessage , isEmpty , literal , map @@ -240,37 +239,6 @@ getName = --- Parse pattern -helpMessage : String -helpMessage = - """ -A pattern allows to customize the title and subtitle of each card. -Variables expressions are enclosed in `{{` and `}}`, other text is -used as-is. The following variables are available: - -- `{{name}}` the item name -- `{{source}}` the source the item was created from -- `{{folder}}` the items folder -- `{{corrOrg}}` the correspondent organization -- `{{corrPerson}}` the correspondent person -- `{{correspondent}}` both organization and person separated by a comma -- `{{concPerson}}` the concerning person -- `{{concEquip}}` the concerning equipment -- `{{concerning}}` both person and equipment separated by a comma -- `{{fileCount}}` the number of attachments of this item -- `{{dateLong}}` the item date as full formatted date -- `{{dateShort}}` the item date as short formatted date (yyyy/mm/dd) -- `{{dueDateLong}}` the item due date as full formatted date -- `{{dueDateShort}}` the item due date as short formatted date (yyyy/mm/dd) -- `{{direction}}` the items direction values as string - -If some variable is not present, an empty string is rendered. You can -combine multiple variables with `|` to use the first non-empty one, -for example `{{corrOrg|corrPerson|-}}` would render the organization -and if that is not present the person. If both are absent a dash `-` -is rendered. -""" - - knownPattern : String -> Maybe ItemTemplate knownPattern str = case str of diff --git a/modules/webapp/src/main/elm/Messages/Basics.elm b/modules/webapp/src/main/elm/Messages/Basics.elm index 3cf515da..9c9616fb 100644 --- a/modules/webapp/src/main/elm/Messages/Basics.elm +++ b/modules/webapp/src/main/elm/Messages/Basics.elm @@ -21,6 +21,16 @@ type alias Texts = , no : String , chooseTag : String , loading : String + , name : String + , organization : String + , person : String + , equipment : String + , folder : String + , date : String + , correspondent : String + , concerning : String + , customFields : String + , direction : String } @@ -45,6 +55,16 @@ gb = , no = "No" , chooseTag = "Choose a tag…" , loading = "Loading…" + , name = "Name" + , organization = "Organization" + , person = "Person" + , equipment = "Equipment" + , folder = "Folder" + , date = "Date" + , correspondent = "Correspondent" + , concerning = "Concerning" + , customFields = "Custom Fields" + , direction = "Direction" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/CustomFieldForm.elm b/modules/webapp/src/main/elm/Messages/Comp/CustomFieldForm.elm index 27977ab3..69abed71 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/CustomFieldForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/CustomFieldForm.elm @@ -11,7 +11,6 @@ type alias Texts = , fieldTypeLabel : CustomFieldType -> String , createCustomField : String , modifyTypeWarning : String - , name : String , nameInfo : String , fieldFormat : String , fieldFormatInfo : String @@ -30,7 +29,6 @@ gb = , modifyTypeWarning = "Note that changing the format may " ++ "result in invisible values in the ui, if they don't comply to the new format!" - , name = "Name" , nameInfo = "The name uniquely identifies this field. It must be a valid " ++ "identifier, not contain spaces or weird characters." diff --git a/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsForm.elm b/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsForm.elm index b9ad0cd7..917d9986 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsForm.elm @@ -1,12 +1,13 @@ module Messages.Comp.EmailSettingsForm exposing (..) import Data.SSLType exposing (SSLType) +import Messages.Basics import Messages.Data.SSLType type alias Texts = - { sslTypeLabel : SSLType -> String - , name : String + { basics : Messages.Basics.Texts + , sslTypeLabel : SSLType -> String , connectionPlaceholder : String , connectionNameInfo : String , smtpHost : String @@ -27,8 +28,8 @@ type alias Texts = gb : Texts gb = - { sslTypeLabel = Messages.Data.SSLType.gb - , name = "Name" + { basics = Messages.Basics.gb + , sslTypeLabel = Messages.Data.SSLType.gb , connectionPlaceholder = "Connection name, e.g. 'gmail.com'" , connectionNameInfo = "The connection name must not contain whitespace or special characters." , smtpHost = "SMTP Host" diff --git a/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsTable.elm b/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsTable.elm index ca82df7b..a39c11ff 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/EmailSettingsTable.elm @@ -1,8 +1,10 @@ module Messages.Comp.EmailSettingsTable exposing (..) +import Messages.Basics + type alias Texts = - { name : String + { basics : Messages.Basics.Texts , hostPort : String , from : String } @@ -10,7 +12,7 @@ type alias Texts = gb : Texts gb = - { name = "Name" + { basics = Messages.Basics.gb , hostPort = "Host/Port" , from = "From" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/EquipmentForm.elm b/modules/webapp/src/main/elm/Messages/Comp/EquipmentForm.elm index a7c7d954..779f2fff 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/EquipmentForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/EquipmentForm.elm @@ -1,15 +1,26 @@ module Messages.Comp.EquipmentForm exposing (..) import Data.EquipmentUse exposing (EquipmentUse) +import Messages.Basics import Messages.Data.EquipmentUse type alias Texts = - { equipmentUseLabel : EquipmentUse -> String + { basics : Messages.Basics.Texts + , use : String + , useAsConcerning : String + , useNotSuggestions : String + , equipmentUseLabel : EquipmentUse -> String + , notes : String } gb : Texts gb = - { equipmentUseLabel = Messages.Data.EquipmentUse.gb + { basics = Messages.Basics.gb + , use = "Use" + , useAsConcerning = "Use as concerning equipment" + , useNotSuggestions = "Do not use for suggestions." + , equipmentUseLabel = Messages.Data.EquipmentUse.gb + , notes = "Notes" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/EquipmentTable.elm b/modules/webapp/src/main/elm/Messages/Comp/EquipmentTable.elm index 82e64b44..5039e589 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/EquipmentTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/EquipmentTable.elm @@ -1,11 +1,12 @@ module Messages.Comp.EquipmentTable exposing (..) import Data.EquipmentUse exposing (EquipmentUse) +import Messages.Basics import Messages.Data.EquipmentUse type alias Texts = - { name : String + { basics : Messages.Basics.Texts , use : String , equipmentUseLabel : EquipmentUse -> String } @@ -13,7 +14,7 @@ type alias Texts = gb : Texts gb = - { name = "Name" + { basics = Messages.Basics.gb , use = "Use" , equipmentUseLabel = Messages.Data.EquipmentUse.gb } diff --git a/modules/webapp/src/main/elm/Messages/Comp/FolderDetail.elm b/modules/webapp/src/main/elm/Messages/Comp/FolderDetail.elm index 9b5c1d2d..3c45cb34 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/FolderDetail.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/FolderDetail.elm @@ -9,7 +9,6 @@ type alias Texts = , autoOwnerInfo : String , modifyInfo : String , notOwnerInfo : String - , name : String , members : String , addMember : String , add : String @@ -25,7 +24,6 @@ gb = , autoOwnerInfo = "You are automatically set as owner of this new folder." , modifyInfo = "Modify this folder by changing the name or add/remove members." , notOwnerInfo = "You are not the owner of this folder and therefore are not allowed to edit it." - , name = "Name" , members = "Members" , addMember = "Add a new member" , add = "Add" diff --git a/modules/webapp/src/main/elm/Messages/Comp/FolderTable.elm b/modules/webapp/src/main/elm/Messages/Comp/FolderTable.elm index 4982736f..18f404fc 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/FolderTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/FolderTable.elm @@ -5,7 +5,6 @@ import Messages.Basics type alias Texts = { basics : Messages.Basics.Texts - , name : String , memberCount : String } @@ -13,6 +12,5 @@ type alias Texts = gb : Texts gb = { basics = Messages.Basics.gb - , name = "Name" , memberCount = "#Member" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsForm.elm b/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsForm.elm index 069dfcc2..c5c1f204 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsForm.elm @@ -1,12 +1,13 @@ module Messages.Comp.ImapSettingsForm exposing (..) import Data.SSLType exposing (SSLType) +import Messages.Basics import Messages.Data.SSLType type alias Texts = - { sslTypeLabel : SSLType -> String - , name : String + { basics : Messages.Basics.Texts + , sslTypeLabel : SSLType -> String , connectionNamePlaceholder : String , connectionNameInfo : String , imapHost : String @@ -25,8 +26,8 @@ type alias Texts = gb : Texts gb = - { sslTypeLabel = Messages.Data.SSLType.gb - , name = "Name" + { basics = Messages.Basics.gb + , sslTypeLabel = Messages.Data.SSLType.gb , connectionNamePlaceholder = "Connection name, e.g. 'gmail.com'" , connectionNameInfo = "The connection name must not contain whitespace or special characters." , imapHost = "IMAP Host" diff --git a/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsTable.elm b/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsTable.elm index f2f4c4ac..2fdef3e0 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ImapSettingsTable.elm @@ -1,14 +1,16 @@ module Messages.Comp.ImapSettingsTable exposing (..) +import Messages.Basics + type alias Texts = - { name : String + { basics : Messages.Basics.Texts , hostPort : String } gb : Texts gb = - { name = "Name" + { basics = Messages.Basics.gb , hostPort = "Host/Port" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/ItemCard.elm b/modules/webapp/src/main/elm/Messages/Comp/ItemCard.elm index b5ba78b7..56941360 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ItemCard.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ItemCard.elm @@ -1,12 +1,24 @@ module Messages.Comp.ItemCard exposing (..) +import Messages.Basics + type alias Texts = - { folder : String + { basics : Messages.Basics.Texts + , dueOn : String + , new : String + , openAttachmentFile : String + , gotoDetail : String + , cycleAttachments : String } gb : Texts gb = - { folder = "Folder" + { basics = Messages.Basics.gb + , dueOn = "Due on" + , new = "New" + , openAttachmentFile = "Open attachment file" + , gotoDetail = "Go to detail view" + , cycleAttachments = "Cycle attachments" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/EditForm.elm b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/EditForm.elm index b215a40c..eefe9be8 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/EditForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/EditForm.elm @@ -10,25 +10,17 @@ type alias Texts = , createNewCustomField : String , chooseDirection : String , selectPlaceholder : String - , nameTab : String - , dateTab : String - , folderTab : String , folderNotOwnerWarning : String - , customFieldsTab : String , dueDateTab : String - , correspondentTab : String - , organization : String , addNewOrg : String , editOrg : String , chooseOrg : String , addNewCorrespondentPerson : String , editPerson : String , personOrgInfo : String - , concerningTab : String , addNewConcerningPerson : String , addNewEquipment : String , editEquipment : String - , directionTab : String , suggestions : String } @@ -40,29 +32,21 @@ gb = , createNewCustomField = "Create new custom field" , chooseDirection = "Choose a direction…" , selectPlaceholder = "Select…" - , nameTab = "Name" - , dateTab = "Date" - , folderTab = "Folder" , folderNotOwnerWarning = """ You are **not a member** of this folder. This item will be **hidden** from any search now. Use a folder where you are a member of to make this item visible. This message will disappear then. """ - , customFieldsTab = "Custom Fields" , dueDateTab = "Due Date" - , correspondentTab = "Correspondent" - , organization = "Organization" , addNewOrg = "Add new organization" , editOrg = "Edit organization" , chooseOrg = "Choose an organization" , addNewCorrespondentPerson = "Add new correspondent person" , editPerson = "Edit person" , personOrgInfo = "The selected person doesn't belong to the selected organization." - , concerningTab = "Concerning" , addNewConcerningPerson = "Add new concerning person" , addNewEquipment = "Add new equipment" , editEquipment = "Edit equipment" - , directionTab = "Direction" , suggestions = "Suggestions" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/ItemInfoHeader.elm b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/ItemInfoHeader.elm index b330a77d..aef26dae 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/ItemInfoHeader.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/ItemInfoHeader.elm @@ -1,12 +1,12 @@ module Messages.Comp.ItemDetail.ItemInfoHeader exposing (..) +import Messages.Basics + type alias Texts = - { itemDate : String + { basics : Messages.Basics.Texts + , itemDate : String , dueDate : String - , correspondent : String - , concerning : String - , folder : String , source : String , new : String } @@ -14,11 +14,9 @@ type alias Texts = gb : Texts gb = - { itemDate = "Item Date" + { basics = Messages.Basics.gb + , itemDate = "Item Date" , dueDate = "Due Date" - , correspondent = "Correspondent" - , concerning = "Concerning" - , folder = "Folder" , source = "Source" , new = "New" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/MultiEditMenu.elm b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/MultiEditMenu.elm index 1f9bf3c1..1ed6d2c2 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/MultiEditMenu.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/ItemDetail/MultiEditMenu.elm @@ -16,18 +16,8 @@ type alias Texts = , confirm : String , unconfirm : String , changeTagMode : String - , folderTab : String , folderNotOwnerWarning : String - , customFieldsTab : String - , dateTab : String , dueDateTab : String - , correspondentTab : String - , organization : String - , person : String - , concerningTab : String - , equipment : String - , directionTab : String - , nameTab : String } @@ -44,21 +34,11 @@ gb = , confirm = "Confirm" , unconfirm = "Unconfirm" , changeTagMode = "Change tag edit mode" - , folderTab = "Folder" , folderNotOwnerWarning = """ You are **not a member** of this folder. This item will be **hidden** from any search now. Use a folder where you are a member of to make this item visible. This message will disappear then. """ - , customFieldsTab = "Custom Fields" - , dateTab = "Date" , dueDateTab = "Due Date" - , correspondentTab = "Correspondent" - , organization = "Organization" - , person = "Person" - , concerningTab = "Concerning" - , equipment = "Equipment" - , directionTab = "Direction" - , nameTab = "Name" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/OrgForm.elm b/modules/webapp/src/main/elm/Messages/Comp/OrgForm.elm index 13d5241f..b22139d2 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/OrgForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/OrgForm.elm @@ -2,15 +2,16 @@ module Messages.Comp.OrgForm exposing (..) import Data.ContactType exposing (ContactType) import Data.OrgUse exposing (OrgUse) +import Messages.Basics import Messages.Comp.AddressForm import Messages.Data.ContactType import Messages.Data.OrgUse type alias Texts = - { addressForm : Messages.Comp.AddressForm.Texts + { basics : Messages.Basics.Texts + , addressForm : Messages.Comp.AddressForm.Texts , orgUseLabel : OrgUse -> String - , name : String , shortName : String , use : String , useAsCorrespondent : String @@ -24,9 +25,9 @@ type alias Texts = gb : Texts gb = - { addressForm = Messages.Comp.AddressForm.gb + { basics = Messages.Basics.gb + , addressForm = Messages.Comp.AddressForm.gb , orgUseLabel = Messages.Data.OrgUse.gb - , name = "Name" , shortName = "Short Name" , use = "Use" , useAsCorrespondent = "Use as correspondent" diff --git a/modules/webapp/src/main/elm/Messages/Comp/OrgTable.elm b/modules/webapp/src/main/elm/Messages/Comp/OrgTable.elm index 361c1903..867ff913 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/OrgTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/OrgTable.elm @@ -7,7 +7,6 @@ import Messages.Data.OrgUse type alias Texts = { basics : Messages.Basics.Texts - , name : String , address : String , contact : String , orgUseLabel : OrgUse -> String @@ -17,7 +16,6 @@ type alias Texts = gb : Texts gb = { basics = Messages.Basics.gb - , name = "Name" , address = "Address" , contact = "Contact" , orgUseLabel = Messages.Data.OrgUse.gb diff --git a/modules/webapp/src/main/elm/Messages/Comp/PersonForm.elm b/modules/webapp/src/main/elm/Messages/Comp/PersonForm.elm index 53cedf43..fcb9bae3 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/PersonForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/PersonForm.elm @@ -2,21 +2,21 @@ module Messages.Comp.PersonForm exposing (..) import Data.ContactType exposing (ContactType) import Data.PersonUse exposing (PersonUse) +import Messages.Basics import Messages.Comp.AddressForm import Messages.Data.ContactType import Messages.Data.PersonUse type alias Texts = - { addressForm : Messages.Comp.AddressForm.Texts + { basics : Messages.Basics.Texts + , addressForm : Messages.Comp.AddressForm.Texts , personUseLabel : PersonUse -> String - , name : String , useOfPerson : String , useAsConcerningOnly : String , useAsCorrespondentOnly : String , useAsBoth : String , dontUseForSuggestions : String - , organization : String , chooseAnOrg : String , address : String , contacts : String @@ -27,15 +27,14 @@ type alias Texts = gb : Texts gb = - { addressForm = Messages.Comp.AddressForm.gb + { basics = Messages.Basics.gb + , addressForm = Messages.Comp.AddressForm.gb , personUseLabel = Messages.Data.PersonUse.gb - , name = "Name" , useOfPerson = "Use of this person" , useAsConcerningOnly = "Use as concerning person only" , useAsCorrespondentOnly = "Use as correspondent person only" , useAsBoth = "Use as both concerning or correspondent person" , dontUseForSuggestions = "Do not use for suggestions." - , organization = "Organization" , chooseAnOrg = "Choose an organization" , address = "Address" , contacts = "Contacts" diff --git a/modules/webapp/src/main/elm/Messages/Comp/PersonTable.elm b/modules/webapp/src/main/elm/Messages/Comp/PersonTable.elm index 8d10a81d..2e81db34 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/PersonTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/PersonTable.elm @@ -7,9 +7,9 @@ import Messages.Data.PersonUse type alias Texts = { basics : Messages.Basics.Texts - , name : String , address : String , contact : String + , use : String , personUseLabel : PersonUse -> String } @@ -17,8 +17,8 @@ type alias Texts = gb : Texts gb = { basics = Messages.Basics.gb - , name = "Name" , address = "Address" , contact = "Contact" + , use = "Use" , personUseLabel = Messages.Data.PersonUse.gb } diff --git a/modules/webapp/src/main/elm/Messages/Comp/SearchMenu.elm b/modules/webapp/src/main/elm/Messages/Comp/SearchMenu.elm index 5eb7f4de..9e693e63 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/SearchMenu.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/SearchMenu.elm @@ -21,16 +21,8 @@ type alias Texts = , fulltextSearchInfo : String , nameSearchInfo : String , tagCategoryTab : String - , folderTab : String - , correspondentTab : String - , organization : String , chooseOrganization : String - , person : String - , concerningTab : String - , equipment : String - , customFieldsTab : String , createCustomFieldTitle : String - , dateTab : String , from : String , to : String , dueDateTab : String @@ -38,7 +30,6 @@ type alias Texts = , dueTo : String , sourceTab : String , searchInItemSource : String - , directionTab : String } @@ -59,16 +50,8 @@ gb = , fulltextSearchInfo = "Fulltext search in document contents and notes." , nameSearchInfo = "Looks in correspondents, concerned entities, item name and notes." , tagCategoryTab = "Tag Categories" - , folderTab = "Folder" - , correspondentTab = "Correspondent" - , organization = "Organization" , chooseOrganization = "Choose an organization" - , person = "Person" - , concerningTab = "Concerning" - , equipment = "Equipment" - , customFieldsTab = "Custom Fields" , createCustomFieldTitle = "Create a new custom field" - , dateTab = "Date" , from = "From" , to = "To" , dueDateTab = "Due Date" @@ -76,5 +59,4 @@ gb = , dueTo = "Due To" , sourceTab = "Source" , searchInItemSource = "Search in item source…" - , directionTab = "Direction" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/SourceForm.elm b/modules/webapp/src/main/elm/Messages/Comp/SourceForm.elm index 9aac062c..93e83f98 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/SourceForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/SourceForm.elm @@ -7,14 +7,12 @@ import Messages.Data.Language type alias Texts = { basics : Messages.Basics.Texts - , name : String , description : String , enabled : String , priority : String , priorityInfo : String , metadata : String , metadataInfoText : String - , folder : String , folderInfo : String , folderForbiddenText : String , tagsInfo : String @@ -30,7 +28,6 @@ type alias Texts = gb : Texts gb = { basics = Messages.Basics.gb - , name = "Name" , description = "Description" , enabled = "Enabled" , priority = "Priority" @@ -40,7 +37,6 @@ gb = "Metadata specified here is automatically attached to each item uploaded " ++ "through this source, unless it is overriden in the upload request meta data. " ++ "Tags from the request are added to those defined here." - , folder = "Folder" , folderInfo = "Choose a folder to automatically put items into." , folderForbiddenText = """ diff --git a/modules/webapp/src/main/elm/Messages/Comp/TagForm.elm b/modules/webapp/src/main/elm/Messages/Comp/TagForm.elm index 7893a63f..9e80ed64 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/TagForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/TagForm.elm @@ -1,16 +1,18 @@ module Messages.Comp.TagForm exposing (..) +import Messages.Basics + type alias Texts = - { selectDefineCategory : String - , name : String + { basics : Messages.Basics.Texts + , selectDefineCategory : String , category : String } gb : Texts gb = - { selectDefineCategory = "Select or define category..." - , name = "Name" + { basics = Messages.Basics.gb + , selectDefineCategory = "Select or define category..." , category = "Category" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/TagTable.elm b/modules/webapp/src/main/elm/Messages/Comp/TagTable.elm index 5e0dc40b..f60dbca3 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/TagTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/TagTable.elm @@ -1,14 +1,16 @@ module Messages.Comp.TagTable exposing (..) +import Messages.Basics + type alias Texts = - { name : String + { basics : Messages.Basics.Texts , category : String } gb : Texts gb = - { name = "Name" + { basics = Messages.Basics.gb , category = "Category" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/UiSettingsForm.elm b/modules/webapp/src/main/elm/Messages/Comp/UiSettingsForm.elm index 920c321f..50991728 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/UiSettingsForm.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/UiSettingsForm.elm @@ -39,6 +39,7 @@ type alias Texts = , fields : String , fieldsInfo : String , fieldLabel : Field -> String + , templateHelpMessage : String } @@ -84,4 +85,32 @@ gb = , fields = "Fields" , fieldsInfo = "Choose which fields to display in search and edit menus." , fieldLabel = Messages.Data.Fields.gb + , templateHelpMessage = + """ +A pattern allows to customize the title and subtitle of each card. +Variables expressions are enclosed in `{{` and `}}`, other text is +used as-is. The following variables are available: + +- `{{name}}` the item name +- `{{source}}` the source the item was created from +- `{{folder}}` the items folder +- `{{corrOrg}}` the correspondent organization +- `{{corrPerson}}` the correspondent person +- `{{correspondent}}` both organization and person separated by a comma +- `{{concPerson}}` the concerning person +- `{{concEquip}}` the concerning equipment +- `{{concerning}}` both person and equipment separated by a comma +- `{{fileCount}}` the number of attachments of this item +- `{{dateLong}}` the item date as full formatted date +- `{{dateShort}}` the item date as short formatted date (yyyy/mm/dd) +- `{{dueDateLong}}` the item due date as full formatted date +- `{{dueDateShort}}` the item due date as short formatted date (yyyy/mm/dd) +- `{{direction}}` the items direction values as string + +If some variable is not present, an empty string is rendered. You can +combine multiple variables with `|` to use the first non-empty one, +for example `{{corrOrg|corrPerson|-}}` would render the organization +and if that is not present the person. If both are absent a dash `-` +is rendered. +""" } diff --git a/modules/webapp/src/main/elm/Messages/Comp/UserTable.elm b/modules/webapp/src/main/elm/Messages/Comp/UserTable.elm index e434e42f..c5729b50 100644 --- a/modules/webapp/src/main/elm/Messages/Comp/UserTable.elm +++ b/modules/webapp/src/main/elm/Messages/Comp/UserTable.elm @@ -10,7 +10,6 @@ type alias Texts = , email : String , logins : String , lastLogin : String - , created : String } @@ -22,5 +21,4 @@ gb = , email = "E-Mail" , logins = "Logins" , lastLogin = "Last Login" - , created = "Created" } diff --git a/modules/webapp/src/main/elm/Messages/Data/Color.elm b/modules/webapp/src/main/elm/Messages/Data/Color.elm index cc516943..560e45fe 100644 --- a/modules/webapp/src/main/elm/Messages/Data/Color.elm +++ b/modules/webapp/src/main/elm/Messages/Data/Color.elm @@ -7,7 +7,7 @@ gb : Color -> String gb color = case color of Red -> - "Rot" + "Red" Orange -> "Orange" diff --git a/modules/webapp/src/main/elm/Messages/Page/ManageData.elm b/modules/webapp/src/main/elm/Messages/Page/ManageData.elm index b2051ed6..93713e1f 100644 --- a/modules/webapp/src/main/elm/Messages/Page/ManageData.elm +++ b/modules/webapp/src/main/elm/Messages/Page/ManageData.elm @@ -18,11 +18,6 @@ type alias Texts = , folderManage : Messages.Comp.FolderManage.Texts , customFieldManage : Messages.Comp.CustomFieldManage.Texts , manageData : String - , equipment : String - , organization : String - , person : String - , folder : String - , customFields : String } @@ -36,11 +31,6 @@ gb = , folderManage = Messages.Comp.FolderManage.gb , customFieldManage = Messages.Comp.CustomFieldManage.gb , manageData = "Manage Data" - , equipment = "Equipment" - , organization = "Organization" - , person = "Person" - , folder = "Folder" - , customFields = "Custom Fields" } diff --git a/modules/webapp/src/main/elm/Page/ManageData/View2.elm b/modules/webapp/src/main/elm/Page/ManageData/View2.elm index 0749a0ce..70ec2102 100644 --- a/modules/webapp/src/main/elm/Page/ManageData/View2.elm +++ b/modules/webapp/src/main/elm/Page/ManageData/View2.elm @@ -53,7 +53,7 @@ viewSidebar texts visible _ settings model = [ Icons.equipmentIcon2 "" , span [ class "ml-3" ] - [ text texts.equipment + [ text texts.basics.equipment ] ] , a @@ -65,7 +65,7 @@ viewSidebar texts visible _ settings model = [ Icons.organizationIcon2 "" , span [ class "ml-3" ] - [ text texts.organization + [ text texts.basics.organization ] ] , a @@ -77,7 +77,7 @@ viewSidebar texts visible _ settings model = [ Icons.personIcon2 "" , span [ class "ml-3" ] - [ text texts.person + [ text texts.basics.person ] ] , a @@ -94,7 +94,7 @@ viewSidebar texts visible _ settings model = [ Icons.folderIcon2 "" , span [ class "ml-3" ] - [ text texts.folder + [ text texts.basics.folder ] ] , a @@ -111,7 +111,7 @@ viewSidebar texts visible _ settings model = [ Icons.customFieldIcon2 "" , span [ class "ml-3" ] - [ text texts.customFields + [ text texts.basics.customFields ] ] ] @@ -184,7 +184,7 @@ viewEquip texts model = ] [ Icons.equipmentIcon2 "" , div [ class "ml-2" ] - [ text texts.equipment + [ text texts.basics.equipment ] ] , Html.map EquipManageMsg @@ -202,7 +202,7 @@ viewOrg texts settings model = ] [ Icons.organizationIcon2 "" , div [ class "ml-2" ] - [ text "Organizations" + [ text texts.basics.organization ] ] , Html.map OrgManageMsg @@ -221,7 +221,7 @@ viewPerson texts settings model = ] [ Icons.personIcon2 "" , div [ class "ml-2" ] - [ text "Person" + [ text texts.basics.person ] ] , Html.map PersonManageMsg @@ -242,7 +242,7 @@ viewFolder texts flags _ model = , div [ class "ml-2" ] - [ text texts.folder + [ text texts.basics.folder ] ] , Html.map FolderMsg @@ -258,7 +258,7 @@ viewCustomFields texts flags _ model = ] [ Icons.customFieldIcon2 "" , div [ class "ml-2" ] - [ text texts.customFields + [ text texts.basics.customFields ] ] , Html.map CustomFieldMsg