diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index 26b72d0e..a55166e8 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -41,8 +41,8 @@ def strip_filter(string): def get_billform_for(project, set_default=True, **kwargs): """Return an instance of BillForm configured for a particular project. - :set_default: if set to True, on GET methods (usually when we want to - display the default form, it will call set_default on it. + :set_default: if set to True, it will call set_default on GET methods (usually + when we want to display the default form). """ form = BillForm(**kwargs) @@ -248,9 +248,8 @@ class DestructiveActionProjectForm(FlaskForm): - delete project itself - delete history - delete IP addresses in history - - possibly others in the future - It asks the user to enter the private code to confirm deletion. + It asks the participant to enter the private code to confirm deletion. """ password = PasswordField( @@ -388,7 +387,7 @@ class MemberForm(FlaskForm): def validate_name(form, field): if field.data == form.name.default: - raise ValidationError(_("User name incorrect")) + raise ValidationError(_("The participant name is invalid")) if ( not form.edit and Person.query.filter( @@ -397,7 +396,7 @@ class MemberForm(FlaskForm): Person.activated, ).all() ): # NOQA - raise ValidationError(_("This project already have this member")) + raise ValidationError(_("This project already have this participant")) def save(self, project, person): # if the user is already bound to the project, just reactivate him diff --git a/ihatemoney/messages.pot b/ihatemoney/messages.pot index 1a5e8597..c08d3703 100644 --- a/ihatemoney/messages.pot +++ b/ihatemoney/messages.pot @@ -144,10 +144,10 @@ msgstr "" msgid "Add" msgstr "" -msgid "User name incorrect" +msgid "The participant name is invalid" msgstr "" -msgid "This project already have this member" +msgid "This project already have this participant" msgstr "" msgid "People to notify" @@ -268,28 +268,28 @@ msgstr "" msgid "%(member)s has been added" msgstr "" -msgid "Error activating member" +msgid "Error activating participant" msgstr "" #, python-format msgid "%(name)s is part of this project again" msgstr "" -msgid "Error removing member" +msgid "Error removing participant" msgstr "" #, python-format msgid "" -"User '%(name)s' has been deactivated. It will still appear in the users " -"list until its balance becomes zero." +"Participant '%(name)s' has been deactivated. It will still appear in the " +"list until its balance reach zero." msgstr "" #, python-format -msgid "User '%(name)s' has been removed" +msgid "Participant '%(name)s' has been removed" msgstr "" #, python-format -msgid "User '%(name)s' has been edited" +msgid "Participant '%(name)s' has been modified" msgstr "" msgid "The bill has been added" @@ -328,6 +328,9 @@ msgstr "" msgid "Administration tasks are currently disabled." msgstr "" +msgid "Authentication" +msgstr "" + msgid "The project you are trying to access do not exist, do you want to" msgstr "" @@ -343,7 +346,7 @@ msgstr "" msgid "Project" msgstr "" -msgid "Number of members" +msgid "Number of participants" msgstr "" msgid "Number of bills" @@ -439,7 +442,7 @@ msgstr "" msgid "Add participant" msgstr "" -msgid "Edit this member" +msgid "Edit this participant" msgstr "" msgid "john.doe@example.com, mary.moe@site.com" diff --git a/ihatemoney/models.py b/ihatemoney/models.py index f4137d65..473e7c0b 100644 --- a/ihatemoney/models.py +++ b/ihatemoney/models.py @@ -133,9 +133,9 @@ class Project(db.Model): @property def members_stats(self): - """Compute what each member has paid + """Compute what each participant has paid - :return: one stat dict per member + :return: one stat dict per participant :rtype list: """ balance, spent, paid = self.full_balance @@ -493,7 +493,7 @@ class Person(db.Model): } def has_bills(self): - """return if the user do have bills or not""" + """return if the participant do have bills or not""" bills_as_ower_number = ( db.session.query(billowers) .filter(billowers.columns.get("person_id") == self.id) diff --git a/ihatemoney/templates/authenticate.html b/ihatemoney/templates/authenticate.html index 4e8eb779..fcc617fa 100644 --- a/ihatemoney/templates/authenticate.html +++ b/ihatemoney/templates/authenticate.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block content %} -

Authentication

+

{{ _("Authentication") }}

{% if create_project %}

{{ _("The project you are trying to access do not exist, do you want to") }} diff --git a/ihatemoney/templates/dashboard.html b/ihatemoney/templates/dashboard.html index 3e26441a..6036de98 100644 --- a/ihatemoney/templates/dashboard.html +++ b/ihatemoney/templates/dashboard.html @@ -2,7 +2,7 @@ {% block content %} {% if is_admin_dashboard_activated %} - + {% for project in projects|sort(attribute='name') %} diff --git a/ihatemoney/templates/debug.html b/ihatemoney/templates/debug.html deleted file mode 100644 index 6f976676..00000000 --- a/ihatemoney/templates/debug.html +++ /dev/null @@ -1 +0,0 @@ -Yeah diff --git a/ihatemoney/templates/download_mobile_app.html b/ihatemoney/templates/download_mobile_app.html index b343c71f..8cc15ed6 100644 --- a/ihatemoney/templates/download_mobile_app.html +++ b/ihatemoney/templates/download_mobile_app.html @@ -9,12 +9,12 @@

