pretalx / pretalx-public-voting

Public community voting on talk proposals
Other
3 stars 5 forks source link

Placeholders aren't filled properly #18

Closed vmx closed 3 years ago

vmx commented 3 years ago

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 commented 3 years ago

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

In b7a17227, 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.

vmx commented 3 years ago

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

rixx commented 3 years ago

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