Feat: Add default PDF layout option as fallback to ENV

This commit is contained in:
Silvia Bigler 2025-01-26 11:47:14 +01:00 committed by shamoon
parent 96d1a43da7
commit 6b398a6c62
7 changed files with 118 additions and 80 deletions

View File

@ -203,7 +203,7 @@ and watch out for indentation if editing the YAML file.
#### [`PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT=<int>`(#PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT) {#PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT} #### [`PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT=<int>`(#PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT) {#PAPERLESS_EMAIL_PARSE_DEFAULT_LAYOUT}
: The default layout to use for emails that are consumed as documents. Must be one of the integer choices below. Note that mail : The default layout to use for emails that are consumed as documents. Must be one of the integer choices below. Note that mail
rules can specify this setting, thus this fallback is used for .eml files consumed by other means. rules can specify this setting, thus this fallback is used for the default selection and for .eml files consumed by other means.
- `1` = Text, then HTML - `1` = Text, then HTML
- `2` = HTML, then text - `2` = HTML, then text

View File

@ -2030,7 +2030,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">84</context> <context context-type="linenumber">88</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html</context>
@ -4032,123 +4032,130 @@
<context context-type="linenumber">58</context> <context context-type="linenumber">58</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="8776300244268604360" datatype="html">
<source>System default</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">65</context>
</context-group>
</trans-unit>
<trans-unit id="4812910224365219000" datatype="html"> <trans-unit id="4812910224365219000" datatype="html">
<source>Text, then HTML</source> <source>Text, then HTML</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">65</context> <context context-type="linenumber">69</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3181744476823286470" datatype="html"> <trans-unit id="3181744476823286470" datatype="html">
<source>HTML, then text</source> <source>HTML, then text</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">69</context> <context context-type="linenumber">73</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="9048933760263399623" datatype="html"> <trans-unit id="9048933760263399623" datatype="html">
<source>HTML only</source> <source>HTML only</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">73</context> <context context-type="linenumber">77</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3835211125655594627" datatype="html"> <trans-unit id="3835211125655594627" datatype="html">
<source>Text only</source> <source>Text only</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">77</context> <context context-type="linenumber">81</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="2784260611081866636" datatype="html"> <trans-unit id="2784260611081866636" datatype="html">
<source>Move to specified folder</source> <source>Move to specified folder</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">88</context> <context context-type="linenumber">92</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="4593278936733161020" datatype="html"> <trans-unit id="4593278936733161020" datatype="html">
<source>Mark as read, don&apos;t process read mails</source> <source>Mark as read, don&apos;t process read mails</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">92</context> <context context-type="linenumber">96</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="2378921144019636516" datatype="html"> <trans-unit id="2378921144019636516" datatype="html">
<source>Flag the mail, don&apos;t process flagged mails</source> <source>Flag the mail, don&apos;t process flagged mails</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">96</context> <context context-type="linenumber">100</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="6457024618858980302" datatype="html"> <trans-unit id="6457024618858980302" datatype="html">
<source>Tag the mail with specified tag, don&apos;t process tagged mails</source> <source>Tag the mail with specified tag, don&apos;t process tagged mails</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">100</context> <context context-type="linenumber">104</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="4673329664686432878" datatype="html"> <trans-unit id="4673329664686432878" datatype="html">
<source>Use subject as title</source> <source>Use subject as title</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">107</context> <context context-type="linenumber">111</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="8645471396972938185" datatype="html"> <trans-unit id="8645471396972938185" datatype="html">
<source>Use attachment filename as title</source> <source>Use attachment filename as title</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">111</context> <context context-type="linenumber">115</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="2881879110886196973" datatype="html"> <trans-unit id="2881879110886196973" datatype="html">
<source>Do not assign title from this rule</source> <source>Do not assign title from this rule</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">115</context> <context context-type="linenumber">119</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="1568902914205618549" datatype="html"> <trans-unit id="1568902914205618549" datatype="html">
<source>Do not assign a correspondent</source> <source>Do not assign a correspondent</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">122</context> <context context-type="linenumber">126</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3567746385454588269" datatype="html"> <trans-unit id="3567746385454588269" datatype="html">
<source>Use mail address</source> <source>Use mail address</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">126</context> <context context-type="linenumber">130</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="445154175758965852" datatype="html"> <trans-unit id="445154175758965852" datatype="html">
<source>Use name (or mail address if not available)</source> <source>Use name (or mail address if not available)</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">130</context> <context context-type="linenumber">134</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="1258862217749148424" datatype="html"> <trans-unit id="1258862217749148424" datatype="html">
<source>Use correspondent selected below</source> <source>Use correspondent selected below</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">134</context> <context context-type="linenumber">138</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3147349817770432927" datatype="html"> <trans-unit id="3147349817770432927" datatype="html">
<source>Create new mail rule</source> <source>Create new mail rule</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">186</context> <context context-type="linenumber">190</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="3374331029704382439" datatype="html"> <trans-unit id="3374331029704382439" datatype="html">
<source>Edit mail rule</source> <source>Edit mail rule</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context> <context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">190</context> <context context-type="linenumber">194</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="8911059720204770105" datatype="html"> <trans-unit id="8911059720204770105" datatype="html">

View File

@ -60,6 +60,10 @@ const CONSUMPTION_SCOPE_OPTIONS = [
] ]
const PDF_LAYOUT_OPTIONS = [ const PDF_LAYOUT_OPTIONS = [
{
id: MailRulePdfLayout.Default,
name: $localize`System default`,
},
{ {
id: MailRulePdfLayout.TextHtml, id: MailRulePdfLayout.TextHtml,
name: $localize`Text, then HTML`, name: $localize`Text, then HTML`,
@ -204,7 +208,7 @@ export class MailRuleEditDialogComponent extends EditDialogComponent<MailRule> {
filter_attachment_filename_exclude: new FormControl(null), filter_attachment_filename_exclude: new FormControl(null),
maximum_age: new FormControl(null), maximum_age: new FormControl(null),
attachment_type: new FormControl(MailFilterAttachmentType.Attachments), attachment_type: new FormControl(MailFilterAttachmentType.Attachments),
pdf_layout: new FormControl(MailRulePdfLayout.TextHtml), pdf_layout: new FormControl(MailRulePdfLayout.Default),
consumption_scope: new FormControl(MailRuleConsumptionScope.Attachments), consumption_scope: new FormControl(MailRuleConsumptionScope.Attachments),
order: new FormControl(null), order: new FormControl(null),
action: new FormControl(MailAction.MarkRead), action: new FormControl(MailAction.MarkRead),

View File

@ -12,6 +12,7 @@ export enum MailRuleConsumptionScope {
} }
export enum MailRulePdfLayout { export enum MailRulePdfLayout {
Default = 0,
TextHtml = 1, TextHtml = 1,
HtmlText = 2, HtmlText = 2,
HtmlOnly = 3, HtmlOnly = 3,

View File

@ -1,21 +1,21 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: paperless-ngx\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-27 08:19-0800\n" "POT-Creation-Date: 2025-01-27 09:31-0800\n"
"PO-Revision-Date: 2022-02-17 04:17\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_US\n" "Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: paperless-ngx\n"
"X-Crowdin-Project-ID: 500308\n"
"X-Crowdin-Language: en\n"
"X-Crowdin-File: /dev/src/locale/en_US/LC_MESSAGES/django.po\n"
"X-Crowdin-File-ID: 14\n"
#: documents/apps.py:8 #: documents/apps.py:8
msgid "Documents" msgid "Documents"
@ -90,7 +90,7 @@ msgid "Automatic"
msgstr "" msgstr ""
#: documents/models.py:67 documents/models.py:433 documents/models.py:1493 #: documents/models.py:67 documents/models.py:433 documents/models.py:1493
#: paperless_mail/models.py:23 paperless_mail/models.py:136 #: paperless_mail/models.py:23 paperless_mail/models.py:143
msgid "name" msgid "name"
msgstr "" msgstr ""
@ -276,7 +276,7 @@ msgstr ""
msgid "warning" msgid "warning"
msgstr "" msgstr ""
#: documents/models.py:387 paperless_mail/models.py:350 #: documents/models.py:387 paperless_mail/models.py:363
msgid "error" msgid "error"
msgstr "" msgstr ""
@ -818,7 +818,7 @@ msgstr ""
msgid "filter filename" msgid "filter filename"
msgstr "" msgstr ""
#: documents/models.py:1066 paperless_mail/models.py:193 #: documents/models.py:1066 paperless_mail/models.py:200
msgid "" msgid ""
"Only consume documents which entirely match this filename if specified. " "Only consume documents which entirely match this filename if specified. "
"Wildcards such as *.pdf or *invoice* are allowed. Case insensitive." "Wildcards such as *.pdf or *invoice* are allowed. Case insensitive."
@ -988,15 +988,15 @@ msgid ""
"Assign a document title, can include some placeholders, see documentation." "Assign a document title, can include some placeholders, see documentation."
msgstr "" msgstr ""
#: documents/models.py:1287 paperless_mail/models.py:261 #: documents/models.py:1287 paperless_mail/models.py:274
msgid "assign this tag" msgid "assign this tag"
msgstr "" msgstr ""
#: documents/models.py:1296 paperless_mail/models.py:269 #: documents/models.py:1296 paperless_mail/models.py:282
msgid "assign this document type" msgid "assign this document type"
msgstr "" msgstr ""
#: documents/models.py:1305 paperless_mail/models.py:283 #: documents/models.py:1305 paperless_mail/models.py:296
msgid "assign this correspondent" msgid "assign this correspondent"
msgstr "" msgstr ""
@ -1112,7 +1112,7 @@ msgstr ""
msgid "workflow actions" msgid "workflow actions"
msgstr "" msgstr ""
#: documents/models.py:1495 paperless_mail/models.py:138 #: documents/models.py:1495 paperless_mail/models.py:145
msgid "order" msgid "order"
msgstr "" msgstr ""
@ -1124,7 +1124,7 @@ msgstr ""
msgid "actions" msgid "actions"
msgstr "" msgstr ""
#: documents/models.py:1511 paperless_mail/models.py:147 #: documents/models.py:1511 paperless_mail/models.py:154
msgid "enabled" msgid "enabled"
msgstr "" msgstr ""
@ -1838,161 +1838,185 @@ msgid "Process all files, including 'inline' attachments."
msgstr "" msgstr ""
#: paperless_mail/models.py:119 #: paperless_mail/models.py:119
msgid "Delete" msgid "System default"
msgstr "" msgstr ""
#: paperless_mail/models.py:120 #: paperless_mail/models.py:120
msgid "Move to specified folder" msgid "Text, then HTML"
msgstr "" msgstr ""
#: paperless_mail/models.py:121 #: paperless_mail/models.py:121
msgid "Mark as read, don't process read mails" msgid "HTML, then text"
msgstr "" msgstr ""
#: paperless_mail/models.py:122 #: paperless_mail/models.py:122
msgid "Flag the mail, don't process flagged mails" msgid "HTML only"
msgstr "" msgstr ""
#: paperless_mail/models.py:123 #: paperless_mail/models.py:123
msgid "Tag the mail with specified tag, don't process tagged mails" msgid "Text only"
msgstr "" msgstr ""
#: paperless_mail/models.py:126 #: paperless_mail/models.py:126
msgid "Use subject as title" msgid "Delete"
msgstr "" msgstr ""
#: paperless_mail/models.py:127 #: paperless_mail/models.py:127
msgid "Use attachment filename as title" msgid "Move to specified folder"
msgstr "" msgstr ""
#: paperless_mail/models.py:128 #: paperless_mail/models.py:128
msgid "Do not assign title from rule" msgid "Mark as read, don't process read mails"
msgstr "" msgstr ""
#: paperless_mail/models.py:131 #: paperless_mail/models.py:129
msgid "Do not assign a correspondent" msgid "Flag the mail, don't process flagged mails"
msgstr "" msgstr ""
#: paperless_mail/models.py:132 #: paperless_mail/models.py:130
msgid "Use mail address" msgid "Tag the mail with specified tag, don't process tagged mails"
msgstr "" msgstr ""
#: paperless_mail/models.py:133 #: paperless_mail/models.py:133
msgid "Use name (or mail address if not available)" msgid "Use subject as title"
msgstr "" msgstr ""
#: paperless_mail/models.py:134 #: paperless_mail/models.py:134
msgid "Use attachment filename as title"
msgstr ""
#: paperless_mail/models.py:135
msgid "Do not assign title from rule"
msgstr ""
#: paperless_mail/models.py:138
msgid "Do not assign a correspondent"
msgstr ""
#: paperless_mail/models.py:139
msgid "Use mail address"
msgstr ""
#: paperless_mail/models.py:140
msgid "Use name (or mail address if not available)"
msgstr ""
#: paperless_mail/models.py:141
msgid "Use correspondent selected below" msgid "Use correspondent selected below"
msgstr "" msgstr ""
#: paperless_mail/models.py:144 #: paperless_mail/models.py:151
msgid "account" msgid "account"
msgstr "" msgstr ""
#: paperless_mail/models.py:150 paperless_mail/models.py:305 #: paperless_mail/models.py:157 paperless_mail/models.py:318
msgid "folder" msgid "folder"
msgstr "" msgstr ""
#: paperless_mail/models.py:154 #: paperless_mail/models.py:161
msgid "" msgid ""
"Subfolders must be separated by a delimiter, often a dot ('.') or slash " "Subfolders must be separated by a delimiter, often a dot ('.') or slash "
"('/'), but it varies by mail server." "('/'), but it varies by mail server."
msgstr "" msgstr ""
#: paperless_mail/models.py:160 #: paperless_mail/models.py:167
msgid "filter from" msgid "filter from"
msgstr "" msgstr ""
#: paperless_mail/models.py:167 #: paperless_mail/models.py:174
msgid "filter to" msgid "filter to"
msgstr "" msgstr ""
#: paperless_mail/models.py:174 #: paperless_mail/models.py:181
msgid "filter subject" msgid "filter subject"
msgstr "" msgstr ""
#: paperless_mail/models.py:181 #: paperless_mail/models.py:188
msgid "filter body" msgid "filter body"
msgstr "" msgstr ""
#: paperless_mail/models.py:188 #: paperless_mail/models.py:195
msgid "filter attachment filename inclusive" msgid "filter attachment filename inclusive"
msgstr "" msgstr ""
#: paperless_mail/models.py:200 #: paperless_mail/models.py:207
msgid "filter attachment filename exclusive" msgid "filter attachment filename exclusive"
msgstr "" msgstr ""
#: paperless_mail/models.py:205 #: paperless_mail/models.py:212
msgid "" msgid ""
"Do not consume documents which entirely match this filename if specified. " "Do not consume documents which entirely match this filename if specified. "
"Wildcards such as *.pdf or *invoice* are allowed. Case insensitive." "Wildcards such as *.pdf or *invoice* are allowed. Case insensitive."
msgstr "" msgstr ""
#: paperless_mail/models.py:212 #: paperless_mail/models.py:219
msgid "maximum age" msgid "maximum age"
msgstr "" msgstr ""
#: paperless_mail/models.py:214 #: paperless_mail/models.py:221
msgid "Specified in days." msgid "Specified in days."
msgstr "" msgstr ""
#: paperless_mail/models.py:218 #: paperless_mail/models.py:225
msgid "attachment type" msgid "attachment type"
msgstr "" msgstr ""
#: paperless_mail/models.py:222 #: paperless_mail/models.py:229
msgid "" msgid ""
"Inline attachments include embedded images, so it's best to combine this " "Inline attachments include embedded images, so it's best to combine this "
"option with a filename filter." "option with a filename filter."
msgstr "" msgstr ""
#: paperless_mail/models.py:228 #: paperless_mail/models.py:235
msgid "consumption scope" msgid "consumption scope"
msgstr "" msgstr ""
#: paperless_mail/models.py:234 #: paperless_mail/models.py:241
msgid "pdf layout"
msgstr ""
#: paperless_mail/models.py:247
msgid "action" msgid "action"
msgstr "" msgstr ""
#: paperless_mail/models.py:240 #: paperless_mail/models.py:253
msgid "action parameter" msgid "action parameter"
msgstr "" msgstr ""
#: paperless_mail/models.py:245 #: paperless_mail/models.py:258
msgid "" msgid ""
"Additional parameter for the action selected above, i.e., the target folder " "Additional parameter for the action selected above, i.e., the target folder "
"of the move to folder action. Subfolders must be separated by dots." "of the move to folder action. Subfolders must be separated by dots."
msgstr "" msgstr ""
#: paperless_mail/models.py:253 #: paperless_mail/models.py:266
msgid "assign title from" msgid "assign title from"
msgstr "" msgstr ""
#: paperless_mail/models.py:273 #: paperless_mail/models.py:286
msgid "assign correspondent from" msgid "assign correspondent from"
msgstr "" msgstr ""
#: paperless_mail/models.py:287 #: paperless_mail/models.py:300
msgid "Assign the rule owner to documents" msgid "Assign the rule owner to documents"
msgstr "" msgstr ""
#: paperless_mail/models.py:313 #: paperless_mail/models.py:326
msgid "uid" msgid "uid"
msgstr "" msgstr ""
#: paperless_mail/models.py:321 #: paperless_mail/models.py:334
msgid "subject" msgid "subject"
msgstr "" msgstr ""
#: paperless_mail/models.py:329 #: paperless_mail/models.py:342
msgid "received" msgid "received"
msgstr "" msgstr ""
#: paperless_mail/models.py:336 #: paperless_mail/models.py:349
msgid "processed" msgid "processed"
msgstr "" msgstr ""
#: paperless_mail/models.py:342 #: paperless_mail/models.py:355
msgid "status" msgid "status"
msgstr "" msgstr ""

View File

@ -15,12 +15,13 @@ class Migration(migrations.Migration):
name="pdf_layout", name="pdf_layout",
field=models.PositiveIntegerField( field=models.PositiveIntegerField(
choices=[ choices=[
(0, "System default"),
(1, "Text, then HTML"), (1, "Text, then HTML"),
(2, "HTML, then text"), (2, "HTML, then text"),
(3, "HTML only"), (3, "HTML only"),
(4, "Text only"), (4, "Text only"),
], ],
default=1, default=0,
verbose_name="pdf layout", verbose_name="pdf layout",
), ),
), ),

View File

@ -116,6 +116,7 @@ class MailRule(document_models.ModelWithOwner):
EVERYTHING = 2, _("Process all files, including 'inline' attachments.") EVERYTHING = 2, _("Process all files, including 'inline' attachments.")
class PdfLayout(models.IntegerChoices): class PdfLayout(models.IntegerChoices):
DEFAULT = 0, _("System default")
TEXT_HTML = 1, _("Text, then HTML") TEXT_HTML = 1, _("Text, then HTML")
HTML_TEXT = 2, _("HTML, then text") HTML_TEXT = 2, _("HTML, then text")
HTML_ONLY = 3, _("HTML only") HTML_ONLY = 3, _("HTML only")