Add translation module for Argos Translate #351

Merged
floatingghost merged 4 commits from ilja/akkoma:add_translator_argos_translate into develop 2022-12-19 13:06:39 +00:00
Contributor

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.

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.
ilja changed title from Add translation module for Argos Translate to WIP: Add translation module for Argos Translate 2022-12-09 12:23:27 +00:00
ilja force-pushed add_translator_argos_translate from 6b9bdb3c64
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 6aceeb7220
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
2022-12-09 12:39:59 +00:00
Compare
ilja changed title from WIP: Add translation module for Argos Translate to Add translation module for Argos Translate 2022-12-09 12:44:18 +00:00

seems to work!

any chance you can update config/description.exs for admin-fe stuff and add a changelog entry?

seems to work! any chance you can update config/description.exs for admin-fe stuff and add a changelog entry?
ilja force-pushed add_translator_argos_translate from 444833fde2
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
to eee77a1727
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
2022-12-17 12:36:23 +00:00
Compare
ilja force-pushed add_translator_argos_translate from eee77a1727
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
to d5b3d9104d
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2022-12-17 16:18:49 +00:00
Compare

you've got a linting issue

but i'll fix that, thanks!

you've got a linting issue but i'll fix that, thanks!
floatingghost deleted branch add_translator_argos_translate 2022-12-19 13:06:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma!351
No description provided.