Externalize strings in manage-data page

This commit is contained in:
Eike Kettner
2021-04-04 15:55:49 +02:00
parent 8f1380fcf5
commit 594818499e
57 changed files with 1078 additions and 379 deletions

View File

@ -0,0 +1,20 @@
module Messages.AddressFormComp exposing (..)
type alias Texts =
{ selectCountry : String
, street : String
, zipCode : String
, city : String
, country : String
}
gb : Texts
gb =
{ selectCountry = "Select Country"
, street = "Street"
, zipCode = "Zip Code"
, city = "City"
, country = "Country"
}

View File

@ -14,6 +14,8 @@ type alias Texts =
, edit : String
, back : String
, backToList : String
, searchPlaceholder : String
, id : String
}
@ -31,6 +33,8 @@ gb =
, edit = "Edit"
, back = "Back"
, backToList = "Back to list"
, searchPlaceholder = "Search"
, id = "Id"
}

View File

@ -0,0 +1,25 @@
module Messages.ContactTypeData exposing (..)
import Data.ContactType exposing (ContactType(..))
gb : ContactType -> String
gb ct =
case ct of
Phone ->
"Phone"
Mobile ->
"Mobile"
Fax ->
"Fax"
Email ->
"Email"
Docspell ->
"Docspell"
Website ->
"Website"

View File

@ -0,0 +1,46 @@
module Messages.CustomFieldFormComp exposing (..)
import Data.CustomFieldType exposing (CustomFieldType)
import Messages.Basics
import Messages.CustomFieldTypeData
type alias Texts =
{ basics : Messages.Basics.Texts
, reallyDeleteField : String
, fieldTypeLabel : CustomFieldType -> String
, createCustomField : String
, modifyTypeWarning : String
, name : String
, nameInfo : String
, fieldFormat : String
, fieldFormatInfo : String
, label : String
, labelInfo : String
, deleteThisField : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, reallyDeleteField = "Really delete this custom field?"
, fieldTypeLabel = Messages.CustomFieldTypeData.gb
, createCustomField = "Create a new custom field."
, 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."
, fieldFormat = "Field Format"
, fieldFormatInfo =
"A field must have a format. Values are validated "
++ "according to this format."
, label = "Label"
, labelInfo =
"The user defined label for this field. This is used to represent "
++ "this field in the ui. If not present, the name is used."
, deleteThisField = "Delete this field"
}

View File

@ -0,0 +1,24 @@
module Messages.CustomFieldManageComp exposing (..)
import Messages.Basics
import Messages.CustomFieldFormComp
import Messages.CustomFieldTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, fieldForm : Messages.CustomFieldFormComp.Texts
, fieldTable : Messages.CustomFieldTableComp.Texts
, addCustomField : String
, newCustomField : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, fieldForm = Messages.CustomFieldFormComp.gb
, fieldTable = Messages.CustomFieldTableComp.gb
, addCustomField = "Add a new custom field"
, newCustomField = "New custom field"
}

View File

@ -0,0 +1,20 @@
module Messages.CustomFieldTableComp exposing (..)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, nameLabel : String
, format : String
, usageCount : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, nameLabel = "Name/Label"
, format = "Format"
, usageCount = "#Usage"
}

View File

@ -0,0 +1,22 @@
module Messages.CustomFieldTypeData exposing (..)
import Data.CustomFieldType exposing (CustomFieldType(..))
gb : CustomFieldType -> String
gb ft =
case ft of
Text ->
"Text"
Numeric ->
"Numeric"
Date ->
"Date"
Boolean ->
"Boolean"
Money ->
"Money"

View File

@ -0,0 +1,15 @@
module Messages.EquipmentFormComp exposing (..)
import Data.EquipmentUse exposing (EquipmentUse)
import Messages.EquipmentUseData
type alias Texts =
{ equipmentUseLabel : EquipmentUse -> String
}
gb : Texts
gb =
{ equipmentUseLabel = Messages.EquipmentUseData.gb
}

View File

@ -0,0 +1,28 @@
module Messages.EquipmentManageComp exposing (..)
import Messages.Basics
import Messages.EquipmentFormComp
import Messages.EquipmentTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, equipmentTable : Messages.EquipmentTableComp.Texts
, equipmentForm : Messages.EquipmentFormComp.Texts
, createNewEquipment : String
, newEquipment : String
, reallyDeleteEquipment : String
, deleteThisEquipment : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, equipmentTable = Messages.EquipmentTableComp.gb
, equipmentForm = Messages.EquipmentFormComp.gb
, createNewEquipment = "Create a new equipment"
, newEquipment = "New Equipment"
, reallyDeleteEquipment = "Really delete this equipment?"
, deleteThisEquipment = "Delete this equipment"
}

View File

