Customisation of 'Action Trouble Text'
fridolin-koch opened this issue · 5 comments
Currently I can't find any possibility to change the 'action trouble text' inside the footer:
If you’re having trouble with the button 'Hier Anmelden', copy and paste the URL below into your web browser.
This makes it impossible to fully customise the email template (e.g. i18n).
I would propose the following changes: fridolin-koch@44be377
I've you are happy with the proposed solution, I can sent a PR.
Best Regards,
Frido
Hey @fridolin-koch ,
Thanks for your message, it's a nice idea ! Implementation looks great to me, I see a little edge case though.
Code does not check that user set a single %s
when he overrides his troubletext string. The user may get weird behaviour without knowing it, because the email template expects a parameter to the printf
function.
On top of that, we would just need more additions for the PR, could you:
- Update
README.md
with the new feature - Update
CONTRIBUTING.md
with the new feature
Thank you :)
I agree, I can think of two possible solutions.
-
Check if the string contains
%s
exactly once, but this may also lead to unexpected behaviour in case the string contains%d
%b
etc. -
Define a custom placeholder like
{ACTION}
and replace with the action button text.
I think solution 2. would be less error prone. What do you think?
I agree, let's go for the second solution ;)
I've created a PR (#8), let me know if anything is missing :)