{{_("Download Mobile Application")}}

-

{{_("Get it on")}}

+

{{_("Get it on")}}

- + diff --git a/ihatemoney/templates/forms.html b/ihatemoney/templates/forms.html index 2de11ec5..e6662b76 100644 --- a/ihatemoney/templates/forms.html +++ b/ihatemoney/templates/forms.html @@ -203,7 +203,7 @@ {% macro edit_member(form, title=True) %}
- {% if title %}{{ _("Edit this member") }}{% endif %} + {% if title %}{{ _("Edit this participant") }}{% endif %} {% include "display_errors.html" %} {{ form.hidden_tag() }} {{ input(form.name) }} diff --git a/ihatemoney/templates/reminder_mail.en.j2 b/ihatemoney/templates/reminder_mail.en.j2 index 8784d2a1..1552c37b 100644 --- a/ihatemoney/templates/reminder_mail.en.j2 +++ b/ihatemoney/templates/reminder_mail.en.j2 @@ -7,4 +7,3 @@ If you want to share this project with your friends, you can share the identifie {{ url_for(".invite", _external=True) }} Enjoy, -Some weird guys (with beards) diff --git a/ihatemoney/tests/api_test.py b/ihatemoney/tests/api_test.py index 6d241bd1..1365fa02 100644 --- a/ihatemoney/tests/api_test.py +++ b/ihatemoney/tests/api_test.py @@ -232,7 +232,7 @@ class APITestCase(IhatemoneyTestCase): # create a project self.api_create("raclette") - # get the list of members (should be empty) + # get the list of participants (should be empty) req = self.client.get( "/api/projects/raclette/members", headers=self.get_auth("raclette") ) @@ -251,7 +251,7 @@ class APITestCase(IhatemoneyTestCase): self.assertStatus(201, req) self.assertEqual("1\n", req.data.decode("utf-8")) - # the list of members should contain one member + # the list of participants should contain one member req = self.client.get( "/api/projects/raclette/members", headers=self.get_auth("raclette") ) @@ -267,7 +267,7 @@ class APITestCase(IhatemoneyTestCase): ) self.assertStatus(400, req) - # edit the member + # edit the participant req = self.client.put( "/api/projects/raclette/members/1", data={"name": "Fred", "weight": 2}, @@ -295,7 +295,7 @@ class APITestCase(IhatemoneyTestCase): self.assertStatus(200, req) - # de-activate the user + # de-activate the participant req = self.client.put( "/api/projects/raclette/members/1", data={"name": "Fred", "activated": False}, @@ -309,7 +309,7 @@ class APITestCase(IhatemoneyTestCase): self.assertStatus(200, req) self.assertEqual(False, json.loads(req.data.decode("utf-8"))["activated"]) - # re-activate the user + # re-activate the participant req = self.client.put( "/api/projects/raclette/members/1", data={"name": "Fred", "activated": True}, @@ -330,7 +330,7 @@ class APITestCase(IhatemoneyTestCase): self.assertStatus(200, req) - # the list of members should be empty + # the list of participants should be empty req = self.client.get( "/api/projects/raclette/members", headers=self.get_auth("raclette") ) @@ -342,7 +342,7 @@ class APITestCase(IhatemoneyTestCase): # create a project self.api_create("raclette") - # add members + # add participants self.api_add_member("raclette", "zorglub") self.api_add_member("raclette", "fred") self.api_add_member("raclette", "quentin") @@ -490,7 +490,7 @@ class APITestCase(IhatemoneyTestCase): # create a project self.api_create("raclette") - # add members + # add participants self.api_add_member("raclette", "zorglub") self.api_add_member("raclette", "fred") @@ -597,7 +597,7 @@ class APITestCase(IhatemoneyTestCase): decoded_resp = json.loads(resp.data.decode("utf-8")) self.assertDictEqual(decoded_resp, expected) - # Add members + # Add participants self.api_add_member("raclette", "zorglub") self.api_add_member("raclette", "fred") self.api_add_member("raclette", "quentin") @@ -730,7 +730,7 @@ class APITestCase(IhatemoneyTestCase): # create a project self.api_create("raclette") - # add members + # add participants self.api_add_member("raclette", "zorglub") self.api_add_member("raclette", "fred") @@ -786,7 +786,7 @@ class APITestCase(IhatemoneyTestCase): self.post_project("raclette") self.login("raclette") - # add members + # add participants self.api_add_member("raclette", "
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}}
{{ _("Project") }}{{ _("Number of participants") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills_unordered().count() }}