diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 146acd0ab..32f6881aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -645,7 +645,7 @@ jobs: script: | const { repo, owner } = context.repo; const result = await github.rest.pulls.create({ - title: '[Documentation] Add ${{ needs.publish-release.outputs.version }} changelog', + title: 'Documentation: Add ${{ needs.publish-release.outputs.version }} changelog', owner, repo, head: '${{ needs.publish-release.outputs.version }}-changelog', diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 038a44dbe..a3890f961 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -324,44 +324,45 @@ Loading... - } - @switch (contentRenderType) { - @case (ContentRenderType.PDF) { - @if (!useNativePdfViewer) { -
- - + } @else { + @switch (contentRenderType) { + @case (ContentRenderType.PDF) { + @if (!useNativePdfViewer) { +
+ + +
+ } @else { + + } + } + @case (ContentRenderType.Text) { +
{{previewText}}
+ } + @case (ContentRenderType.Image) { +
+ {{title}}
- } @else { + } + @case (ContentRenderType.Other) { } } - @case (ContentRenderType.Text) { -
{{previewText}}
- } - @case (ContentRenderType.Image) { -
- {{title}} + @if (requiresPassword) { +
+
+ +
} - @case (ContentRenderType.Other) { - - } - } - @if (requiresPassword) { -
-
- -
-
} diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts index cccf2677b..af0e0e78e 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts @@ -681,6 +681,7 @@ describe('DocumentDetailComponent', () => { it('should support Enter key in password field', () => { initNormally() + component.metadata = { has_archive_version: true } component.onError({ name: 'PasswordException' }) // normally dispatched by pdf viewer fixture.detectChanges() expect(component.password).toBeUndefined() diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 18e6b1211..0ce9fa007 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -82,6 +82,7 @@ enum ContentRenderType { Image = 'image', Text = 'text', Other = 'other', + Unknown = 'unknown', } enum ZoomSetting { @@ -211,6 +212,7 @@ export class DocumentDetailComponent } get contentRenderType(): ContentRenderType { + if (!this.metadata) return ContentRenderType.Unknown const contentType = this.metadata?.has_archive_version ? 'application/pdf' : this.metadata?.original_mime_type diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts index 361c87f3c..9015ef341 100644 --- a/src-ui/src/environments/environment.prod.ts +++ b/src-ui/src/environments/environment.prod.ts @@ -5,7 +5,7 @@ export const environment = { apiBaseUrl: document.baseURI + 'api/', apiVersion: '4', appTitle: 'Paperless-ngx', - version: '2.4.1', + version: '2.4.1-dev', webSocketHost: window.location.host, webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:', webSocketBaseUrl: base_url.pathname + 'ws/', diff --git a/src-ui/src/locale/messages.ar_AR.xlf b/src-ui/src/locale/messages.ar_AR.xlf index d1d5f100f..fc011ced2 100644 --- a/src-ui/src/locale/messages.ar_AR.xlf +++ b/src-ui/src/locale/messages.ar_AR.xlf @@ -3289,7 +3289,7 @@ src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html 25 - Do not consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive. + لا تستهلك المستندات التي تتطابق تماما مع اسم الملف هذا إذا تم تحديده. البطاقات البرية مثل *.pdf أو *الفاتورة* مسموح بها. الحالة غير حساسة. Action @@ -3749,7 +3749,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 30 - Add Trigger + إضافة مشغل Apply Actions: @@ -3757,7 +3757,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 66 - Apply Actions: + تطبيق الإجراءات: Add Action @@ -3765,7 +3765,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 68 - Add Action + إضافة اجراء Action type @@ -3773,7 +3773,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 86 - Action type + نوع الإجراء Assign title @@ -3789,7 +3789,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 90 - Can include some placeholders, see <a target='_blank' href='https://docs.paperless-ngx.com/usage/#workflows'>documentation</a>. + يمكن أن تتضمن بعض العناصر النائبة، انظر <a target='_blank' href='https://docs.paperless-ngx.com/usage/#workflows'>المستندات</a>. Assign tags @@ -3813,7 +3813,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 95 - Assign custom fields + تعيين حقول مخصصة Assign owner @@ -3845,7 +3845,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 166 - Trigger type + نوع المشغل Trigger for documents that match all filters specified below. @@ -3853,7 +3853,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 167 - Trigger for documents that match all filters specified below. + المشغل للمستندات التي تطابق جميع الفلاتر المحددة أدناه. Filter filename @@ -4005,7 +4005,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts 69 - Assignment + المهام Create new workflow @@ -4013,7 +4013,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts 137 - Create new workflow + إنشاء سير عمل جديد Edit workflow @@ -4021,7 +4021,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts 141 - Edit workflow + تعديل سير العمل All @@ -4138,7 +4138,7 @@ src/app/components/common/input/url/url.component.html 7 - Remove + إزالة Invalid date. @@ -4182,7 +4182,7 @@ src/app/components/common/input/document-link/document-link.component.ts 44 - No documents found + لم يتم العثور على مستندات Upload @@ -4190,7 +4190,7 @@ src/app/components/common/input/file/file.component.html 15 - Upload + رفع Show password @@ -4198,7 +4198,7 @@ src/app/components/common/input/password/password.component.html 6 - Show password + عرض كلمة المرور Edit Permissions @@ -4267,7 +4267,7 @@ src/app/components/common/input/select/select.component.ts 92 - No items found + لم يتم العثور على أي عنصر Note: value has not yet been set and will not apply until explicitly changed @@ -4275,7 +4275,7 @@ src/app/components/common/input/switch/switch.component.html 39 - Note: value has not yet been set and will not apply until explicitly changed + ملاحظة: لم يتم بعد تعيين القيمة ولن تنطبق حتى يتم تغييرها بشكل صريح Add tag @@ -4299,7 +4299,7 @@ src/app/components/common/input/url/url.component.html 14 - Open link + فتح الرابط What's this? @@ -4307,7 +4307,7 @@ src/app/components/common/page-header/page-header.component.html 9 - What's this? + ما هذا؟ Read more @@ -4315,7 +4315,7 @@ src/app/components/common/page-header/page-header.component.html 15 - Read more + اقرأ المزيد Set permissions @@ -4363,7 +4363,7 @@ src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.html 46 - Shared by me + تم المشاركة من قبلي Unowned @@ -4411,7 +4411,7 @@ src/app/components/common/preview-popup/preview-popup.component.html 4 - Error loading preview + خطأ في تحميل المعاينة Edit Profile @@ -4419,7 +4419,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 3 - Edit Profile + تعديل الملف الشخصي Confirm Email @@ -4427,7 +4427,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 13 - Confirm Email + تأكيد البريد الإلكتروني Confirm Password @@ -4435,7 +4435,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 23 - Confirm Password + تأكيد كلمة المرور API Auth Token @@ -4443,7 +4443,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 31 - API Auth Token + API Auth Token Copy @@ -4467,7 +4467,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 44 - Regenerate auth token + تجديد رمز المصادقة Copied! @@ -4487,7 +4487,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 50 - Warning: changing the token cannot be undone + تحذير: لا يمكن التراجع عن تغيير رمز المصادقة Emails must match @@ -4495,7 +4495,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts 94 - Emails must match + البريد الإلكتروني يجب أن يتطابق Passwords must match @@ -4503,7 +4503,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts 122 - Passwords must match + يجب أن تتطابق كلمة المرور Profile updated successfully @@ -4511,7 +4511,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts 142 - Profile updated successfully + تم تعديل الملف الشخصي بنجاح Error saving profile @@ -4519,7 +4519,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts 154 - Error saving profile + حدث خطأ أثناء حفظ الملف الشخصي Error generating auth token @@ -4527,7 +4527,7 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts 171 - Error generating auth token + خطأ في إنشاء رمز المصادقة Select diff --git a/src-ui/src/locale/messages.ca_ES.xlf b/src-ui/src/locale/messages.ca_ES.xlf index 868669f65..ddaf1e75e 100644 --- a/src-ui/src/locale/messages.ca_ES.xlf +++ b/src-ui/src/locale/messages.ca_ES.xlf @@ -463,7 +463,7 @@ src/app/components/admin/config/config.component.html 4 - Global app configuration options which apply to <strong>every</strong> user of this install of Paperless-ngx. Options can also be set using environment variables or the configuration file but the value here will always take precedence. + Opcions de configuració global d'aplicació que aplica a <strong>cada</strong> usuari d'aquesta instal·lació de Paperless-ngx. Les opcions també es poden establir mitjançant variables d'entorn o el fitxer de configuració, però el valor aquí sempre tindrà prioritat. @@ -645,7 +645,7 @@ src/app/components/admin/logs/logs.component.html 4 - Review the log files for the application and for email checking. + Revisa els fitxers de registre de l'aplicació i per a la comprovació del correu electrònic. Auto refresh @@ -761,7 +761,7 @@ src/app/components/admin/settings/settings.component.html 4 - Options to customize appearance, notifications, saved views and more. Settings apply to the <strong>current user only</strong>. + Opcions per personalitzar l'aparença, les notificacions, les visualitzacions desades i molt més. La configuració s'aplica només a <strong>l'usuari actual</strong>. Start tour @@ -3893,7 +3893,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html 173 - Apply to documents that match this path. Wildcards specified as * are allowed. Case-normalized.</a> + Aplica als documents que coincideixen amb aquest camí. Es permeten els comodins especificats com a *. Cas normalitzat.</a> Filter mail rule @@ -4275,7 +4275,7 @@ src/app/components/common/input/switch/switch.component.html 39 - Note: value has not yet been set and will not apply until explicitly changed + Nota: el valor encara no s'ha establert i no s'aplicarà fins que no es modifiqui explícitament Add tag @@ -4723,7 +4723,7 @@ src/app/components/dashboard/dashboard.component.ts 40 - Welcome to + Benvingut a Dashboard updated @@ -5314,7 +5314,7 @@ src/app/components/document-detail/document-detail.component.html 272,275 - Notes + Notes Save & next @@ -5354,7 +5354,7 @@ src/app/components/document-detail/document-detail.component.ts 321 - Document changes detected + Canvis detectats al document The version of this document in your browser session appears older than the existing version. @@ -5362,7 +5362,7 @@ src/app/components/document-detail/document-detail.component.ts 322 - The version of this document in your browser session appears older than the existing version. + La versió d'aquest document a la sessió del vostre navegador sembla més antiga que la versió existent. Saving the document here may overwrite other changes that were made. To restore the existing version, discard your changes or close the document. @@ -5370,7 +5370,7 @@ src/app/components/document-detail/document-detail.component.ts 323 - Saving the document here may overwrite other changes that were made. To restore the existing version, discard your changes or close the document. + Desar el document aquí pot sobreescriure altres canvis fets. Per restaurar la versió existent, descarta els canvis o tanca el document. Ok @@ -6488,7 +6488,7 @@ src/app/components/manage/custom-fields/custom-fields.component.html 4 - Customize the data fields that can be attached to documents. + Personalitza els camps de dades que es poden adjuntar als documents. Add Field @@ -7000,7 +7000,7 @@ src/app/components/manage/workflows/workflows.component.html 4 - Use workflows to customize the behavior of Paperless-ngx when events 'trigger' a workflow. + Empra fluxos de treball per personalitzar el comportament de Paperless-ngx quan els esdeveniments "activin" un flux de treball. Add Workflow diff --git a/src-ui/src/locale/messages.fr_FR.xlf b/src-ui/src/locale/messages.fr_FR.xlf index 216176898..e765bbb6c 100644 --- a/src-ui/src/locale/messages.fr_FR.xlf +++ b/src-ui/src/locale/messages.fr_FR.xlf @@ -729,7 +729,7 @@ src/app/components/manage/management-list/management-list.component.html 48 - Chargement ... + Chargement... Settings @@ -1833,7 +1833,7 @@ src/app/components/admin/tasks/tasks.component.html 123,125 - échoué(s) + Échoué(s) Complete @@ -1841,7 +1841,7 @@ src/app/components/admin/tasks/tasks.component.html 131,133 - terminé(s) + Terminé(s) Started @@ -1849,7 +1849,7 @@ src/app/components/admin/tasks/tasks.component.html 139,141 - commencé(s) + Commencé(s) Queued @@ -1857,7 +1857,7 @@ src/app/components/admin/tasks/tasks.component.html 147,149 - Queued en attente + En attente Dismiss selected @@ -1897,7 +1897,7 @@ src/app/components/admin/tasks/tasks.component.ts 133 - liste d'attente + en attente started @@ -6448,7 +6448,7 @@ src/app/components/file-drop/file-drop.component.ts 88 - Démarrage du téléversement... + Démarrage du téléversement… correspondent @@ -7973,7 +7973,7 @@ src/app/services/upload-documents.service.ts 57 - Téléversement terminé, en attente... + Téléversement terminé, en attente… HTTP error: diff --git a/src-ui/src/locale/messages.nl_NL.xlf b/src-ui/src/locale/messages.nl_NL.xlf index 1a375cd64..ffa254df1 100644 --- a/src-ui/src/locale/messages.nl_NL.xlf +++ b/src-ui/src/locale/messages.nl_NL.xlf @@ -3621,7 +3621,7 @@ src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts 32 - Etiket bewerken + Label bewerken Email diff --git a/src/documents/parsers.py b/src/documents/parsers.py index db4b42792..12e5d6b33 100644 --- a/src/documents/parsers.py +++ b/src/documents/parsers.py @@ -38,7 +38,7 @@ from documents.utils import copy_file_with_basic_stats DATE_REGEX = re.compile( r"(\b|(?!=([_-])))([0-9]{1,2})[\.\/-]([0-9]{1,2})[\.\/-]([0-9]{4}|[0-9]{2})(\b|(?=([_-])))|" r"(\b|(?!=([_-])))([0-9]{4}|[0-9]{2})[\.\/-]([0-9]{1,2})[\.\/-]([0-9]{1,2})(\b|(?=([_-])))|" - r"(\b|(?!=([_-])))([0-9]{1,2}[\. ]+[a-zA-Z]{3,9} ([0-9]{4}|[0-9]{2}))(\b|(?=([_-])))|" + r"(\b|(?!=([_-])))([0-9]{1,2}[\. ]+[a-zA-Z]{3,9} [0-9]{4}|[a-zA-Z]{3,9} [0-9]{1,2}, [0-9]{4})(\b|(?=([_-])))|" r"(\b|(?!=([_-])))([^\W\d_]{3,9} [0-9]{1,2}, ([0-9]{4}))(\b|(?=([_-])))|" r"(\b|(?!=([_-])))([^\W\d_]{3,9} [0-9]{4})(\b|(?=([_-])))|" r"(\b|(?!=([_-])))([0-9]{1,2}[^ ]{2}[\. ]+[^ ]{3,9}[ \.\/-][0-9]{4})(\b|(?=([_-])))|" diff --git a/src/documents/tests/test_date_parsing.py b/src/documents/tests/test_date_parsing.py index 54b4d7b53..d4ea71be5 100644 --- a/src/documents/tests/test_date_parsing.py +++ b/src/documents/tests/test_date_parsing.py @@ -201,6 +201,13 @@ class TestDate(TestCase): datetime.datetime(2022, 3, 25, 0, 0, tzinfo=tz.gettz(settings.TIME_ZONE)), ) + def test_date_format_26(self): + text = "CHASE 0 September 25, 2019 JPMorgan Chase Bank, NA. P0 Box 182051" + self.assertEqual( + parse_date("", text), + datetime.datetime(2019, 9, 25, 0, 0, tzinfo=tz.gettz(settings.TIME_ZONE)), + ) + def test_crazy_date_past(self, *args): self.assertIsNone(parse_date("", "01-07-0590 00:00:00")) diff --git a/src/locale/ar_AR/LC_MESSAGES/django.po b/src/locale/ar_AR/LC_MESSAGES/django.po index db74c237b..426f9910f 100644 --- a/src/locale/ar_AR/LC_MESSAGES/django.po +++ b/src/locale/ar_AR/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-05 21:26-0800\n" -"PO-Revision-Date: 2024-01-22 00:25\n" +"PO-Revision-Date: 2024-01-25 22:18\n" "Last-Translator: \n" "Language-Team: Arabic\n" "Language: ar_SA\n" diff --git a/src/locale/ca_ES/LC_MESSAGES/django.po b/src/locale/ca_ES/LC_MESSAGES/django.po index 3bf779cec..c99827626 100644 --- a/src/locale/ca_ES/LC_MESSAGES/django.po +++ b/src/locale/ca_ES/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-05 21:26-0800\n" -"PO-Revision-Date: 2024-01-19 12:09\n" +"PO-Revision-Date: 2024-01-25 12:09\n" "Last-Translator: \n" "Language-Team: Catalan\n" "Language: ca_ES\n" @@ -1031,11 +1031,11 @@ msgstr "Controls de generació d'arxiu arxivat" #: paperless/models.py:123 msgid "Sets image DPI fallback value" -msgstr "" +msgstr "Estableix DPI d'imatge per defecte" #: paperless/models.py:130 msgid "Controls the unpaper cleaning" -msgstr "" +msgstr "Controla la neteja sense paper" #: paperless/models.py:137 msgid "Enables deskew" @@ -1055,11 +1055,11 @@ msgstr "Estableix la mida màxima de la imatge per a la descompressió" #: paperless/models.py:157 msgid "Sets the Ghostscript color conversion strategy" -msgstr "" +msgstr "Estableix l'estratègia de conversió de color de Ghostscript" #: paperless/models.py:165 msgid "Adds additional user arguments for OCRMyPDF" -msgstr "" +msgstr "Afegeix arguments d'usuari addicionals per a OCRMyPDF" #: paperless/models.py:170 msgid "paperless application settings" diff --git a/src/locale/fr_FR/LC_MESSAGES/django.po b/src/locale/fr_FR/LC_MESSAGES/django.po index 9e611ff67..27064025e 100644 --- a/src/locale/fr_FR/LC_MESSAGES/django.po +++ b/src/locale/fr_FR/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-05 21:26-0800\n" -"PO-Revision-Date: 2024-01-17 00:24\n" +"PO-Revision-Date: 2024-01-25 00:24\n" "Last-Translator: \n" "Language-Team: French\n" "Language: fr_FR\n" diff --git a/src/locale/nl_NL/LC_MESSAGES/django.po b/src/locale/nl_NL/LC_MESSAGES/django.po index a6406d310..2bf4bb40a 100644 --- a/src/locale/nl_NL/LC_MESSAGES/django.po +++ b/src/locale/nl_NL/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-05 21:26-0800\n" -"PO-Revision-Date: 2024-01-20 12:08\n" +"PO-Revision-Date: 2024-01-25 12:09\n" "Last-Translator: \n" "Language-Team: Dutch\n" "Language: nl_NL\n" diff --git a/src/locale/tr_TR/LC_MESSAGES/django.po b/src/locale/tr_TR/LC_MESSAGES/django.po index 3f7477691..e60844e34 100644 --- a/src/locale/tr_TR/LC_MESSAGES/django.po +++ b/src/locale/tr_TR/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-05 21:26-0800\n" -"PO-Revision-Date: 2024-01-24 00:24\n" +"PO-Revision-Date: 2024-01-25 00:24\n" "Last-Translator: \n" "Language-Team: Turkish\n" "Language: tr_TR\n"