-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to translate submissions #4134
Conversation
Lots of work needed before this is ready, like:
So far happy with the initial pass though! OTF is on board already as this is something they really hate having to keep using an external AI type service for. |
if anyone wants to play around with this, to install language packages you can use the following script (will install the Arabic -> English package but
|
I think the UI looks really nice. Neat to make the to/from lang a query string so it can be shared. How would downloading the language package work on production? |
I was thinking via a management command that way the instance could add languages as needed. Still thinking through what that syntax would look like but maybe something like: python3 manage.py install_language from_to ... ie. to install the arabic -> english & french -> english package it'd look like: python3 manage.py install_language ar_en fr_en |
The previously mentioned management commands were added - had a long layover today so went a little overboard w/ verbosities and messages (ie. Installing English -> Arabic & English -> Spanish: python3 manage.py install_languages ar_en fr_en Uninstalling said languages:
|
c585d71
to
43d72a3
Compare
835bed6
to
fc7608a
Compare
fc7608a
to
dba2b8b
Compare
I think this is ready for review! Added tons of unit tests - might've gone a little overboard with mocking but really wanted logic testing to be isolated. Let me know what y'all think! |
dba2b8b
to
25739aa
Compare
Works well in my testing and I like the UI. Two observations:
|
Pertaining to discussions had in #4037. This integrates the argostranslate library to allow for translation of applications. The current functionality allows staff users to translate the written answers of an application.
This feature utilizes htmx to translate the application without requiring a reload of the page, while also updating the URL so a user can have a sharable link (using the query parameters
fl
[from language] &tl
[to language]) when collaborating with others on the application.This feature is disabled by default & can be enabled via the
SUBMISSION_TRANSLATIONS_ENABLED
settingDemos
Translating an application
Screen.Recording.2024-09-13.at.14.33.16.mp4
Clearing a translation via the form
Screen.Recording.2024-09-13.at.14.52.45.mp4
Test Steps