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

View file

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

View file

@ -239,7 +239,7 @@ class EmailFailureTestCase(IhatemoneyTestCase):
) )
# Check that we were redirected to the home page anyway # Check that we were redirected to the home page anyway
self.assertIn( 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"), resp.data.decode("utf-8"),
) )
@ -254,7 +254,7 @@ class EmailFailureTestCase(IhatemoneyTestCase):
) )
# Check that we were redirected to the home page anyway # Check that we were redirected to the home page anyway
self.assertIn( 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"), resp.data.decode("utf-8"),
) )