Skip to content

Commit

Permalink
Fix translations (spiral-project#575)
Browse files Browse the repository at this point in the history
* Fix user-facing string and update translation catalog

In the flash message confirming member creation, change "member had been
added" into the correct form "member has been added".

No translation has been changed.  Some translators seem to have already
spotted the mistake while translating, but I can't tell for all languages.

* Change "Person" to "Participant" in history view

Currently, the main user-facing term is "Participant", as seen for
instance in the "Add participant" form.  "Person" is not used anywhere in
the interface.

See spiral-project#302 for a more general discussion on choosing the right terminology.

* Fix obsolete translations.

Co-authored-by: Baptiste Jonglez <[email protected]>
Co-authored-by: Rémy HUBSCHER <[email protected]>
  • Loading branch information
3 people authored Apr 25, 2020
1 parent 2733547 commit 0e0efeb
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 702 deletions.
2 changes: 1 addition & 1 deletion ihatemoney/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_history(project, human_readable_names=True):
for version_list in [person_query.all(), project_query.all(), bill_query.all()]:
for version in version_list:
object_type = {
"Person": _("Person"),
"Person": _("Participant"),
"Bill": _("Bill"),
"Project": _("Project"),
}[parent_class(type(version)).__name__]
Expand Down
4 changes: 2 additions & 2 deletions ihatemoney/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ msgstr ""
msgid "The email %(email)s is not valid"
msgstr ""

msgid "Person"
msgid "Participant"
msgstr ""

msgid "Bill"
Expand Down Expand Up @@ -177,7 +177,7 @@ msgid "Your invitations have been sent"
msgstr ""

#, python-format
msgid "%(member)s had been added"
msgid "%(member)s has been added"
msgstr ""

#, python-format
Expand Down
14 changes: 8 additions & 6 deletions ihatemoney/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ def test_log_created_from_api_call(self):
resp = self.client.get("/raclette/history", follow_redirects=True)
self.assertEqual(resp.status_code, 200)
self.assertIn(
f"Person {em_surround('alexis')} added", resp.data.decode("utf-8")
f"Participant {em_surround('alexis')} added", resp.data.decode("utf-8")
)
self.assertIn(
f"Project {em_surround('raclette')} added", resp.data.decode("utf-8"),
Expand Down Expand Up @@ -2578,7 +2578,7 @@ def test_logs_for_common_actions(self):
resp = self.client.get("/demo/history")
self.assertEqual(resp.status_code, 200)
self.assertIn(
f"Person {em_surround('alexis')} added", resp.data.decode("utf-8")
f"Participant {em_surround('alexis')} added", resp.data.decode("utf-8")
)

# create a bill
Expand Down Expand Up @@ -2666,20 +2666,22 @@ def test_logs_for_common_actions(self):
self.assertEqual(resp.status_code, 200)
self.assertRegex(
resp.data.decode("utf-8"),
r"Person %s:\s* Weight changed\s* from %s\s* to %s"
r"Participant %s:\s* Weight changed\s* from %s\s* to %s"
% (
em_surround("alexis", regex_escape=True),
em_surround("1.0", regex_escape=True),
em_surround("2.0", regex_escape=True),
),
)
self.assertIn(
"Person %s renamed to %s"
"Participant %s renamed to %s"
% (em_surround("alexis"), em_surround("new name"),),
resp.data.decode("utf-8"),
)
self.assertLess(
resp.data.decode("utf-8").index(f"Person {em_surround('alexis')} renamed"),
resp.data.decode("utf-8").index(
f"Participant {em_surround('alexis')} renamed"
),
resp.data.decode("utf-8").index("Weight changed"),
)

Expand All @@ -2690,7 +2692,7 @@ def test_logs_for_common_actions(self):
resp = self.client.get("/demo/history")
self.assertEqual(resp.status_code, 200)
self.assertIn(
f"Person {em_surround('new name')} removed", resp.data.decode("utf-8")
f"Participant {em_surround('new name')} removed", resp.data.decode("utf-8")
)

def test_double_bill_double_person_edit_second(self):
Expand Down
9 changes: 4 additions & 5 deletions ihatemoney/translations/cs/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-21 14:18+0200\n"
"POT-Creation-Date: 2020-04-24 19:59+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language: cs\n"
Expand All @@ -12,7 +12,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
"Generated-By: Babel 2.8.0\n"

msgid ""
"Not a valid amount or expression. Only numbers and + - * / operators are "
Expand Down Expand Up @@ -134,7 +134,7 @@ msgstr ""
msgid "The email %(email)s is not valid"
msgstr ""

msgid "Person"
msgid "Participant"
msgstr ""

msgid "Bill"
Expand Down Expand Up @@ -193,7 +193,7 @@ msgid "Your invitations have been sent"
msgstr ""

#, python-format
msgid "%(member)s had been added"
msgid "%(member)s has been added"
msgstr ""

#, python-format
Expand Down Expand Up @@ -738,4 +738,3 @@ msgstr ""

msgid "Period"
msgstr ""

11 changes: 5 additions & 6 deletions ihatemoney/translations/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-21 14:18+0200\n"
"POT-Creation-Date: 2020-04-24 19:59+0200\n"
"PO-Revision-Date: 2020-02-12 10:50+0000\n"
"Last-Translator: flolilo <[email protected]>\n"
"Language: de\n"
Expand All @@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
"Generated-By: Babel 2.8.0\n"

msgid ""
"Not a valid amount or expression. Only numbers and + - * / operators are "
Expand Down Expand Up @@ -139,7 +139,7 @@ msgstr "Einladung senden"
msgid "The email %(email)s is not valid"
msgstr "Die E-Mail-Adresse(n) %(email)s ist/sind nicht gültig"

msgid "Person"
msgid "Participant"
msgstr ""

msgid "Bill"
Expand Down Expand Up @@ -202,8 +202,8 @@ msgid "Your invitations have been sent"
msgstr "Deine Einladungen wurden versendet"

#, python-format
msgid "%(member)s had been added"
msgstr "%(member)s wurde(n) hinzugefügt"
msgid "%(member)s has been added"
msgstr ""

#, python-format
msgid "%(name)s is part of this project again"
Expand Down Expand Up @@ -760,4 +760,3 @@ msgstr ""

msgid "Period"
msgstr ""

91 changes: 4 additions & 87 deletions ihatemoney/translations/el/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-21 14:18+0200\n"
"POT-Creation-Date: 2020-04-24 19:59+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language: el\n"
Expand All @@ -12,7 +12,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
"Generated-By: Babel 2.8.0\n"

msgid ""
"Not a valid amount or expression. Only numbers and + - * / operators are "
Expand Down Expand Up @@ -134,7 +134,7 @@ msgstr ""
msgid "The email %(email)s is not valid"
msgstr ""

msgid "Person"
msgid "Participant"
msgstr ""

msgid "Bill"
Expand Down Expand Up @@ -193,7 +193,7 @@ msgid "Your invitations have been sent"
msgstr ""

#, python-format
msgid "%(member)s had been added"
msgid "%(member)s has been added"
msgstr ""

#, python-format
Expand Down Expand Up @@ -738,86 +738,3 @@ msgstr ""

msgid "Period"
msgstr ""

#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""

#~ msgid "What do you want to download ?"
#~ msgstr ""

#~ msgid "bills"
#~ msgstr ""

#~ msgid "transactions"
#~ msgstr ""

#~ msgid "Export file format"
#~ msgstr ""

#~ msgid "Edit this project"
#~ msgstr ""

#~ msgid "Download this project's data"
#~ msgstr ""

#~ msgid "Type user name here"
#~ msgstr ""

#~ msgid "No, thanks"
#~ msgstr ""

#~ msgid "Manage your shared <br>expenses, easily"
#~ msgstr ""

#~ msgid "Log to an existing project"
#~ msgstr ""

#~ msgid "log in"
#~ msgstr ""

#~ msgid "or create a new one"
#~ msgstr ""

#~ msgid "let's get started"
#~ msgstr ""

#~ msgid "options"
#~ msgstr ""

#~ msgid "Project settings"
#~ msgstr ""

#~ msgid "This is a free software"
#~ msgstr ""

#~ msgid "Invite people to join this project!"
#~ msgstr ""

#~ msgid "Added on"
#~ msgstr ""

#~ msgid "Nothing to list yet. You probably want to"
#~ msgstr ""

#~ msgid ""
#~ "Specify a (comma separated) list of "
#~ "email adresses you want to notify "
#~ "about the\n"
#~ "creation of this budget management "
#~ "project and we will send them an"
#~ " email for you."
#~ msgstr ""

#~ msgid ""
#~ "If you prefer, you can share the project identifier and the shared\n"
#~ "password by other communication means. "
#~ "Or even directly share the following "
#~ "link:"
#~ msgstr ""

#~ msgid "A link to reset your password has been sent to your email."
#~ msgstr ""

11 changes: 5 additions & 6 deletions ihatemoney/translations/es_419/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-21 14:18+0200\n"
"POT-Creation-Date: 2020-04-24 19:59+0200\n"
"PO-Revision-Date: 2019-09-25 22:28+0000\n"
"Last-Translator: Diego Caraballo <[email protected]>\n"
"Language: es_419\n"
Expand All @@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
"Generated-By: Babel 2.8.0\n"

msgid ""
"Not a valid amount or expression. Only numbers and + - * / operators are "
Expand Down Expand Up @@ -139,7 +139,7 @@ msgstr "Enviar invitaciones"
msgid "The email %(email)s is not valid"
msgstr "El correo electrónico %(email)s no es válido"

msgid "Person"
msgid "Participant"
msgstr ""

msgid "Bill"
Expand Down Expand Up @@ -202,8 +202,8 @@ msgid "Your invitations have been sent"
msgstr "Sus invitaciones han sido enviadas"

#, python-format
msgid "%(member)s had been added"
msgstr "se han añadido %(member)s"
msgid "%(member)s has been added"
msgstr ""

#, python-format
msgid "%(name)s is part of this project again"
Expand Down Expand Up @@ -763,4 +763,3 @@ msgstr ""

msgid "Period"
msgstr ""

Loading

0 comments on commit 0e0efeb

Please sign in to comment.