Add the ability to translate submissions (#4134)
Pertaining to discussions had in #4037. This integrates the [argostranslate](https://github.com/argosopentech/argos-translate) 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` setting ## Demos *Translating an application* https://github.com/user-attachments/assets/e454a6b7-d449-4caf-8d2d-cb1ad7196546 *Clearing a translation via the form* https://github.com/user-attachments/assets/5c46ea36-7860-49dc-8758-965a06036fdc
parent
11f8bb68
No related branches found
No related tags found
Showing
- hypha/apply/funds/fields.py 39 additions, 0 deletionshypha/apply/funds/fields.py
- hypha/apply/funds/forms.py 28 additions, 0 deletionshypha/apply/funds/forms.py
- hypha/apply/funds/services.py 90 additions, 0 deletionshypha/apply/funds/services.py
- hypha/apply/funds/templates/funds/applicationsubmission_admin_detail.html 5 additions, 1 deletion...s/templates/funds/applicationsubmission_admin_detail.html
- hypha/apply/funds/templates/funds/applicationsubmission_detail.html 14 additions, 5 deletions...y/funds/templates/funds/applicationsubmission_detail.html
- hypha/apply/funds/templates/funds/includes/admin_primary_actions.html 8 additions, 1 deletion...funds/templates/funds/includes/admin_primary_actions.html
- hypha/apply/funds/templates/funds/includes/rendered_answers.html 43 additions, 1 deletion...pply/funds/templates/funds/includes/rendered_answers.html
- hypha/apply/funds/templates/funds/includes/translate_application_form.html 125 additions, 0 deletions.../templates/funds/includes/translate_application_form.html
- hypha/apply/funds/templates/submissions/partials/submission-title.html 1 addition, 0 deletions...unds/templates/submissions/partials/submission-title.html
- hypha/apply/funds/templatetags/submission_tags.py 6 additions, 0 deletionshypha/apply/funds/templatetags/submission_tags.py
- hypha/apply/funds/templatetags/translate_tags.py 18 additions, 0 deletionshypha/apply/funds/templatetags/translate_tags.py
- hypha/apply/funds/tests/test_services.py 121 additions, 0 deletionshypha/apply/funds/tests/test_services.py
- hypha/apply/funds/tests/test_tags.py 41 additions, 1 deletionhypha/apply/funds/tests/test_tags.py
- hypha/apply/funds/tests/test_utils.py 194 additions, 1 deletionhypha/apply/funds/tests/test_utils.py
- hypha/apply/funds/tests/test_views.py 34 additions, 0 deletionshypha/apply/funds/tests/test_views.py
- hypha/apply/funds/urls.py 13 additions, 1 deletionhypha/apply/funds/urls.py
- hypha/apply/funds/utils.py 82 additions, 0 deletionshypha/apply/funds/utils.py
- hypha/apply/funds/views.py 92 additions, 58 deletionshypha/apply/funds/views.py
- hypha/apply/funds/views_partials.py 155 additions, 2 deletionshypha/apply/funds/views_partials.py
- hypha/apply/translate/__init__.py 0 additions, 0 deletionshypha/apply/translate/__init__.py
Loading
Please register or sign in to comment