Closed DylannCordel closed 7 years ago
trans tag uses a double quote (language strings)
I think this is not a good idea. Usage of different types of quotes makes template more readable. Example.
include ":" and variables inside translations
Okay, I'll commit to add {% trans ':' %}
.
I'm not sure to understand your first comment. In this PR, we use different quotes to make templates more readable (it's easier to identify what are translated strings and what are path or arg strings). Furthermore, we need sometime to use "quote" inside translations, so I think it's simpler to always use double quote to avoid quote escape. eg: {% trans "it's simpler" %}
.
If you prefer we use only simple quote, it's okay for me, I'll push another commit. My point was there was no consistency between pybbm templates (sometimes single quotes, sometimes double quotes, in the same template: exemple)
What do you recommend exactly ?
Sequences like " " " " " "
make me unhappy... <p title="{% trans "title text" %}">
and <p title="{% trans "press \"yes\" to continue" %}">
for example.
I recommend to do as django developers or, if they use different styles, use double quotes in templates only for html attribues.
Ok, thx for your feedback. I'll commit that.
It's my personal opinion, I don't force you to do this. If you will find trans
with double quotes in built-in templates of django, I'll accept this PR as is :)
No problem @lampslave, with your examples and django coding style, you are right and you have convinced me :). It's commited.
Thank you!