translations: Avoid splitting strings to make translator's life easier

This commit is contained in:
Baptiste Jonglez 2023-07-28 15:26:18 +02:00 committed by zorun
parent c9c6795b21
commit db04f68652
3 changed files with 14 additions and 14 deletions

View file

@ -164,13 +164,14 @@
<h3>{{ _('No bills')}}</h3>
<p>
{{ _("Nothing to list yet.")}}<br />
{{ _("You probably want to") }}
{%- if g.project.members %} <a href="{{ url_for('.add_bill') }}" data-toggle="modal" data-target="#bill-form">
{{- _("add a bill") -}}
</a> ?
{% else %} <a href="{{ url_for('.add_member') }}">
{{- _('add participants') -}}
</a> ?
{%- if g.project.members %}
<a href="{{ url_for('.add_bill') }}" data-toggle="modal" data-target="#bill-form">
{{- _("Add your first bill") -}}
</a>
{% else %}
<a href="{{ url_for('.add_member') }}">
{{- _("Add the first participant") -}}
</a>
{%- endif -%}
</p>
</div>

View file

@ -100,7 +100,7 @@ class BudgetTestCase(IhatemoneyTestCase):
# Test that we got a valid token
resp = self.client.get(url, follow_redirects=True)
self.assertIn(
'You probably want to <a href="/raclette/members/add"',
'<a href="/raclette/members/add">Add the first participant',
resp.data.decode("utf-8"),
)
# Test empty and invalid tokens
@ -376,7 +376,7 @@ class BudgetTestCase(IhatemoneyTestCase):
# Empty bill list and no participant, should now propose to add participants first
self.assertIn(
'You probably want to <a href="/raclette/members/add"',
'<a href="/raclette/members/add">Add the first participant',
result.data.decode("utf-8"),
)
@ -385,9 +385,8 @@ class BudgetTestCase(IhatemoneyTestCase):
result = self.client.get("/raclette/")
# Empty bill with member, list should now propose to add bills
self.assertIn(
'You probably want to <a href="/raclette/add"', result.data.decode("utf-8")
)
self.assertIn('<a href="/raclette/add"', result.data.decode("utf-8"))
self.assertIn("Add your first bill", result.data.decode("utf-8"))
def test_membership(self):
self.post_project("raclette")

View file

@ -239,7 +239,7 @@ class EmailFailureTestCase(IhatemoneyTestCase):
)
# Check that we were redirected to the home page anyway
self.assertIn(
'You probably want to <a href="/raclette/members/add"',
'<a href="/raclette/members/add">Add the first participant',
resp.data.decode("utf-8"),
)
@ -254,7 +254,7 @@ class EmailFailureTestCase(IhatemoneyTestCase):
)
# Check that we were redirected to the home page anyway
self.assertIn(
'You probably want to <a href="/raclette/members/add"',
'<a href="/raclette/members/add">Add the first participant',
resp.data.decode("utf-8"),
)