mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Download multiple files as zip
This commit is contained in:
113
modules/webapp/src/main/elm/Messages/Comp/DownloadAll.elm
Normal file
113
modules/webapp/src/main/elm/Messages/Comp/DownloadAll.elm
Normal file
@ -0,0 +1,113 @@
|
||||
{-
|
||||
Copyright 2020 Eike K. & Contributors
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-}
|
||||
|
||||
|
||||
module Messages.Comp.DownloadAll exposing (Texts, de, fr, gb)
|
||||
|
||||
import Messages.Data.DownloadFileType
|
||||
import Util.Size
|
||||
|
||||
|
||||
type alias Texts =
|
||||
{ downloadFileType : Messages.Data.DownloadFileType.Texts
|
||||
, downloadFileTypeLabel : String
|
||||
, noResults : String
|
||||
, summary : Int -> String -> String
|
||||
, close : String
|
||||
, downloadPreparing : String
|
||||
, downloadTooLarge : String
|
||||
, downloadConfigText : Int -> Int -> Int -> String
|
||||
, downloadReady : String
|
||||
, downloadCreateText : String
|
||||
, downloadCreate : String
|
||||
, downloadNow : String
|
||||
}
|
||||
|
||||
|
||||
byteStr : Int -> String
|
||||
byteStr n =
|
||||
Util.Size.bytesReadable Util.Size.B (toFloat n)
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb =
|
||||
{ downloadFileType = Messages.Data.DownloadFileType.gb
|
||||
, downloadFileTypeLabel = "What files"
|
||||
, noResults = "No results to download."
|
||||
, summary = \files -> \size -> "Download consists of " ++ String.fromInt files ++ " files (" ++ size ++ ")."
|
||||
, close = "Close"
|
||||
, downloadPreparing = "Download is being prepared…"
|
||||
, downloadTooLarge = "The download is too large."
|
||||
, downloadConfigText =
|
||||
\maxNum ->
|
||||
\maxSize ->
|
||||
\curSize ->
|
||||
"The maximum number of files allowed is "
|
||||
++ String.fromInt maxNum
|
||||
++ " and maximum size is "
|
||||
++ byteStr maxSize
|
||||
++ " (current size would be "
|
||||
++ byteStr curSize
|
||||
++ "). "
|
||||
, downloadReady = "Donwload is ready!"
|
||||
, downloadCreateText = "You can create the download at the server. Once it is ready, the button will download the zip file."
|
||||
, downloadCreate = "Create download"
|
||||
, downloadNow = "Download now!"
|
||||
}
|
||||
|
||||
|
||||
de : Texts
|
||||
de =
|
||||
{ downloadFileType = Messages.Data.DownloadFileType.de
|
||||
, downloadFileTypeLabel = "Welche Dateien"
|
||||
, noResults = "Keine Ergebnisse zum Herunterladen."
|
||||
, summary = \files -> \size -> "Download besteht aus " ++ String.fromInt files ++ " Dateien (" ++ size ++ ")."
|
||||
, close = "Schließen"
|
||||
, downloadPreparing = "Der Download wird erstellt…"
|
||||
, downloadTooLarge = "Der Download ist zu groß."
|
||||
, downloadConfigText =
|
||||
\maxNum ->
|
||||
\maxSize ->
|
||||
\curSize ->
|
||||
"Es können maximal "
|
||||
++ String.fromInt maxNum
|
||||
++ " Dateien mit einer Gesamtgröße von "
|
||||
++ byteStr maxSize
|
||||
++ " erstellt werden (aktuelle Größe wäre "
|
||||
++ byteStr curSize
|
||||
++ "). "
|
||||
, downloadReady = "Donwload ist fertig!"
|
||||
, downloadCreateText = "Der Download kann auf dem Server erzeugt werden. Sobald die ZIP Datei fertig ist, kann sie hier heruntergeladen werden."
|
||||
, downloadCreate = "Download erstellen"
|
||||
, downloadNow = "Jetzt herunterladen"
|
||||
}
|
||||
|
||||
|
||||
fr : Texts
|
||||
fr =
|
||||
{ downloadFileType = Messages.Data.DownloadFileType.fr
|
||||
, downloadFileTypeLabel = "Quels fichiers"
|
||||
, noResults = "No results to download"
|
||||
, summary = \files -> \size -> "Download consists of " ++ String.fromInt files ++ " files (" ++ size ++ ")."
|
||||
, close = "Fermer"
|
||||
, downloadPreparing = "Le téléchargement est créé…"
|
||||
, downloadTooLarge = "Le téléchargement est trop important."
|
||||
, downloadConfigText =
|
||||
\maxNum ->
|
||||
\maxSize ->
|
||||
\curSize ->
|
||||
"Il est possible de créer au maximum "
|
||||
++ String.fromInt maxNum
|
||||
++ " fichiers d'une taille totale de "
|
||||
++ byteStr maxSize
|
||||
++ " (la taille actuelle serait de "
|
||||
++ byteStr curSize
|
||||
++ "). "
|
||||
, downloadReady = "Le téléchargement est achevé."
|
||||
, downloadCreateText = "Vous pouvez créer le téléchargement sur le serveur. Une fois qu'il est prêt, le bouton téléchargera le fichier zip."
|
||||
, downloadCreate = "Créer Télécharger"
|
||||
, downloadNow = "Télécharger l'archive!"
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{-
|
||||
Copyright 2020 Eike K. & Contributors
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-}
|
||||
|
||||
|
||||
module Messages.Data.DownloadFileType exposing (Texts, de, fr, gb)
|
||||
|
||||
import Data.DownloadFileType exposing (DownloadFileType(..))
|
||||
|
||||
|
||||
type alias Texts =
|
||||
DownloadFileType -> String
|
||||
|
||||
|
||||
gb : Texts
|
||||
gb ft =
|
||||
case ft of
|
||||
Converted ->
|
||||
"Converted PDF files"
|
||||
|
||||
Originals ->
|
||||
"Original files"
|
||||
|
||||
|
||||
de : Texts
|
||||
de ft =
|
||||
case ft of
|
||||
Converted ->
|
||||
"Konvertierte PDF Dateien"
|
||||
|
||||
Originals ->
|
||||
"Original Dateien"
|
||||
|
||||
|
||||
fr : Texts
|
||||
fr ft =
|
||||
case ft of
|
||||
Converted ->
|
||||
"Fichiers PDF convertis"
|
||||
|
||||
Originals ->
|
||||
"Fichiers originaux"
|
@ -15,6 +15,7 @@ module Messages.Page.Search exposing
|
||||
import Data.TimeZone exposing (TimeZone)
|
||||
import Messages.Basics
|
||||
import Messages.Comp.BookmarkQueryManage
|
||||
import Messages.Comp.DownloadAll
|
||||
import Messages.Comp.ItemCardList
|
||||
import Messages.Comp.ItemMerge
|
||||
import Messages.Comp.PublishItems
|
||||
@ -30,6 +31,7 @@ type alias Texts =
|
||||
, itemMerge : Messages.Comp.ItemMerge.Texts
|
||||
, publishItems : Messages.Comp.PublishItems.Texts
|
||||
, bookmarkManage : Messages.Comp.BookmarkQueryManage.Texts
|
||||
, downloadAllComp : Messages.Comp.DownloadAll.Texts
|
||||
, contentSearch : String
|
||||
, searchInNames : String
|
||||
, selectModeTitle : String
|
||||
@ -76,6 +78,8 @@ type alias Texts =
|
||||
, linkItemsSuccessful : String
|
||||
, linkItemsInProcess : String
|
||||
, linkItemsHeader : String
|
||||
, downloadAll : String
|
||||
, downloadAllQueryNeeded : String
|
||||
}
|
||||
|
||||
|
||||
@ -88,6 +92,7 @@ gb tz =
|
||||
, itemMerge = Messages.Comp.ItemMerge.gb tz
|
||||
, publishItems = Messages.Comp.PublishItems.gb tz
|
||||
, bookmarkManage = Messages.Comp.BookmarkQueryManage.gb
|
||||
, downloadAllComp = Messages.Comp.DownloadAll.gb
|
||||
, contentSearch = "Content search…"
|
||||
, searchInNames = "Search in names…"
|
||||
, selectModeTitle = "Select Mode"
|
||||
@ -134,6 +139,8 @@ gb tz =
|
||||
, linkItemsInProcess = "Linking items ..."
|
||||
, mergeHeader = "Merge Items"
|
||||
, linkItemsHeader = "Link Items"
|
||||
, downloadAll = "Download all"
|
||||
, downloadAllQueryNeeded = "Apply a criteria to reduce what to download."
|
||||
}
|
||||
|
||||
|
||||
@ -146,6 +153,7 @@ de tz =
|
||||
, itemMerge = Messages.Comp.ItemMerge.de tz
|
||||
, publishItems = Messages.Comp.PublishItems.de tz
|
||||
, bookmarkManage = Messages.Comp.BookmarkQueryManage.de
|
||||
, downloadAllComp = Messages.Comp.DownloadAll.de
|
||||
, contentSearch = "Volltextsuche…"
|
||||
, searchInNames = "Suche in Namen…"
|
||||
, selectModeTitle = "Auswahlmodus"
|
||||
@ -192,6 +200,8 @@ de tz =
|
||||
, linkItemsInProcess = "Dokumente werden verknüpft ..."
|
||||
, mergeHeader = "Dokumente zusammenführen"
|
||||
, linkItemsHeader = "Dokument verknüpfen"
|
||||
, downloadAll = "Alle herunterladen"
|
||||
, downloadAllQueryNeeded = "Alles kann nicht heruntergeladen werden, es muss etwas gesucht werden."
|
||||
}
|
||||
|
||||
|
||||
@ -204,6 +214,7 @@ fr tz =
|
||||
, itemMerge = Messages.Comp.ItemMerge.fr tz
|
||||
, publishItems = Messages.Comp.PublishItems.fr tz
|
||||
, bookmarkManage = Messages.Comp.BookmarkQueryManage.fr
|
||||
, downloadAllComp = Messages.Comp.DownloadAll.fr
|
||||
, contentSearch = "Recherche..."
|
||||
, searchInNames = "Recherche par nom..."
|
||||
, selectModeTitle = "Select Mode"
|
||||
@ -250,4 +261,6 @@ fr tz =
|
||||
, linkItemsInProcess = "Relier en cours ..."
|
||||
, mergeHeader = "Fusionner des documents"
|
||||
, linkItemsHeader = "Lier des documents"
|
||||
, downloadAll = "Télécharger tout"
|
||||
, downloadAllQueryNeeded = "Tout ne peut pas être téléchargé, il faut chercher quelque chose."
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ module Messages.Page.Share exposing (..)
|
||||
import Data.TimeZone exposing (TimeZone)
|
||||
import Http
|
||||
import Messages.Basics
|
||||
import Messages.Comp.DownloadAll
|
||||
import Messages.Comp.HttpError
|
||||
import Messages.Comp.ItemCardList
|
||||
import Messages.Comp.SearchMenu
|
||||
@ -21,6 +22,7 @@ type alias Texts =
|
||||
, basics : Messages.Basics.Texts
|
||||
, itemCardList : Messages.Comp.ItemCardList.Texts
|
||||
, passwordForm : Messages.Comp.SharePasswordForm.Texts
|
||||
, downloadAll : Messages.Comp.DownloadAll.Texts
|
||||
, httpError : Http.Error -> String
|
||||
, authFailed : String
|
||||
, fulltextPlaceholder : String
|
||||
@ -30,6 +32,7 @@ type alias Texts =
|
||||
, showItemGroups : String
|
||||
, listView : String
|
||||
, tileView : String
|
||||
, downloadAllLabel : String
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +42,7 @@ gb tz =
|
||||
, basics = Messages.Basics.gb
|
||||
, itemCardList = Messages.Comp.ItemCardList.gb tz
|
||||
, passwordForm = Messages.Comp.SharePasswordForm.gb
|
||||
, downloadAll = Messages.Comp.DownloadAll.gb
|
||||
, authFailed = "This share does not exist."
|
||||
, httpError = Messages.Comp.HttpError.gb
|
||||
, fulltextPlaceholder = "Fulltext search…"
|
||||
@ -48,6 +52,7 @@ gb tz =
|
||||
, showItemGroups = "Group by month"
|
||||
, listView = "List view"
|
||||
, tileView = "Tile view"
|
||||
, downloadAllLabel = "Download all"
|
||||
}
|
||||
|
||||
|
||||
@ -57,6 +62,7 @@ de tz =
|
||||
, basics = Messages.Basics.de
|
||||
, itemCardList = Messages.Comp.ItemCardList.de tz
|
||||
, passwordForm = Messages.Comp.SharePasswordForm.de
|
||||
, downloadAll = Messages.Comp.DownloadAll.de
|
||||
, authFailed = "Diese Freigabe existiert nicht."
|
||||
, httpError = Messages.Comp.HttpError.de
|
||||
, fulltextPlaceholder = "Volltextsuche…"
|
||||
@ -66,6 +72,7 @@ de tz =
|
||||
, showItemGroups = "nach Monat gruppieren"
|
||||
, listView = "Listenansicht"
|
||||
, tileView = "Kachelansicht"
|
||||
, downloadAllLabel = "Alles herunterladen"
|
||||
}
|
||||
|
||||
|
||||
@ -75,6 +82,7 @@ fr tz =
|
||||
, basics = Messages.Basics.fr
|
||||
, itemCardList = Messages.Comp.ItemCardList.fr tz
|
||||
, passwordForm = Messages.Comp.SharePasswordForm.fr
|
||||
, downloadAll = Messages.Comp.DownloadAll.fr
|
||||
, authFailed = "Ce partage n'existe pas."
|
||||
, httpError = Messages.Comp.HttpError.fr
|
||||
, fulltextPlaceholder = "Recherche en texte entier..."
|
||||
@ -84,4 +92,5 @@ fr tz =
|
||||
, showItemGroups = "Grouper par mois"
|
||||
, listView = "Affichage liste"
|
||||
, tileView = "Affichage tuile"
|
||||
, downloadAllLabel = "Télécharger tout"
|
||||
}
|
||||
|
Reference in New Issue
Block a user