Skip to content
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 i18n-demo plugin #163

Merged
merged 8 commits into from
Jun 4, 2024
Merged

Add i18n-demo plugin #163

merged 8 commits into from
Jun 4, 2024

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Apr 30, 2024

This is a plugin intended for the i18n demo instance. It does two things:

  • All emails are redirected to the user who sent them (avoids spamming random people and lets you check email translations)
  • Adds a new Clone button to the example events. When clicked, the corresponding event is cloned into your own personal subcategory and you get management rights to it. This way, you can see the management area without accidentally modifying the example events.

image

i18n-demo/MANIFEST.in Outdated Show resolved Hide resolved
i18n-demo/indico_i18n_demo/controllers.py Outdated Show resolved Hide resolved
i18n-demo/indico_i18n_demo/plugin.py Outdated Show resolved Hide resolved
i18n-demo/setup.cfg Outdated Show resolved Hide resolved
i18n-demo/setup.cfg Outdated Show resolved Hide resolved
@tomasr8
Copy link
Member Author

tomasr8 commented May 10, 2024

Note to self: email interception fails when the email is being sent from a celery task (e.g. data export). This is because at that point we're outside the request and don't have access to session.user anymore so we don't know who to redirect the email to

@tomasr8
Copy link
Member Author

tomasr8 commented May 17, 2024

Note to self: email interception fails when the email is being sent from a celery task (e.g. data export). This is because at that point we're outside the request and don't have access to session.user anymore so we don't know who to redirect the email to

This should be 'fixed' now. We now substitute the recipient only when we have the request context which is most cases when sending an email. Two exceptions are data export where the recipient is the same user anyway, and reminders but hopefully people won't abuse this.

Otherwise this should be ready.

@ThiefMaster ThiefMaster enabled auto-merge (squash) June 4, 2024 11:44
@ThiefMaster ThiefMaster merged commit 18b369b into indico:master Jun 4, 2024
9 checks passed
@tomasr8 tomasr8 deleted the i18n-demo branch June 4, 2024 11:57
@tomasr8 tomasr8 added the build-wheel Build a Python wheel for this PR label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-wheel Build a Python wheel for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants