mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-10-12 02:26:09 -05:00
Fixes language code checks around two part languages
This commit is contained in:

committed by
Trenton H

parent
0e8265f1ae
commit
55ef0d4a1b
@@ -16,8 +16,7 @@ def get_tesseract_langs():
|
||||
# Decode bytes to string, split on newlines, trim out the header
|
||||
proc_lines = proc.stdout.decode("utf8", errors="ignore").strip().split("\n")[1:]
|
||||
|
||||
# Replace _ with - to convert two part languages to the expected code
|
||||
return [x.replace("_", "-") for x in proc_lines]
|
||||
return [x.strip() for x in proc_lines]
|
||||
|
||||
|
||||
@register()
|
||||
|
Reference in New Issue
Block a user