@ -0,0 +1,19 @@
module Messages.EquipmentTableComp exposing (..)
import Data.EquipmentUse exposing (EquipmentUse)
import Messages.EquipmentUseData
type alias Texts =
{ name : String
, use : String
, equipmentUseLabel : EquipmentUse -> String
}
gb : Texts
gb =
{ name = "Name"
, use = "Use"
, equipmentUseLabel = Messages.EquipmentUseData.gb
}

View File

@ -0,0 +1,13 @@
module Messages.EquipmentUseData exposing (..)
import Data.EquipmentUse exposing (EquipmentUse(..))
gb : EquipmentUse -> String
gb pu =
case pu of
Concerning ->
"Concerning"
Disabled ->
"Disabled"

View File

@ -0,0 +1,34 @@
module Messages.FolderDetailComp exposing (..)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, reallyDeleteThisFolder : String
, autoOwnerInfo : String
, modifyInfo : String
, notOwnerInfo : String
, name : String
, members : String
, addMember : String
, add : String
, removeMember : String
, deleteThisFolder : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, reallyDeleteThisFolder = "Really delete this folder?"
, 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"
, removeMember = "Remove this member"
, deleteThisFolder = "Delete this folder"
}

View File

@ -0,0 +1,26 @@
module Messages.FolderManageComp exposing (..)
import Messages.Basics
import Messages.FolderDetailComp
import Messages.FolderTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, folderDetail : Messages.FolderDetailComp.Texts
, folderTable : Messages.FolderTableComp.Texts
, showOwningFoldersOnly : String
, createNewFolder : String
, newFolder : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, folderDetail = Messages.FolderDetailComp.gb
, folderTable = Messages.FolderTableComp.gb
, showOwningFoldersOnly = "Show owning folders only"
, createNewFolder = "Create a new folder"
, newFolder = "New Folder"
}

View File

@ -0,0 +1,18 @@
module Messages.FolderTableComp exposing (..)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, name : String
, memberCount : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, name = "Name"
, memberCount = "#Member"
}

View File

@ -0,0 +1,49 @@
module Messages.ManageDataPage exposing (..)
import Messages.Basics
import Messages.CustomFieldManageComp
import Messages.EquipmentManageComp
import Messages.FolderManageComp
import Messages.OrgManageComp
import Messages.PersonManageComp
import Messages.TagManageComp
type alias Texts =
{ basics : Messages.Basics.Texts
, tagManage : Messages.TagManageComp.Texts
, equipmentManage : Messages.EquipmentManageComp.Texts
, orgManage : Messages.OrgManageComp.Texts
, personManage : Messages.PersonManageComp.Texts
, folderManage : Messages.FolderManageComp.Texts
, customFieldManage : Messages.CustomFieldManageComp.Texts
, manageData : String
, equipment : String
, organization : String
, person : String
, folder : String
, customFields : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, tagManage = Messages.TagManageComp.gb
, equipmentManage = Messages.EquipmentManageComp.gb
, orgManage = Messages.OrgManageComp.gb
, personManage = Messages.PersonManageComp.gb
, folderManage = Messages.FolderManageComp.gb
, customFieldManage = Messages.CustomFieldManageComp.gb
, manageData = "Manage Data"
, equipment = "Equipment"
, organization = "Organization"
, person = "Person"
, folder = "Folder"
, customFields = "Custom Fields"
}
de : Texts
de =
gb

View File

@ -0,0 +1,38 @@
module Messages.OrgFormComp exposing (..)
import Data.ContactType exposing (ContactType)
import Data.OrgUse exposing (OrgUse)
import Messages.AddressFormComp
import Messages.ContactTypeData
import Messages.OrgUseData
type alias Texts =
{ addressForm : Messages.AddressFormComp.Texts
, orgUseLabel : OrgUse -> String
, name : String
, shortName : String
, use : String
, useAsCorrespondent : String
, dontUseForSuggestions : String
, address : String
, contacts : String
, contactTypeLabel : ContactType -> String
, notes : String
}
gb : Texts
gb =
{ addressForm = Messages.AddressFormComp.gb
, orgUseLabel = Messages.OrgUseData.gb
, name = "Name"
, shortName = "Short Name"
, use = "Use"
, useAsCorrespondent = "Use as correspondent"
, dontUseForSuggestions = "Do not use for suggestions."
, address = "Address"
, contacts = "Contacts"
, contactTypeLabel = Messages.ContactTypeData.gb
, notes = "Notes"
}

View File

