Add the ability to translate submissions (redux) - #4219
Conversation
…be utilized unless enabled
|
To use hypha the |
|
Maybe we can use |
|
|
||
| if settings.APPLICATION_TRANSLATIONS_ENABLED: | ||
| pass | ||
|
|
| display: inline-block; | ||
| height: 1rem; | ||
| } | ||
| </style> No newline at end of file |
There was a problem hiding this comment.
Could we use tailwind classes for this instead?
There was a problem hiding this comment.
the htmx-request class gets added while the request is processing so I that bit of CSS will need to stay but I moved everything else to tailwind
|
Overall it looks like a smart way to implement this. We have the feature easily available without putting a burdon on all installs. Nice work! Will try it out locally and see if I find any edge cases. |
…LICATION_TRANSLATIONS_ENABLED` is true
|
@frjo your |
|
I think it's good candidate for #4201 or have it implemented in the client/server mode then use it's translator api. Advantage of the client/server mode, it will allow someone to easily replace it with another API and/or allow it to run without blocking the main application server. |
|
@wes-otf I think we can run the tests for this in the CI. The pip installs are cached so the effect should be minimal. |
|
@frjo CI looks good to go! |
|
@theskumar I totally agree! I think with how isolated the logic is now especially once we're ready to do that implementation I could totally extract it into a plugin |
This builds on the #4134 PR that initially introduced machine translations into Hypha. This isolates the translation behavior; putting pip dependencies in a separate
requirements-translate.txtand will not attempt any translate imports unless the setting for it is true.Other small changes are also a full docs page explaining how to install language packages & changing the setting once again from
SUBMISSION_TRANSLATIONS_ENABLEDtoAPPLICATION_TRANSLATIONS_ENABLEDto reflect the system wide shift away from submission terminology.Test Steps