Externalize strings in other of components

This commit is contained in:
Eike Kettner
2021-04-09 22:39:44 +02:00
parent 2f678aca17
commit fa2c5750dd
53 changed files with 490 additions and 223 deletions

View File

@ -0,0 +1,34 @@
module Messages.AttachmentMetaComp exposing (..)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, extractedMetadata : String
, content : String
, labels : String
, proposals : String
, correspondentOrg : String
, correspondentPerson : String
, concerningPerson : String
, concerningEquipment : String
, itemDate : String
, itemDueDate : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, extractedMetadata = "Extracted Meta Data"
, content = "Content"
, labels = "Labels"
, proposals = "Proposals"
, correspondentOrg = "Correspondent Organization"
, correspondentPerson = "Correspondent Person"
, concerningPerson = "Concerning Person"
, concerningEquipment = "Concerning Equipment"
, itemDate = "Item Date"
, itemDueDate = "Item Due Date"
}

View File

@ -20,6 +20,7 @@ type alias Texts =
, yes : String
, no : String
, chooseTag : String
, loading : String
}
@ -43,6 +44,7 @@ gb =
, yes = "Yes"
, no = "No"
, chooseTag = "Choose a tag"
, loading = "Loading"
}

View File

@ -0,0 +1,28 @@
module Messages.CalEventInputComp exposing (..)
type alias Texts =
{ weekday : String
, year : String
, month : String
, day : String
, hour : String
, minute : String
, error : String
, schedule : String
, next : String
}
gb : Texts
gb =
{ weekday = "Weekday"
, year = "Year"
, month = "Month"
, day = "Day"
, hour = "Hour"
, minute = "Minute"
, error = "Error"
, schedule = "Schedule"
, next = "Next"
}

View File

