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

Placeholders aren't filled properly #18

Closed
vmx opened this issue Feb 9, 2021 · 3 comments
Closed

Placeholders aren't filled properly #18

vmx opened this issue Feb 9, 2021 · 3 comments

Comments

@vmx
Copy link
Contributor

vmx commented Feb 9, 2021

In the email sent, the placeholders are not replaced by the actual content. Example:

Hi,

you have registered to vote for submissions for {event.name}. Please confirm that this email address is valid by following this link:

{vote_url}

If you did not register for voting, you can ignore this email.

Thank you for participating in the vote!

The {event.name} organisers

I guess that has something to do with making it a translatable string.

@rixx Do you have an idea? Does it make sense to fix it or will it automatically be fixed if #1 would be implemented (I'd then just go ahead an implement #1)?

@rixx
Copy link
Member

rixx commented Feb 9, 2021

Running flake8 says "./pretalx_public_voting/forms.py:25:9: F841 local variable 'vote_url' is assigned to but never used".

In b7a1722, you made the email text translatable. Prior to that commit, the string was an f-string, so the vote_url variable was substituted automatically. Now it is just a string, so without a .format(vote_url=vote_url), nothing will be replaced.

@rixx rixx closed this as completed in 116e1b9 Feb 9, 2021
@vmx
Copy link
Contributor Author

vmx commented Feb 9, 2021

Thanks for the quick fix! I should really start run the proper tooling to find those things myself.

@rixx
Copy link
Member

rixx commented Feb 9, 2021

We can add flake8/isort/black to this repo as a github workflow. I'll look into that over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants