Compare commits

...

2 Commits

Author SHA1 Message Date
shamoon fd0168ac6f Documentation: fix PAPERLESS_DATE_PARSER_LANGUAGES formatting (#12997) 2026-06-12 23:26:45 -07:00
Matt Van Horn 45ba35dd3a docs: remove duplicate words in three files (#12852) 2026-05-26 06:40:30 -07:00
3 changed files with 14 additions and 12 deletions
+6 -4
View File
@@ -852,7 +852,7 @@ pages being rotated as well.
#### [`PAPERLESS_OCR_OUTPUT_TYPE=<type>`](#PAPERLESS_OCR_OUTPUT_TYPE) {#PAPERLESS_OCR_OUTPUT_TYPE} #### [`PAPERLESS_OCR_OUTPUT_TYPE=<type>`](#PAPERLESS_OCR_OUTPUT_TYPE) {#PAPERLESS_OCR_OUTPUT_TYPE}
: Specify the the type of PDF documents that paperless should produce. : Specify the type of PDF documents that paperless should produce.
- `pdf`: Modify the PDF document as little as possible. - `pdf`: Modify the PDF document as little as possible.
- `pdfa`: Convert PDF documents into PDF/A-2b documents, which is - `pdfa`: Convert PDF documents into PDF/A-2b documents, which is
@@ -1018,18 +1018,20 @@ still perform some basic text pre-processing before matching.
#### [`PAPERLESS_DATE_PARSER_LANGUAGES=<lang>`](#PAPERLESS_DATE_PARSER_LANGUAGES) {#PAPERLESS_DATE_PARSER_LANGUAGES} #### [`PAPERLESS_DATE_PARSER_LANGUAGES=<lang>`](#PAPERLESS_DATE_PARSER_LANGUAGES) {#PAPERLESS_DATE_PARSER_LANGUAGES}
Specifies which language Paperless should use when parsing dates from documents. : Specifies which language Paperless should use when parsing dates from documents.
This should be a language code supported by the dateparser library, : This should be a language code supported by the dateparser library,
for example: "en", or a combination such as "en+de". for example: "en", or a combination such as "en+de".
Locales are also supported (e.g., "en-AU"). Locales are also supported (e.g., "en-AU").
Multiple languages can be combined using "+", for example: "en+de" or "en-AU+de". Multiple languages can be combined using "+", for example: "en+de" or "en-AU+de".
For valid values, refer to the list of supported languages and locales in the [dateparser documentation](https://dateparser.readthedocs.io/en/latest/supported_locales.html). For valid values, refer to the list of supported languages and locales in the [dateparser documentation](https://dateparser.readthedocs.io/en/latest/supported_locales.html).
Set this to match the languages in which most of your documents are written. : Set this to match the languages in which most of your documents are written.
If not set, Paperless will attempt to infer the language(s) from the OCR configuration (`PAPERLESS_OCR_LANGUAGE`). If not set, Paperless will attempt to infer the language(s) from the OCR configuration (`PAPERLESS_OCR_LANGUAGE`).
!!! note !!! note
This format differs from the `PAPERLESS_OCR_LANGUAGE` setting, which uses ISO 639-2 codes (3 letters, e.g., "eng+deu" for Tesseract OCR). This format differs from the `PAPERLESS_OCR_LANGUAGE` setting, which uses ISO 639-2 codes (3 letters, e.g., "eng+deu" for Tesseract OCR).
#### [`PAPERLESS_EMAIL_TASK_CRON=<cron expression>`](#PAPERLESS_EMAIL_TASK_CRON) {#PAPERLESS_EMAIL_TASK_CRON} #### [`PAPERLESS_EMAIL_TASK_CRON=<cron expression>`](#PAPERLESS_EMAIL_TASK_CRON) {#PAPERLESS_EMAIL_TASK_CRON}
+1 -1
View File
@@ -14,7 +14,7 @@ def localize_date(value: date | datetime | str, format: str, locale: str) -> str
Args: Args:
value (date | datetime | str): The date or datetime to format. If a datetime value (date | datetime | str): The date or datetime to format. If a datetime
is provided, it should be timezone-aware (e.g., UTC from a Django DB object). is provided, it should be timezone-aware (e.g., UTC from a Django DB object).
if str is provided is is parsed as date. If str is provided it is parsed as date.
format (str): The format to use. Can be one of Babel's preset formats format (str): The format to use. Can be one of Babel's preset formats
('short', 'medium', 'long', 'full') or a custom pattern string. ('short', 'medium', 'long', 'full') or a custom pattern string.
locale (str): The locale code (e.g., 'en_US', 'fr_FR') to use for locale (str): The locale code (e.g., 'en_US', 'fr_FR') to use for
@@ -313,7 +313,7 @@ class TestCommandImport(
WHEN: WHEN:
- An import is attempted - An import is attempted
THEN: THEN:
- Warning about the the version mismatch is output - Warning about the version mismatch is output
""" """
stdout = StringIO() stdout = StringIO()