-
Notifications
You must be signed in to change notification settings - Fork 74
added babel for messages extraction #509
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
base: master
Are you sure you want to change the base?
Conversation
babel.cfg
Outdated
|
||
[jinja2: **/templates/**.html] | ||
encoding = utf-8 | ||
trimmed = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please configure your editor to end files with a linebreka
newdle/templates/base_email.html
Outdated
@@ -31,7 +31,7 @@ | |||
<tr> | |||
<td style="text-align: center; color: #aaa; font-size: 11px; padding-bottom: 10px;"> | |||
<p style="padding: 0 50px; margin-top: 10px;"> | |||
This email was sent by <a href="{{ url_for('index', _external=true) }}">newdle</a>. | |||
{% trans %}This email was sent by{% endtrans %} <a href="{{ url_for('index', _external=true) }}">newdle</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have partial sentences in translatable strings. The link must be part of it. You can do something like this:
{% set newdle_link -%}
<a href="{{ url_for('index', _external=true) }}">newdle</a>
{%- endset %}
{% trans %}This email was sent by {{ newdle_link }}.{% endtrans %}
@@ -2,26 +2,26 @@ | |||
|
|||
{% block content %} | |||
<p> | |||
Hi {{ participant }}, you have a fresh newdle! | |||
{% trans %}"Hi {{ participant }}, you have a fresh newdle!"{% endtrans %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% trans %}"Hi {{ participant }}, you have a fresh newdle!"{% endtrans %} | |
{% trans %}Hi {{ participant }}, you have a fresh newdle!{% endtrans %} |
#503