-
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 (redux) #4219
Conversation
…be utilized unless enabled
To use hypha the |
Maybe we can use |
hypha/apply/funds/forms.py
Outdated
@@ -24,6 +25,9 @@ | |||
from .widgets import MetaTermSelect2Widget, Select2MultiCheckboxesWidget | |||
from .workflow import get_action_mapping | |||
|
|||
if settings.APPLICATION_TRANSLATIONS_ENABLED: | |||
pass | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this left over test code?
display: inline-block; | ||
height: 1rem; | ||
} | ||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use tailwind classes for this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.txt
and 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_ENABLED
toAPPLICATION_TRANSLATIONS_ENABLED
to reflect the system wide shift away from submission terminology.Test Steps