Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lucvin
Copy link
Contributor

@lucvin lucvin commented Apr 15, 2025

babel.cfg Outdated

[jinja2: **/templates/**.html]
encoding = utf-8
trimmed = true
Copy link
Member

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

@@ -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>.
Copy link
Member

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 %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% trans %}"Hi {{ participant }}, you have a fresh newdle!"{% endtrans %}
{% trans %}Hi {{ participant }}, you have a fresh newdle!{% endtrans %}

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

Successfully merging this pull request may close these issues.

2 participants