From 26784a532551b5e52bc3868a102a5e594a6110eb Mon Sep 17 00:00:00 2001 From: jayme-github Date: Thu, 3 Dec 2020 20:12:55 +0100 Subject: [PATCH 01/88] Add automatic coloring of tags Please see this as proposal on how to implement automatic/random colors for tags while keeping the current set of hard coded colors in place (at least in the frontend). Bear with me as I have even less Angular knowledge than Django and just tried to get away with as few changes as possible. :-) AIUI you want to change to a color picking system anyways in the future, which could also play well with this. fixes #51 --- Pipfile | 1 + .../components/common/tag/tag.component.html | 4 +- .../components/common/tag/tag.component.ts | 6 +- .../tag-edit-dialog.component.html | 2 +- .../tag-edit-dialog.component.ts | 6 +- .../manage/tag-list/tag-list.component.html | 2 +- .../manage/tag-list/tag-list.component.ts | 8 ++- src-ui/src/app/data/paperless-tag.ts | 31 ++++---- .../migrations/1006_migrate_tag_colour.py | 70 +++++++++++++++++++ src/documents/models.py | 28 +++----- 10 files changed, 116 insertions(+), 42 deletions(-) create mode 100644 src/documents/migrations/1006_migrate_tag_colour.py diff --git a/Pipfile b/Pipfile index c0728fddf..1cf5a312f 100644 --- a/Pipfile +++ b/Pipfile @@ -40,6 +40,7 @@ whoosh="~=2.7.4" inotifyrecursive = ">=0.3.4" ocrmypdf = "*" tqdm = "*" +colorhash = "*" [dev-packages] coveralls = "*" diff --git a/src-ui/src/app/components/common/tag/tag.component.html b/src-ui/src/app/components/common/tag/tag.component.html index 8b9632a65..29c554142 100644 --- a/src-ui/src/app/components/common/tag/tag.component.html +++ b/src-ui/src/app/components/common/tag/tag.component.html @@ -1,2 +1,2 @@ -{{tag.name}} -{{tag.name}} \ No newline at end of file +{{tag.name}} +{{tag.name}} \ No newline at end of file diff --git a/src-ui/src/app/components/common/tag/tag.component.ts b/src-ui/src/app/components/common/tag/tag.component.ts index c032c51db..163960f3d 100644 --- a/src-ui/src/app/components/common/tag/tag.component.ts +++ b/src-ui/src/app/components/common/tag/tag.component.ts @@ -23,7 +23,11 @@ export class TagComponent implements OnInit { } getColour() { - return TAG_COLOURS.find(c => c.id == this.tag.colour) + var color = TAG_COLOURS.find(c => c.id == this.tag.colour) + if (color) { + return color + } + return { id: this.tag.colour, name: this.tag.colour, textColor: "#ffffff" } } } diff --git a/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html b/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html index 8048b0c80..2f6dded52 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html +++ b/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html @@ -7,7 +7,7 @@ \ No newline at end of file diff --git a/src-ui/src/app/components/common/input/color/color.component.ts b/src-ui/src/app/components/common/input/color/color.component.ts index e75bbee16..a7f3452f2 100644 --- a/src-ui/src/app/components/common/input/color/color.component.ts +++ b/src-ui/src/app/components/common/input/color/color.component.ts @@ -1,5 +1,6 @@ import { Component, forwardRef } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { randomColor } from 'src/app/utils/color'; import { AbstractInputComponent } from '../abstract-input'; @Component({ @@ -19,9 +20,11 @@ export class ColorComponent extends AbstractInputComponent { } randomize() { + this.colorChanged(randomColor()) } colorChanged(value) { - this.value = value.color.hex + this.value = value + this.onChange(value) } } diff --git a/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts b/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts index 53cd50c45..623b033ec 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts +++ b/src-ui/src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts @@ -5,6 +5,7 @@ import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit- import { PaperlessTag } from 'src/app/data/paperless-tag'; import { TagService } from 'src/app/services/rest/tag.service'; import { ToastService } from 'src/app/services/toast.service'; +import { randomColor } from 'src/app/utils/color'; @Component({ selector: 'app-tag-edit-dialog', @@ -28,7 +29,7 @@ export class TagEditDialogComponent extends EditDialogComponent { getForm(): FormGroup { return new FormGroup({ name: new FormControl(''), - color: new FormControl(''), + color: new FormControl(randomColor()), is_inbox_tag: new FormControl(false), matching_algorithm: new FormControl(1), match: new FormControl(""), diff --git a/src-ui/src/app/utils/color.ts b/src-ui/src/app/utils/color.ts new file mode 100644 index 000000000..bcfdef088 --- /dev/null +++ b/src-ui/src/app/utils/color.ts @@ -0,0 +1,12 @@ + + function componentToHex(c) { + var hex = c.toString(16); + return hex.length == 1 ? "0" + hex : hex; + } + + export function randomColor() { + let r = Math.floor(Math.random() * 150) + 50 + let g = Math.floor(Math.random() * 150) + 50 + let b = Math.floor(Math.random() * 150) + 50 + return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}` + } \ No newline at end of file From 3a75b2571a1286770f2a153f494732cec51ce54e Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Thu, 25 Feb 2021 22:49:38 +0100 Subject: [PATCH 31/88] increase luminance threshold for better readability --- src/documents/serialisers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index 675bb464a..6ebf4c541 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -150,7 +150,7 @@ class TagSerializer(MatchingModelSerializer): 0.587 * math.pow(rgb[1], 2) + 0.114 * math.pow(rgb[2], 2) ) - return "#ffffff" if luminance < 0.5 else "#000000" + return "#ffffff" if luminance < 0.53 else "#000000" except ValueError: return "#000000" From 2fb286cd43ad754ff089de4cbf2bf8904eb28988 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Thu, 25 Feb 2021 22:49:47 +0100 Subject: [PATCH 32/88] shadows --- .../src/app/components/common/input/color/color.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/input/color/color.component.html b/src-ui/src/app/components/common/input/color/color.component.html index ca4a0e281..778a3684e 100644 --- a/src-ui/src/app/components/common/input/color/color.component.html +++ b/src-ui/src/app/components/common/input/color/color.component.html @@ -13,7 +13,7 @@ - +
diff --git a/src/locale/en_US/LC_MESSAGES/django.po b/src/locale/en_US/LC_MESSAGES/django.po index 4a3dde410..7aaa6ddd1 100644 --- a/src/locale/en_US/LC_MESSAGES/django.po +++ b/src/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-26 12:56+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -428,6 +428,10 @@ msgstr "" msgid "Italian" msgstr "" +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "" From 6ab884a95c62016fd962ea346a2ba6de0467266c Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sun, 28 Feb 2021 13:01:26 +0100 Subject: [PATCH 63/88] update dependencies --- Pipfile | 6 +- Pipfile.lock | 123 +++++++------------ requirements.txt | 19 ++- src/paperless_tesseract/tests/test_parser.py | 4 +- 4 files changed, 58 insertions(+), 94 deletions(-) diff --git a/Pipfile b/Pipfile index 29a91ece3..4d9836e68 100644 --- a/Pipfile +++ b/Pipfile @@ -9,12 +9,12 @@ verify_ssl = true name = "piwheels" [packages] -dateparser = "~=0.7.6" +dateparser = "~=1.0.0" django = "~=3.1.3" django-cors-headers = "*" django-extensions = "*" django-filter = "~=2.4.0" -django-q = "~=1.3.4" +django-q = "==1.3.4" djangorestframework = "~=3.12.2" filelock = "*" fuzzywuzzy = {extras = ["speedup"], version = "*"} @@ -53,7 +53,7 @@ concurrent-log-handler = "*" # uvloop 0.15+ incompatible with python 3.6 uvloop = "~=0.14.0" # TODO: keep an eye on piwheel builds and update this once available (https://www.piwheels.org/project/cryptography/) -cryptography = "~=3.3.2" +cryptography = "~=3.4" "pdfminer.six" = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index eefaeeecd..98d8655eb 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "71959eb287fc97969263be5e3a1b1f4f369b7a5ace85bd1947a25b9b92e17e8a" + "sha256": "49f8a0718a7982bc4ca7e1315c17849523b0d29c38f13cff88f8f883e0e9943a" }, "pipfile-spec": 6, "requires": {}, @@ -28,11 +28,11 @@ }, "arrow": { "hashes": [ - "sha256:e098abbd9af3665aea81bdd6c869e93af4feb078e98468dd351c383af187aac5", - "sha256:ff08d10cda1d36c68657d6ad20d74fbea493d980f8b2d45344e00d6ed2bf6ed4" + "sha256:7909d9fd30d32fa8fd173fdeb3f7125aaf6dedd1a837276fe1d8cea2c0e86d76", + "sha256:b1e106a0ab754e540f4aeb08747900830b688adef02d81240e65afc0e781a870" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==0.17.0" + "markers": "python_version >= '3.6'", + "version": "==1.0.1" }, "asgiref": { "hashes": [ @@ -60,11 +60,11 @@ }, "autobahn": { "hashes": [ - "sha256:41a3a3f89cde48643baf4e105d9491c566295f9abee951379e59121784044b8b", - "sha256:7e6b1bf95196b733978bab2d54a7ab8899c16ce11be369dc58422c07b7eea726" + "sha256:884f79c50fdc55ade2c315946a9caa145e8b10075eee9d2c2594ea5e8f5226aa", + "sha256:bf7a9d302a34d0f719d43c57f65ca1f2f5c982dd6ea0c11e1e190ef6f43710fe" ], - "markers": "python_version >= '3.6'", - "version": "==21.2.1" + "markers": "python_version >= '3.7'", + "version": "==21.2.2" }, "automat": { "hashes": [ @@ -76,10 +76,10 @@ }, "blessed": { "hashes": [ - "sha256:0a74a8d3f0366db600d061273df77d44f0db07daade7bb7a4d49c8bc22ed9f74", - "sha256:580429e7e0c6f6a42ea81b0ae5a4993b6205c6ccbb635d034b4277af8175753e" + "sha256:1312879f971330a1b7f2c6341f2ae7e2cbac244bfc9d0ecfbbecd4b0293bc755", + "sha256:5b5e2f0563d5a668c282f3f5946f7b1abb70c85829461900e607e74d7725106e" ], - "version": "==1.17.12" + "version": "==1.18.0" }, "certifi": { "hashes": [ @@ -190,24 +190,22 @@ }, "cryptography": { "hashes": [ - "sha256:0d7b69674b738068fa6ffade5c962ecd14969690585aaca0a1b1fc9058938a72", - "sha256:1bd0ccb0a1ed775cd7e2144fe46df9dc03eefd722bbcf587b3e0616ea4a81eff", - "sha256:3c284fc1e504e88e51c428db9c9274f2da9f73fdf5d7e13a36b8ecb039af6e6c", - "sha256:49570438e60f19243e7e0d504527dd5fe9b4b967b5a1ff21cc12b57602dd85d3", - "sha256:541dd758ad49b45920dda3b5b48c968f8b2533d8981bcdb43002798d8f7a89ed", - "sha256:5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed", - "sha256:7951a966613c4211b6612b0352f5bf29989955ee592c4a885d8c7d0f830d0433", - "sha256:922f9602d67c15ade470c11d616f2b2364950602e370c76f0c94c94ae672742e", - "sha256:a0f0b96c572fc9f25c3f4ddbf4688b9b38c69836713fb255f4a2715d93cbaf44", - "sha256:a777c096a49d80f9d2979695b835b0f9c9edab73b59e4ceb51f19724dda887ed", - "sha256:a9a4ac9648d39ce71c2f63fe7dc6db144b9fa567ddfc48b9fde1b54483d26042", - "sha256:aa4969f24d536ae2268c902b2c3d62ab464b5a66bcb247630d208a79a8098e9b", - "sha256:c7390f9b2119b2b43160abb34f63277a638504ef8df99f11cb52c1fda66a2e6f", - "sha256:ddd06e71c449a4fe10d0c60846280ee35d69ce49e3e413ce46d5f129e1468083", - "sha256:e18e6ab84dfb0ab997faf8cca25a86ff15dfea4027b986322026cc99e0a892da" + "sha256:066bc53f052dfeda2f2d7c195cf16fb3e5ff13e1b6b7415b468514b40b381a5b", + "sha256:0923ba600d00718d63a3976f23cab19aef10c1765038945628cd9be047ad0336", + "sha256:2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87", + "sha256:4169a27b818de4a1860720108b55a2801f32b6ae79e7f99c00d79f2a2822eeb7", + "sha256:57ad77d32917bc55299b16d3b996ffa42a1c73c6cfa829b14043c561288d2799", + "sha256:5ecf2bcb34d17415e89b546dbb44e73080f747e504273e4d4987630493cded1b", + "sha256:600cf9bfe75e96d965509a4c0b2b183f74a4fa6f5331dcb40fb7b77b7c2484df", + "sha256:66b57a9ca4b3221d51b237094b0303843b914b7d5afd4349970bb26518e350b0", + "sha256:926ae3dfd160050158b9ca25d419fb7ee658974564b01aa10c059a75dffab7e8", + "sha256:93cfe5b7ff006de13e1e89830810ecbd014791b042cbe5eec253be11ac2b28f3", + "sha256:9e98b452132963678e3ac6c73f7010fe53adf72209a32854d55690acac3f6724", + "sha256:df186fcbf86dc1ce56305becb8434e4b6b7504bc724b71ad7a3239e0c9d14ef2", + "sha256:fec7fb46b10da10d9e1d078d1ff8ed9e05ae14f431fdbd11145edd0550b9a964" ], "index": "pypi", - "version": "==3.3.2" + "version": "==3.4.6" }, "daphne": { "hashes": [ @@ -219,11 +217,11 @@ }, "dateparser": { "hashes": [ - "sha256:7552c994f893b5cb8fcf103b4cd2ff7f57aab9bfd2619fdf0cf571c0740fd90b", - "sha256:e875efd8c57c85c2d02b238239878db59ff1971f5a823457fcc69e493bf6ebfa" + "sha256:159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a", + "sha256:17202df32c7a36e773136ff353aa3767e987f8b3e27374c39fd21a30a803d6f8" ], "index": "pypi", - "version": "==0.7.6" + "version": "==1.0.0" }, "django": { "hashes": [ @@ -415,11 +413,11 @@ }, "imap-tools": { "hashes": [ - "sha256:0eaa9b990fae336601dd44f353fac2d35ea25ca3b1b682a83700511635fc30ae", - "sha256:1c809e286d439e41fbe796c522ad4e565fd47a4260253343fa1b1045b6bfe8b1" + "sha256:44641716f0c5c07df78c5713405675fac50220d4f8e2906c9ed4aabd9c356fa8", + "sha256:bab9a6edf848a58bdd3959ba55e0eb75039ff188a3779371d0b8db674a4945e8" ], "index": "pypi", - "version": "==0.37.0" + "version": "==0.38.1" }, "img2pdf": { "hashes": [ @@ -591,11 +589,11 @@ }, "ocrmypdf": { "hashes": [ - "sha256:0f624456a50be0b0bc8c0b59704d159f637616c093a1cabe8bb383706561bcf7", - "sha256:b829ad640a6160423162012e094ee2f7cd074ec99efadd7f7486954ec9182985" + "sha256:2fca4046e3a33e5902dd89c3003a3f31c7d584dc43f14c7c97f57fce20d2e469", + "sha256:5c386fcf2c0f2635533c2bad0edcd2d455f667a134d180dc61cbb3d4d5f0c8e2" ], "index": "pypi", - "version": "==11.6.2" + "version": "==11.7.0" }, "pathvalidate": { "hashes": [ @@ -784,14 +782,6 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.20" }, - "pyhamcrest": { - "hashes": [ - "sha256:412e00137858f04bde0729913874a48485665f2d36fe9ee449f26be864af9316", - "sha256:7ead136e03655af85069b6f47b23eb7c3e5c221aa9f022a4fbb499f5b7308f29" - ], - "markers": "python_version >= '3.5'", - "version": "==2.0.2" - }, "pyopenssl": { "hashes": [ "sha256:4c231c759543ba02560fcd2480c48dcec4dae34c9da7d3747c508227e0624b51", @@ -1097,45 +1087,22 @@ }, "tqdm": { "hashes": [ - "sha256:65185676e9fdf20d154cffd1c5de8e39ef9696ff7e59fe0156b1b08e468736af", - "sha256:70657337ec104eb4f3fb229285358f23f045433f6aea26846cdd55f0fd68945c" + "sha256:2c44efa73b8914dba7807aefd09653ac63c22b5b4ea34f7a80973f418f1a3089", + "sha256:c23ac707e8e8aabb825e4d91f8e17247f9cc14b0d64dd9e97be0781e9e525bba" ], "index": "pypi", - "version": "==4.57.0" + "version": "==4.58.0" }, "twisted": { "extras": [ "tls" ], "hashes": [ - "sha256:0150dae5adc962d15e00054cc6926f1e64763fb8dd26e1632593ac06e592104b", - "sha256:040eb6641125d2a9a09cf198ec7b83dd8858c6f51f6770325ed9959c00f5098f", - "sha256:147780b8caf21ba2aef3688628eaf13d7e7fe02a86747cd54bfaf2140538f042", - "sha256:158ddb80719a4813d292293ac44ba41d8b56555ed009d90994a278237ee63d2c", - "sha256:15e52271f08f62e2230ff093e0278aa01c9dac057c4557cadadd2429eed86a3e", - "sha256:2182000d6ffc05d269e6c03bfcec8b57e20259ca1086180edaedec3f1e689292", - "sha256:25ffcf37944bdad4a99981bc74006d735a678d2b5c193781254fbbb6d69e3b22", - "sha256:3281d9ce889f7b21bdb73658e887141aa45a102baf3b2320eafcfba954fcefec", - "sha256:356e8d8dd3590e790e3dba4db139eb8a17aca64b46629c622e1b1597a4a92478", - "sha256:70952c56e4965b9f53b180daecf20a9595cf22b8d0935cd3bd664c90273c3ab2", - "sha256:7408c6635ee1b96587289283ebe90ee15dbf9614b05857b446055116bc822d29", - "sha256:7c547fd0215db9da8a1bc23182b309e84a232364cc26d829e9ee196ce840b114", - "sha256:894f6f3cfa57a15ea0d0714e4283913a5f2511dbd18653dd148eba53b3919797", - "sha256:94ac3d55a58c90e2075c5fe1853f2aa3892b73e3bf56395f743aefde8605eeaa", - "sha256:a58e61a2a01e5bcbe3b575c0099a2bcb8d70a75b1a087338e0c48dd6e01a5f15", - "sha256:c09c47ff9750a8e3aa60ad169c4b95006d455a29b80ad0901f031a103b2991cd", - "sha256:ca3a0b8c9110800e576d89b5337373e52018b41069bc879f12fa42b7eb2d0274", - "sha256:cd1dc5c85b58494138a3917752b54bb1daa0045d234b7c132c37a61d5483ebad", - "sha256:cdbc4c7f0cd7a2218b575844e970f05a1be1861c607b0e048c9bceca0c4d42f7", - "sha256:d267125cc0f1e8a0eed6319ba4ac7477da9b78a535601c49ecd20c875576433a", - "sha256:d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10", - "sha256:d95803193561a243cb0401b0567c6b7987d3f2a67046770e1dccd1c9e49a9780", - "sha256:e92703bed0cc21d6cb5c61d66922b3b1564015ca8a51325bd164a5e33798d504", - "sha256:f058bd0168271de4dcdc39845b52dd0a4a2fecf5f1246335f13f5e96eaebb467", - "sha256:f3c19e5bd42bbe4bf345704ad7c326c74d3fd7a1b3844987853bef180be638d4" + "sha256:77544a8945cf69b98d2946689bbe0c75de7d145cdf11f391dd487eae8fc95a12", + "sha256:aab38085ea6cda5b378b519a0ec99986874921ee8881318626b0a3414bb2631e" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==20.3.0" + "markers": "python_full_version >= '3.5.4'", + "version": "==21.2.0" }, "txaio": { "hashes": [ @@ -1490,11 +1457,11 @@ }, "faker": { "hashes": [ - "sha256:31a58ec5a8f4672f24da3b5ddea02c82a712de1de3179b432948e5c34d787aca", - "sha256:aadfe0efe11ecbbbc5b3b0b0fab050c2acbd2d8e5201769546d43d236bfff663" + "sha256:90b69e9e05d622edb2fa5ebfda7bef41c88675cace85e72689fde5b8723d00a3", + "sha256:da395fe545f40d4366b82b1a02448847a4586bd2b28af393b3edbd1e45d1e0fc" ], "markers": "python_version >= '3.6'", - "version": "==6.4.1" + "version": "==6.5.0" }, "filelock": { "hashes": [ diff --git a/requirements.txt b/requirements.txt index 2df1b29ae..947a30350 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,13 +8,13 @@ -i https://pypi.python.org/simple --extra-index-url https://www.piwheels.org/simple aioredis==1.3.1 -arrow==0.17.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +arrow==1.0.1; python_version >= '3.6' asgiref==3.3.1; python_version >= '3.5' async-timeout==3.0.1; python_full_version >= '3.5.3' attrs==20.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -autobahn==21.2.1; python_version >= '3.6' +autobahn==21.2.2; python_version >= '3.7' automat==20.2.0 -blessed==1.17.12 +blessed==1.18.0 certifi==2020.12.5 cffi==1.14.5 channels-redis==3.2.0 @@ -24,9 +24,9 @@ click==7.1.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, coloredlogs==15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' concurrent-log-handler==0.9.19 constantly==15.1.0 -cryptography==3.3.2 +cryptography==3.4.6 daphne==3.0.1; python_version >= '3.6' -dateparser==0.7.6 +dateparser==1.0.0 django-cors-headers==3.7.0 django-extensions==3.1.1 django-filter==2.4.0 @@ -43,7 +43,7 @@ httptools==0.1.1 humanfriendly==9.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' hyperlink==21.0.0 idna==2.10; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -imap-tools==0.37.0 +imap-tools==0.38.1 img2pdf==0.4.0 incremental==17.5.0 inotify-simple==1.3.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' @@ -53,7 +53,7 @@ langdetect==1.0.8 lxml==4.6.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' msgpack==1.0.2 numpy==1.19.5 -ocrmypdf==11.6.2 +ocrmypdf==11.7.0 pathvalidate==2.3.2 pdfminer.six==20201018 pikepdf==2.5.2 @@ -64,7 +64,6 @@ psycopg2-binary==2.8.6 pyasn1-modules==0.2.8 pyasn1==0.4.8 pycparser==2.20; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -pyhamcrest==2.0.2; python_version >= '3.5' pyopenssl==20.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' python-dateutil==2.8.1 python-dotenv==0.15.0 @@ -85,8 +84,8 @@ sortedcontainers==2.3.0 sqlparse==0.4.1; python_version >= '3.5' threadpoolctl==2.1.0; python_version >= '3.5' tika==1.24 -tqdm==4.57.0 -twisted[tls]==20.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +tqdm==4.58.0 +twisted[tls]==21.2.0; python_full_version >= '3.5.4' txaio==21.2.1; python_version >= '3.6' tzlocal==2.1 urllib3==1.26.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4' diff --git a/src/paperless_tesseract/tests/test_parser.py b/src/paperless_tesseract/tests/test_parser.py index c389d446f..21f1e140c 100644 --- a/src/paperless_tesseract/tests/test_parser.py +++ b/src/paperless_tesseract/tests/test_parser.py @@ -278,9 +278,7 @@ class TestParser(DirectoriesMixin, TestCase): with open(os.path.join(parser.tempdir, "sidecar.txt")) as f: sidecar = f.read() - self.assertIn("[OCR skipped on page 4]", sidecar) - self.assertIn("[OCR skipped on page 5]", sidecar) - self.assertIn("[OCR skipped on page 6]", sidecar) + self.assertIn("[OCR skipped on page(s) 4-6]", sidecar) @override_settings(OCR_MODE="skip_noarchive") def test_multi_page_mixed_no_archive(self): From b847e0c65e627604383f5520a963b3fc1285015d Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sun, 28 Feb 2021 13:20:31 +0100 Subject: [PATCH 64/88] changelog, documentation, version bump --- docs/administration.rst | 20 ++++++++++---------- docs/api.rst | 2 ++ docs/changelog.rst | 16 ++++++++++++++++ src-ui/src/environments/environment.prod.ts | 2 +- src/paperless/version.py | 2 +- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/docs/administration.rst b/docs/administration.rst index c91f501bd..19ab1e73f 100644 --- a/docs/administration.rst +++ b/docs/administration.rst @@ -184,17 +184,17 @@ Downgrades are possible. However, some updates also contain database migrations In order to move back from a version that applied database migrations, you'll have to revert the database migration *before* downgrading, and then downgrade paperless. -This table lists the most recent database migrations for each versions: +This table lists the compatible versions for each database migration number. -+---------+-------------------------+ -| Version | Latest migration number | -+---------+-------------------------+ -| 1.0.0 | 1011 | -+---------+-------------------------+ -| 1.1.0 | 1011 | -+---------+-------------------------+ -| 1.1.1 | 1012 | -+---------+-------------------------+ ++------------------+-----------------+ +| Migration number | Version range | ++------------------+-----------------+ +| 1011 | 1.0.0 | ++------------------+-----------------+ +| 1012 | 1.1.0 - 1.2.1 | ++------------------+-----------------+ +| 1013 | 1.3.0 - current | ++------------------+-----------------+ Execute the following management command to migrate your database: diff --git a/docs/api.rst b/docs/api.rst index d34558b36..c2120b20f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -286,6 +286,8 @@ was started successfully. No additional status information about the consumption process itself is available, since that happens in a different process. +.. _api-versioning: + API Versioning ############## diff --git a/docs/changelog.rst b/docs/changelog.rst index 73e457176..543d9435d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,22 @@ Changelog ********* +paperless-ng 1.3.0 +################## + +This release contains new database migrations. + +* Added a color picker for tag colors. + +* Added translations into Italian and Romanian. Thank you! + +* Close individual documents from the sidebar. + +* `BolkoSchreiber `_ added an option to disable/enable thumbnail inversion in dark mode. + +* The REST API is versioned from this point onwards. See the documentation about :ref:`api-versioning` for details. + + paperless-ng 1.2.1 ################## diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts index 2d07ac31c..d48b0bebe 100644 --- a/src-ui/src/environments/environment.prod.ts +++ b/src-ui/src/environments/environment.prod.ts @@ -3,7 +3,7 @@ export const environment = { apiBaseUrl: "/api/", apiVersion: "2", appTitle: "Paperless-ng", - version: "1.2.1", + version: "1.3.0", webSocketHost: window.location.host, webSocketProtocol: (window.location.protocol == "https:" ? "wss:" : "ws:") }; diff --git a/src/paperless/version.py b/src/paperless/version.py index d93cd02b0..3be2947f7 100644 --- a/src/paperless/version.py +++ b/src/paperless/version.py @@ -1 +1 @@ -__version__ = (1, 2, 1) +__version__ = (1, 3, 0) From 65377d881caa0257e65a1a955de684f9674c2818 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 12:35:21 +0000 Subject: [PATCH 65/88] Apply translations in ro translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'ro' language. --- src/locale/ro/LC_MESSAGES/django.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/locale/ro/LC_MESSAGES/django.po b/src/locale/ro/LC_MESSAGES/django.po index 613d60949..ac1fb40d1 100644 --- a/src/locale/ro/LC_MESSAGES/django.po +++ b/src/locale/ro/LC_MESSAGES/django.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-26 12:56+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" "Last-Translator: Cubic Lemon , 2021\n" "Language-Team: Romanian (https://www.transifex.com/paperless/teams/115905/ro/)\n" @@ -437,6 +437,10 @@ msgstr "Portugheza (Brazilia)" msgid "Italian" msgstr "Italiana" +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Romana" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Administrare Paperless-ng" @@ -676,7 +680,7 @@ msgstr "atribuie acest tip" #: paperless_mail/models.py:195 msgid "assign correspondent from" -msgstr "atribuie acest corespondent" +msgstr "atribuie corespondent din" #: paperless_mail/models.py:205 msgid "assign this correspondent" From c4c8a96f25571640bfdfb4fb37f49d875f9865d3 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 12:36:01 +0000 Subject: [PATCH 66/88] Translate /src-ui/messages.xlf in ro translation completed for the source file '/src-ui/messages.xlf' on the 'ro' language. --- src-ui/src/locale/messages.ro.xlf | 88 ++++++++++++++++++------------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/src-ui/src/locale/messages.ro.xlf b/src-ui/src/locale/messages.ro.xlf index b45e86699..65ff0f3f7 100644 --- a/src-ui/src/locale/messages.ro.xlf +++ b/src-ui/src/locale/messages.ro.xlf @@ -590,7 +590,7 @@ Vizualizarea "" a fost stearsa. src/app/components/manage/settings/settings.component.ts - 67 + 68 @@ -598,7 +598,7 @@ Setarile au fost salvate. src/app/components/manage/settings/settings.component.ts - 87 + 89 @@ -606,7 +606,7 @@ Foloseste limba sistemului src/app/components/manage/settings/settings.component.ts - 92 + 94 @@ -614,7 +614,7 @@ Foloseste formatul datei corespunzator limbii de afisare src/app/components/manage/settings/settings.component.ts - 98 + 100 @@ -622,7 +622,7 @@ Eroare la stocarea setarilor pe server: src/app/components/manage/settings/settings.component.ts - 115 + 117 @@ -646,7 +646,7 @@ Notificari src/app/components/manage/settings/settings.component.html - 115 + 116 @@ -654,7 +654,7 @@ Vizualizari src/app/components/manage/settings/settings.component.html - 133 + 134 @@ -777,12 +777,20 @@ 98 + + Invert thumbnails in dark mode + Inverseaza miniaturile in modul intunecat + + src/app/components/manage/settings/settings.component.html + 99 + + Bulk editing Editare in bloc src/app/components/manage/settings/settings.component.html - 102 + 103 @@ -790,7 +798,7 @@ Afisati dialoguri de confirmare src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -798,7 +806,7 @@ Stergerea documentelor necesita intotdeauna confirmare. src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -806,7 +814,7 @@ Aplica la iesire src/app/components/manage/settings/settings.component.html - 107 + 108 @@ -814,7 +822,7 @@ Procesarea documentelor src/app/components/manage/settings/settings.component.html - 118 + 119 @@ -822,7 +830,7 @@ Afisati notificari cand sunt detectate documente noi src/app/components/manage/settings/settings.component.html - 122 + 123 @@ -830,7 +838,7 @@ Afisati notificari cand procesarea unui document este completa src/app/components/manage/settings/settings.component.html - 123 + 124 @@ -838,7 +846,7 @@ Afisati notificari cand procesarea unui document esueaza src/app/components/manage/settings/settings.component.html - 124 + 125 @@ -846,7 +854,7 @@ Ascundeti notificarile pe tabloul de bord src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -854,7 +862,7 @@ Aceasta setare va opri mesajele despre procesarea documentelor pe tabloul de bord src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -862,7 +870,7 @@ Apare pe src/app/components/manage/settings/settings.component.html - 145 + 146 @@ -870,7 +878,7 @@ Afiseaza pe tabloul de bord src/app/components/manage/settings/settings.component.html - 148 + 149 @@ -878,7 +886,7 @@ Afiseaza in bara laterala src/app/components/manage/settings/settings.component.html - 152 + 153 @@ -886,7 +894,7 @@ Nu sunt definite vizualizari. src/app/components/manage/settings/settings.component.html - 162 + 163 @@ -1111,7 +1119,7 @@ Administreaza src/app/components/app-frame/app-frame.component.html - 107 + 112 @@ -1119,7 +1127,7 @@ Administrator src/app/components/app-frame/app-frame.component.html - 149 + 154 @@ -1127,7 +1135,7 @@ Informatii src/app/components/app-frame/app-frame.component.html - 155 + 160 @@ -1135,7 +1143,7 @@ Documentatie src/app/components/app-frame/app-frame.component.html - 162 + 167 @@ -1143,7 +1151,7 @@ GitHub src/app/components/app-frame/app-frame.component.html - 170 + 175 @@ -1151,7 +1159,7 @@ Sugestii src/app/components/app-frame/app-frame.component.html - 176 + 181 @@ -1175,7 +1183,7 @@ Inchide tot src/app/components/app-frame/app-frame.component.html - 101 + 106 @@ -1861,7 +1869,7 @@ Engleza (SUA) src/app/services/settings.service.ts - 88 + 90 @@ -1869,7 +1877,7 @@ Engleza (UK) src/app/services/settings.service.ts - 89 + 91 @@ -1877,7 +1885,7 @@ Germana src/app/services/settings.service.ts - 90 + 92 @@ -1885,7 +1893,7 @@ Olandeza src/app/services/settings.service.ts - 91 + 93 @@ -1893,7 +1901,7 @@ Franceza src/app/services/settings.service.ts - 92 + 94 @@ -1901,7 +1909,7 @@ Portugheza (Brazilia) src/app/services/settings.service.ts - 93 + 95 @@ -1909,7 +1917,15 @@ Italiana src/app/services/settings.service.ts - 94 + 96 + + + + Romanian + Romana + + src/app/services/settings.service.ts + 97 @@ -1917,7 +1933,7 @@ ISO 8601 src/app/services/settings.service.ts - 99 + 102 From efa7b7b0b54c97d6040124e95a2c438fe472edc7 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:19:41 +0100 Subject: [PATCH 67/88] filter by title or title+content fixes #636 --- src-ui/messages.xlf | 43 +++++++------ .../filter-editor.component.html | 10 +++- .../filter-editor/filter-editor.component.ts | 60 ++++++++++++++----- src-ui/src/app/data/filter-rule-type.ts | 6 +- src/documents/filters.py | 13 ++++ .../migrations/1014_auto_20210228_1614.py | 18 ++++++ src/documents/models.py | 2 + 7 files changed, 116 insertions(+), 36 deletions(-) create mode 100644 src/documents/migrations/1014_auto_20210228_1614.py diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 8f2b8b786..329399584 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -1039,81 +1039,95 @@ 106 + + Title + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 + + Correspondent: src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 Without correspondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 Type: src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 Without document type src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 Tag: src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 Without any tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 Title: src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 Filter tags src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 Filter correspondents src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 Filter document types src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 Reset filters src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -1819,13 +1833,6 @@ 18 - - Title - - src/app/services/rest/document.service.ts - 19 - - Document type 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 033596f53..7290354eb 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 @@ -2,7 +2,15 @@
- +
+
+ + +
+ +
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts index a6506efde..3ac9df1ff 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts @@ -8,10 +8,13 @@ import { DocumentTypeService } from 'src/app/services/rest/document-type.service import { TagService } from 'src/app/services/rest/tag.service'; import { CorrespondentService } from 'src/app/services/rest/correspondent.service'; import { FilterRule } from 'src/app/data/filter-rule'; -import { FILTER_ADDED_AFTER, FILTER_ADDED_BEFORE, FILTER_CORRESPONDENT, FILTER_CREATED_AFTER, FILTER_CREATED_BEFORE, FILTER_DOCUMENT_TYPE, FILTER_HAS_ANY_TAG, FILTER_HAS_TAG, FILTER_TITLE } from 'src/app/data/filter-rule-type'; +import { FILTER_ADDED_AFTER, FILTER_ADDED_BEFORE, FILTER_CORRESPONDENT, FILTER_CREATED_AFTER, FILTER_CREATED_BEFORE, FILTER_DOCUMENT_TYPE, FILTER_HAS_ANY_TAG, FILTER_HAS_TAG, FILTER_TITLE, FILTER_TITLE_CONTENT } from 'src/app/data/filter-rule-type'; import { FilterableDropdownSelectionModel } from '../../common/filterable-dropdown/filterable-dropdown.component'; import { ToggleableItemState } from '../../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component'; +const TEXT_FILTER_TARGET_TITLE = "title" +const TEXT_FILTER_TARGET_TITLE_CONTENT = "title-content" + @Component({ selector: 'app-filter-editor', templateUrl: './filter-editor.component.html', @@ -64,7 +67,19 @@ export class FilterEditorComponent implements OnInit, OnDestroy { correspondents: PaperlessCorrespondent[] = [] documentTypes: PaperlessDocumentType[] = [] - _titleFilter = "" + _textFilter = "" + + textFilterTargets = [ + {id: TEXT_FILTER_TARGET_TITLE, name: $localize`Title`}, + {id: TEXT_FILTER_TARGET_TITLE_CONTENT, name: $localize`Title & content`} + ] + + textFilterTarget = TEXT_FILTER_TARGET_TITLE_CONTENT + + get textFilterTargetName() { + return this.textFilterTargets.find(t => t.id == this.textFilterTarget)?.name + } + tagSelectionModel = new FilterableDropdownSelectionModel() correspondentSelectionModel = new FilterableDropdownSelectionModel() @@ -80,7 +95,7 @@ export class FilterEditorComponent implements OnInit, OnDestroy { this.documentTypeSelectionModel.clear(false) this.tagSelectionModel.clear(false) this.correspondentSelectionModel.clear(false) - this._titleFilter = null + this._textFilter = null this.dateAddedBefore = null this.dateAddedAfter = null this.dateCreatedBefore = null @@ -89,7 +104,12 @@ export class FilterEditorComponent implements OnInit, OnDestroy { value.forEach(rule => { switch (rule.rule_type) { case FILTER_TITLE: - this._titleFilter = rule.value + this._textFilter = rule.value + this.textFilterTarget = TEXT_FILTER_TARGET_TITLE + break + case FILTER_TITLE_CONTENT: + this._textFilter = rule.value + this.textFilterTarget = TEXT_FILTER_TARGET_TITLE_CONTENT break case FILTER_CREATED_AFTER: this.dateCreatedAfter = rule.value @@ -121,8 +141,11 @@ export class FilterEditorComponent implements OnInit, OnDestroy { get filterRules(): FilterRule[] { let filterRules: FilterRule[] = [] - if (this._titleFilter) { - filterRules.push({rule_type: FILTER_TITLE, value: this._titleFilter}) + if (this._textFilter && this.textFilterTarget == TEXT_FILTER_TARGET_TITLE_CONTENT) { + filterRules.push({rule_type: FILTER_TITLE_CONTENT, value: this._textFilter}) + } + if (this._textFilter && this.textFilterTarget == TEXT_FILTER_TARGET_TITLE) { + filterRules.push({rule_type: FILTER_TITLE, value: this._textFilter}) } if (this.tagSelectionModel.isNoneSelected()) { filterRules.push({rule_type: FILTER_HAS_ANY_TAG, value: "false"}) @@ -165,15 +188,15 @@ export class FilterEditorComponent implements OnInit, OnDestroy { this.filterRulesChange.next(this.filterRules) } - get titleFilter() { - return this._titleFilter + get textFilter() { + return this._textFilter } - set titleFilter(value) { - this.titleFilterDebounce.next(value) + set textFilter(value) { + this.textFilterDebounce.next(value) } - titleFilterDebounce: Subject + textFilterDebounce: Subject subscription: Subscription ngOnInit() { @@ -181,19 +204,19 @@ export class FilterEditorComponent implements OnInit, OnDestroy { this.correspondentService.listAll().subscribe(result => this.correspondents = result.results) this.documentTypeService.listAll().subscribe(result => this.documentTypes = result.results) - this.titleFilterDebounce = new Subject() + this.textFilterDebounce = new Subject() - this.subscription = this.titleFilterDebounce.pipe( + this.subscription = this.textFilterDebounce.pipe( debounceTime(400), distinctUntilChanged() - ).subscribe(title => { - this._titleFilter = title + ).subscribe(text => { + this._textFilter = text this.updateRules() }) } ngOnDestroy() { - this.titleFilterDebounce.complete() + this.textFilterDebounce.complete() } resetSelected() { @@ -223,4 +246,9 @@ export class FilterEditorComponent implements OnInit, OnDestroy { onDocumentTypeDropdownOpen() { this.documentTypeSelectionModel.apply() } + + changeTextFilterTarget(target) { + this.textFilterTarget = target + this.updateRules() + } } diff --git a/src-ui/src/app/data/filter-rule-type.ts b/src-ui/src/app/data/filter-rule-type.ts index 4669b548e..2c9f8a373 100644 --- a/src-ui/src/app/data/filter-rule-type.ts +++ b/src-ui/src/app/data/filter-rule-type.ts @@ -20,6 +20,8 @@ export const FILTER_DOES_NOT_HAVE_TAG = 17 export const FILTER_ASN_ISNULL = 18 +export const FILTER_TITLE_CONTENT = 19 + export const FILTER_RULE_TYPES: FilterRuleType[] = [ {id: FILTER_TITLE, filtervar: "title__icontains", datatype: "string", multi: false, default: ""}, @@ -47,7 +49,9 @@ export const FILTER_RULE_TYPES: FilterRuleType[] = [ {id: FILTER_MODIFIED_BEFORE, filtervar: "modified__date__lt", datatype: "date", multi: false}, {id: FILTER_MODIFIED_AFTER, filtervar: "modified__date__gt", datatype: "date", multi: false}, - {id: FILTER_ASN_ISNULL, filtervar: "archive_serial_number__isnull", datatype: "boolean", multi: false} + {id: FILTER_ASN_ISNULL, filtervar: "archive_serial_number__isnull", datatype: "boolean", multi: false}, + + {id: FILTER_TITLE_CONTENT, filtervar: "title_content", datatype: "string", multi: false} ] export interface FilterRuleType { diff --git a/src/documents/filters.py b/src/documents/filters.py index 2201298f3..a1ad94b1e 100755 --- a/src/documents/filters.py +++ b/src/documents/filters.py @@ -1,3 +1,4 @@ +from django.db.models import Q from django_filters.rest_framework import BooleanFilter, FilterSet, Filter from .models import Correspondent, Document, Tag, DocumentType, Log @@ -70,6 +71,16 @@ class InboxFilter(Filter): return qs +class TitleContentFilter(Filter): + + def filter(self, qs, value): + if value: + return qs.filter(Q(title__icontains=value) | + Q(content__icontains=value)) + else: + return qs + + class DocumentFilterSet(FilterSet): is_tagged = BooleanFilter( @@ -85,6 +96,8 @@ class DocumentFilterSet(FilterSet): is_in_inbox = InboxFilter() + title_content = TitleContentFilter() + class Meta: model = Document fields = { diff --git a/src/documents/migrations/1014_auto_20210228_1614.py b/src/documents/migrations/1014_auto_20210228_1614.py new file mode 100644 index 000000000..cb716fa82 --- /dev/null +++ b/src/documents/migrations/1014_auto_20210228_1614.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.7 on 2021-02-28 15:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '1013_migrate_tag_colour'), + ] + + operations = [ + migrations.AlterField( + model_name='savedviewfilterrule', + name='rule_type', + field=models.PositiveIntegerField(choices=[(0, 'title contains'), (1, 'content contains'), (2, 'ASN is'), (3, 'correspondent is'), (4, 'document type is'), (5, 'is in inbox'), (6, 'has tag'), (7, 'has any tag'), (8, 'created before'), (9, 'created after'), (10, 'created year is'), (11, 'created month is'), (12, 'created day is'), (13, 'added before'), (14, 'added after'), (15, 'modified before'), (16, 'modified after'), (17, 'does not have tag'), (18, 'does not have ASN'), (19, 'title or content contains')], verbose_name='rule type'), + ), + ] diff --git a/src/documents/models.py b/src/documents/models.py index 3d81efea4..6ee93e3ad 100755 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -385,6 +385,8 @@ class SavedViewFilterRule(models.Model): (15, _("modified before")), (16, _("modified after")), (17, _("does not have tag")), + (18, _("does not have ASN")), + (19, _("title or content contains")), ] saved_view = models.ForeignKey( From 5c19a8bb703022eece2601f34d2b7ef829430c78 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:35:02 +0100 Subject: [PATCH 68/88] improved color generation logic --- src-ui/src/app/utils/color.ts | 54 +++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/src-ui/src/app/utils/color.ts b/src-ui/src/app/utils/color.ts index bcfdef088..549e900b7 100644 --- a/src-ui/src/app/utils/color.ts +++ b/src-ui/src/app/utils/color.ts @@ -1,12 +1,48 @@ - function componentToHex(c) { - var hex = c.toString(16); - return hex.length == 1 ? "0" + hex : hex; +function componentToHex(c) { + var hex = Math.floor(c).toString(16) + return hex.length == 1 ? "0" + hex : hex +} + +/** + * https://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c + * + * Converts an HSL color value to RGB. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes h, s, and l are contained in the set [0, 1] and + * returns r, g, and b in the set [0, 255]. + * + * @param Number h The hue + * @param Number s The saturation + * @param Number l The lightness + * @return Array The RGB representation + */ +function hslToRgb(h, s, l){ + var r, g, b + + if(s == 0){ + r = g = b = l // achromatic + }else{ + function hue2rgb(p, q, t){ + if(t < 0) t += 1 + if(t > 1) t -= 1 + if(t < 1/6) return p + (q - p) * 6 * t + if(t < 1/2) return q + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6 + return p + } + + var q = l < 0.5 ? l * (1 + s) : l + s - l * s + var p = 2 * l - q + r = hue2rgb(p, q, h + 1/3) + g = hue2rgb(p, q, h) + b = hue2rgb(p, q, h - 1/3) } - export function randomColor() { - let r = Math.floor(Math.random() * 150) + 50 - let g = Math.floor(Math.random() * 150) + 50 - let b = Math.floor(Math.random() * 150) + 50 - return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}` - } \ No newline at end of file + return [r * 255, g * 255, b * 255] +} + +export function randomColor() { + let rgb = hslToRgb(Math.random(), 0.6, Math.random() * 0.4 + 0.4) + return `#${componentToHex(rgb[0])}${componentToHex(rgb[1])}${componentToHex(rgb[2])}` +} \ No newline at end of file From 686ae5b213417c27fdd4e589f944f6ee278e2fa7 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:35:20 +0000 Subject: [PATCH 69/88] Apply translations in fr translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'fr' language. --- src/locale/fr/LC_MESSAGES/django.po | 172 +++++++++++++++------------- 1 file changed, 92 insertions(+), 80 deletions(-) diff --git a/src/locale/fr/LC_MESSAGES/django.po b/src/locale/fr/LC_MESSAGES/django.po index 3b4fbce3f..755dbba9d 100644 --- a/src/locale/fr/LC_MESSAGES/django.po +++ b/src/locale/fr/LC_MESSAGES/django.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 16:49+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" "Last-Translator: Philmo67, 2021\n" "Language-Team: French (https://www.transifex.com/paperless/teams/115905/fr/)\n" @@ -50,7 +50,7 @@ msgstr "Mot approximatif" msgid "Automatic" msgstr "Automatique" -#: documents/models.py:41 documents/models.py:364 paperless_mail/models.py:25 +#: documents/models.py:41 documents/models.py:350 paperless_mail/models.py:25 #: paperless_mail/models.py:109 msgid "name" msgstr "nom" @@ -67,7 +67,7 @@ msgstr "algorithme de rapprochement" msgid "is insensitive" msgstr "est insensible à la casse" -#: documents/models.py:74 documents/models.py:134 +#: documents/models.py:74 documents/models.py:120 msgid "correspondent" msgstr "correspondant" @@ -75,15 +75,15 @@ msgstr "correspondant" msgid "correspondents" msgstr "correspondants" -#: documents/models.py:97 +#: documents/models.py:81 msgid "color" msgstr "couleur" -#: documents/models.py:101 +#: documents/models.py:87 msgid "is inbox tag" msgstr "est une étiquette de boîte de réception" -#: documents/models.py:103 +#: documents/models.py:89 msgid "" "Marks this tag as an inbox tag: All newly consumed documents will be tagged " "with inbox tags." @@ -91,39 +91,39 @@ msgstr "" "Marque cette étiquette comme étiquette de boîte de réception : ces " "étiquettes sont affectées à tous les documents nouvellement traités." -#: documents/models.py:108 +#: documents/models.py:94 msgid "tag" msgstr "étiquette" -#: documents/models.py:109 documents/models.py:165 +#: documents/models.py:95 documents/models.py:151 msgid "tags" msgstr "étiquettes" -#: documents/models.py:115 documents/models.py:147 +#: documents/models.py:101 documents/models.py:133 msgid "document type" msgstr "type de document" -#: documents/models.py:116 +#: documents/models.py:102 msgid "document types" msgstr "types de document" -#: documents/models.py:124 +#: documents/models.py:110 msgid "Unencrypted" msgstr "Non chiffré" -#: documents/models.py:125 +#: documents/models.py:111 msgid "Encrypted with GNU Privacy Guard" msgstr "Chiffré avec GNU Privacy Guard" -#: documents/models.py:138 +#: documents/models.py:124 msgid "title" msgstr "titre" -#: documents/models.py:151 +#: documents/models.py:137 msgid "content" msgstr "contenu" -#: documents/models.py:153 +#: documents/models.py:139 msgid "" "The raw, text-only data of the document. This field is primarily used for " "searching." @@ -131,242 +131,246 @@ msgstr "" "Les données brutes du document, en format texte uniquement. Ce champ est " "principalement utilisé pour la recherche." -#: documents/models.py:158 +#: documents/models.py:144 msgid "mime type" msgstr "type mime" -#: documents/models.py:169 +#: documents/models.py:155 msgid "checksum" msgstr "somme de contrôle" -#: documents/models.py:173 +#: documents/models.py:159 msgid "The checksum of the original document." msgstr "La somme de contrôle du document original." -#: documents/models.py:177 +#: documents/models.py:163 msgid "archive checksum" msgstr "somme de contrôle de l'archive" -#: documents/models.py:182 +#: documents/models.py:168 msgid "The checksum of the archived document." msgstr "La somme de contrôle du document archivé." -#: documents/models.py:186 documents/models.py:342 +#: documents/models.py:172 documents/models.py:328 msgid "created" msgstr "créé le" -#: documents/models.py:190 +#: documents/models.py:176 msgid "modified" msgstr "modifié" -#: documents/models.py:194 +#: documents/models.py:180 msgid "storage type" msgstr "forme d'enregistrement :" -#: documents/models.py:202 +#: documents/models.py:188 msgid "added" msgstr "date d'ajout" -#: documents/models.py:206 +#: documents/models.py:192 msgid "filename" msgstr "nom du fichier" -#: documents/models.py:212 +#: documents/models.py:198 msgid "Current filename in storage" msgstr "Nom du fichier courant en base de données" -#: documents/models.py:216 +#: documents/models.py:202 msgid "archive filename" msgstr "nom de fichier de l'archive" -#: documents/models.py:222 +#: documents/models.py:208 msgid "Current archive filename in storage" msgstr "Nom du fichier d'archive courant en base de données" -#: documents/models.py:226 +#: documents/models.py:212 msgid "archive serial number" msgstr "numéro de série de l'archive" -#: documents/models.py:231 +#: documents/models.py:217 msgid "The position of this document in your physical document archive." msgstr "" "Le classement de ce document dans votre archive de documents physiques." -#: documents/models.py:237 +#: documents/models.py:223 msgid "document" msgstr "document" -#: documents/models.py:238 +#: documents/models.py:224 msgid "documents" msgstr "documents" -#: documents/models.py:325 +#: documents/models.py:311 msgid "debug" msgstr "débogage" -#: documents/models.py:326 +#: documents/models.py:312 msgid "information" msgstr "information" -#: documents/models.py:327 +#: documents/models.py:313 msgid "warning" msgstr "avertissement" -#: documents/models.py:328 +#: documents/models.py:314 msgid "error" msgstr "erreur" -#: documents/models.py:329 +#: documents/models.py:315 msgid "critical" msgstr "critique" -#: documents/models.py:333 +#: documents/models.py:319 msgid "group" msgstr "groupe" -#: documents/models.py:336 +#: documents/models.py:322 msgid "message" msgstr "message" -#: documents/models.py:339 +#: documents/models.py:325 msgid "level" msgstr "niveau" -#: documents/models.py:346 +#: documents/models.py:332 msgid "log" msgstr "rapport" -#: documents/models.py:347 +#: documents/models.py:333 msgid "logs" msgstr "rapports" -#: documents/models.py:358 documents/models.py:408 +#: documents/models.py:344 documents/models.py:394 msgid "saved view" msgstr "vue enregistrée" -#: documents/models.py:359 +#: documents/models.py:345 msgid "saved views" msgstr "vues enregistrées" -#: documents/models.py:362 +#: documents/models.py:348 msgid "user" msgstr "utilisateur" -#: documents/models.py:368 +#: documents/models.py:354 msgid "show on dashboard" msgstr "montrer sur le tableau de bord" -#: documents/models.py:371 +#: documents/models.py:357 msgid "show in sidebar" msgstr "montrer dans la barre latérale" -#: documents/models.py:375 +#: documents/models.py:361 msgid "sort field" msgstr "champ de tri" -#: documents/models.py:378 +#: documents/models.py:364 msgid "sort reverse" msgstr "tri inverse" -#: documents/models.py:384 +#: documents/models.py:370 msgid "title contains" msgstr "le titre contient" -#: documents/models.py:385 +#: documents/models.py:371 msgid "content contains" msgstr "le contenu contient" -#: documents/models.py:386 +#: documents/models.py:372 msgid "ASN is" msgstr "le NSA est" -#: documents/models.py:387 +#: documents/models.py:373 msgid "correspondent is" msgstr "le correspondant est" -#: documents/models.py:388 +#: documents/models.py:374 msgid "document type is" msgstr "le type de document est" -#: documents/models.py:389 +#: documents/models.py:375 msgid "is in inbox" msgstr "est dans la boîte de réception" -#: documents/models.py:390 +#: documents/models.py:376 msgid "has tag" msgstr "porte l'étiquette" -#: documents/models.py:391 +#: documents/models.py:377 msgid "has any tag" msgstr "porte l'une des étiquettes" -#: documents/models.py:392 +#: documents/models.py:378 msgid "created before" msgstr "créé avant" -#: documents/models.py:393 +#: documents/models.py:379 msgid "created after" msgstr "créé après" -#: documents/models.py:394 +#: documents/models.py:380 msgid "created year is" msgstr "l'année de création est" -#: documents/models.py:395 +#: documents/models.py:381 msgid "created month is" msgstr "le mois de création est" -#: documents/models.py:396 +#: documents/models.py:382 msgid "created day is" msgstr "le jour de création est" -#: documents/models.py:397 +#: documents/models.py:383 msgid "added before" msgstr "ajouté avant" -#: documents/models.py:398 +#: documents/models.py:384 msgid "added after" msgstr "ajouté après" -#: documents/models.py:399 +#: documents/models.py:385 msgid "modified before" msgstr "modifié avant" -#: documents/models.py:400 +#: documents/models.py:386 msgid "modified after" msgstr "modifié après" -#: documents/models.py:401 +#: documents/models.py:387 msgid "does not have tag" msgstr "ne porte pas d'étiquette" -#: documents/models.py:412 +#: documents/models.py:398 msgid "rule type" msgstr "type de règle" -#: documents/models.py:416 +#: documents/models.py:402 msgid "value" msgstr "valeur" -#: documents/models.py:422 +#: documents/models.py:408 msgid "filter rule" msgstr "règle de filtrage" -#: documents/models.py:423 +#: documents/models.py:409 msgid "filter rules" msgstr "règles de filtrage" -#: documents/serialisers.py:52 +#: documents/serialisers.py:53 #, python-format msgid "Invalid regular expresssion: %(error)s" msgstr "Expression régulière incorrecte : %(error)s" -#: documents/serialisers.py:378 +#: documents/serialisers.py:177 +msgid "Invalid color." +msgstr "Couleur incorrecte." + +#: documents/serialisers.py:451 #, python-format msgid "File type %(type)s not supported" msgstr "Type de fichier %(type)s non pris en charge" -#: documents/templates/index.html:20 +#: documents/templates/index.html:21 msgid "Paperless-ng is loading..." msgstr "Paperless-ng est en cours de chargement..." @@ -408,30 +412,38 @@ msgstr "Mot de passe" msgid "Sign in" msgstr "S'identifier" -#: paperless/settings.py:291 +#: paperless/settings.py:297 msgid "English (US)" msgstr "Anglais (US)" -#: paperless/settings.py:292 +#: paperless/settings.py:298 msgid "English (GB)" msgstr "Anglais (GB)" -#: paperless/settings.py:293 +#: paperless/settings.py:299 msgid "German" msgstr "Allemand" -#: paperless/settings.py:294 +#: paperless/settings.py:300 msgid "Dutch" msgstr "Néerlandais" -#: paperless/settings.py:295 +#: paperless/settings.py:301 msgid "French" msgstr "Français" -#: paperless/settings.py:296 +#: paperless/settings.py:302 msgid "Portuguese (Brazil)" msgstr "Portugais (Brésil)" +#: paperless/settings.py:303 +msgid "Italian" +msgstr "Italien" + +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Roumain" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Administration de Paperless-ng" From c3ec40189f9f7a8ce5f0e1d881e8cf959b8f51d5 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:36:24 +0000 Subject: [PATCH 70/88] Translate /src-ui/messages.xlf in fr translation completed for the source file '/src-ui/messages.xlf' on the 'fr' language. --- src-ui/src/locale/messages.fr.xlf | 266 +++++++++++------------------- 1 file changed, 97 insertions(+), 169 deletions(-) diff --git a/src-ui/src/locale/messages.fr.xlf b/src-ui/src/locale/messages.fr.xlf index 05b9fdab7..b1f820e2e 100644 --- a/src-ui/src/locale/messages.fr.xlf +++ b/src-ui/src/locale/messages.fr.xlf @@ -478,7 +478,7 @@ Voulez-vous vraiment supprimer l'étiquette "" ? src/app/components/manage/tag-list/tag-list.component.ts - 30 + 26
@@ -590,7 +590,7 @@ Vue "" supprimée. src/app/components/manage/settings/settings.component.ts - 67 + 68 @@ -598,7 +598,7 @@ Paramètres enregistrés avec succès. src/app/components/manage/settings/settings.component.ts - 87 + 89 @@ -606,7 +606,7 @@ Utiliser la langue du système src/app/components/manage/settings/settings.component.ts - 92 + 94 @@ -614,7 +614,7 @@ Utiliser le format de date de la langue d'affichage src/app/components/manage/settings/settings.component.ts - 98 + 100 @@ -622,7 +622,7 @@ Une erreur s'est produite lors de l'enregistrement des paramètres sur le serveur : src/app/components/manage/settings/settings.component.ts - 115 + 117 @@ -646,7 +646,7 @@ Notifications src/app/components/manage/settings/settings.component.html - 115 + 116 @@ -654,7 +654,7 @@ Vues enregistrées src/app/components/manage/settings/settings.component.html - 133 + 134 @@ -777,12 +777,20 @@ 98 + + Invert thumbnails in dark mode + Inverser les vignettes en mode sombre + + src/app/components/manage/settings/settings.component.html + 99 + + Bulk editing Edition en masse src/app/components/manage/settings/settings.component.html - 102 + 103 @@ -790,7 +798,7 @@ Afficher les messages de confirmation src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -798,7 +806,7 @@ La suppression de documents requiert toujours une confirmation. src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -806,7 +814,7 @@ Appliquer lors de la fermeture src/app/components/manage/settings/settings.component.html - 107 + 108 @@ -814,7 +822,7 @@ Traitement de documents src/app/components/manage/settings/settings.component.html - 118 + 119 @@ -822,7 +830,7 @@ Afficher des notifications lorsque de nouveaux documents sont détectés src/app/components/manage/settings/settings.component.html - 122 + 123 @@ -830,7 +838,7 @@ Afficher des notifications lorsque le traitement des documents se termine avec succès src/app/components/manage/settings/settings.component.html - 123 + 124 @@ -838,7 +846,7 @@ Afficher des notifications en cas d'échec du traitement des documents src/app/components/manage/settings/settings.component.html - 124 + 125 @@ -846,7 +854,7 @@ Supprimer les notifications du tableau de bord src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -854,7 +862,7 @@ Cela supprimera tous les messages liés au traitement de documents sur le tableau de bord. src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -862,7 +870,7 @@ Apparaît sur src/app/components/manage/settings/settings.component.html - 145 + 146 @@ -870,7 +878,7 @@ Montrer sur le tableau de bord src/app/components/manage/settings/settings.component.html - 148 + 149 @@ -878,7 +886,7 @@ Montrer dans la barre latérale src/app/components/manage/settings/settings.component.html - 152 + 153 @@ -886,7 +894,7 @@ Aucune vue sauvegardée n'est définie. src/app/components/manage/settings/settings.component.html - 162 + 163 @@ -990,7 +998,7 @@ Créer une nouvelle étiquette src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 21 + 22 @@ -998,7 +1006,7 @@ Éditer l'étiquette src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 25 + 26 @@ -1006,7 +1014,7 @@ Étiquette de boîte de réception src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1014,7 +1022,7 @@ Les étiquettes de boîte de réception sont automatiquement affectées à tous les documents traités. src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1111,7 +1119,7 @@ Gestion src/app/components/app-frame/app-frame.component.html - 107 + 112 @@ -1119,7 +1127,7 @@ Administration src/app/components/app-frame/app-frame.component.html - 149 + 154 @@ -1127,7 +1135,7 @@ Info src/app/components/app-frame/app-frame.component.html - 155 + 160 @@ -1135,7 +1143,7 @@ Documentation src/app/components/app-frame/app-frame.component.html - 162 + 167 @@ -1143,7 +1151,7 @@ GitHub src/app/components/app-frame/app-frame.component.html - 170 + 175 @@ -1151,7 +1159,7 @@ Suggérer une idée src/app/components/app-frame/app-frame.component.html - 176 + 181 @@ -1175,7 +1183,23 @@ Fermer tout src/app/components/app-frame/app-frame.component.html - 101 + 106 + + + + Title + Titre + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + Titre & contenu + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 @@ -1183,7 +1207,7 @@ Correspondant : src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 @@ -1191,7 +1215,7 @@ Sans correspondant src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 @@ -1199,7 +1223,7 @@ Type : src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 @@ -1207,7 +1231,7 @@ Sans type de document src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 @@ -1215,7 +1239,7 @@ Étiquette : src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 @@ -1223,7 +1247,7 @@ Sans étiquette src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 @@ -1231,7 +1255,7 @@ Titre : src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 @@ -1239,7 +1263,7 @@ Filtrer les étiquettes src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 @@ -1247,7 +1271,7 @@ Filtrer les correspondants src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 @@ -1255,7 +1279,7 @@ Filtrer les types de documents src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 @@ -1263,7 +1287,7 @@ Réinitialiser les filtres src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -1288,7 +1312,7 @@ Les 7 derniers jours src/app/components/common/date-dropdown/date-dropdown.component.ts - 24 + 34 @@ -1296,7 +1320,7 @@ Le mois dernier src/app/components/common/date-dropdown/date-dropdown.component.ts - 25 + 35 @@ -1304,7 +1328,7 @@ Les 3 derniers mois src/app/components/common/date-dropdown/date-dropdown.component.ts - 26 + 36 @@ -1312,7 +1336,7 @@ L'année passée src/app/components/common/date-dropdown/date-dropdown.component.ts - 27 + 37 @@ -1328,7 +1352,7 @@ Avant src/app/components/common/date-dropdown/date-dropdown.component.html - 29 + 38 @@ -1829,7 +1853,7 @@ Date incorrecte. src/app/components/common/input/date/date.component.html - 13 + 14 @@ -1861,7 +1885,7 @@ Anglais (US) src/app/services/settings.service.ts - 88 + 90 @@ -1869,7 +1893,7 @@ Anglais (GB) src/app/services/settings.service.ts - 89 + 91 @@ -1877,7 +1901,7 @@ Allemand src/app/services/settings.service.ts - 90 + 92 @@ -1885,7 +1909,7 @@ Néerlandais src/app/services/settings.service.ts - 91 + 93 @@ -1893,7 +1917,7 @@ Français src/app/services/settings.service.ts - 92 + 94 @@ -1901,7 +1925,23 @@ Portugais (Brésil) src/app/services/settings.service.ts - 93 + 95 + + + + Italian + Italien + + src/app/services/settings.service.ts + 96 + + + + Romanian + Roumain + + src/app/services/settings.service.ts + 97 @@ -1909,7 +1949,7 @@ ISO 8601 src/app/services/settings.service.ts - 98 + 102 @@ -2052,14 +2092,6 @@ 18 - - Title - Titre - - src/app/services/rest/document.service.ts - 19 - - Document type Type de document @@ -2092,110 +2124,6 @@ 23 - - Light blue - Bleu clair - - src/app/data/paperless-tag.ts - 6 - - - - Blue - Bleu - - src/app/data/paperless-tag.ts - 7 - - - - Light green - Vert clair - - src/app/data/paperless-tag.ts - 8 - - - - Green - Vert - - src/app/data/paperless-tag.ts - 9 - - - - Light red - Rouge clair - - src/app/data/paperless-tag.ts - 10 - - - - Red - Rouge - - src/app/data/paperless-tag.ts - 11 - - - - Light orange - Orange clair - - src/app/data/paperless-tag.ts - 12 - - - - Orange - Orange - - src/app/data/paperless-tag.ts - 13 - - - - Light violet - Violet clair - - src/app/data/paperless-tag.ts - 14 - - - - Violet - Violet - - src/app/data/paperless-tag.ts - 15 - - - - Brown - Brun - - src/app/data/paperless-tag.ts - 16 - - - - Black - Noir - - src/app/data/paperless-tag.ts - 17 - - - - Light grey - Gris clair - - src/app/data/paperless-tag.ts - 18 - - Create new item Créer un nouvel élément From 1df6d857e58683f577e9ed8a5b7629fd662b9388 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:59:35 +0000 Subject: [PATCH 71/88] Translate /src-ui/messages.xlf in pt_BR translation completed for the source file '/src-ui/messages.xlf' on the 'pt_BR' language. --- src-ui/src/locale/messages.pt_BR.xlf | 266 ++++++++++----------------- 1 file changed, 97 insertions(+), 169 deletions(-) diff --git a/src-ui/src/locale/messages.pt_BR.xlf b/src-ui/src/locale/messages.pt_BR.xlf index fe574c7bc..ec6fb02d9 100644 --- a/src-ui/src/locale/messages.pt_BR.xlf +++ b/src-ui/src/locale/messages.pt_BR.xlf @@ -478,7 +478,7 @@ Você realmente deseja excluir a etiqueta ""? src/app/components/manage/tag-list/tag-list.component.ts - 30 + 26 @@ -590,7 +590,7 @@ Visualização "" excluída. src/app/components/manage/settings/settings.component.ts - 67 + 68 @@ -598,7 +598,7 @@ Configurações salvas com sucesso. src/app/components/manage/settings/settings.component.ts - 87 + 89 @@ -606,7 +606,7 @@ Usar linguagem do sistema src/app/components/manage/settings/settings.component.ts - 92 + 94 @@ -614,7 +614,7 @@ Usar formato de data da linguagem de exibição src/app/components/manage/settings/settings.component.ts - 98 + 100 @@ -622,7 +622,7 @@ Erro ao salvar configurações: src/app/components/manage/settings/settings.component.ts - 115 + 117 @@ -646,7 +646,7 @@ Notificações src/app/components/manage/settings/settings.component.html - 115 + 116 @@ -654,7 +654,7 @@ Visualizações src/app/components/manage/settings/settings.component.html - 133 + 134 @@ -777,12 +777,20 @@ 98 + + Invert thumbnails in dark mode + Inverter imagens em modo noturno + + src/app/components/manage/settings/settings.component.html + 99 + + Bulk editing Edição em massa src/app/components/manage/settings/settings.component.html - 102 + 103 @@ -790,7 +798,7 @@ Mostrar janelas de confirmação src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -798,7 +806,7 @@ Ao excluir um documento, sempre será pedido uma confirmação. src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -806,7 +814,7 @@ Aplicar ao fechar src/app/components/manage/settings/settings.component.html - 107 + 108 @@ -814,7 +822,7 @@ Processamento de documentos src/app/components/manage/settings/settings.component.html - 118 + 119 @@ -822,7 +830,7 @@ Exibir notificações quando novos documentos forem detectados src/app/components/manage/settings/settings.component.html - 122 + 123 @@ -830,7 +838,7 @@ Exibir notificações quando o processamento de um documento concluir com sucesso src/app/components/manage/settings/settings.component.html - 123 + 124 @@ -838,7 +846,7 @@ Exibir notificações quando o processamento de um documento falhar src/app/components/manage/settings/settings.component.html - 124 + 125 @@ -846,7 +854,7 @@ Não exibir notificações no painel de controle src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -854,7 +862,7 @@ Isso esconderá todas as mensagens sobre o status de processamento de documentos no painel de controle. src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -862,7 +870,7 @@ Aparece em src/app/components/manage/settings/settings.component.html - 145 + 146 @@ -870,7 +878,7 @@ Exibir no painel de controle src/app/components/manage/settings/settings.component.html - 148 + 149 @@ -878,7 +886,7 @@ Mostrar na navegação lateral src/app/components/manage/settings/settings.component.html - 152 + 153 @@ -886,7 +894,7 @@ Nenhuma visualização definida. src/app/components/manage/settings/settings.component.html - 162 + 163 @@ -990,7 +998,7 @@ Criar nova etiqueta src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 21 + 22 @@ -998,7 +1006,7 @@ Editar etiqueta src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 25 + 26 @@ -1006,7 +1014,7 @@ Etiqueta caixa de entrada src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1014,7 +1022,7 @@ Etiquetas de caixa de entrada são atribuídas automaticamente para todos os documentos consumidos. src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1111,7 +1119,7 @@ Gerenciar src/app/components/app-frame/app-frame.component.html - 107 + 112 @@ -1119,7 +1127,7 @@ Admin src/app/components/app-frame/app-frame.component.html - 149 + 154 @@ -1127,7 +1135,7 @@ Informação src/app/components/app-frame/app-frame.component.html - 155 + 160 @@ -1135,7 +1143,7 @@ Documentação src/app/components/app-frame/app-frame.component.html - 162 + 167 @@ -1143,7 +1151,7 @@ GitHub src/app/components/app-frame/app-frame.component.html - 170 + 175 @@ -1151,7 +1159,7 @@ Sugerir uma idéia src/app/components/app-frame/app-frame.component.html - 176 + 181 @@ -1175,7 +1183,23 @@ Fechar todos src/app/components/app-frame/app-frame.component.html - 101 + 106 + + + + Title + Título + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + Título & conteúdo + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 @@ -1183,7 +1207,7 @@ Correspondente: src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 @@ -1191,7 +1215,7 @@ Sem correspondente src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 @@ -1199,7 +1223,7 @@ Tipo: src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 @@ -1207,7 +1231,7 @@ Sem tipo de documento src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 @@ -1215,7 +1239,7 @@ Etiqueta: src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 @@ -1223,7 +1247,7 @@ Sem etiquetas src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 @@ -1231,7 +1255,7 @@ Título: src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 @@ -1239,7 +1263,7 @@ Filtrar etiquetas src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 @@ -1247,7 +1271,7 @@ Filtrar correspondentes src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 @@ -1255,7 +1279,7 @@ Filtrar tipos de documento src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 @@ -1263,7 +1287,7 @@ Limpar filtros src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -1288,7 +1312,7 @@ Últimos 7 dias src/app/components/common/date-dropdown/date-dropdown.component.ts - 24 + 34 @@ -1296,7 +1320,7 @@ Último mês src/app/components/common/date-dropdown/date-dropdown.component.ts - 25 + 35 @@ -1304,7 +1328,7 @@ Últimos 3 meses src/app/components/common/date-dropdown/date-dropdown.component.ts - 26 + 36 @@ -1312,7 +1336,7 @@ Último ano src/app/components/common/date-dropdown/date-dropdown.component.ts - 27 + 37 @@ -1328,7 +1352,7 @@ Depois src/app/components/common/date-dropdown/date-dropdown.component.html - 29 + 38 @@ -1829,7 +1853,7 @@ Data inválida. src/app/components/common/input/date/date.component.html - 13 + 14 @@ -1861,7 +1885,7 @@ Inglês (US) src/app/services/settings.service.ts - 88 + 90 @@ -1869,7 +1893,7 @@ Inglês (GB) src/app/services/settings.service.ts - 89 + 91 @@ -1877,7 +1901,7 @@ Alemão src/app/services/settings.service.ts - 90 + 92 @@ -1885,7 +1909,7 @@ Holandês src/app/services/settings.service.ts - 91 + 93 @@ -1893,7 +1917,7 @@ Francês src/app/services/settings.service.ts - 92 + 94 @@ -1901,7 +1925,23 @@ Português (Brasil) src/app/services/settings.service.ts - 93 + 95 + + + + Italian + Italiano + + src/app/services/settings.service.ts + 96 + + + + Romanian + Romeno + + src/app/services/settings.service.ts + 97 @@ -1909,7 +1949,7 @@ ISO 8601 src/app/services/settings.service.ts - 98 + 102 @@ -2052,14 +2092,6 @@ 18 - - Title - Título - - src/app/services/rest/document.service.ts - 19 - - Document type Tipo de Documento @@ -2092,110 +2124,6 @@ 23 - - Light blue - Azul claro - - src/app/data/paperless-tag.ts - 6 - - - - Blue - Azul - - src/app/data/paperless-tag.ts - 7 - - - - Light green - Verde claro - - src/app/data/paperless-tag.ts - 8 - - - - Green - Verde - - src/app/data/paperless-tag.ts - 9 - - - - Light red - Vermelho claro - - src/app/data/paperless-tag.ts - 10 - - - - Red - Vermelho - - src/app/data/paperless-tag.ts - 11 - - - - Light orange - Laranja claro - - src/app/data/paperless-tag.ts - 12 - - - - Orange - Laranja - - src/app/data/paperless-tag.ts - 13 - - - - Light violet - Violeta claro - - src/app/data/paperless-tag.ts - 14 - - - - Violet - Violeta - - src/app/data/paperless-tag.ts - 15 - - - - Brown - Marrom - - src/app/data/paperless-tag.ts - 16 - - - - Black - Preto - - src/app/data/paperless-tag.ts - 17 - - - - Light grey - Cinza claro - - src/app/data/paperless-tag.ts - 18 - - Create new item Criar novo item From fd3cb6e2caaef81b6b51a86bc34d16a4ac918be8 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 16:59:47 +0000 Subject: [PATCH 72/88] Apply translations in pt_BR translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'pt_BR' language. --- src/locale/pt_BR/LC_MESSAGES/django.po | 172 +++++++++++++------------ 1 file changed, 92 insertions(+), 80 deletions(-) diff --git a/src/locale/pt_BR/LC_MESSAGES/django.po b/src/locale/pt_BR/LC_MESSAGES/django.po index 7800b0c88..f4e5710db 100644 --- a/src/locale/pt_BR/LC_MESSAGES/django.po +++ b/src/locale/pt_BR/LC_MESSAGES/django.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 16:49+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" "Last-Translator: Rodrigo A , 2021\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/paperless/teams/115905/pt_BR/)\n" @@ -50,7 +50,7 @@ msgstr "Palavra difusa (fuzzy)" msgid "Automatic" msgstr "Automático" -#: documents/models.py:41 documents/models.py:364 paperless_mail/models.py:25 +#: documents/models.py:41 documents/models.py:350 paperless_mail/models.py:25 #: paperless_mail/models.py:109 msgid "name" msgstr "nome" @@ -67,7 +67,7 @@ msgstr "algoritmo de detecção" msgid "is insensitive" msgstr "diferencia maiúsculas de minúsculas" -#: documents/models.py:74 documents/models.py:134 +#: documents/models.py:74 documents/models.py:120 msgid "correspondent" msgstr "correspondente" @@ -75,15 +75,15 @@ msgstr "correspondente" msgid "correspondents" msgstr "correspondentes" -#: documents/models.py:97 +#: documents/models.py:81 msgid "color" msgstr "cor" -#: documents/models.py:101 +#: documents/models.py:87 msgid "is inbox tag" msgstr "é etiqueta caixa de entrada" -#: documents/models.py:103 +#: documents/models.py:89 msgid "" "Marks this tag as an inbox tag: All newly consumed documents will be tagged " "with inbox tags." @@ -91,39 +91,39 @@ msgstr "" "Marca essa etiqueta como caixa de entrada: Todos os novos documentos " "consumidos terão as etiquetas de caixa de entrada." -#: documents/models.py:108 +#: documents/models.py:94 msgid "tag" msgstr "etiqueta" -#: documents/models.py:109 documents/models.py:165 +#: documents/models.py:95 documents/models.py:151 msgid "tags" msgstr "etiquetas" -#: documents/models.py:115 documents/models.py:147 +#: documents/models.py:101 documents/models.py:133 msgid "document type" msgstr "tipo de documento" -#: documents/models.py:116 +#: documents/models.py:102 msgid "document types" msgstr "tipos de documento" -#: documents/models.py:124 +#: documents/models.py:110 msgid "Unencrypted" msgstr "Não encriptado" -#: documents/models.py:125 +#: documents/models.py:111 msgid "Encrypted with GNU Privacy Guard" msgstr "Encriptado com GNU Privacy Guard" -#: documents/models.py:138 +#: documents/models.py:124 msgid "title" msgstr "título" -#: documents/models.py:151 +#: documents/models.py:137 msgid "content" msgstr "conteúdo" -#: documents/models.py:153 +#: documents/models.py:139 msgid "" "The raw, text-only data of the document. This field is primarily used for " "searching." @@ -131,241 +131,245 @@ msgstr "" "O conteúdo de texto bruto do documento. Esse campo é usado principalmente " "para busca." -#: documents/models.py:158 +#: documents/models.py:144 msgid "mime type" msgstr "tipo mime" -#: documents/models.py:169 +#: documents/models.py:155 msgid "checksum" msgstr "some de verificação" -#: documents/models.py:173 +#: documents/models.py:159 msgid "The checksum of the original document." msgstr "A soma de verificação original do documento." -#: documents/models.py:177 +#: documents/models.py:163 msgid "archive checksum" msgstr "Soma de verificação de arquivamento." -#: documents/models.py:182 +#: documents/models.py:168 msgid "The checksum of the archived document." msgstr "A soma de verificação do documento arquivado." -#: documents/models.py:186 documents/models.py:342 +#: documents/models.py:172 documents/models.py:328 msgid "created" msgstr "criado" -#: documents/models.py:190 +#: documents/models.py:176 msgid "modified" msgstr "modificado" -#: documents/models.py:194 +#: documents/models.py:180 msgid "storage type" msgstr "tipo de armazenamento" -#: documents/models.py:202 +#: documents/models.py:188 msgid "added" msgstr "adicionado" -#: documents/models.py:206 +#: documents/models.py:192 msgid "filename" msgstr "nome do arquivo" -#: documents/models.py:212 +#: documents/models.py:198 msgid "Current filename in storage" msgstr "Nome do arquivo atual armazenado" -#: documents/models.py:216 +#: documents/models.py:202 msgid "archive filename" msgstr "nome do arquivo para arquivamento" -#: documents/models.py:222 +#: documents/models.py:208 msgid "Current archive filename in storage" msgstr "Nome do arquivo para arquivamento armazenado" -#: documents/models.py:226 +#: documents/models.py:212 msgid "archive serial number" msgstr "número de sério de arquivamento" -#: documents/models.py:231 +#: documents/models.py:217 msgid "The position of this document in your physical document archive." msgstr "A posição deste documento no seu arquivamento físico." -#: documents/models.py:237 +#: documents/models.py:223 msgid "document" msgstr "documento" -#: documents/models.py:238 +#: documents/models.py:224 msgid "documents" msgstr "documentos" -#: documents/models.py:325 +#: documents/models.py:311 msgid "debug" msgstr "debug" -#: documents/models.py:326 +#: documents/models.py:312 msgid "information" msgstr "informação" -#: documents/models.py:327 +#: documents/models.py:313 msgid "warning" msgstr "aviso" -#: documents/models.py:328 +#: documents/models.py:314 msgid "error" msgstr "erro" -#: documents/models.py:329 +#: documents/models.py:315 msgid "critical" msgstr "crítico" -#: documents/models.py:333 +#: documents/models.py:319 msgid "group" msgstr "grupo" -#: documents/models.py:336 +#: documents/models.py:322 msgid "message" msgstr "mensagem" -#: documents/models.py:339 +#: documents/models.py:325 msgid "level" msgstr "nível" -#: documents/models.py:346 +#: documents/models.py:332 msgid "log" msgstr "log" -#: documents/models.py:347 +#: documents/models.py:333 msgid "logs" msgstr "logs" -#: documents/models.py:358 documents/models.py:408 +#: documents/models.py:344 documents/models.py:394 msgid "saved view" msgstr "visualização" -#: documents/models.py:359 +#: documents/models.py:345 msgid "saved views" msgstr "visualizações" -#: documents/models.py:362 +#: documents/models.py:348 msgid "user" msgstr "usuário" -#: documents/models.py:368 +#: documents/models.py:354 msgid "show on dashboard" msgstr "exibir no painel de controle" -#: documents/models.py:371 +#: documents/models.py:357 msgid "show in sidebar" msgstr "exibir no painel lateral" -#: documents/models.py:375 +#: documents/models.py:361 msgid "sort field" msgstr "ordenar campo" -#: documents/models.py:378 +#: documents/models.py:364 msgid "sort reverse" msgstr "odernar reverso" -#: documents/models.py:384 +#: documents/models.py:370 msgid "title contains" msgstr "título contém" -#: documents/models.py:385 +#: documents/models.py:371 msgid "content contains" msgstr "conteúdo contém" -#: documents/models.py:386 +#: documents/models.py:372 msgid "ASN is" msgstr "NSA é" -#: documents/models.py:387 +#: documents/models.py:373 msgid "correspondent is" msgstr "correspondente é" -#: documents/models.py:388 +#: documents/models.py:374 msgid "document type is" msgstr "tipo de documento é" -#: documents/models.py:389 +#: documents/models.py:375 msgid "is in inbox" msgstr "é caixa de entrada" -#: documents/models.py:390 +#: documents/models.py:376 msgid "has tag" msgstr "contém etiqueta" -#: documents/models.py:391 +#: documents/models.py:377 msgid "has any tag" msgstr "contém qualquer etiqueta" -#: documents/models.py:392 +#: documents/models.py:378 msgid "created before" msgstr "criado antes de" -#: documents/models.py:393 +#: documents/models.py:379 msgid "created after" msgstr "criado depois de" -#: documents/models.py:394 +#: documents/models.py:380 msgid "created year is" msgstr "ano de criação é" -#: documents/models.py:395 +#: documents/models.py:381 msgid "created month is" msgstr "mês de criação é" -#: documents/models.py:396 +#: documents/models.py:382 msgid "created day is" msgstr "dia de criação é" -#: documents/models.py:397 +#: documents/models.py:383 msgid "added before" msgstr "adicionado antes de" -#: documents/models.py:398 +#: documents/models.py:384 msgid "added after" msgstr "adicionado depois de" -#: documents/models.py:399 +#: documents/models.py:385 msgid "modified before" msgstr "modificado antes de" -#: documents/models.py:400 +#: documents/models.py:386 msgid "modified after" msgstr "modificado depois de" -#: documents/models.py:401 +#: documents/models.py:387 msgid "does not have tag" msgstr "não tem etiqueta" -#: documents/models.py:412 +#: documents/models.py:398 msgid "rule type" msgstr "tipo de regra" -#: documents/models.py:416 +#: documents/models.py:402 msgid "value" msgstr "valor" -#: documents/models.py:422 +#: documents/models.py:408 msgid "filter rule" msgstr "regra de filtragem" -#: documents/models.py:423 +#: documents/models.py:409 msgid "filter rules" msgstr "regras de filtragem" -#: documents/serialisers.py:52 +#: documents/serialisers.py:53 #, python-format msgid "Invalid regular expresssion: %(error)s" msgstr "Expressão regular inválida: %(error)s" -#: documents/serialisers.py:378 +#: documents/serialisers.py:177 +msgid "Invalid color." +msgstr "Cor inválida." + +#: documents/serialisers.py:451 #, python-format msgid "File type %(type)s not supported" msgstr "Tipo de arquivo %(type)s não suportado" -#: documents/templates/index.html:20 +#: documents/templates/index.html:21 msgid "Paperless-ng is loading..." msgstr "Paperless-ng está carregando..." @@ -405,30 +409,38 @@ msgstr "Senha" msgid "Sign in" msgstr "Entrar" -#: paperless/settings.py:291 +#: paperless/settings.py:297 msgid "English (US)" msgstr "Inglês (EUA)" -#: paperless/settings.py:292 +#: paperless/settings.py:298 msgid "English (GB)" msgstr "Inglês (GB)" -#: paperless/settings.py:293 +#: paperless/settings.py:299 msgid "German" msgstr "Alemão" -#: paperless/settings.py:294 +#: paperless/settings.py:300 msgid "Dutch" msgstr "Holandês" -#: paperless/settings.py:295 +#: paperless/settings.py:301 msgid "French" msgstr "Francês" -#: paperless/settings.py:296 +#: paperless/settings.py:302 msgid "Portuguese (Brazil)" msgstr "Português (Brasil)" +#: paperless/settings.py:303 +msgid "Italian" +msgstr "Italiano" + +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Romeno" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Administração do Paperless-ng" From b240b4821ae2614bfa63cf0d2ca69375990bc558 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 18:04:39 +0000 Subject: [PATCH 73/88] Translate /src-ui/messages.xlf in ro translation completed for the source file '/src-ui/messages.xlf' on the 'ro' language. --- src-ui/src/locale/messages.ro.xlf | 46 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/src-ui/src/locale/messages.ro.xlf b/src-ui/src/locale/messages.ro.xlf index 65ff0f3f7..c016b41a1 100644 --- a/src-ui/src/locale/messages.ro.xlf +++ b/src-ui/src/locale/messages.ro.xlf @@ -1186,12 +1186,28 @@ 106 + + Title + Titlu + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + Titlu si continut + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 + + Correspondent: Corespondent: src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 @@ -1199,7 +1215,7 @@ Fara corespondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 @@ -1207,7 +1223,7 @@ Tip: src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 @@ -1215,7 +1231,7 @@ Fara tip src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 @@ -1223,7 +1239,7 @@ Eticheta: src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 @@ -1231,7 +1247,7 @@ Fara etichete src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 @@ -1239,7 +1255,7 @@ Titlu: src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 @@ -1247,7 +1263,7 @@ Filtreaza etichete src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 @@ -1255,7 +1271,7 @@ Filtreaza corespondenti src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 @@ -1263,7 +1279,7 @@ Filtreaza tipuri de documente src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 @@ -1271,7 +1287,7 @@ Resetati filtrele src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -2076,14 +2092,6 @@ 18 - - Title - Titlu - - src/app/services/rest/document.service.ts - 19 - - Document type Tipul documentului From 895f9c911bf02a368358884ad31c85fd1f8ef05e Mon Sep 17 00:00:00 2001 From: HolzHannes Date: Sun, 28 Feb 2021 20:23:38 +0100 Subject: [PATCH 74/88] Update to status of affiliateded projects --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b21173ba5..e59535af4 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,13 @@ Paperless has been around a while now, and people are starting to build stuff on These projects also exist, but their status and compatibility with paperless-ng is unknown. -* [Paperless Desktop](https://github.com/thomasbrueggemann/paperless-desktop): A desktop UI for your Paperless installation. Runs on Mac, Linux, and Windows. * [paperless-cli](https://github.com/stgarf/paperless-cli): A golang command line binary to interact with a Paperless instance. +This project also exists, but needs updates to be compatile with paperless-ng. + +* [Paperless Desktop](https://github.com/thomasbrueggemann/paperless-desktop): A desktop UI for your Paperless installation. Runs on Mac, Linux, and Windows. + Known issues on Mac: (Could not load reminders and documents) + # Important Note Document scanners are typically used to scan sensitive documents. Things like your social insurance number, tax records, invoices, etc. Everything is stored in the clear without encryption. This means that Paperless should never be run on an untrusted host. Instead, I recommend that if you do want to use it, run it locally on a server in your own home. From 7af0f12e6b3efc5006f241882a120daf5420e7c9 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 20:47:14 +0000 Subject: [PATCH 75/88] Apply translations in de translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'de' language. --- src/locale/de/LC_MESSAGES/django.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/locale/de/LC_MESSAGES/django.po b/src/locale/de/LC_MESSAGES/django.po index 7d03e91ec..55d2b0989 100644 --- a/src/locale/de/LC_MESSAGES/django.po +++ b/src/locale/de/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-26 12:56+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" "Last-Translator: Jonas Winkler, 2021\n" "Language-Team: German (https://www.transifex.com/paperless/teams/115905/de/)\n" @@ -438,6 +438,10 @@ msgstr "Portugiesisch (Brasilien)" msgid "Italian" msgstr "Italienisch" +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Rumänisch" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Paperless-ng Administration" From 73791e0e5046479dcf014db9ae6d646bc55d704b Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Sun, 28 Feb 2021 20:47:42 +0000 Subject: [PATCH 76/88] Translate /src-ui/messages.xlf in de translation completed for the source file '/src-ui/messages.xlf' on the 'de' language. --- src-ui/src/locale/messages.de.xlf | 134 ++++++++++++++++++------------ 1 file changed, 79 insertions(+), 55 deletions(-) diff --git a/src-ui/src/locale/messages.de.xlf b/src-ui/src/locale/messages.de.xlf index 3f141d9c8..21c94b91c 100644 --- a/src-ui/src/locale/messages.de.xlf +++ b/src-ui/src/locale/messages.de.xlf @@ -590,7 +590,7 @@ Gespeicherte Ansicht "" gelöscht. src/app/components/manage/settings/settings.component.ts - 67 + 68 @@ -598,7 +598,7 @@ Einstellungen erfolgreich gespeichert. src/app/components/manage/settings/settings.component.ts - 87 + 89 @@ -606,7 +606,7 @@ Benutze Systemsprache src/app/components/manage/settings/settings.component.ts - 92 + 94 @@ -614,7 +614,7 @@ Benutze Datumsformat der Anzeigesprache src/app/components/manage/settings/settings.component.ts - 98 + 100 @@ -622,7 +622,7 @@ Fehler beim Speichern der Einstellungen auf dem Server: src/app/components/manage/settings/settings.component.ts - 115 + 117 @@ -646,7 +646,7 @@ Benachrichtigungen src/app/components/manage/settings/settings.component.html - 115 + 116 @@ -654,7 +654,7 @@ Gespeicherte Ansichten src/app/components/manage/settings/settings.component.html - 133 + 134 @@ -777,12 +777,20 @@ 98 + + Invert thumbnails in dark mode + Miniaturbilder im dunklen Modus invertieren + + src/app/components/manage/settings/settings.component.html + 99 + + Bulk editing Massenbearbeitung src/app/components/manage/settings/settings.component.html - 102 + 103 @@ -790,7 +798,7 @@ Bestätigungsdialoge anzeigen src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -798,7 +806,7 @@ Beim Löschen von Dokumenten wird immer nach einer Bestätigung gefragt. src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -806,7 +814,7 @@ Anwenden beim Schließen src/app/components/manage/settings/settings.component.html - 107 + 108 @@ -814,7 +822,7 @@ Dokumentverarbeitung src/app/components/manage/settings/settings.component.html - 118 + 119 @@ -822,7 +830,7 @@ Zeige Benachrichtigungen wenn neue Dokumente erkannt werden src/app/components/manage/settings/settings.component.html - 122 + 123 @@ -830,7 +838,7 @@ Zeige Benachrichtigungen wenn neue Dokumente erfolgreich hinzugefügt wurden src/app/components/manage/settings/settings.component.html - 123 + 124 @@ -838,7 +846,7 @@ Zeige Benachrichtigungen wenn Dokumente nicht hinzugefügt werden konnten src/app/components/manage/settings/settings.component.html - 124 + 125 @@ -846,7 +854,7 @@ Unterdrücke Benachrichtigungen auf der Startseite. src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -854,7 +862,7 @@ Dadurch werden alle Benachrichtigungen über die Dokumentenverarbeitung auf der Startseite unterdrückt. src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -862,7 +870,7 @@ Erscheint auf src/app/components/manage/settings/settings.component.html - 145 + 146 @@ -870,7 +878,7 @@ Auf Startseite zeigen src/app/components/manage/settings/settings.component.html - 148 + 149 @@ -878,7 +886,7 @@ In Seitenleiste zeigen src/app/components/manage/settings/settings.component.html - 152 + 153 @@ -886,7 +894,7 @@ Keine gespeicherten Ansichten vorhanden. src/app/components/manage/settings/settings.component.html - 162 + 163 @@ -1111,7 +1119,7 @@ Verwalten src/app/components/app-frame/app-frame.component.html - 107 + 112 @@ -1119,7 +1127,7 @@ Administration src/app/components/app-frame/app-frame.component.html - 149 + 154 @@ -1127,7 +1135,7 @@ Info src/app/components/app-frame/app-frame.component.html - 155 + 160 @@ -1135,7 +1143,7 @@ Dokumentation src/app/components/app-frame/app-frame.component.html - 162 + 167 @@ -1143,7 +1151,7 @@ GitHub src/app/components/app-frame/app-frame.component.html - 170 + 175 @@ -1151,7 +1159,7 @@ Eine Idee vorschlagen src/app/components/app-frame/app-frame.component.html - 176 + 181 @@ -1175,7 +1183,23 @@ Alle schließen src/app/components/app-frame/app-frame.component.html - 101 + 106 + + + + Title + Titel + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + Titel & Inhalt + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 @@ -1183,7 +1207,7 @@ Korrespondent: src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 @@ -1191,7 +1215,7 @@ Ohne Korrespondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 @@ -1199,7 +1223,7 @@ Typ: src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 @@ -1207,7 +1231,7 @@ Ohne Dokumenttyp src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 @@ -1215,7 +1239,7 @@ Tag: src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 @@ -1223,7 +1247,7 @@ Ohne Tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 @@ -1231,7 +1255,7 @@ Titel: src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 @@ -1239,7 +1263,7 @@ Tags filtern src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 @@ -1247,7 +1271,7 @@ Korrespondenten filtern src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 @@ -1255,7 +1279,7 @@ Dokumenttypen filtern src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 @@ -1263,7 +1287,7 @@ Filter zurücksetzen src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -1861,7 +1885,7 @@ Englisch (US) src/app/services/settings.service.ts - 88 + 90 @@ -1869,7 +1893,7 @@ Englisch (UK) src/app/services/settings.service.ts - 89 + 91 @@ -1877,7 +1901,7 @@ Deutsch src/app/services/settings.service.ts - 90 + 92 @@ -1885,7 +1909,7 @@ Niederländisch src/app/services/settings.service.ts - 91 + 93 @@ -1893,7 +1917,7 @@ Französisch src/app/services/settings.service.ts - 92 + 94 @@ -1901,7 +1925,7 @@ Portugiesisch (Brasilien) src/app/services/settings.service.ts - 93 + 95 @@ -1909,7 +1933,15 @@ Italienisch src/app/services/settings.service.ts - 94 + 96 + + + + Romanian + Rumänisch + + src/app/services/settings.service.ts + 97 @@ -1917,7 +1949,7 @@ ISO 8601 src/app/services/settings.service.ts - 99 + 102 @@ -2060,14 +2092,6 @@ 18 - - Title - Titel - - src/app/services/rest/document.service.ts - 19 - - Document type Dokumenttyp From c8a06416e7a8630e64a6e9b30e6c641833730711 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 15:30:27 +0000 Subject: [PATCH 77/88] Apply translations in nl_NL translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'nl_NL' language. --- src/locale/nl_NL/LC_MESSAGES/django.po | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/locale/nl_NL/LC_MESSAGES/django.po b/src/locale/nl_NL/LC_MESSAGES/django.po index 1309edd69..7dae056cf 100644 --- a/src/locale/nl_NL/LC_MESSAGES/django.po +++ b/src/locale/nl_NL/LC_MESSAGES/django.po @@ -6,15 +6,16 @@ # Translators: # Jonas Winkler, 2021 # Jo Vandeginste , 2021 +# Ben , 2021 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-26 12:56+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" -"Last-Translator: Jo Vandeginste , 2021\n" +"Last-Translator: Ben , 2021\n" "Language-Team: Dutch (Netherlands) (https://www.transifex.com/paperless/teams/115905/nl_NL/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -437,6 +438,10 @@ msgstr "Portugees (Brazilië)" msgid "Italian" msgstr "Italiaans" +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Roemeens" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Paperless-ng administratie" From 97f3c214e80ed4a030f88737ac1febf67a672423 Mon Sep 17 00:00:00 2001 From: Simon Taddiken Date: Tue, 2 Mar 2021 09:07:42 +0100 Subject: [PATCH 78/88] Add the possibility to customize the remote user header name Inspired by the discussion here https://github.com/jonaswinkler/paperless-ng/discussions/639#discussion-3242017 it is worthwhile to be able to customize the header name that is used for authentication as its name is not really standardized. --- docs/configuration.rst | 12 +++++++++++- src/paperless/auth.py | 3 +-- src/paperless/settings.py | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index e26180382..d182d589d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -192,7 +192,17 @@ PAPERLESS_ENABLE_HTTP_REMOTE_USER= applications. Defaults to `false` which disables this feature. - + +PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME= + If `PAPERLESS_ENABLE_HTTP_REMOTE_USER` is enabled, this property allows to + customize the name of the HTTP header from which the username is extracted. + Values are in terms of + [HttpRequest.META](https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpRequest.META). + Thus, the configured value must start with `HTTP_` followed by the + normalized actual header name. + + Defaults to `HTTP_REMOTE_USER`. + .. _configuration-ocr: OCR settings diff --git a/src/paperless/auth.py b/src/paperless/auth.py index cd717e56b..3bc6344cd 100644 --- a/src/paperless/auth.py +++ b/src/paperless/auth.py @@ -33,5 +33,4 @@ class HttpRemoteUserMiddleware(RemoteUserMiddleware): """ This class allows authentication via HTTP_REMOTE_USER which is set for example by certain SSO applications. """ - - header = 'HTTP_REMOTE_USER' + header = settings.HTTP_REMOTE_USER_HEADER_NAME diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 8cc12c1ff..3330da19c 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -189,6 +189,7 @@ if AUTO_LOGIN_USERNAME: MIDDLEWARE.insert(_index+1, 'paperless.auth.AutoLoginMiddleware') ENABLE_HTTP_REMOTE_USER = __get_boolean("PAPERLESS_ENABLE_HTTP_REMOTE_USER") +HTTP_REMOTE_USER_HEADER_NAME = os.getenv("PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME", "HTTP_REMOTE_USER") if ENABLE_HTTP_REMOTE_USER: MIDDLEWARE.append( From 72ebe7df58313b2dfe861f3557ae44e280d48374 Mon Sep 17 00:00:00 2001 From: Simon Taddiken Date: Tue, 2 Mar 2021 10:21:50 +0100 Subject: [PATCH 79/88] Improve documentation --- docs/configuration.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index d182d589d..7ffab20d7 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -193,10 +193,10 @@ PAPERLESS_ENABLE_HTTP_REMOTE_USER= Defaults to `false` which disables this feature. -PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME= +PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME= If `PAPERLESS_ENABLE_HTTP_REMOTE_USER` is enabled, this property allows to - customize the name of the HTTP header from which the username is extracted. - Values are in terms of + customize the name of the HTTP header from which the authenticated username + is extracted. Values are in terms of [HttpRequest.META](https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpRequest.META). Thus, the configured value must start with `HTTP_` followed by the normalized actual header name. From c7abdb61e889ed928efa0a917d56a1c4a8655f4f Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:19:06 +0100 Subject: [PATCH 80/88] added remote user auth test --- src/documents/tests/test_auth.py | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/documents/tests/test_auth.py diff --git a/src/documents/tests/test_auth.py b/src/documents/tests/test_auth.py new file mode 100644 index 000000000..82b586f7b --- /dev/null +++ b/src/documents/tests/test_auth.py @@ -0,0 +1,66 @@ +from django.contrib.auth.models import User +from django.test import override_settings, Client, modify_settings, TestCase + + +class TestRemoteUserAuthentication(TestCase): + + def test_no_remote_user_auth(self): + client = Client() + + response = client.get("/api/documents/") + self.assertEqual(response.status_code, 401) + + response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") + self.assertEqual(response.status_code, 401) + + response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") + self.assertEqual(response.status_code, 401) + + @modify_settings( + MIDDLEWARE={ + 'append': 'paperless.auth.HttpRemoteUserMiddleware' + }, + AUTHENTICATION_BACKENDS={ + 'prepend': 'django.contrib.auth.backends.RemoteUserBackend' + } + ) + def test_standard_remote_user_auth(self): + client = Client() + + response = client.get("/api/documents/") + self.assertEqual(response.status_code, 401) + + response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") + self.assertEqual(response.status_code, 401) + + self.assertFalse(User.objects.filter(username="someone").exists()) + + response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") + self.assertEqual(response.status_code, 200) + + self.assertTrue(User.objects.filter(username="someone").exists()) + + @modify_settings( + MIDDLEWARE={ + 'append': 'paperless.auth.HttpRemoteUserMiddleware' + }, + AUTHENTICATION_BACKENDS={ + 'prepend': 'django.contrib.auth.backends.RemoteUserBackend' + } + ) + @override_settings(HTTP_REMOTE_USER_HEADER_NAME="HTTP_X_FORWARDED_USER") + def test_custom_remote_user_auth(self): + client = Client() + + response = client.get("/api/documents/") + self.assertEqual(response.status_code, 401) + + response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") + self.assertEqual(response.status_code, 401) + + self.assertFalse(User.objects.filter(username="someone").exists()) + + response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") + self.assertEqual(response.status_code, 200) + + self.assertTrue(User.objects.filter(username="someone").exists()) From 551792274f12eae33fae910f44b3001a5d771109 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 3 Mar 2021 07:30:31 +0000 Subject: [PATCH 81/88] Translate /src-ui/messages.xlf in it translation completed for the source file '/src-ui/messages.xlf' on the 'it' language. --- src-ui/src/locale/messages.it.xlf | 266 +++++++++++------------------- 1 file changed, 97 insertions(+), 169 deletions(-) diff --git a/src-ui/src/locale/messages.it.xlf b/src-ui/src/locale/messages.it.xlf index a602079b0..401172fae 100644 --- a/src-ui/src/locale/messages.it.xlf +++ b/src-ui/src/locale/messages.it.xlf @@ -478,7 +478,7 @@ Vuoi eliminare il tag &quot;&quot;? src/app/components/manage/tag-list/tag-list.component.ts - 30 + 26 @@ -590,7 +590,7 @@ La vista &quot;&quot; è stata eliminata. src/app/components/manage/settings/settings.component.ts - 67 + 68 @@ -598,7 +598,7 @@ Le impostazioni sono state salvate. src/app/components/manage/settings/settings.component.ts - 87 + 89 @@ -606,7 +606,7 @@ Usa lingua di sistema src/app/components/manage/settings/settings.component.ts - 92 + 94 @@ -614,7 +614,7 @@ Usa il formato data della lingua di visualizzazione src/app/components/manage/settings/settings.component.ts - 98 + 100 @@ -622,7 +622,7 @@ Errore durante il salvataggio delle impostazioni sul server: src/app/components/manage/settings/settings.component.ts - 115 + 117 @@ -646,7 +646,7 @@ Notifiche src/app/components/manage/settings/settings.component.html - 115 + 116 @@ -654,7 +654,7 @@ Viste salvate src/app/components/manage/settings/settings.component.html - 133 + 134 @@ -777,12 +777,20 @@ 98 + + Invert thumbnails in dark mode + Inverti anteptime in modalità notte + + src/app/components/manage/settings/settings.component.html + 99 + + Bulk editing Modifica in blocco src/app/components/manage/settings/settings.component.html - 102 + 103 @@ -790,7 +798,7 @@ Mostra dialoghi di conferma src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -798,7 +806,7 @@ L'eliminazione dei documenti chiederà sempre la conferma. src/app/components/manage/settings/settings.component.html - 106 + 107 @@ -806,7 +814,7 @@ Applica in chiusura src/app/components/manage/settings/settings.component.html - 107 + 108 @@ -814,7 +822,7 @@ Elaborazione del documento src/app/components/manage/settings/settings.component.html - 118 + 119 @@ -822,7 +830,7 @@ Notifica quando vengono trovati nuovi documenti src/app/components/manage/settings/settings.component.html - 122 + 123 @@ -830,7 +838,7 @@ Notifica quando l'elaborazione del documento viene completata con successo. src/app/components/manage/settings/settings.component.html - 123 + 124 @@ -838,7 +846,7 @@ Notifica quando l'elaborazione del documento fallisce src/app/components/manage/settings/settings.component.html - 124 + 125 @@ -846,7 +854,7 @@ Non mostrare notifiche nella dashboard src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -854,7 +862,7 @@ Verranno interrotte tutte le notifiche nella dashboard riguardo lo stato dell'elaborazione dei documenti. src/app/components/manage/settings/settings.component.html - 125 + 126 @@ -862,7 +870,7 @@ Appare in src/app/components/manage/settings/settings.component.html - 145 + 146 @@ -870,7 +878,7 @@ Mostra nella dashboard src/app/components/manage/settings/settings.component.html - 148 + 149 @@ -878,7 +886,7 @@ Mostra nella barra laterale src/app/components/manage/settings/settings.component.html - 152 + 153 @@ -886,7 +894,7 @@ Nessuna vista salvata. src/app/components/manage/settings/settings.component.html - 162 + 163 @@ -990,7 +998,7 @@ Crea nuovo tag src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 21 + 22 @@ -998,7 +1006,7 @@ Modifica tag src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.ts - 25 + 26 @@ -1006,7 +1014,7 @@ Tag di arrivo src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1014,7 +1022,7 @@ I tag di arrivo vengono assegnati automaticamente a tutti i documenti elaborati. src/app/components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component.html - 21 + 13 @@ -1111,7 +1119,7 @@ Gestisci src/app/components/app-frame/app-frame.component.html - 107 + 112 @@ -1119,7 +1127,7 @@ Amministratore src/app/components/app-frame/app-frame.component.html - 149 + 154 @@ -1127,7 +1135,7 @@ Informazioni src/app/components/app-frame/app-frame.component.html - 155 + 160 @@ -1135,7 +1143,7 @@ Documentazione src/app/components/app-frame/app-frame.component.html - 162 + 167 @@ -1143,7 +1151,7 @@ GitHub src/app/components/app-frame/app-frame.component.html - 170 + 175 @@ -1151,7 +1159,7 @@ Suggerisci un'idea src/app/components/app-frame/app-frame.component.html - 176 + 181 @@ -1175,7 +1183,23 @@ Chiudi tutti src/app/components/app-frame/app-frame.component.html - 101 + 106 + + + + Title + Titolo + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 73 + + + + Title & content + Titolo & contenuto + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 74 @@ -1183,7 +1207,7 @@ Corrispondente: src/app/components/document-list/filter-editor/filter-editor.component.ts - 29 + 32 @@ -1191,7 +1215,7 @@ Senza corrispondente src/app/components/document-list/filter-editor/filter-editor.component.ts - 31 + 34 @@ -1199,7 +1223,7 @@ Tipo: src/app/components/document-list/filter-editor/filter-editor.component.ts - 36 + 39 @@ -1207,7 +1231,7 @@ Senza tipo di documento src/app/components/document-list/filter-editor/filter-editor.component.ts - 38 + 41 @@ -1215,7 +1239,7 @@ Tag: src/app/components/document-list/filter-editor/filter-editor.component.ts - 42 + 45 @@ -1223,7 +1247,7 @@ Senza alcun tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 46 + 49 @@ -1231,7 +1255,7 @@ Titolo: src/app/components/document-list/filter-editor/filter-editor.component.ts - 50 + 53 @@ -1239,7 +1263,7 @@ Filtra tag src/app/components/document-list/filter-editor/filter-editor.component.html - 12 + 20 @@ -1247,7 +1271,7 @@ Filtra corrispondenti src/app/components/document-list/filter-editor/filter-editor.component.html - 20 + 28 @@ -1255,7 +1279,7 @@ Filtra tipi di documento src/app/components/document-list/filter-editor/filter-editor.component.html - 27 + 35 @@ -1263,7 +1287,7 @@ Ripristina filtri src/app/components/document-list/filter-editor/filter-editor.component.html - 50 + 58 @@ -1288,7 +1312,7 @@ Ultimi 7 giorni src/app/components/common/date-dropdown/date-dropdown.component.ts - 24 + 34 @@ -1296,7 +1320,7 @@ Ultimo mese src/app/components/common/date-dropdown/date-dropdown.component.ts - 25 + 35 @@ -1304,7 +1328,7 @@ Ultimi 3 mesi src/app/components/common/date-dropdown/date-dropdown.component.ts - 26 + 36 @@ -1312,7 +1336,7 @@ Ultimo anno src/app/components/common/date-dropdown/date-dropdown.component.ts - 27 + 37 @@ -1328,7 +1352,7 @@ Prima src/app/components/common/date-dropdown/date-dropdown.component.html - 29 + 38 @@ -1829,7 +1853,7 @@ Data non valida. src/app/components/common/input/date/date.component.html - 13 + 14 @@ -1861,7 +1885,7 @@ Inglese (US) src/app/services/settings.service.ts - 88 + 90 @@ -1869,7 +1893,7 @@ Inglese (GB) src/app/services/settings.service.ts - 89 + 91 @@ -1877,7 +1901,7 @@ Tedesco src/app/services/settings.service.ts - 90 + 92 @@ -1885,7 +1909,7 @@ Olandese src/app/services/settings.service.ts - 91 + 93 @@ -1893,7 +1917,7 @@ Francese src/app/services/settings.service.ts - 92 + 94 @@ -1901,7 +1925,23 @@ Portoghese (Brasile) src/app/services/settings.service.ts - 93 + 95 + + + + Italian + Italiano + + src/app/services/settings.service.ts + 96 + + + + Romanian + Rumeno + + src/app/services/settings.service.ts + 97 @@ -1909,7 +1949,7 @@ ISO 8601 src/app/services/settings.service.ts - 98 + 102 @@ -2052,14 +2092,6 @@ 18 - - Title - Titolo - - src/app/services/rest/document.service.ts - 19 - - Document type Tipo di documento @@ -2092,110 +2124,6 @@ 23 - - Light blue - Blu chiaro - - src/app/data/paperless-tag.ts - 6 - - - - Blue - Blu - - src/app/data/paperless-tag.ts - 7 - - - - Light green - Verde chiaro - - src/app/data/paperless-tag.ts - 8 - - - - Green - Verde - - src/app/data/paperless-tag.ts - 9 - - - - Light red - Rosso chiaro - - src/app/data/paperless-tag.ts - 10 - - - - Red - Rosso - - src/app/data/paperless-tag.ts - 11 - - - - Light orange - Arancione chiaro - - src/app/data/paperless-tag.ts - 12 - - - - Orange - Arancione - - src/app/data/paperless-tag.ts - 13 - - - - Light violet - Viola chiaro - - src/app/data/paperless-tag.ts - 14 - - - - Violet - Viola - - src/app/data/paperless-tag.ts - 15 - - - - Brown - Marrone - - src/app/data/paperless-tag.ts - 16 - - - - Black - Nero - - src/app/data/paperless-tag.ts - 17 - - - - Light grey - Grigio chiaro - - src/app/data/paperless-tag.ts - 18 - - Create new item Crea nuovo elemento From 41d966895f6a7e9d974a66754f5802743e7d53dd Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 3 Mar 2021 07:30:59 +0000 Subject: [PATCH 82/88] Apply translations in it translation completed for the source file '/src/locale/en_US/LC_MESSAGES/django.po' on the 'it' language. --- src/locale/it/LC_MESSAGES/django.po | 175 +++++++++++++++------------- 1 file changed, 94 insertions(+), 81 deletions(-) diff --git a/src/locale/it/LC_MESSAGES/django.po b/src/locale/it/LC_MESSAGES/django.po index f3456bed9..c1b29608d 100644 --- a/src/locale/it/LC_MESSAGES/django.po +++ b/src/locale/it/LC_MESSAGES/django.po @@ -7,15 +7,16 @@ # Ioma Taani, 2021 # Jonas Winkler, 2021 # Oliver Thomas Cervera , 2021 +# Alex Camilleri , 2021 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 16:49+0100\n" +"POT-Creation-Date: 2021-02-28 12:40+0100\n" "PO-Revision-Date: 2021-02-16 18:37+0000\n" -"Last-Translator: Oliver Thomas Cervera , 2021\n" +"Last-Translator: Alex Camilleri , 2021\n" "Language-Team: Italian (https://www.transifex.com/paperless/teams/115905/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -51,7 +52,7 @@ msgstr "Parole fuzzy" msgid "Automatic" msgstr "Automatico" -#: documents/models.py:41 documents/models.py:364 paperless_mail/models.py:25 +#: documents/models.py:41 documents/models.py:350 paperless_mail/models.py:25 #: paperless_mail/models.py:109 msgid "name" msgstr "nome" @@ -68,7 +69,7 @@ msgstr "algoritmo di corrispondenza" msgid "is insensitive" msgstr "non distingue maiuscole e minuscole" -#: documents/models.py:74 documents/models.py:134 +#: documents/models.py:74 documents/models.py:120 msgid "correspondent" msgstr "corrispondente" @@ -76,15 +77,15 @@ msgstr "corrispondente" msgid "correspondents" msgstr "corrispondenti" -#: documents/models.py:97 +#: documents/models.py:81 msgid "color" msgstr "colore" -#: documents/models.py:101 +#: documents/models.py:87 msgid "is inbox tag" msgstr "è tag di arrivo" -#: documents/models.py:103 +#: documents/models.py:89 msgid "" "Marks this tag as an inbox tag: All newly consumed documents will be tagged " "with inbox tags." @@ -92,39 +93,39 @@ msgstr "" "Contrassegna questo tag come tag in arrivo: tutti i documenti elaborati " "verranno taggati con questo tag." -#: documents/models.py:108 +#: documents/models.py:94 msgid "tag" msgstr "tag" -#: documents/models.py:109 documents/models.py:165 +#: documents/models.py:95 documents/models.py:151 msgid "tags" msgstr "tag" -#: documents/models.py:115 documents/models.py:147 +#: documents/models.py:101 documents/models.py:133 msgid "document type" msgstr "tipo di documento" -#: documents/models.py:116 +#: documents/models.py:102 msgid "document types" msgstr "tipi di documento" -#: documents/models.py:124 +#: documents/models.py:110 msgid "Unencrypted" msgstr "Non criptato" -#: documents/models.py:125 +#: documents/models.py:111 msgid "Encrypted with GNU Privacy Guard" msgstr "Criptato con GNU Privacy Guard" -#: documents/models.py:138 +#: documents/models.py:124 msgid "title" msgstr "titolo" -#: documents/models.py:151 +#: documents/models.py:137 msgid "content" msgstr "contenuto" -#: documents/models.py:153 +#: documents/models.py:139 msgid "" "The raw, text-only data of the document. This field is primarily used for " "searching." @@ -132,241 +133,245 @@ msgstr "" "I dati grezzi o solo testo del documento. Questo campo è usato " "principalmente per la ricerca." -#: documents/models.py:158 +#: documents/models.py:144 msgid "mime type" msgstr "tipo mime" -#: documents/models.py:169 +#: documents/models.py:155 msgid "checksum" msgstr "checksum" -#: documents/models.py:173 +#: documents/models.py:159 msgid "The checksum of the original document." msgstr "Il checksum del documento originale." -#: documents/models.py:177 +#: documents/models.py:163 msgid "archive checksum" msgstr "checksum dell'archivio" -#: documents/models.py:182 +#: documents/models.py:168 msgid "The checksum of the archived document." msgstr "Il checksum del documento archiviato." -#: documents/models.py:186 documents/models.py:342 +#: documents/models.py:172 documents/models.py:328 msgid "created" msgstr "creato il" -#: documents/models.py:190 +#: documents/models.py:176 msgid "modified" msgstr "modificato il" -#: documents/models.py:194 +#: documents/models.py:180 msgid "storage type" msgstr "tipo di storage" -#: documents/models.py:202 +#: documents/models.py:188 msgid "added" msgstr "aggiunto il" -#: documents/models.py:206 +#: documents/models.py:192 msgid "filename" msgstr "nome del file" -#: documents/models.py:212 +#: documents/models.py:198 msgid "Current filename in storage" msgstr "Nome del file corrente nello storage" -#: documents/models.py:216 +#: documents/models.py:202 msgid "archive filename" msgstr "Nome file in archivio" -#: documents/models.py:222 +#: documents/models.py:208 msgid "Current archive filename in storage" msgstr "Il nome del file nell'archiviazione" -#: documents/models.py:226 +#: documents/models.py:212 msgid "archive serial number" msgstr "numero seriale dell'archivio" -#: documents/models.py:231 +#: documents/models.py:217 msgid "The position of this document in your physical document archive." msgstr "Posizione di questo documento all'interno dell'archivio fisico." -#: documents/models.py:237 +#: documents/models.py:223 msgid "document" msgstr "documento" -#: documents/models.py:238 +#: documents/models.py:224 msgid "documents" msgstr "documenti" -#: documents/models.py:325 +#: documents/models.py:311 msgid "debug" msgstr "debug" -#: documents/models.py:326 +#: documents/models.py:312 msgid "information" msgstr "informazione" -#: documents/models.py:327 +#: documents/models.py:313 msgid "warning" msgstr "avvertimento" -#: documents/models.py:328 +#: documents/models.py:314 msgid "error" msgstr "errore" -#: documents/models.py:329 +#: documents/models.py:315 msgid "critical" msgstr "critico" -#: documents/models.py:333 +#: documents/models.py:319 msgid "group" msgstr "gruppo" -#: documents/models.py:336 +#: documents/models.py:322 msgid "message" msgstr "messaggio" -#: documents/models.py:339 +#: documents/models.py:325 msgid "level" msgstr "livello" -#: documents/models.py:346 +#: documents/models.py:332 msgid "log" msgstr "log" -#: documents/models.py:347 +#: documents/models.py:333 msgid "logs" msgstr "log" -#: documents/models.py:358 documents/models.py:408 +#: documents/models.py:344 documents/models.py:394 msgid "saved view" msgstr "vista salvata" -#: documents/models.py:359 +#: documents/models.py:345 msgid "saved views" msgstr "viste salvate" -#: documents/models.py:362 +#: documents/models.py:348 msgid "user" msgstr "utente" -#: documents/models.py:368 +#: documents/models.py:354 msgid "show on dashboard" msgstr "mostra sul cruscotto" -#: documents/models.py:371 +#: documents/models.py:357 msgid "show in sidebar" msgstr "mostra nella barra laterale" -#: documents/models.py:375 +#: documents/models.py:361 msgid "sort field" msgstr "campo di ordinamento" -#: documents/models.py:378 +#: documents/models.py:364 msgid "sort reverse" msgstr "ordine invertito" -#: documents/models.py:384 +#: documents/models.py:370 msgid "title contains" msgstr "il titolo contiene" -#: documents/models.py:385 +#: documents/models.py:371 msgid "content contains" msgstr "il contenuto contiene" -#: documents/models.py:386 +#: documents/models.py:372 msgid "ASN is" msgstr "ASN è" -#: documents/models.py:387 +#: documents/models.py:373 msgid "correspondent is" msgstr "la corrispondenza è" -#: documents/models.py:388 +#: documents/models.py:374 msgid "document type is" msgstr "il tipo di documento è" -#: documents/models.py:389 +#: documents/models.py:375 msgid "is in inbox" msgstr "è in arrivo" -#: documents/models.py:390 +#: documents/models.py:376 msgid "has tag" msgstr "ha etichetta" -#: documents/models.py:391 +#: documents/models.py:377 msgid "has any tag" msgstr "ha qualsiasi etichetta" -#: documents/models.py:392 +#: documents/models.py:378 msgid "created before" msgstr "creato prima del" -#: documents/models.py:393 +#: documents/models.py:379 msgid "created after" msgstr "creato dopo il" -#: documents/models.py:394 +#: documents/models.py:380 msgid "created year is" msgstr "l'anno di creazione è" -#: documents/models.py:395 +#: documents/models.py:381 msgid "created month is" msgstr "il mese di creazione è" -#: documents/models.py:396 +#: documents/models.py:382 msgid "created day is" msgstr "il giorno di creazione è" -#: documents/models.py:397 +#: documents/models.py:383 msgid "added before" msgstr "aggiunto prima del" -#: documents/models.py:398 +#: documents/models.py:384 msgid "added after" msgstr "aggiunto dopo il" -#: documents/models.py:399 +#: documents/models.py:385 msgid "modified before" msgstr "modificato prima del" -#: documents/models.py:400 +#: documents/models.py:386 msgid "modified after" msgstr "modificato dopo" -#: documents/models.py:401 +#: documents/models.py:387 msgid "does not have tag" msgstr "non ha tag" -#: documents/models.py:412 +#: documents/models.py:398 msgid "rule type" msgstr "tipo di regola" -#: documents/models.py:416 +#: documents/models.py:402 msgid "value" msgstr "valore" -#: documents/models.py:422 +#: documents/models.py:408 msgid "filter rule" msgstr "regola filtro" -#: documents/models.py:423 +#: documents/models.py:409 msgid "filter rules" msgstr "regole filtro" -#: documents/serialisers.py:52 +#: documents/serialisers.py:53 #, python-format msgid "Invalid regular expresssion: %(error)s" msgstr "Espressione regolare non valida: %(error)s" -#: documents/serialisers.py:378 +#: documents/serialisers.py:177 +msgid "Invalid color." +msgstr "Colore non valido." + +#: documents/serialisers.py:451 #, python-format msgid "File type %(type)s not supported" msgstr "Il tipo di file %(type)s non è supportato" -#: documents/templates/index.html:20 +#: documents/templates/index.html:21 msgid "Paperless-ng is loading..." msgstr "Paperless-ng si sta caricando..." @@ -406,30 +411,38 @@ msgstr "Password" msgid "Sign in" msgstr "Accedi" -#: paperless/settings.py:291 +#: paperless/settings.py:297 msgid "English (US)" msgstr "Inglese (US)" -#: paperless/settings.py:292 +#: paperless/settings.py:298 msgid "English (GB)" msgstr "Inglese (GB)" -#: paperless/settings.py:293 +#: paperless/settings.py:299 msgid "German" msgstr "Tedesco" -#: paperless/settings.py:294 +#: paperless/settings.py:300 msgid "Dutch" msgstr "Olandese" -#: paperless/settings.py:295 +#: paperless/settings.py:301 msgid "French" msgstr "Francese" -#: paperless/settings.py:296 +#: paperless/settings.py:302 msgid "Portuguese (Brazil)" msgstr "Portoghese (Brasile)" +#: paperless/settings.py:303 +msgid "Italian" +msgstr "Italiano" + +#: paperless/settings.py:304 +msgid "Romanian" +msgstr "Rumeno" + #: paperless/urls.py:118 msgid "Paperless-ng administration" msgstr "Amministrazione di Paperless-ng" From 12235cc85346373909763b75c80ec3b6a13656f9 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:35:26 +0100 Subject: [PATCH 83/88] fixes #689 --- src/documents/classifier.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/documents/classifier.py b/src/documents/classifier.py index 47dd7dfc7..664c00222 100755 --- a/src/documents/classifier.py +++ b/src/documents/classifier.py @@ -123,10 +123,11 @@ class DocumentClassifier(object): m.update(y.to_bytes(4, 'little', signed=True)) labels_correspondent.append(y) - tags = [tag.pk for tag in doc.tags.filter( + tags = sorted([tag.pk for tag in doc.tags.filter( matching_algorithm=MatchingModel.MATCH_AUTO - )] - m.update(bytearray(tags)) + )]) + for tag in tags: + m.update(tag.to_bytes(4, 'little', signed=True)) labels_tags.append(tags) if not data: From 9e3caa57ec2b018140492fafce850a8af5edafe3 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:44:43 +0100 Subject: [PATCH 84/88] fix quoting --- src-ui/src/locale/messages.it.xlf | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src-ui/src/locale/messages.it.xlf b/src-ui/src/locale/messages.it.xlf index 401172fae..b2b49b833 100644 --- a/src-ui/src/locale/messages.it.xlf +++ b/src-ui/src/locale/messages.it.xlf @@ -59,7 +59,7 @@ View "" saved successfully. - La vista &quot;&quot; è stata salvata. + La vista "" è stata salvata. src/app/components/document-list/document-list.component.ts 115 @@ -67,7 +67,7 @@ View "" created successfully. - La vista &quot;&quot; è stata creata. + La vista "" è stata creata. src/app/components/document-list/document-list.component.ts 136 @@ -131,7 +131,7 @@ Save "" - Salva &quot;&quot; + Salva "" src/app/components/document-list/document-list.component.html 71 @@ -219,7 +219,7 @@ Do you really want to delete document ""? - Vuoi eliminare il documento &quot;&quot;? + Vuoi eliminare il documento ""? src/app/components/document-detail/document-detail.component.ts 204 @@ -475,7 +475,7 @@ Do you really want to delete the tag ""? - Vuoi eliminare il tag &quot;&quot;? + Vuoi eliminare il tag ""? src/app/components/manage/tag-list/tag-list.component.ts 26 @@ -563,7 +563,7 @@ Do you really want to delete the document type ""? - Vuoi eliminare il tipo di documento &quot;&quot;? + Vuoi eliminare il tipo di documento ""? src/app/components/manage/document-type-list/document-type-list.component.ts 26 @@ -587,7 +587,7 @@ Saved view "" deleted. - La vista &quot;&quot; è stata eliminata. + La vista "" è stata eliminata. src/app/components/manage/settings/settings.component.ts 68 @@ -907,7 +907,7 @@ Do you really want to delete the correspondent ""? - Vuoi eliminare il corrispondente &quot;&quot;? + Vuoi eliminare il corrispondente ""? src/app/components/manage/correspondent-list/correspondent-list.component.ts 26 @@ -1075,7 +1075,7 @@ Did you mean ""? - Forse intendevi &quot;&quot;? + Forse intendevi ""? src/app/components/search/search.component.html 13 @@ -1421,7 +1421,7 @@ "" - &quot;&quot; + "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts 113 @@ -1429,7 +1429,7 @@ "" and "" - &quot;&quot; e &quot;&quot; + "" e "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts 115 @@ -1447,7 +1447,7 @@ and "" - e &quot;&quot; + e "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts 118 @@ -1464,7 +1464,7 @@ This operation will add the tag "" to selected document(s). - Questa operazione aggiungerà il tag &quot;&quot; a documento/i selezionato/i. + Questa operazione aggiungerà il tag "" a documento/i selezionato/i. src/app/components/document-list/bulk-editor/bulk-editor.component.ts 130 @@ -1480,7 +1480,7 @@ This operation will remove the tag "" from selected document(s). - Questa operazione rimuoverà il tag &quot;&quot; da documento/i selezionato/i. + Questa operazione rimuoverà il tag "" da documento/i selezionato/i. src/app/components/document-list/bulk-editor/bulk-editor.component.ts 135 @@ -1512,7 +1512,7 @@ This operation will assign the correspondent "" to selected document(s). - Questa operazione assegnerà il corrispondente &quot;&quot; a documento/i selezionato/i. + Questa operazione assegnerà il corrispondente "" a documento/i selezionato/i. src/app/components/document-list/bulk-editor/bulk-editor.component.ts 161 @@ -1536,7 +1536,7 @@ This operation will assign the document type "" to selected document(s). - Questa operazione assegnerà il tipo di documento &quot;&quot; a documento/i selezionato/i. + Questa operazione assegnerà il tipo di documento "" a documento/i selezionato/i. src/app/components/document-list/bulk-editor/bulk-editor.component.ts 184 From 5b2576ace4ce6d2325b36d64f5378eed871e21e0 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:55:25 +0100 Subject: [PATCH 85/88] remove test cases #677 --- src/documents/tests/test_auth.py | 66 -------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 src/documents/tests/test_auth.py diff --git a/src/documents/tests/test_auth.py b/src/documents/tests/test_auth.py deleted file mode 100644 index 82b586f7b..000000000 --- a/src/documents/tests/test_auth.py +++ /dev/null @@ -1,66 +0,0 @@ -from django.contrib.auth.models import User -from django.test import override_settings, Client, modify_settings, TestCase - - -class TestRemoteUserAuthentication(TestCase): - - def test_no_remote_user_auth(self): - client = Client() - - response = client.get("/api/documents/") - self.assertEqual(response.status_code, 401) - - response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") - self.assertEqual(response.status_code, 401) - - response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") - self.assertEqual(response.status_code, 401) - - @modify_settings( - MIDDLEWARE={ - 'append': 'paperless.auth.HttpRemoteUserMiddleware' - }, - AUTHENTICATION_BACKENDS={ - 'prepend': 'django.contrib.auth.backends.RemoteUserBackend' - } - ) - def test_standard_remote_user_auth(self): - client = Client() - - response = client.get("/api/documents/") - self.assertEqual(response.status_code, 401) - - response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") - self.assertEqual(response.status_code, 401) - - self.assertFalse(User.objects.filter(username="someone").exists()) - - response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") - self.assertEqual(response.status_code, 200) - - self.assertTrue(User.objects.filter(username="someone").exists()) - - @modify_settings( - MIDDLEWARE={ - 'append': 'paperless.auth.HttpRemoteUserMiddleware' - }, - AUTHENTICATION_BACKENDS={ - 'prepend': 'django.contrib.auth.backends.RemoteUserBackend' - } - ) - @override_settings(HTTP_REMOTE_USER_HEADER_NAME="HTTP_X_FORWARDED_USER") - def test_custom_remote_user_auth(self): - client = Client() - - response = client.get("/api/documents/") - self.assertEqual(response.status_code, 401) - - response = client.get("/api/documents/", HTTP_REMOTE_USER="someone") - self.assertEqual(response.status_code, 401) - - self.assertFalse(User.objects.filter(username="someone").exists()) - - response = client.get("/api/documents/", HTTP_X_FORWARDED_USER="someone") - self.assertEqual(response.status_code, 200) - - self.assertTrue(User.objects.filter(username="someone").exists()) From b1c2c79d80a153b09b5318c8b2fa488735bf25d2 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:58:53 +0100 Subject: [PATCH 86/88] update docs --- docs/configuration.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index 7ffab20d7..48b09213d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -191,6 +191,16 @@ PAPERLESS_ENABLE_HTTP_REMOTE_USER= Allows authentication via HTTP_REMOTE_USER which is used by some SSO applications. + .. warning:: + + This will allow authentication by simply adding a ``Remote-User: `` header + to a request. Use with care! You especially *must* ensure that any such header is not + passed from your proxy server to paperless. + + If you're exposing paperless to the internet directly, do not use this. + + Also see the warning `in the official documentation `. + Defaults to `false` which disables this feature. PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME= From 80e91cde7068867831a2dfcb99af21accc2dcc95 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Thu, 4 Mar 2021 00:10:15 +0100 Subject: [PATCH 87/88] changelog --- docs/changelog.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 543d9435d..0c8056266 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,9 +18,14 @@ This release contains new database migrations. * `BolkoSchreiber `_ added an option to disable/enable thumbnail inversion in dark mode. +* Fixed an issue with the auto matching algorithm when more than 256 tags were used. + +* `Simon Taddiken `_ added the ability to customize the header used for remote user authentication with SSO applications. + * The REST API is versioned from this point onwards. See the documentation about :ref:`api-versioning` for details. + paperless-ng 1.2.1 ################## From 59ecff87011c2b1209bc32b4ef4d33455827e321 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Thu, 4 Mar 2021 00:16:24 +0100 Subject: [PATCH 88/88] test case for the migration --- .../tests/test_migration_tag_colors.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/documents/tests/test_migration_tag_colors.py diff --git a/src/documents/tests/test_migration_tag_colors.py b/src/documents/tests/test_migration_tag_colors.py new file mode 100644 index 000000000..2c4b35925 --- /dev/null +++ b/src/documents/tests/test_migration_tag_colors.py @@ -0,0 +1,37 @@ +from documents.tests.utils import DirectoriesMixin, TestMigrations + + +class TestMigrateTagColor(DirectoriesMixin, TestMigrations): + + migrate_from = '1012_fix_archive_files' + migrate_to = '1013_migrate_tag_colour' + + def setUpBeforeMigration(self, apps): + Tag = apps.get_model("documents", "Tag") + self.t1_id = Tag.objects.create(name="tag1").id + self.t2_id = Tag.objects.create(name="tag2", colour=1).id + self.t3_id = Tag.objects.create(name="tag3", colour=5).id + + def testMimeTypesMigrated(self): + Tag = self.apps.get_model('documents', 'Tag') + self.assertEqual(Tag.objects.get(id=self.t1_id).color, "#a6cee3") + self.assertEqual(Tag.objects.get(id=self.t2_id).color, "#a6cee3") + self.assertEqual(Tag.objects.get(id=self.t3_id).color, "#fb9a99") + + +class TestMigrateTagColorBackwards(DirectoriesMixin, TestMigrations): + + migrate_from = '1013_migrate_tag_colour' + migrate_to = '1012_fix_archive_files' + + def setUpBeforeMigration(self, apps): + Tag = apps.get_model("documents", "Tag") + self.t1_id = Tag.objects.create(name="tag1").id + self.t2_id = Tag.objects.create(name="tag2", color="#cab2d6").id + self.t3_id = Tag.objects.create(name="tag3", color="#123456").id + + def testMimeTypesReverted(self): + Tag = self.apps.get_model('documents', 'Tag') + self.assertEqual(Tag.objects.get(id=self.t1_id).colour, 1) + self.assertEqual(Tag.objects.get(id=self.t2_id).colour, 9) + self.assertEqual(Tag.objects.get(id=self.t3_id).colour, 1)