1
0
Fork 0
mirror of https://git.youjo.love/youjo/youjo-be.git synced 2025-02-27 15:43:04 +01:00
youjo-be/lib/pleroma/akkoma
ilja c092fc9fd6 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 directly from our server without doing requests to a third party or having to install our own LibreTranslate webservice (obviously you do have to install Argos Translate).

One thing that's currently still missing from Argos Translate is auto-detection of languages (see <https://github.com/argosopentech/argos-translate/issues/9>). For now, when no source language is provided, we just return the text unchanged, supposedly translated from the target language. That way you get a near immediate response in pleroma-fe when clicking Translate, after which you can select the source language from a dropdown.

Argos Translate also doesn't seem to handle html very well. Therefore we give admins the option to strip the html before translating. I made this an option because I'm unsure if/how this will change in the future.

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/351
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2022-12-19 13:06:39 +00:00
..
translators Add translation module for Argos Translate () 2022-12-19 13:06:39 +00:00
frontend_setting_profile.ex Backend settings sync () 2022-10-06 16:22:15 +00:00
translator.ex giant massive dep upgrade and dialyxir-found error emporium () 2022-12-14 12:38:48 +00:00