Commit Graph

3 Commits

Author SHA1 Message Date
ilja d1bb480146 Change ArgosTranslate strategy for dealing with nil from-language
Instead of choosing a fallback language, we just return the input, supposedly translated from the target language.
This gives us a much faster response, so you can immedialty choose the correct from language yourself in pleroma-fe.

Some other cleanup and improvements to the docs are also done.
2022-12-17 13:34:03 +01:00
ilja f78bada08d Allow stripping of html for Argos Translate module
Argos Translate doesn't properly translate HTML.
Libre Translate uses an extra module for that.
Here we strip the HTML by default before translating and then add rudimentary HTML back so it displays properly.

Stripping HTML is a default-on option, just in case argos adds support for html in the language models later on.
That way admins will be able to overwrite the setting and not strip any more.
2022-12-17 13:34:03 +01:00
ilja f027db9654 Add translation module for Argos Translate
Argos Translate is a Python module for translation and can be used as a command line tool.
This is also the engine for LibreTranslate, for which we already have a module.
Here we can use the engine irectly from our server without doing requests to a third party or
having to install our own LibreTranslate webservice.

One thing that's currently still missing from ArgosTranslate is auto-detection of languages.
2022-12-17 13:34:03 +01:00