Updated text and improved button contrast

This commit is contained in:
Edgar P. Burkhart 2022-12-19 11:42:48 +01:00
parent e6e7fa328a
commit b844947cfd
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
5 changed files with 29 additions and 35 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-19 11:17+0100\n"
"POT-Creation-Date: 2022-12-19 11:42+0100\n"
"PO-Revision-Date: 2022-05-30 19:00+0200\n"
"Last-Translator: edpibu <git@edgarpierre.fr>\n"
"Language-Team: edpibu <git@edgarpierre.fr>\n"
@ -17,79 +17,79 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: .\main\models.py:13 .\main\models.py:22 .\main\models.py:56
#: .\main\models.py:12 .\main\models.py:21 .\main\models.py:55
#: .\main\templates\main\tag\transaction_table.html:10
msgid "Category"
msgstr "Catégorie"
#: .\main\models.py:13 .\main\models.py:37 .\main\models.py:91
#: .\main\models.py:12 .\main\models.py:36 .\main\models.py:87
#: .\main\templates\main\tag\transaction_table.html:7
msgid "Name"
msgstr "Nom"
#: .\main\models.py:15
#: .\main\models.py:14
msgid "Icon"
msgstr "Icône"
#: .\main\models.py:23 .\main\templates\main\index.html:57
#: .\main\models.py:22 .\main\templates\main\index.html:57
#: .\main\templates\main\snapshot.html:33
msgid "Categories"
msgstr "Catégories"
#: .\main\models.py:37 .\main\models.py:67
#: .\main\models.py:36 .\main\models.py:63
msgid "Transaction"
msgstr "Transaction"
#: .\main\models.py:39 .\main\templates\main\tag\transaction_table.html:11
#: .\main\models.py:38 .\main\templates\main\tag\transaction_table.html:11
msgid "Description"
msgstr "Description"
#: .\main\models.py:41 .\main\models.py:125 .\main\templates\main\index.html:23
#: .\main\models.py:40 .\main\models.py:121 .\main\templates\main\index.html:23
#: .\main\templates\main\tag\transaction_table.html:8
msgid "Value"
msgstr "Valeur"
#: .\main\models.py:43 .\main\models.py:123 .\main\templates\main\index.html:22
#: .\main\models.py:42 .\main\models.py:119 .\main\templates\main\index.html:22
#: .\main\templates\main\tag\transaction_table.html:6
msgid "Date"
msgstr "Date"
#: .\main\models.py:44
#: .\main\models.py:43
msgid "Real date"
msgstr "Date réelle"
#: .\main\models.py:46 .\main\templates\main\tag\transaction_table.html:9
#: .\main\models.py:45 .\main\templates\main\tag\transaction_table.html:9
msgid "Trader"
msgstr "Commerçant"
#: .\main\models.py:49
#: .\main\models.py:48
msgid "Payment"
msgstr "Paiement"
#: .\main\models.py:68 .\main\templates\main\base.html:30
#: .\main\models.py:64 .\main\templates\main\base.html:30
#: .\main\templates\main\category.html:22 .\main\templates\main\index.html:14
#: .\main\templates\main\index.html:25 .\main\templates\main\snapshot.html:87
#: .\main\templates\main\transactions.html:13
msgid "Transactions"
msgstr "Transactions"
#: .\main\models.py:91 .\main\models.py:108
#: .\main\models.py:87 .\main\models.py:104
msgid "Invoice"
msgstr "Facture"
#: .\main\models.py:96
#: .\main\models.py:92
msgid "File"
msgstr "Fichier"
#: .\main\models.py:109 .\main\templates\main\transaction.html:23
#: .\main\models.py:105 .\main\templates\main\transaction.html:23
msgid "Invoices"
msgstr "Factures"
#: .\main\models.py:217
#: .\main\models.py:211
msgid "Snapshot"
msgstr "Relevé"
#: .\main\models.py:218 .\main\templates\main\index.html:19
#: .\main\models.py:212 .\main\templates\main\index.html:19
msgid "Snapshots"
msgstr "Relevés"

View file

@ -3,8 +3,7 @@ import uuid
from django.db import models
from django.forms import ModelForm
from django.core.validators import FileExtensionValidator
from django.utils.text import lazy
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext as _
class Category(models.Model):
@ -15,7 +14,7 @@ class Category(models.Model):
icon = models.CharField(max_length=64, default="folder", verbose_name=_("Icon"))
def __str__(self):
return str(self.name)
return self.name
class Meta:
ordering = ["name"]
@ -57,10 +56,7 @@ class Transaction(models.Model):
)
def __str__(self):
res = f"{self.date} {self.name}: {self.value}"
if self.category:
return f"{res} ({self.category})"
return res
return f"{self.date} {self.name}"
class Meta:
ordering = ["-date"]
@ -132,9 +128,7 @@ class Snapshot(models.Model):
)
def __str__(self):
if self.previous is None:
return f"Snapshot {self.date}: {self.value}"
return f"Snapshot {self.date}: {self.value}€ (Previous: {self.previous.date})"
return f"{_('Snapshot')} {self.date}"
def save(self, *args, only_super=False, **kwargs):
if not only_super:

View file

@ -21,6 +21,10 @@ form a {
padding: 0 var(--gap);
}
form input {
color: inherit;
}
form > label,
form > input[type="text"],
form > input[type="number"],
@ -66,11 +70,7 @@ form > .buttons > *:hover {
text-decoration: underline;
}
form > .buttons input[type="submit"] {
background: var(--green);
color: var(--text-inv);
}
form > .buttons input[type="reset"] {
color: var(--red);
background: var(--green-1);
}
form > .buttons a.del {
background: var(--red);

View file

@ -30,7 +30,7 @@
--green: var(--theme-0);
--red-1: var(--theme-4);
--green-1: var(--theme-1);
--green-1: var(--theme);
--border: .5em;
--radius: .25em;

View file

@ -4,7 +4,7 @@
{% translate "Delete" as del %}
<a
class="btn del"
onclick="return confirm('{{ del }} <{{ instance.name}}> ?')"
onclick="return confirm('{{ del }} <{{ instance}}> ?')"
href="{% url del_url instance.id %}">
{{ del }}
</a>