From db04f6865202cd59bf090761e1a74dcc838cd3a8 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Fri, 28 Jul 2023 15:26:18 +0200 Subject: [PATCH] translations: Avoid splitting strings to make translator's life easier --- ihatemoney/templates/list_bills.html | 15 ++++++++------- ihatemoney/tests/budget_test.py | 9 ++++----- ihatemoney/tests/main_test.py | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html index 78d0b952..749c9070 100644 --- a/ihatemoney/templates/list_bills.html +++ b/ihatemoney/templates/list_bills.html @@ -164,13 +164,14 @@

{{ _('No bills')}}

{{ _("Nothing to list yet.")}}
- {{ _("You probably want to") }} - {%- if g.project.members %} - {{- _("add a bill") -}} - ? - {% else %} - {{- _('add participants') -}} - ? + {%- if g.project.members %} + + {{- _("Add your first bill") -}} + + {% else %} + + {{- _("Add the first participant") -}} + {%- endif -%}

diff --git a/ihatemoney/tests/budget_test.py b/ihatemoney/tests/budget_test.py index 490c8862..bac56507 100644 --- a/ihatemoney/tests/budget_test.py +++ b/ihatemoney/tests/budget_test.py @@ -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 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 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 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 Add the first participant', resp.data.decode("utf-8"), )