From 1fcb143667d570ddff06efc55d82f39634121e07 Mon Sep 17 00:00:00 2001 From: Adrien CLERC Date: Sat, 7 Sep 2019 00:25:36 +0200 Subject: [PATCH] Add more human "for who?" description. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The limit for displaying "Everyone but …" instead of the ower's list is completely empirical. --- ihatemoney/messages.pot | 7 +++++++ ihatemoney/templates/list_bills.html | 8 +++++++- .../translations/el/LC_MESSAGES/messages.po | 9 ++++++++- .../es_419/LC_MESSAGES/messages.po | 18 +++++++++++++----- .../translations/fr/LC_MESSAGES/messages.po | 17 ++++++++++++----- .../translations/nb_NO/LC_MESSAGES/messages.po | 9 ++++++++- .../translations/nl/LC_MESSAGES/messages.po | 9 ++++++++- .../translations/tr/LC_MESSAGES/messages.po | 9 ++++++++- .../zh_HANS-CN/LC_MESSAGES/messages.po | 9 ++++++++- 9 files changed, 79 insertions(+), 16 deletions(-) diff --git a/ihatemoney/messages.pot b/ihatemoney/messages.pot index ff5370f1..b88aa747 100644 --- a/ihatemoney/messages.pot +++ b/ihatemoney/messages.pot @@ -402,6 +402,13 @@ msgstr "" msgid "Added on %(date)s" msgstr "" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "" diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html index e42ec372..dddef4dc 100644 --- a/ihatemoney/templates/list_bills.html +++ b/ihatemoney/templates/list_bills.html @@ -123,7 +123,13 @@ {{ bill.payer }} {{ bill.what }} - {{ bill.owers|join(', ', 'name') }} + {% if bill.owers|length == g.project.members|length -%} + {{ _("Everyone") }} + {%- elif bill.owers|length > g.project.members|length / 2 + 1 -%} + {{ _("Everyone but %(excluded)s", excluded=g.project.members|reject('in', bill.owers)|join(', ', 'name')) }} + {%- else -%} + {{ bill.owers|join(', ', 'name') }} + {%- endif %} {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }}) {{ _('edit') }} diff --git a/ihatemoney/translations/el/LC_MESSAGES/messages.po b/ihatemoney/translations/el/LC_MESSAGES/messages.po index c57a43b5..dbdb3418 100644 --- a/ihatemoney/translations/el/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/el/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language: el\n" @@ -418,6 +418,13 @@ msgstr "" msgid "Added on %(date)s" msgstr "" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "" diff --git a/ihatemoney/translations/es_419/LC_MESSAGES/messages.po b/ihatemoney/translations/es_419/LC_MESSAGES/messages.po index 6e78f25f..91c0b9f6 100644 --- a/ihatemoney/translations/es_419/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/es_419/LC_MESSAGES/messages.po @@ -1,18 +1,18 @@ + msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-09-25 22:28+0000\n" "Last-Translator: Diego Caraballo \n" -"Language-Team: Spanish (Latin America) \n" "Language: es_419\n" +"Language-Team: Spanish (Latin America) " +"\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.9-dev\n" "Generated-By: Babel 2.7.0\n" msgid "" @@ -433,6 +433,13 @@ msgstr "¿Cuánto?" msgid "Added on %(date)s" msgstr "Agregado el %(date)s" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "Cada" @@ -525,3 +532,4 @@ msgstr "gastado" msgid "Balance" msgstr "Balance" + diff --git a/ihatemoney/translations/fr/LC_MESSAGES/messages.po b/ihatemoney/translations/fr/LC_MESSAGES/messages.po index 6f632236..b95e87d8 100644 --- a/ihatemoney/translations/fr/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/fr/LC_MESSAGES/messages.po @@ -7,17 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-09-18 21:34+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-09-24 15:13+0000\n" "Last-Translator: Alexis Metaireau \n" -"Language-Team: French \n" "Language: fr\n" +"Language-Team: French \n" +"Plural-Forms: nplurals=2; plural=n > 1\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 3.9-dev\n" "Generated-By: Babel 2.7.0\n" msgid "" @@ -434,6 +433,13 @@ msgstr "Combien ?" msgid "Added on %(date)s" msgstr "Ajouté le %(date)s" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "chacun" @@ -669,3 +675,4 @@ msgstr "Solde" #~ msgid "A link to reset your password has been sent to your email." #~ msgstr "Un lien pour changer votre mot de passe vous a été envoyé par mail." + diff --git a/ihatemoney/translations/nb_NO/LC_MESSAGES/messages.po b/ihatemoney/translations/nb_NO/LC_MESSAGES/messages.po index a6231ddf..dd6902c6 100644 --- a/ihatemoney/translations/nb_NO/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/nb_NO/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-09-19 23:27+0000\n" "Last-Translator: Allan Nordhøy \n" "Language: nb_NO\n" @@ -446,6 +446,13 @@ msgstr "Hvor meget?" msgid "Added on %(date)s" msgstr "Lagt til %(date)s" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "hver" diff --git a/ihatemoney/translations/nl/LC_MESSAGES/messages.po b/ihatemoney/translations/nl/LC_MESSAGES/messages.po index 0bef2f1a..412f3d7f 100644 --- a/ihatemoney/translations/nl/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/nl/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-09-19 23:27+0000\n" "Last-Translator: Heimen Stoffels \n" "Language: nl\n" @@ -427,6 +427,13 @@ msgstr "Hoeveel?" msgid "Added on %(date)s" msgstr "Toegevoegd op %(date)s" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "per persoon" diff --git a/ihatemoney/translations/tr/LC_MESSAGES/messages.po b/ihatemoney/translations/tr/LC_MESSAGES/messages.po index afb95280..976903e7 100644 --- a/ihatemoney/translations/tr/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/tr/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-08-07 13:24+0000\n" "Last-Translator: Mesut Akcan \n" "Language: tr\n" @@ -423,6 +423,13 @@ msgstr "" msgid "Added on %(date)s" msgstr "" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr "" diff --git a/ihatemoney/translations/zh_HANS-CN/LC_MESSAGES/messages.po b/ihatemoney/translations/zh_HANS-CN/LC_MESSAGES/messages.po index 45b5a8e9..5836868d 100644 --- a/ihatemoney/translations/zh_HANS-CN/LC_MESSAGES/messages.po +++ b/ihatemoney/translations/zh_HANS-CN/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-09-24 16:56+0200\n" +"POT-Creation-Date: 2019-09-30 23:53+0200\n" "PO-Revision-Date: 2019-07-02 00:02+0000\n" "Last-Translator: Elizabeth Sherrock \n" "Language: zh_HANS_CN\n" @@ -420,6 +420,13 @@ msgstr "多少?" msgid "Added on %(date)s" msgstr "" +msgid "Everyone" +msgstr "" + +#, python-format +msgid "Everyone but %(excluded)s" +msgstr "" + msgid "each" msgstr ""