Skip to content

Commit

Permalink
Cap texts at 4096 length
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Oct 28, 2024
1 parent f071dce commit 4e81dc4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion argostranslatefiles/formats/epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ def get_texts(self, file_path: str):

inzip.close()

return texts
return texts[:4096]
2 changes: 1 addition & 1 deletion argostranslatefiles/formats/opendocument/odt.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ def get_texts(self, file_path: str):

inzip.close()

return texts
return texts[:4096]
2 changes: 1 addition & 1 deletion argostranslatefiles/formats/openxml/docx.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ def get_texts(self, file_path: str):

inzip.close()

return texts
return texts[:4096]
2 changes: 1 addition & 1 deletion argostranslatefiles/formats/openxml/pptx.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ def get_texts(self, file_path: str):

inzip.close()

return texts
return texts[:4096]

0 comments on commit 4e81dc4

Please sign in to comment.