From db4b62163176f16220f2684c6e237ec3300c7939 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 00:24:42 +0100 Subject: [PATCH 01/10] angular message file --- src-ui/messages.xlf | 1562 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1562 insertions(+) create mode 100644 src-ui/messages.xlf diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf new file mode 100644 index 000000000..6270f5373 --- /dev/null +++ b/src-ui/messages.xlf @@ -0,0 +1,1562 @@ + + + + + + Documents + + src/app/components/document-list/document-list.component.ts + 38 + + + + View "" saved successfully. + + src/app/components/document-list/document-list.component.ts + 84 + + + + View "" created successfully. + + src/app/components/document-list/document-list.component.ts + 103 + + + + Select + + src/app/components/document-list/document-list.component.html + 7 + + + + Select none + + src/app/components/document-list/document-list.component.html + 11 + + + + Select page + + src/app/components/document-list/document-list.component.html + 12 + + + + Select all + + src/app/components/document-list/document-list.component.html + 13 + + + + Sort by + + src/app/components/document-list/document-list.component.html + 41 + + + + Views + + src/app/components/document-list/document-list.component.html + 64 + + + + Save as... + + src/app/components/document-list/document-list.component.html + 72 + + + + Save "" + + src/app/components/document-list/document-list.component.html + 71 + + + + {VAR_PLURAL, plural, =1 {document} other {documents}} + + src/app/components/document-list/document-list.component.html + 86 + + + + Selected of + + src/app/components/document-list/document-list.component.html + 86 + + + + {VAR_PLURAL, plural, =1 {1 document} other { documents}} + + src/app/components/document-list/document-list.component.html + 87 + + + + ASN + + src/app/components/document-list/document-list.component.html + 100 + + + + Correspondent + + src/app/components/document-list/document-list.component.html + 101 + + + + Title + + src/app/components/document-list/document-list.component.html + 102 + + + + Document type + + src/app/components/document-list/document-list.component.html + 103 + + + + Created + + src/app/components/document-list/document-list.component.html + 104 + + + + Added + + src/app/components/document-list/document-list.component.html + 105 + + + + Confirm delete + + src/app/components/document-detail/document-detail.component.ts + 161 + + + + Do you really want to delete document ''? + + src/app/components/document-detail/document-detail.component.ts + 162 + + + + The files for this document will be deleted permanently. This operation cannot be undone. + + src/app/components/document-detail/document-detail.component.ts + 163 + + + + Delete document + + src/app/components/document-detail/document-detail.component.ts + 165 + + + + Delete + + src/app/components/document-detail/document-detail.component.html + 15 + + + + Download + + src/app/components/document-detail/document-detail.component.html + 23 + + + + More like this + + src/app/components/document-detail/document-detail.component.html + 38 + + + + Close + + src/app/components/document-detail/document-detail.component.html + 44 + + + + Details + + src/app/components/document-detail/document-detail.component.html + 56 + + + + Content + + src/app/components/document-detail/document-detail.component.html + 76 + + + + Metadata + + src/app/components/document-detail/document-detail.component.html + 85 + + + + Discard + + src/app/components/document-detail/document-detail.component.html + 134 + + + + Save + + src/app/components/document-detail/document-detail.component.html + 136 + + + + Page + + src/app/components/document-detail/document-detail.component.html + 4 + + + + of + + src/app/components/document-detail/document-detail.component.html + 8 + + + + Download original + + src/app/components/document-detail/document-detail.component.html + 29 + + + + Archive serial number + + src/app/components/document-detail/document-detail.component.html + 61 + + + + Date created + + src/app/components/document-detail/document-detail.component.html + 65 + + + + Tags + + src/app/components/document-detail/document-detail.component.html + 70 + + + + Date modified + + src/app/components/document-detail/document-detail.component.html + 91 + + + + Date added + + src/app/components/document-detail/document-detail.component.html + 95 + + + + Media filename + + src/app/components/document-detail/document-detail.component.html + 99 + + + + Original MD5 checksum + + src/app/components/document-detail/document-detail.component.html + 103 + + + + Original file size + + src/app/components/document-detail/document-detail.component.html + 107 + + + + Original mime type + + src/app/components/document-detail/document-detail.component.html + 111 + + + + Archive MD5 checksum + + src/app/components/document-detail/document-detail.component.html + 115 + + + + Archive file size + + src/app/components/document-detail/document-detail.component.html + 119 + + + + Original document metadata + + src/app/components/document-detail/document-detail.component.html + 125 + + + + Archived document metadata + + src/app/components/document-detail/document-detail.component.html + 126 + + + + Save & next + + src/app/components/document-detail/document-detail.component.html + 135 + + + + Hello , welcome to Paperless-ng! + + src/app/components/dashboard/dashboard.component.ts + 33 + + + + Welcome to Paperless-ng! + + src/app/components/dashboard/dashboard.component.ts + 35 + + + + Dashboard + + src/app/components/dashboard/dashboard.component.html + 1 + + + + Do you really want to delete the tag ? + + src/app/components/manage/tag-list/tag-list.component.ts + 30 + + + + Create + + src/app/components/manage/tag-list/tag-list.component.html + 2 + + + + Name + + src/app/components/manage/tag-list/tag-list.component.html + 13 + + + + Color + + src/app/components/manage/tag-list/tag-list.component.html + 14 + + + + Matching + + src/app/components/manage/tag-list/tag-list.component.html + 15 + + + + Document count + + src/app/components/manage/tag-list/tag-list.component.html + 16 + + + + Actions + + src/app/components/manage/tag-list/tag-list.component.html + 17 + + + + Documents + + src/app/components/manage/tag-list/tag-list.component.html + 32 + + + + Edit + + src/app/components/manage/tag-list/tag-list.component.html + 37 + + + + Do you really want to delete the document type ? + + src/app/components/manage/document-type-list/document-type-list.component.ts + 26 + + + + Document types + + src/app/components/manage/document-type-list/document-type-list.component.html + 1 + + + + Logs + + src/app/components/manage/logs/logs.component.html + 1 + + + + Filter + + src/app/components/manage/logs/logs.component.html + 7 + + + + Saved view " deleted. + + src/app/components/manage/settings/settings.component.ts + 52 + + + + Settings saved successfully. + + src/app/components/manage/settings/settings.component.ts + 61 + + + + Error while storing settings on server: + + src/app/components/manage/settings/settings.component.ts + 73 + + + + General settings + + src/app/components/manage/settings/settings.component.html + 10 + + + + Saved views + + src/app/components/manage/settings/settings.component.html + 41 + + + + Document list + + src/app/components/manage/settings/settings.component.html + 13 + + + + Items per page + + src/app/components/manage/settings/settings.component.html + 17 + + + + Bulk editing + + src/app/components/manage/settings/settings.component.html + 33 + + + + Show confirmation dialogs + + src/app/components/manage/settings/settings.component.html + 35 + + + + Deleting documents will always ask for confirmation. + + src/app/components/manage/settings/settings.component.html + 35 + + + + Apply on close + + src/app/components/manage/settings/settings.component.html + 36 + + + + Appears on + + src/app/components/manage/settings/settings.component.html + 53 + + + + Show on dashboard + + src/app/components/manage/settings/settings.component.html + 56 + + + + Show in sidebar + + src/app/components/manage/settings/settings.component.html + 60 + + + + No saved views defined. + + src/app/components/manage/settings/settings.component.html + 70 + + + + 404 Not Found + + src/app/components/not-found/not-found.component.html + 7 + + + + Do you really want to delete the correspondent ? + + src/app/components/manage/correspondent-list/correspondent-list.component.ts + 26 + + + + Correspondents + + src/app/components/manage/correspondent-list/correspondent-list.component.html + 1 + + + + Last correspondence + + src/app/components/manage/correspondent-list/correspondent-list.component.html + 15 + + + + Confirmation + + src/app/components/common/confirm-dialog/confirm-dialog.component.ts + 17 + + + + Confirm + + src/app/components/common/confirm-dialog/confirm-dialog.component.ts + 29 + + + + Create new correspondent + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.ts + 21 + + + + Edit correspondent + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.ts + 25 + + + + Could not save correspondent: + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.ts + 29 + + + + Matching algorithm + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 11 + + + + Match + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 12 + + + + Auto matching does not require you to fill in this field. + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 12 + + + + Case insensitive + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 13 + + + + Auto matching ignores this option. + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 13 + + + + Cancel + + src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html + 16 + + + + Create new tag + + src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts + 21 + + + + Edit tag + + src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts + 25 + + + + Could not save tag: + + src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts + 29 + + + + Inbox tag + + src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html + 21 + + + + Inbox tags are automatically assigned to all consumed documents. + + src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html + 21 + + + + Create new document type + + src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.ts + 21 + + + + Edit document type + + src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.ts + 25 + + + + Could not save document type: + + src/app/components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component.ts + 29 + + + + Search results + + src/app/components/search/search.component.html + 1 + + + + Invalid search query: + + src/app/components/search/search.component.html + 4 + + + + Showing documents similar to + + src/app/components/search/search.component.html + 7 + + + + Search query: + + src/app/components/search/search.component.html + 11 + + + + Did you mean ""? + + src/app/components/search/search.component.html + 13 + + + + {VAR_PLURAL, plural, =0 {No results} =1 {One result} other { results}} + + src/app/components/search/search.component.html + 18 + + + + Paperless-ng + + src/app/components/app-frame/app-frame.component.html + 4 + + app title + + + Search for documents + + src/app/components/app-frame/app-frame.component.html + 12 + + + + Manage + + src/app/components/app-frame/app-frame.component.html + 77 + + + + Settings + + src/app/components/app-frame/app-frame.component.html + 112 + + + + Admin + + src/app/components/app-frame/app-frame.component.html + 119 + + + + Misc + + src/app/components/app-frame/app-frame.component.html + 125 + + + + Documentation + + src/app/components/app-frame/app-frame.component.html + 132 + + + + GitHub + + src/app/components/app-frame/app-frame.component.html + 139 + + + + Logout + + src/app/components/app-frame/app-frame.component.html + 146 + + + + Open documents + + src/app/components/app-frame/app-frame.component.html + 57 + + + + Close all + + src/app/components/app-frame/app-frame.component.html + 71 + + + + Correspondent: + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 28 + + + + Type: + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 31 + + + + Tag: + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 34 + + + + Filter by: + + src/app/components/document-list/filter-editor/filter-editor.component.html + 4 + + + + Clear all filters + + src/app/components/document-list/filter-editor/filter-editor.component.html + 23 + + + + Not assigned + + src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts + 145 + + + + Apply + + src/app/components/common/filterable-dropdown/filterable-dropdown.component.html + 28 + + + + Last 7 days + + src/app/components/common/date-dropdown/date-dropdown.component.ts + 24 + + + + Last month + + src/app/components/common/date-dropdown/date-dropdown.component.ts + 25 + + + + Last 3 months + + src/app/components/common/date-dropdown/date-dropdown.component.ts + 26 + + + + Last year + + src/app/components/common/date-dropdown/date-dropdown.component.ts + 27 + + + + After + + src/app/components/common/date-dropdown/date-dropdown.component.html + 13 + + + + Before + + src/app/components/common/date-dropdown/date-dropdown.component.html + 29 + + + + Clear + + src/app/components/common/date-dropdown/date-dropdown.component.html + 18 + + + + View + + src/app/components/document-list/document-card-large/document-card-large.component.html + 50 + + + + Score: + + src/app/components/document-list/document-card-large/document-card-large.component.html + 61 + + + + Created: + + src/app/components/document-list/document-card-large/document-card-large.component.html + 65 + + + + Filter by correspondent + + src/app/components/document-list/document-card-large/document-card-large.component.html + 20 + + + + Filter by tag + + src/app/components/document-list/document-card-large/document-card-large.component.html + 24 + + + + View in browser + + src/app/components/document-list/document-card-small/document-card-small.component.html + 40 + + + + and + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 103 + + + + , + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 105 + + + + Confirm tags assignment + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 115 + + + + This operation will add the tag to all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 118 + + + + This operation will add the tags to all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 120 + + + + This operation will remove the tag from all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 123 + + + + This operation will remove the tags from all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 125 + + + + This operation will add the tags and remove the tags on all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 127 + + + + Confirm correspondent assignment + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 157 + + + + This operation will assign the correspondent to all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 159 + + + + This operation will remove the correspondent from all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 161 + + + + Confirm document type assignment + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 190 + + + + This operation will assign the document type to all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 192 + + + + This operation will remove the document type from all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 194 + + + + Delete confirm + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 219 + + + + This operation will permanently delete all selected document(s). + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 220 + + + + This operation cannot be undone. + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 221 + + + + Delete document(s) + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 223 + + + + Select: + + src/app/components/document-list/bulk-editor/bulk-editor.component.html + 11 + + + + All + + src/app/components/document-list/bulk-editor/bulk-editor.component.html + 21 + + + + Edit: + + src/app/components/document-list/bulk-editor/bulk-editor.component.html + 28 + + + + Save current view + + src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html + 3 + + + + Show all + + src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html + 3 + + + + Statistics + + src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html + 1 + + + + Documents in inbox: + + src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html + 3 + + + + Total documents: + + src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html + 4 + + + + The document has been uploaded and will be processed by the consumer shortly. + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts + 63 + + + + There was an error while uploading the document: + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts + 71 + + + + An error has occurred while uploading the document. Sorry! + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts + 75 + + + + Upload new documents + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html + 1 + + + + Drop documents here or + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html + 5 + + + + Browse files + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html + 5 + + + + Uploading file(s) + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html + 13 + + + + First steps + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 1 + + + + Paperless is running! :) + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 5 + + + + You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message. + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 6,7 + + + + Paperless offers some more features that try to make your life easier, such as: + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 8 + + + + Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically. + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 10 + + + + You can configure paperless to read your mails and add documents from attached files. + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 11 + + + + Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general. + + src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html + 13 + + + + Metadata + + src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts + 18 + + + + Select + + src/app/components/common/select-dialog/select-dialog.component.ts + 18 + + + + Please select an object + + src/app/components/common/select-dialog/select-dialog.component.ts + 21 + + + + Yes + + src/app/pipes/yes-no.pipe.ts + 9 + + + + No + + src/app/pipes/yes-no.pipe.ts + 9 + + + + (no title) + + src/app/pipes/document-title.pipe.ts + 12 + + + + Error + + src/app/services/toast.service.ts + 31 + + + + Information + + src/app/services/toast.service.ts + 35 + + + + Correspondent + + src/app/services/rest/document.service.ts + 16 + + + + Document type + + src/app/services/rest/document.service.ts + 17 + + + + Title + + src/app/services/rest/document.service.ts + 18 + + + + ASN + + src/app/services/rest/document.service.ts + 19 + + + + Created + + src/app/services/rest/document.service.ts + 20 + + + + Added + + src/app/services/rest/document.service.ts + 21 + + + + Modified + + src/app/services/rest/document.service.ts + 22 + + + + Light blue + + src/app/data/paperless-tag.ts + 6 + + + + Blue + + src/app/data/paperless-tag.ts + 7 + + + + Light green + + src/app/data/paperless-tag.ts + 8 + + + + Green + + src/app/data/paperless-tag.ts + 9 + + + + Light red + + src/app/data/paperless-tag.ts + 10 + + + + Red + + src/app/data/paperless-tag.ts + 11 + + + + Light orange + + src/app/data/paperless-tag.ts + 12 + + + + Orange + + src/app/data/paperless-tag.ts + 13 + + + + Light violet + + src/app/data/paperless-tag.ts + 14 + + + + Violet + + src/app/data/paperless-tag.ts + 15 + + + + Brown + + src/app/data/paperless-tag.ts + 16 + + + + Black + + src/app/data/paperless-tag.ts + 17 + + + + Light grey + + src/app/data/paperless-tag.ts + 18 + + + + Create new item + + src/app/components/common/edit-dialog/edit-dialog.component.ts + 38 + + + + Edit item + + src/app/components/common/edit-dialog/edit-dialog.component.ts + 42 + + + + Could not save element: + + src/app/components/common/edit-dialog/edit-dialog.component.ts + 46 + + + + Automatic + + src/app/components/manage/generic-list/generic-list.component.ts + 31 + + + + Do you really want to delete this element? + + src/app/components/manage/generic-list/generic-list.component.ts + 88 + + + + Associated documents will not be deleted. + + src/app/components/manage/generic-list/generic-list.component.ts + 95 + + + + Delete + + src/app/components/manage/generic-list/generic-list.component.ts + 97 + + + + Any + + src/app/data/matching-model.ts + 12 + + + + All + + src/app/data/matching-model.ts + 13 + + + + Literal + + src/app/data/matching-model.ts + 14 + + + + Regular expression + + src/app/data/matching-model.ts + 15 + + + + Fuzzy match + + src/app/data/matching-model.ts + 16 + + + + Auto + + src/app/data/matching-model.ts + 17 + + + + + From 118149c53907e52b9ae84eaf424f14fec748b0be Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 11:33:56 +0100 Subject: [PATCH 02/10] more translation work --- src-ui/messages.xlf | 94 ++++++++++++++----- .../filterable-dropdown.component.html | 2 +- .../filterable-dropdown.component.ts | 5 +- .../upload-file-widget.component.html | 2 +- .../welcome-widget.component.html | 4 +- .../bulk-editor/bulk-editor.component.html | 9 +- .../bulk-editor/bulk-editor.component.ts | 14 +-- .../filter-editor.component.html | 38 ++++++-- .../correspondent-list.component.ts | 2 +- .../document-type-list.component.ts | 2 +- .../manage/tag-list/tag-list.component.ts | 3 +- 11 files changed, 126 insertions(+), 49 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 6270f5373..18eeec0ef 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -373,11 +373,11 @@ 1 - - Do you really want to delete the tag ? + + Do you really want to delete the tag ""? src/app/components/manage/tag-list/tag-list.component.ts - 30 + 31 @@ -436,8 +436,8 @@ 37 - - Do you really want to delete the document type ? + + Do you really want to delete the document type ""? src/app/components/manage/document-type-list/document-type-list.component.ts 26 @@ -576,8 +576,8 @@ 7 - - Do you really want to delete the correspondent ? + + Do you really want to delete the correspondent ""? src/app/components/manage/correspondent-list/correspondent-list.component.ts 26 @@ -878,11 +878,32 @@ 4 + + Filter tags + + src/app/components/document-list/filter-editor/filter-editor.component.html + 12 + + + + Filter correspondents + + src/app/components/document-list/filter-editor/filter-editor.component.html + 19 + + + + Filter document types + + src/app/components/document-list/filter-editor/filter-editor.component.html + 25 + + Clear all filters src/app/components/document-list/filter-editor/filter-editor.component.html - 23 + 47 @@ -891,6 +912,7 @@ src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts 145 + Filter drop down element to filter for documents with no correspondent/type/tag assigned Apply @@ -990,12 +1012,20 @@ 40 - - and + + "" and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts 103 + This is for messages like 'modify "tag1" and "tag2"' + + + "" + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 105 + , @@ -1003,6 +1033,15 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts 105 + this is used to separate enumerations and should probably be a comma and a whitespace in most languages + + + and "" + + src/app/components/document-list/bulk-editor/bulk-editor.component.ts + 106 + + this is for messages like 'modify "tag1", "tag2" and "tag3"' Confirm tags assignment @@ -1011,8 +1050,8 @@ 115 - - This operation will add the tag to all selected document(s). + + This operation will add the tag "" to all selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 118 @@ -1025,8 +1064,8 @@ 120 - - This operation will remove the tag from all selected document(s). + + This operation will remove the tag "" from all selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 123 @@ -1053,8 +1092,8 @@ 157 - - This operation will assign the correspondent to all selected document(s). + + This operation will assign the correspondent "" to all selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 159 @@ -1074,8 +1113,8 @@ 190 - - This operation will assign the document type to all selected document(s). + + This operation will assign the document type "" to all selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 192 @@ -1214,8 +1253,15 @@ 5 - - Uploading file(s) + + {VAR_PLURAL, plural, =1 {file} =other { files}} + + src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html + 13 + + + + Uploading ... src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html 13 @@ -1235,15 +1281,15 @@ 5 - - You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message. + + You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have they will be shown on the dashboard instead of this message. src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html 6,7 - - Paperless offers some more features that try to make your life easier, such as: + + Paperless offers some more features that try to make your life easier: src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html 8 diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html index 7215faa79..015269c17 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html @@ -16,7 +16,7 @@
- +
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts index 915d10677..e1aa6a06a 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts @@ -142,7 +142,7 @@ export class FilterableDropdownComponent { if (items) { this._selectionModel.items = Array.from(items) this._selectionModel.items.unshift({ - name: $localize`Not assigned`, + name: $localize`:Filter drop down element to filter for documents with no correspondent/type/tag assigned:Not assigned`, id: null }) } @@ -186,6 +186,9 @@ export class FilterableDropdownComponent { @Input() title: string + @Input() + filterPlaceholder: string = "" + @Input() icon: string diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html index 91fff4e83..38aff96ab 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -10,7 +10,7 @@
-

Uploading {{uploadStatus.length}} file(s)

+

Uploading {uploadStatus.length, plural, =1 {file} =other {{{uploadStatus.length}} files}}...

diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html index 6c9c34d5b..7a2bbcb3c 100644 --- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html @@ -4,8 +4,8 @@

Paperless is running! :)

You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. - After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message.

-

Paperless offers some more features that try to make your life easier, such as:

+ After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have they will be shown on the dashboard instead of this message.

+

Paperless offers some more features that try to make your life easier:

  • Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.
  • You can configure paperless to read your mails and add documents from attached files.
  • diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html index 62a2bb95d..b9912ec1d 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -26,7 +26,8 @@
    - - - i.name).join($localize`, `) - return $localize`${list} and ${items[items.length - 1].name}` + let list = items.slice(0, items.length - 1).map(i => $localize`"${i.name}"`).join($localize`:this is used to separate enumerations and should probably be a comma and a whitespace in most languages:, `) + return $localize`:this is for messages like 'modify "tag1", "tag2" and "tag3"':${list} and "${items[items.length - 1].name}"` } } @@ -115,12 +115,12 @@ export class BulkEditorComponent { modal.componentInstance.title = $localize`Confirm tags assignment` if (changedTags.itemsToAdd.length == 1 && changedTags.itemsToRemove.length == 0) { let tag = changedTags.itemsToAdd[0] - modal.componentInstance.message = $localize`This operation will add the tag ${tag.name} to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will add the tag "${tag.name}" to all ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length > 1 && changedTags.itemsToRemove.length == 0) { modal.componentInstance.message = $localize`This operation will add the tags ${this._localizeList(changedTags.itemsToAdd)} to all ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length == 0 && changedTags.itemsToRemove.length == 1) { let tag = changedTags.itemsToRemove[0] - modal.componentInstance.message = $localize`This operation will remove the tag ${tag.name} from all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will remove the tag "${tag.name}" from all ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length == 0 && changedTags.itemsToRemove.length > 1) { modal.componentInstance.message = $localize`This operation will remove the tags ${this._localizeList(changedTags.itemsToRemove)} from all ${this.list.selected.size} selected document(s).` } else { @@ -156,7 +156,7 @@ export class BulkEditorComponent { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.title = $localize`Confirm correspondent assignment` if (correspondent) { - modal.componentInstance.message = $localize`This operation will assign the correspondent ${correspondent.name} to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will assign the correspondent "${correspondent.name}" to all ${this.list.selected.size} selected document(s).` } else { modal.componentInstance.message = $localize`This operation will remove the correspondent from all ${this.list.selected.size} selected document(s).` } @@ -189,7 +189,7 @@ export class BulkEditorComponent { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.title = $localize`Confirm document type assignment` if (documentType) { - modal.componentInstance.message = $localize`This operation will assign the document type ${documentType.name} to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will assign the document type "${documentType.name}" to all ${this.list.selected.size} selected document(s).` } else { modal.componentInstance.message = $localize`This operation will remove the document type from all ${this.list.selected.size} selected document(s).` } diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html index f0c83ae73..efbf6ce7e 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html @@ -6,13 +6,37 @@
    -
    -
    - - - - - +
    +
    + + + + +
    diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts index bc3bf7b02..d3b71b4ab 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts @@ -23,7 +23,7 @@ export class CorrespondentListComponent extends GenericListComponent { } getDeleteMessage(object: PaperlessTag) { - return $localize`Do you really want to delete the tag ${object.name}?` + + return $localize`Do you really want to delete the tag "${object.name}"?` } filterDocuments(object: PaperlessTag) { From 17ded123756be90afa37f84a735f4a490d08ba60 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 12:21:13 +0100 Subject: [PATCH 03/10] bugfix --- src-ui/src/app/services/open-documents.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src-ui/src/app/services/open-documents.service.ts b/src-ui/src/app/services/open-documents.service.ts index c91031f83..9e5746c10 100644 --- a/src-ui/src/app/services/open-documents.service.ts +++ b/src-ui/src/app/services/open-documents.service.ts @@ -28,6 +28,9 @@ export class OpenDocumentsService { if (index > -1) { this.documentService.get(id).subscribe(doc => { this.openDocuments[index] = doc + }, error => { + this.openDocuments.splice(index, 1) + this.save() }) } } From 713985f2592e60506c0baebcbcacefa01dcff510 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 15:12:16 +0100 Subject: [PATCH 04/10] fixes #218 --- src/documents/parsers.py | 2 ++ src/paperless_tesseract/parsers.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/documents/parsers.py b/src/documents/parsers.py index cbbb912de..725e605a2 100644 --- a/src/documents/parsers.py +++ b/src/documents/parsers.py @@ -117,6 +117,7 @@ def run_convert(input_file, trim=False, type=None, depth=None, + auto_orient=False, extra=None, logging_group=None): @@ -134,6 +135,7 @@ def run_convert(input_file, args += ['-trim'] if trim else [] args += ['-type', str(type)] if type else [] args += ['-depth', str(depth)] if depth else [] + args += ['-auto-orient'] if auto_orient else [] args += [input_file, output_file] logger.debug("Execute: " + " ".join(args), extra={'group': logging_group}) diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.py index 80e200f27..4da5af2c0 100644 --- a/src/paperless_tesseract/parsers.py +++ b/src/paperless_tesseract/parsers.py @@ -60,6 +60,7 @@ class RasterisedDocumentParser(DocumentParser): alpha="remove", strip=True, trim=False, + auto_orient=True, input_file="{}[0]".format(document_path), output_file=out_path, logging_group=self.logging_group) @@ -84,6 +85,7 @@ class RasterisedDocumentParser(DocumentParser): alpha="remove", strip=True, trim=False, + auto_orient=True, input_file=gs_out_path, output_file=out_path, logging_group=self.logging_group) From 400392655ec7d398b3e84cb4e5ba5f3159085840 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 15:46:56 +0100 Subject: [PATCH 05/10] adds a command to regenerate thumbnails #218 --- .../commands/document_thumbnails.py | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/documents/management/commands/document_thumbnails.py diff --git a/src/documents/management/commands/document_thumbnails.py b/src/documents/management/commands/document_thumbnails.py new file mode 100644 index 000000000..41ddec86e --- /dev/null +++ b/src/documents/management/commands/document_thumbnails.py @@ -0,0 +1,65 @@ +import logging +import multiprocessing +import shutil + +import tqdm +from django import db +from django.core.management.base import BaseCommand + +from documents.models import Document +from ...mixins import Renderable +from ...parsers import get_parser_class_for_mime_type + + +def _process_document(doc_in): + document = Document.objects.get(id=doc_in) + parser = get_parser_class_for_mime_type(document.mime_type)( + logging_group=None) + try: + thumb = parser.get_optimised_thumbnail( + document.source_path, document.mime_type) + + shutil.move(thumb, document.thumbnail_path) + finally: + parser.cleanup() + +class Command(Renderable, BaseCommand): + + help = """ + This will regenerate the thumbnails for all documents. + """.replace(" ", "") + + def __init__(self, *args, **kwargs): + self.verbosity = 0 + BaseCommand.__init__(self, *args, **kwargs) + + def add_arguments(self, parser): + parser.add_argument( + "-d", "--document", + default=None, + type=int, + required=False, + help="Specify the ID of a document, and this command will only " + "run on this specific document." + ) + + def handle(self, *args, **options): + + self.verbosity = options["verbosity"] + + logging.getLogger().handlers[0].level = logging.ERROR + + if options['document']: + documents = Document.objects.filter(pk=options['document']) + else: + documents = Document.objects.all() + + ids = [doc.id for doc in documents] + + # Note to future self: this prevents django from reusing database + # conncetions between processes, which is bad and does not work + # with postgres. + db.connections.close_all() + + with multiprocessing.Pool() as pool: + list(tqdm.tqdm(pool.imap_unordered(_process_document, ids), total=len(ids))) From aacf7ba275eb602d4a6cd97d4ad3b6a351d8a9d6 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 16:29:22 +0100 Subject: [PATCH 06/10] language fixes --- .../welcome-widget.component.html | 2 +- .../document-detail.component.ts | 2 +- .../bulk-editor/bulk-editor.component.ts | 20 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html index 7a2bbcb3c..6320189cc 100644 --- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html @@ -4,7 +4,7 @@

    Paperless is running! :)

    You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. - After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have they will be shown on the dashboard instead of this message.

    + After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and they will appear on the dashboard instead of this message.

    Paperless offers some more features that try to make your life easier:

    • Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.
    • diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 2efd32f27..053258f34 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -159,7 +159,7 @@ export class DocumentDetailComponent implements OnInit { delete() { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.title = $localize`Confirm delete` - modal.componentInstance.messageBold = $localize`Do you really want to delete document '${this.document.title}'?` + modal.componentInstance.messageBold = $localize`Do you really want to delete document "${this.document.title}"?` modal.componentInstance.message = $localize`The files for this document will be deleted permanently. This operation cannot be undone.` modal.componentInstance.btnClass = "btn-danger" modal.componentInstance.btnCaption = $localize`Delete document` diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts index 1347cb138..e69ab241b 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -115,16 +115,16 @@ export class BulkEditorComponent { modal.componentInstance.title = $localize`Confirm tags assignment` if (changedTags.itemsToAdd.length == 1 && changedTags.itemsToRemove.length == 0) { let tag = changedTags.itemsToAdd[0] - modal.componentInstance.message = $localize`This operation will add the tag "${tag.name}" to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will add the tag "${tag.name}" to ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length > 1 && changedTags.itemsToRemove.length == 0) { - modal.componentInstance.message = $localize`This operation will add the tags ${this._localizeList(changedTags.itemsToAdd)} to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will add the tags ${this._localizeList(changedTags.itemsToAdd)} to ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length == 0 && changedTags.itemsToRemove.length == 1) { let tag = changedTags.itemsToRemove[0] - modal.componentInstance.message = $localize`This operation will remove the tag "${tag.name}" from all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will remove the tag "${tag.name}" from ${this.list.selected.size} selected document(s).` } else if (changedTags.itemsToAdd.length == 0 && changedTags.itemsToRemove.length > 1) { - modal.componentInstance.message = $localize`This operation will remove the tags ${this._localizeList(changedTags.itemsToRemove)} from all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will remove the tags ${this._localizeList(changedTags.itemsToRemove)} from ${this.list.selected.size} selected document(s).` } else { - modal.componentInstance.message = $localize`This operation will add the tags ${this._localizeList(changedTags.itemsToAdd)} and remove the tags ${this._localizeList(changedTags.itemsToRemove)} on all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will add the tags ${this._localizeList(changedTags.itemsToAdd)} and remove the tags ${this._localizeList(changedTags.itemsToRemove)} on ${this.list.selected.size} selected document(s).` } modal.componentInstance.btnClass = "btn-warning" @@ -156,9 +156,9 @@ export class BulkEditorComponent { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.title = $localize`Confirm correspondent assignment` if (correspondent) { - modal.componentInstance.message = $localize`This operation will assign the correspondent "${correspondent.name}" to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will assign the correspondent "${correspondent.name}" to ${this.list.selected.size} selected document(s).` } else { - modal.componentInstance.message = $localize`This operation will remove the correspondent from all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will remove the correspondent from ${this.list.selected.size} selected document(s).` } modal.componentInstance.btnClass = "btn-warning" modal.componentInstance.btnCaption = $localize`Confirm` @@ -189,9 +189,9 @@ export class BulkEditorComponent { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.title = $localize`Confirm document type assignment` if (documentType) { - modal.componentInstance.message = $localize`This operation will assign the document type "${documentType.name}" to all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will assign the document type "${documentType.name}" to ${this.list.selected.size} selected document(s).` } else { - modal.componentInstance.message = $localize`This operation will remove the document type from all ${this.list.selected.size} selected document(s).` + modal.componentInstance.message = $localize`This operation will remove the document type from ${this.list.selected.size} selected document(s).` } modal.componentInstance.btnClass = "btn-warning" modal.componentInstance.btnCaption = $localize`Confirm` @@ -217,7 +217,7 @@ export class BulkEditorComponent { let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) modal.componentInstance.delayConfirm(5) modal.componentInstance.title = $localize`Delete confirm` - modal.componentInstance.messageBold = $localize`This operation will permanently delete all ${this.list.selected.size} selected document(s).` + modal.componentInstance.messageBold = $localize`This operation will permanently delete ${this.list.selected.size} selected document(s).` modal.componentInstance.message = $localize`This operation cannot be undone.` modal.componentInstance.btnClass = "btn-danger" modal.componentInstance.btnCaption = $localize`Delete document(s)` From b6722fdd848484709d1aecbb20ee5848e350a1bf Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 17:14:08 +0100 Subject: [PATCH 07/10] update angular messages --- src-ui/messages.xlf | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 18eeec0ef..5f12c504c 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -149,8 +149,8 @@ 161 - - Do you really want to delete document ''? + + Do you really want to delete document ""? src/app/components/document-detail/document-detail.component.ts 162 @@ -1050,36 +1050,36 @@ 115 - - This operation will add the tag "" to all selected document(s). + + This operation will add the tag "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 118 - - This operation will add the tags to all selected document(s). + + This operation will add the tags to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 120 - - This operation will remove the tag "" from all selected document(s). + + This operation will remove the tag "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 123 - - This operation will remove the tags from all selected document(s). + + This operation will remove the tags from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 125 - - This operation will add the tags and remove the tags on all selected document(s). + + This operation will add the tags and remove the tags on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 127 @@ -1092,15 +1092,15 @@ 157 - - This operation will assign the correspondent "" to all selected document(s). + + This operation will assign the correspondent "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 159 - - This operation will remove the correspondent from all selected document(s). + + This operation will remove the correspondent from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 161 @@ -1113,15 +1113,15 @@ 190 - - This operation will assign the document type "" to all selected document(s). + + This operation will assign the document type "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 192 - - This operation will remove the document type from all selected document(s). + + This operation will remove the document type from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 194 @@ -1134,8 +1134,8 @@ 219 - - This operation will permanently delete all selected document(s). + + This operation will permanently delete selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts 220 @@ -1281,8 +1281,8 @@ 5 - - You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have they will be shown on the dashboard instead of this message. + + You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and they will appear on the dashboard instead of this message. src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.html 6,7 From beed820602ed782883820d56b4bbb604abf4b7a7 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 17:17:36 +0100 Subject: [PATCH 08/10] improve file renaming speed. --- src/documents/signals/handlers.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index 586897585..f2743c212 100755 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -276,13 +276,6 @@ def update_filename_and_move_files(sender, instance, **kwargs): Document.objects.filter(pk=instance.pk).update( filename=new_filename) - logging.getLogger(__name__).debug( - f"Moved file {old_source_path} to {new_source_path}.") - - if instance.archive_checksum: - logging.getLogger(__name__).debug( - f"Moved file {old_archive_path} to {new_archive_path}.") - except OSError as e: instance.filename = old_filename # this happens when we can't move a file. If that's the case for From 1df922ef166b38eb87949d57d90dd41325ea0f55 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 17:18:27 +0100 Subject: [PATCH 09/10] Do file renaming first, since this is the important step, and indexing takes a while. --- src/documents/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/documents/tasks.py b/src/documents/tasks.py index f9937c177..ba7010ea9 100644 --- a/src/documents/tasks.py +++ b/src/documents/tasks.py @@ -94,7 +94,10 @@ def bulk_update_documents(document_ids): documents = Document.objects.filter(id__in=document_ids) ix = index.open_index() + + for doc in documents: + post_save.send(Document, instance=doc, created=False) + with AsyncWriter(ix) as writer: for doc in documents: index.update_document(writer, doc) - post_save.send(Document, instance=doc, created=False) From a0f983f05d13af767dcf92a2b1e84213902eb7b2 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 17:20:03 +0100 Subject: [PATCH 10/10] codestyle --- src/documents/management/commands/document_thumbnails.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/documents/management/commands/document_thumbnails.py b/src/documents/management/commands/document_thumbnails.py index 41ddec86e..01df14624 100644 --- a/src/documents/management/commands/document_thumbnails.py +++ b/src/documents/management/commands/document_thumbnails.py @@ -23,6 +23,7 @@ def _process_document(doc_in): finally: parser.cleanup() + class Command(Renderable, BaseCommand): help = """ @@ -62,4 +63,6 @@ class Command(Renderable, BaseCommand): db.connections.close_all() with multiprocessing.Pool() as pool: - list(tqdm.tqdm(pool.imap_unordered(_process_document, ids), total=len(ids))) + list(tqdm.tqdm( + pool.imap_unordered(_process_document, ids), total=len(ids) + ))