@ -1,8 +1,11 @@
module Messages.ChangePasswordFormComp exposing (..)
import Messages.Basics
type alias Texts =
{ currentPassword : String
{ basics : Messages.Basics.Texts
, currentPassword : String
, newPassword : String
, repeatPassword : String
, currentPasswordPlaceholder : String
@ -13,7 +16,8 @@ type alias Texts =
gb : Texts
gb =
{ currentPassword = "Current Password"
{ basics = Messages.Basics.gb
, currentPassword = "Current Password"
, newPassword = "New Password"
, repeatPassword = "New Password (repeat)"
, currentPasswordPlaceholder = "Password"

View File

@ -1,8 +1,11 @@
module Messages.ClassifierSettingsFormComp exposing (..)
import Messages.CalEventInputComp
type alias Texts =
{ autoTaggingText : String
{ calEventInput : Messages.CalEventInputComp.Texts
, autoTaggingText : String
, blacklistOrWhitelist : String
, whitelistLabel : String
, blacklistLabel : String
@ -14,7 +17,8 @@ type alias Texts =
gb : Texts
gb =
{ autoTaggingText =
{ calEventInput = Messages.CalEventInputComp.gb
, autoTaggingText =
"""
Auto-tagging works by learning from existing documents. The more

View File

@ -0,0 +1,18 @@
module Messages.CustomFieldInputComp exposing (..)
type alias Texts =
{ errorNoValue : String
, errorNoNumber : String
, errorNoAmount : String
, errorNotANumber : String -> String
}
gb : Texts
gb =
{ errorNoValue = "Please fill in some value"
, errorNoNumber = "No number given"
, errorNoAmount = "No amount given"
, errorNotANumber = \str -> "Not a number: " ++ str
}

View File

@ -0,0 +1,14 @@
module Messages.CustomFieldMultiInputComp exposing (..)
import Messages.CustomFieldInputComp
type alias Texts =
{ customFieldInput : Messages.CustomFieldInputComp.Texts
}
gb : Texts
gb =
{ customFieldInput = Messages.CustomFieldInputComp.gb
}

View File

@ -1,10 +1,12 @@
module Messages.EditFormComp exposing (..)
import Messages.Basics
import Messages.CustomFieldMultiInputComp
type alias Texts =
{ basics : Messages.Basics.Texts
, customFieldInput : Messages.CustomFieldMultiInputComp.Texts
, createNewCustomField : String
, chooseDirection : String
, selectPlaceholder : String
@ -34,6 +36,7 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, customFieldInput = Messages.CustomFieldMultiInputComp.gb
, createNewCustomField = "Create new custom field"
, chooseDirection = "Choose a direction"
, selectPlaceholder = "Select"

View File

@ -11,6 +11,7 @@ type alias Texts =
, connectionNameInfo : String
, smtpHost : String
, smtpHostPlaceholder : String
, smtpPort : String
, smtpUser : String
, smtpUserPlaceholder : String
, smtpPassword : String
@ -32,6 +33,7 @@ gb =
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
, smtpHost = "SMTP Host"
, smtpHostPlaceholder = "SMTP host name, e.g. 'mail.gmail.com'"
, smtpPort = "SMTP Port"
, smtpUser = "SMTP User"
, smtpUserPlaceholder = "SMTP Username, e.g. 'your.name@gmail.com'"
, smtpPassword = "SMTP Password"

View File

@ -1,12 +1,12 @@
module Messages.HomeSideMenu exposing (..)
import Messages.MultiEditComp
import Messages.MultiEditMenuComp
import Messages.SearchMenuComp
type alias Texts =
{ searchMenu : Messages.SearchMenuComp.Texts
, multiEdit : Messages.MultiEditComp.Texts
, multiEdit : Messages.MultiEditMenuComp.Texts
, editMode : String
, resetSearchForm : String
, multiEditHeader : String
@ -18,7 +18,7 @@ type alias Texts =
gb : Texts
gb =
{ searchMenu = Messages.SearchMenuComp.gb
, multiEdit = Messages.MultiEditComp.gb
, multiEdit = Messages.MultiEditMenuComp.gb
, editMode = "Edit Mode"
, resetSearchForm = "Reset search form"
, multiEditHeader = "Multi-Edit"

View File

@ -11,6 +11,7 @@ type alias Texts =
, connectionNameInfo : String
, imapHost : String
, imapHostPlaceholder : String
, imapPort : String
, imapUser : String
, imapUserPlaceholder : String
, imapPassword : String
@ -30,6 +31,7 @@ gb =
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
, imapHost = "IMAP Host"
, imapHostPlaceholder = "IMAP host name, e.g. 'mail.gmail.com'"
, imapPort = "IMAP Port"
, imapUser = "IMAP User"
, imapUserPlaceholder = "IMAP Username, e.g. 'your.name@gmail.com'"
, imapPassword = "IMAP Password"

View File

@ -33,6 +33,7 @@ type alias Texts =
, itemId : String
, createdOn : String
, lastUpdateOn : String
, sendingMailNow : String
}
@ -61,4 +62,5 @@ gb =
, itemId = "Item ID"
, createdOn = "Created on"
, lastUpdateOn = "Last update on"
, sendingMailNow = "Sending e-mail"
}

View File

@ -1,10 +1,12 @@
module Messages.MultiEditComp exposing (..)
module Messages.MultiEditMenuComp exposing (..)
import Messages.Basics
import Messages.CustomFieldMultiInputComp
type alias Texts =
{ basics : Messages.Basics.Texts
, customFieldMultiInput : Messages.CustomFieldMultiInputComp.Texts
, tagModeAddInfo : String
, tagModeRemoveInfo : String
, tagModeReplaceInfo : String
@ -32,6 +34,7 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, customFieldMultiInput = Messages.CustomFieldMultiInputComp.gb
, tagModeAddInfo = "Tags chosen here are *added* to all selected items."
, tagModeRemoveInfo = "Tags chosen here are *removed* from all selected items."
, tagModeReplaceInfo = "Tags chosen here *replace* those on selected items."

View File

@ -1,10 +1,12 @@
module Messages.NotificationFormComp exposing (..)
import Messages.Basics
import Messages.CalEventInputComp
type alias Texts =
{ basics : Messages.Basics.Texts
, calEventInput : Messages.CalEventInputComp.Texts
, reallyDeleteTask : String
, startOnce : String
, startTaskNow : String
@ -22,6 +24,7 @@ type alias Texts =
, tagsExclude : String
, tagsExcludeInfo : String
, remindDaysInfo : String
, remindDaysLabel : String
, capOverdue : String
, capOverdueInfo : String
, schedule : String
@ -33,6 +36,7 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, calEventInput = Messages.CalEventInputComp.gb
, reallyDeleteTask = "Really delete this notification task?"
, startOnce = "Start Once"
, startTaskNow = "Start this task now"
@ -49,6 +53,7 @@ gb =
, tagsIncludeInfo = "Items must have all the tags specified here."
, tagsExclude = "Tags Exclude (or)"
, tagsExcludeInfo = "Items must not have any tag specified here."
, remindDaysLabel = "Remind Days"
, remindDaysInfo = "Select items with a due date *lower than* `today+remindDays`"
, capOverdue = "Cap overdue items"
, capOverdueInfo = "If checked, only items with a due date *greater than* `today - remindDays` are considered."

View File

@ -1,10 +1,12 @@
module Messages.ScanMailboxFormComp exposing (..)
import Messages.Basics
import Messages.CalEventInputComp
type alias Texts =
{ basics : Messages.Basics.Texts
, calEventInput : Messages.CalEventInputComp.Texts
, reallyDeleteTask : String
, startOnce : String
, startNow : String
@ -29,6 +31,7 @@ type alias Texts =
, folders : String
, foldersInfo : String
, receivedHoursInfo : String
, receivedHoursLabel : String
, fileFilter : String
, fileFilterInfo : String
, subjectFilter : String
@ -57,6 +60,7 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, calEventInput = Messages.CalEventInputComp.gb
, reallyDeleteTask = "Really delete this scan mailbox task?"
, startOnce = "Start Once"
, startNow = "Start this task now"
@ -81,6 +85,7 @@ gb =
, folders = "Folders"
, foldersInfo = "The folders to look for mails."
, receivedHoursInfo = "Select mails newer than `now - receivedHours`"
, receivedHoursLabel = "Received Since Hours"
, fileFilter = "File Filter"
, fileFilterInfo =
"Specify a file glob to filter attachments. For example, to only extract pdf files: "

View File

@ -1,10 +1,14 @@
module Messages.SearchMenuComp exposing (..)
import Messages.Basics
import Messages.CustomFieldMultiInputComp
import Messages.TagSelectComp
type alias Texts =
{ basics : Messages.Basics.Texts
, customFieldMultiInput : Messages.CustomFieldMultiInputComp.Texts
, tagSelect : Messages.TagSelectComp.Texts
, chooseDirection : String
, choosePerson : String
, chooseEquipment : String
@ -41,6 +45,8 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, customFieldMultiInput = Messages.CustomFieldMultiInputComp.gb
, tagSelect = Messages.TagSelectComp.gb
, chooseDirection = "Choose a direction"
, choosePerson = "Choose a person"
, chooseEquipment = "Choose an equipment"

View File

@ -1,8 +1,11 @@
module Messages.SingleAttachmentComp exposing (..)
import Messages.AttachmentMetaComp
type alias Texts =
{ noName : String
{ attachmentMeta : Messages.AttachmentMetaComp.Texts
, noName : String
, openFileInNewTab : String
, downloadFile : String
, renameFile : String
@ -17,7 +20,8 @@ type alias Texts =
gb : Texts
gb =
{ noName = "No name"
{ attachmentMeta = Messages.AttachmentMetaComp.gb
, noName = "No name"
, openFileInNewTab = "Open file in new tab"
, downloadFile = "Download file"
, renameFile = "Rename file"

View File

@ -0,0 +1,16 @@
module Messages.TagSelectComp exposing (..)
type alias Texts =
{ hideEmpty : String
, showEmpty : String
, filterPlaceholder : String
}
gb : Texts
gb =
{ hideEmpty = "Hide empty"
, showEmpty = "Show empty"
, filterPlaceholder = "Filter "
}

View File

@ -12,17 +12,22 @@ type alias Texts =
, uiLanguage : String
, itemSearch : String
, maxResultsPerPageInfo : Int -> String
, maxResultsPerPage : String
, showBasicSearchStatsByDefault : String
, enablePowerSearch : String
, itemCards : String
, maxNoteSize : String
, maxNoteSizeInfo : Int -> String
, sizeOfItemPreview : String
, cardTitlePattern : String
, togglePatternHelpText : String
, cardSubtitlePattern : String
, searchMenu : String
, searchMenuTagCount : String
, searchMenuTagCountInfo : String
, searchMenuCatCount : String
, searchMenuCatCountInfo : String
, searchMenuFolderCount : String
, searchMenuFolderCountInfo : String
, itemDetail : String
, browserNativePdfView : String
@ -48,9 +53,11 @@ gb =
"Maximum results in one page when searching items. At most "
++ String.fromInt max
++ "."
, maxResultsPerPage = "Page size"
, showBasicSearchStatsByDefault = "Show basic search statistics by default"
, enablePowerSearch = "Enable power-user search bar"
, itemCards = "Item Cards"
, maxNoteSize = "Max. Note Length"
, maxNoteSizeInfo =
\max ->
"Maximum size of the item notes to display in card view. Between 0 - "
@ -61,8 +68,11 @@ gb =
, togglePatternHelpText = "Toggle pattern help text"
, cardSubtitlePattern = "Card Subtitle Pattern"
, searchMenu = "Search Menu"
, searchMenuTagCount = "Number of tags in search menu"
, searchMenuTagCountInfo = "How many tags to display in search menu at once. Others can be expanded. Use 0 to always show all."
, searchMenuCatCount = "Number of categories in search menu"
, searchMenuCatCountInfo = "How many categories to display in search menu at once. Others can be expanded. Use 0 to always show all."
, searchMenuFolderCount = "Number of folders in search menu"
, searchMenuFolderCountInfo = "How many folders to display in search menu at once. Other folders can be expanded. Use 0 to always show all."
, itemDetail = "Item Detail"
, browserNativePdfView = "Browser-native PDF preview"