@ -0,0 +1,28 @@
module Messages.OrgManageComp exposing (..)
import Messages.Basics
import Messages.OrgFormComp
import Messages.OrgTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, orgForm : Messages.OrgFormComp.Texts
, orgTable : Messages.OrgTableComp.Texts
, newOrganization : String
, createNewOrganization : String
, reallyDeleteOrg : String
, deleteThisOrg : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, orgForm = Messages.OrgFormComp.gb
, orgTable = Messages.OrgTableComp.gb
, newOrganization = "New Organization"
, createNewOrganization = "Create a new organization"
, reallyDeleteOrg = "Really delete this organization?"
, deleteThisOrg = "Delete this organization"
}

View File

@ -0,0 +1,24 @@
module Messages.OrgTableComp exposing (..)
import Data.OrgUse exposing (OrgUse)
import Messages.Basics
import Messages.OrgUseData
type alias Texts =
{ basics : Messages.Basics.Texts
, name : String
, address : String
, contact : String
, orgUseLabel : OrgUse -> String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, name = "Name"
, address = "Address"
, contact = "Contact"
, orgUseLabel = Messages.OrgUseData.gb
}

View File

@ -0,0 +1,13 @@
module Messages.OrgUseData exposing (..)
import Data.OrgUse exposing (OrgUse(..))
gb : OrgUse -> String
gb pu =
case pu of
Correspondent ->
"Correspondent"
Disabled ->
"Disabled"

View File

@ -0,0 +1,44 @@
module Messages.PersonFormComp exposing (..)
import Data.ContactType exposing (ContactType)
import Data.PersonUse exposing (PersonUse)
import Messages.AddressFormComp
import Messages.ContactTypeData
import Messages.PersonUseData
type alias Texts =
{ addressForm : Messages.AddressFormComp.Texts
, personUseLabel : PersonUse -> String
, name : String
, useOfPerson : String
, useAsConcerningOnly : String
, useAsCorrespondentOnly : String
, useAsBoth : String
, dontUseForSuggestions : String
, organization : String
, chooseAnOrg : String
, address : String
, contacts : String
, contactTypeLabel : ContactType -> String
, notes : String
}
gb : Texts
gb =
{ addressForm = Messages.AddressFormComp.gb
, personUseLabel = Messages.PersonUseData.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"
, contactTypeLabel = Messages.ContactTypeData.gb
, notes = "Notes"
}

View File

@ -0,0 +1,28 @@
module Messages.PersonManageComp exposing (..)
import Messages.Basics
import Messages.PersonFormComp
import Messages.PersonTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, personForm : Messages.PersonFormComp.Texts
, personTable : Messages.PersonTableComp.Texts
, newPerson : String
, createNewPerson : String
, reallyDeletePerson : String
, deleteThisPerson : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, personForm = Messages.PersonFormComp.gb
, personTable = Messages.PersonTableComp.gb
, newPerson = "New Person"
, createNewPerson = "Create a new person"
, reallyDeletePerson = "Really delete this person?"
, deleteThisPerson = "Delete this person"
}

View File

@ -0,0 +1,24 @@
module Messages.PersonTableComp exposing (..)
import Data.PersonUse exposing (PersonUse)
import Messages.Basics
import Messages.PersonUseData
type alias Texts =
{ basics : Messages.Basics.Texts
, name : String
, address : String
, contact : String
, personUseLabel : PersonUse -> String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, name = "Name"
, address = "Address"
, contact = "Contact"
, personUseLabel = Messages.PersonUseData.gb
}

View File

@ -0,0 +1,19 @@
module Messages.PersonUseData exposing (..)
import Data.PersonUse exposing (PersonUse(..))
gb : PersonUse -> String
gb pu =
case pu of
Correspondent ->
"Correspondent"
Concerning ->
"Concerning"
Both ->
"Both"
Disabled ->
"Disabled"

View File

@ -0,0 +1,16 @@
module Messages.TagFormComp exposing (..)
type alias Texts =
{ selectDefineCategory : String
, name : String
, category : String
}
gb : Texts
gb =
{ selectDefineCategory = "Select or define category..."
, name = "Name"
, category = "Category"
}

View File

@ -0,0 +1,28 @@
module Messages.TagManageComp exposing (..)
import Messages.Basics
import Messages.TagFormComp
import Messages.TagTableComp
type alias Texts =
{ basics : Messages.Basics.Texts
, tagTable : Messages.TagTableComp.Texts
, tagForm : Messages.TagFormComp.Texts
, createNewTag : String
, newTag : String
, reallyDeleteTag : String
, deleteThisTag : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, tagTable = Messages.TagTableComp.gb
, tagForm = Messages.TagFormComp.gb
, createNewTag = "Create a new tag"
, newTag = "New Tag"
, reallyDeleteTag = "Really delete this tag?"
, deleteThisTag = "Delete this tag"
}

View File

@ -0,0 +1,14 @@
module Messages.TagTableComp exposing (..)
type alias Texts =
{ name : String
, category : String
}
gb : Texts
gb =
{ name = "Name"
, category = "Category"
}