mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Externalize strings in UiSettings page
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
module Messages.ChangePasswordFormComp exposing (..)
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ currentPassword : String
|
||||
, newPassword : String
|
||||
, repeatPassword : String
|
||||
, currentPasswordPlaceholder : String
|
||||
, newPasswordPlaceholder : String
|
||||
, repeatPasswordPlaceholder : String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
{ currentPassword = "Current Password"
|
||||
, newPassword = "New Password"
|
||||
, repeatPassword = "New Password (repeat)"
|
||||
, currentPasswordPlaceholder = "Password"
|
||||
, newPasswordPlaceholder = "Password"
|
||||
, repeatPasswordPlaceholder = "Password"
|
||||
}
|
46
modules/webapp/src/main/elm/Messages/ColorData.elm
Normal file
46
modules/webapp/src/main/elm/Messages/ColorData.elm
Normal file
@ -0,0 +1,46 @@
|
||||
module Messages.ColorData exposing (..)
|
||||
|
||||
import Data.Color exposing (Color(..))
|
||||
|
||||
|
||||
gb : Color -> String
|
||||
gb color =
|
||||
case color of
|
||||
Red ->
|
||||
"Rot"
|
||||
|
||||
Orange ->
|
||||
"Orange"
|
||||
|
||||
Yellow ->
|
||||
"Yellow"
|
||||
|
||||
Olive ->
|
||||
"Olive"
|
||||
|
||||
Green ->
|
||||
"Green"
|
||||
|
||||
Teal ->
|
||||
"Teal"
|
||||
|
||||
Blue ->
|
||||
"Blue"
|
||||
|
||||
Violet ->
|
||||
"Violet"
|
||||
|
||||
Purple ->
|
||||
"Purple"
|
||||
|
||||
Pink ->
|
||||
"Pink"
|
||||
|
||||
Brown ->
|
||||
"Brown"
|
||||
|
||||
Grey ->
|
||||
"Grey"
|
||||
|
||||
Black ->
|
||||
"Black"
|
43
modules/webapp/src/main/elm/Messages/FieldsData.elm
Normal file
43
modules/webapp/src/main/elm/Messages/FieldsData.elm
Normal file
@ -0,0 +1,43 @@
|
||||
module Messages.FieldsData exposing (..)
|
||||
|
||||
import Data.Fields exposing (Field(..))
|
||||
|
||||
|
||||
gb : Field -> String
|
||||
gb field =
|
||||
case field of
|
||||
Tag ->
|
||||
"Tag"
|
||||
|
||||
Folder ->
|
||||
"Folder"
|
||||
|
||||
CorrOrg ->
|
||||
"Correspondent Organization"
|
||||
|
||||
CorrPerson ->
|
||||
"Correspondent Person"
|
||||
|
||||
ConcPerson ->
|
||||
"Concerning Person"
|
||||
|
||||
ConcEquip ->
|
||||
"Concerned Equipment"
|
||||
|
||||
Date ->
|
||||
"Date"
|
||||
|
||||
DueDate ->
|
||||
"Due Date"
|
||||
|
||||
Direction ->
|
||||
"Direction"
|
||||
|
||||
PreviewImage ->
|
||||
"Preview Image"
|
||||
|
||||
CustomFields ->
|
||||
"Custom Fields"
|
||||
|
||||
SourceName ->
|
||||
"Item Source"
|
77
modules/webapp/src/main/elm/Messages/UiSettingsFormComp.elm
Normal file
77
modules/webapp/src/main/elm/Messages/UiSettingsFormComp.elm
Normal file
@ -0,0 +1,77 @@
|
||||
module Messages.UiSettingsFormComp exposing (..)
|
||||
|
||||
import Data.Color exposing (Color)
|
||||
import Data.Fields exposing (Field)
|
||||
import Messages.ColorData
|
||||
import Messages.FieldsData
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ general : String
|
||||
, showSideMenuByDefault : String
|
||||
, uiLanguage : String
|
||||
, itemSearch : String
|
||||
, maxResultsPerPageInfo : Int -> String
|
||||
, showBasicSearchStatsByDefault : String
|
||||
, enablePowerSearch : String
|
||||
, itemCards : String
|
||||
, maxNoteSizeInfo : Int -> String
|
||||
, sizeOfItemPreview : String
|
||||
, cardTitlePattern : String
|
||||
, togglePatternHelpText : String
|
||||
, cardSubtitlePattern : String
|
||||
, searchMenu : String
|
||||
, searchMenuTagCountInfo : String
|
||||
, searchMenuCatCountInfo : String
|
||||
, searchMenuFolderCountInfo : String
|
||||
, itemDetail : String
|
||||
, browserNativePdfView : String
|
||||
, keyboardShortcutLabel : String
|
||||
, tagCategoryColors : String
|
||||
, colorLabel : Color -> String
|
||||
, chooseTagColorLabel : String
|
||||
, tagColorDescription : String
|
||||
, fields : String
|
||||
, fieldsInfo : String
|
||||
, fieldLabel : Field -> String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
{ general = "General"
|
||||
, showSideMenuByDefault = "Show side menu by default"
|
||||
, uiLanguage = "UI Language"
|
||||
, itemSearch = "Item Search"
|
||||
, maxResultsPerPageInfo =
|
||||
\max ->
|
||||
"Maximum results in one page when searching items. At most "
|
||||
++ String.fromInt max
|
||||
++ "."
|
||||
, showBasicSearchStatsByDefault = "Show basic search statistics by default"
|
||||
, enablePowerSearch = "Enable power-user search bar"
|
||||
, itemCards = "Item Cards"
|
||||
, maxNoteSizeInfo =
|
||||
\max ->
|
||||
"Maximum size of the item notes to display in card view. Between 0 - "
|
||||
++ String.fromInt max
|
||||
++ "."
|
||||
, sizeOfItemPreview = "Size of item preview"
|
||||
, cardTitlePattern = "Card Title Pattern"
|
||||
, togglePatternHelpText = "Toggle pattern help text"
|
||||
, cardSubtitlePattern = "Card Subtitle Pattern"
|
||||
, searchMenu = "Search Menu"
|
||||
, searchMenuTagCountInfo = "How many tags to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
||||
, searchMenuCatCountInfo = "How many categories to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
||||
, 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"
|
||||
, keyboardShortcutLabel = "Use keyboard shortcuts for navigation and confirm/unconfirm with open edit menu."
|
||||
, tagCategoryColors = "Tag Category Colors"
|
||||
, colorLabel = Messages.ColorData.gb
|
||||
, chooseTagColorLabel = "Choose color for tag categories"
|
||||
, tagColorDescription = "Tags can be represented differently based on their category."
|
||||
, fields = "Fields"
|
||||
, fieldsInfo = "Choose which fields to display in search and edit menus."
|
||||
, fieldLabel = Messages.FieldsData.gb
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
module Messages.UiSettingsManageComp exposing (..)
|
||||
|
||||
import Messages.Basics
|
||||
import Messages.UiSettingsFormComp
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ basics : Messages.Basics.Texts
|
||||
, uiSettingsForm : Messages.UiSettingsFormComp.Texts
|
||||
, saveSettings : String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
{ basics = Messages.Basics.gb
|
||||
, uiSettingsForm = Messages.UiSettingsFormComp.gb
|
||||
, saveSettings = "Save settings"
|
||||
}
|
40
modules/webapp/src/main/elm/Messages/UserSettingsPage.elm
Normal file
40
modules/webapp/src/main/elm/Messages/UserSettingsPage.elm
Normal file
@ -0,0 +1,40 @@
|
||||
module Messages.UserSettingsPage exposing (..)
|
||||
|
||||
import Messages.ChangePasswordFormComp
|
||||
import Messages.UiSettingsManageComp
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ changePasswordForm : Messages.ChangePasswordFormComp.Texts
|
||||
, uiSettingsManage : Messages.UiSettingsManageComp.Texts
|
||||
, userSettings : String
|
||||
, uiSettings : String
|
||||
, notifications : String
|
||||
, scanMailbox : String
|
||||
, emailSettingSmtp : String
|
||||
, emailSettingImap : String
|
||||
, changePassword : String
|
||||
, uiSettingsInfo : String
|
||||
}
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
{ changePasswordForm = Messages.ChangePasswordFormComp.gb
|
||||
, uiSettingsManage = Messages.UiSettingsManageComp.gb
|
||||
, userSettings = "User Settings"
|
||||
, uiSettings = "UI Settings"
|
||||
, notifications = "Notifications"
|
||||
, scanMailbox = "Scan Mailbox"
|
||||
, emailSettingSmtp = "E-Mail Settings (SMTP)"
|
||||
, emailSettingImap = "E-Mail Settings (IMAP)"
|
||||
, changePassword = "Change Password"
|
||||
, uiSettingsInfo =
|
||||
"These settings only affect the web ui. They are stored in the browser, "
|
||||
++ "so they are separated between browsers and devices."
|
||||
}
|
||||
|
||||
|
||||
de : Texts
|
||||
de =
|
||||
gb
|
Reference in New Issue
Block a user