diff --git a/nummi/main/locale/fr/LC_MESSAGES/django.mo b/nummi/main/locale/fr/LC_MESSAGES/django.mo index 5321cee..f856459 100644 Binary files a/nummi/main/locale/fr/LC_MESSAGES/django.mo and b/nummi/main/locale/fr/LC_MESSAGES/django.mo differ diff --git a/nummi/main/locale/fr/LC_MESSAGES/django.po b/nummi/main/locale/fr/LC_MESSAGES/django.po index 2c29bb8..7ff0ccd 100644 --- a/nummi/main/locale/fr/LC_MESSAGES/django.po +++ b/nummi/main/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-20 15:28+0100\n" +"POT-Creation-Date: 2022-12-21 09:08+0100\n" "PO-Revision-Date: 2022-05-30 19:00+0200\n" "Last-Translator: edpibu \n" "Language-Team: edpibu \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: .\models.py:12 .\models.py:22 .\models.py:56 +#: .\models.py:12 .\models.py:22 .\models.py:56 .\templates\main\base.html:35 #: .\templates\main\tag\transaction_table.html:10 msgid "Category" msgstr "Catégorie" @@ -35,12 +35,12 @@ msgstr "Icône" msgid "Budget" msgstr "Budget" -#: .\models.py:23 .\templates\main\index.html:57 +#: .\models.py:23 .\templates\main\index.html:19 #: .\templates\main\snapshot.html:33 msgid "Categories" msgstr "Catégories" -#: .\models.py:37 .\models.py:64 +#: .\models.py:37 .\models.py:64 .\templates\main\base.html:30 msgid "Transaction" msgstr "Transaction" @@ -48,12 +48,12 @@ msgstr "Transaction" msgid "Description" msgstr "Description" -#: .\models.py:41 .\models.py:122 .\templates\main\index.html:23 +#: .\models.py:41 .\models.py:122 .\templates\main\index.html:32 #: .\templates\main\tag\transaction_table.html:8 msgid "Value" msgstr "Valeur" -#: .\models.py:43 .\models.py:120 .\templates\main\index.html:22 +#: .\models.py:43 .\models.py:120 .\templates\main\index.html:31 #: .\templates\main\tag\transaction_table.html:6 msgid "Date" msgstr "Date" @@ -70,10 +70,9 @@ msgstr "Commerçant" msgid "Payment" msgstr "Paiement" -#: .\models.py:65 .\templates\main\base.html:30 -#: .\templates\main\category.html:22 .\templates\main\index.html:14 -#: .\templates\main\index.html:25 .\templates\main\snapshot.html:87 -#: .\templates\main\transactions.html:13 +#: .\models.py:65 .\templates\main\category.html:24 +#: .\templates\main\index.html:14 .\templates\main\index.html:34 +#: .\templates\main\snapshot.html:87 .\templates\main\transactions.html:13 msgid "Transactions" msgstr "Transactions" @@ -89,31 +88,19 @@ msgstr "Fichier" msgid "Invoices" msgstr "Factures" -#: .\models.py:230 +#: .\models.py:230 .\templates\main\base.html:40 msgid "Snapshot" msgstr "Relevé" -#: .\models.py:231 .\templates\main\index.html:19 +#: .\models.py:231 .\templates\main\index.html:28 msgid "Snapshots" msgstr "Relevés" -#: .\templates\main\base.html:35 -msgid "New transaction" -msgstr "Nouvelle transaction" - -#: .\templates\main\base.html:40 -msgid "New category" -msgstr "Nouvelle catégorie" - -#: .\templates\main\base.html:45 -msgid "New snapshot" -msgstr "Nouveau relevé" - -#: .\templates\main\index.html:24 +#: .\templates\main\index.html:33 msgid "Difference" msgstr "Différence" -#: .\templates\main\index.html:26 +#: .\templates\main\index.html:35 msgid "Valid" msgstr "Valide" diff --git a/nummi/main/templates/main/base.html b/nummi/main/templates/main/base.html index 965eab2..5b71a72 100644 --- a/nummi/main/templates/main/base.html +++ b/nummi/main/templates/main/base.html @@ -24,25 +24,20 @@ accesskey="h"> Nummi - - {% translate "Transactions" %} - - {% translate "New transaction" %} + {% translate "Transaction" %} - {% translate "New category" %} + {% translate "Category" %} - {% translate "New snapshot" %} + {% translate "Snapshot" %} +{% if transactions %} Graph representing value over time -{% if transactions %}

{% translate "Transactions" %}

{% transaction_table transactions %} {% endif %} diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html index 2aecd7e..4c4f126 100644 --- a/nummi/main/templates/main/index.html +++ b/nummi/main/templates/main/index.html @@ -11,10 +11,19 @@ {% block body %} {% if transactions %} -

{% translate "Transactions" %}

+

{% translate "Transactions" %}

{% transaction_table transactions %} {% endif %} +{% if categories %} +

{% translate "Categories" %}

+
+ {% for cat in categories %} + {{ cat }} + {% endfor %} +
+{% endif %} + {% if snapshots %}

{% translate "Snapshots" %}

@@ -53,13 +62,4 @@
{% endif %} -{% if categories %} -

{% translate "Categories" %}

-
- {% for cat in categories %} - {{ cat }} - {% endfor %} -
-{% endif %} - {% endblock %} diff --git a/nummi/main/views.py b/nummi/main/views.py index e4fe9c2..a98d658 100644 --- a/nummi/main/views.py +++ b/nummi/main/views.py @@ -23,7 +23,7 @@ from .models import ( def index(request): _transactions = Transaction.objects.all()[:10] _categories = Category.objects.all() - _snapshots = Snapshot.objects.all()[:5] + _snapshots = Snapshot.objects.all() context = { "transactions": _transactions, @@ -43,7 +43,7 @@ class LogoutView(auth_views.LogoutView): class TransactionListView(LoginRequiredMixin, ListView): - paginate_by = 20 + paginate_by = 64 model = Transaction template_name = "main/transactions.html" context_object_name = "transactions"