Updated translations
This commit is contained in:
parent
edf6ae0584
commit
e6e7fa328a
7 changed files with 162 additions and 102 deletions
Binary file not shown.
|
@ -3,12 +3,11 @@
|
||||||
# This file is distributed under the same license as the nummi package.
|
# This file is distributed under the same license as the nummi package.
|
||||||
# edpibu <git@edgarpierre.fr>, 2022.
|
# edpibu <git@edgarpierre.fr>, 2022.
|
||||||
#
|
#
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.0.1\n"
|
"Project-Id-Version: 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-05-30 19:19+0200\n"
|
"POT-Creation-Date: 2022-12-19 11:17+0100\n"
|
||||||
"PO-Revision-Date: 2022-05-30 19:00+0200\n"
|
"PO-Revision-Date: 2022-05-30 19:00+0200\n"
|
||||||
"Last-Translator: edpibu <git@edgarpierre.fr>\n"
|
"Last-Translator: edpibu <git@edgarpierre.fr>\n"
|
||||||
"Language-Team: edpibu <git@edgarpierre.fr>\n"
|
"Language-Team: edpibu <git@edgarpierre.fr>\n"
|
||||||
|
@ -18,89 +17,119 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
#: main/templates/main/base.html:30 main/templates/main/category.html:22
|
#: .\main\models.py:13 .\main\models.py:22 .\main\models.py:56
|
||||||
#: main/templates/main/index.html:16 main/templates/main/index.html:27
|
#: .\main\templates\main\tag\transaction_table.html:10
|
||||||
#: main/templates/main/snapshot.html:87
|
|
||||||
#: main/templates/main/transactions.html:13
|
|
||||||
msgid "Transactions"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: main/templates/main/base.html:35
|
|
||||||
msgid "Add transaction"
|
|
||||||
msgstr "Nouvelle transaction"
|
|
||||||
|
|
||||||
#: main/templates/main/base.html:40
|
|
||||||
msgid "Add category"
|
|
||||||
msgstr "Nouvelle catégorie"
|
|
||||||
|
|
||||||
#: main/templates/main/base.html:45
|
|
||||||
msgid "Add snapshot"
|
|
||||||
msgstr "Nouveau relevé"
|
|
||||||
|
|
||||||
#: main/templates/main/base.html:50
|
|
||||||
msgid "Log Out"
|
|
||||||
msgstr "Se déconnecter"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:21
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Add snapshot"
|
|
||||||
msgid "Snapshots"
|
|
||||||
msgstr "Nouveau relevé"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:24
|
|
||||||
#: main/templates/main/tag/transaction_table.html:6
|
|
||||||
msgid "Date"
|
|
||||||
msgstr "Date"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:25
|
|
||||||
#: main/templates/main/tag/transaction_table.html:8
|
|
||||||
msgid "Value"
|
|
||||||
msgstr "Valeur"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:26
|
|
||||||
msgid "Difference"
|
|
||||||
msgstr "Différence"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:28
|
|
||||||
msgid "Valid"
|
|
||||||
msgstr "Valide"
|
|
||||||
|
|
||||||
#: main/templates/main/index.html:59 main/templates/main/snapshot.html:33
|
|
||||||
msgid "Categories"
|
|
||||||
msgstr "Catégories"
|
|
||||||
|
|
||||||
#: main/templates/main/login.html:12
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Log Out"
|
|
||||||
msgid "Log In"
|
|
||||||
msgstr "Se connecter"
|
|
||||||
|
|
||||||
#: main/templates/main/tag/form_buttons.html:6
|
|
||||||
msgid "Delete"
|
|
||||||
msgstr "Supprimer"
|
|
||||||
|
|
||||||
#: main/templates/main/tag/form_buttons.html:13
|
|
||||||
msgid "Save"
|
|
||||||
msgstr "Enregistrer"
|
|
||||||
|
|
||||||
#: main/templates/main/tag/transaction_table.html:7
|
|
||||||
msgid "Name"
|
|
||||||
msgstr "Nom"
|
|
||||||
|
|
||||||
#: main/templates/main/tag/transaction_table.html:9
|
|
||||||
msgid "Trader"
|
|
||||||
msgstr "Commerçant"
|
|
||||||
|
|
||||||
#: main/templates/main/tag/transaction_table.html:10
|
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Add category"
|
|
||||||
msgid "Category"
|
msgid "Category"
|
||||||
msgstr "Catégorie"
|
msgstr "Catégorie"
|
||||||
|
|
||||||
#: main/templates/main/tag/transaction_table.html:11
|
#: .\main\models.py:13 .\main\models.py:37 .\main\models.py:91
|
||||||
|
#: .\main\templates\main\tag\transaction_table.html:7
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nom"
|
||||||
|
|
||||||
|
#: .\main\models.py:15
|
||||||
|
msgid "Icon"
|
||||||
|
msgstr "Icône"
|
||||||
|
|
||||||
|
#: .\main\models.py:23 .\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
|
||||||
|
msgid "Transaction"
|
||||||
|
msgstr "Transaction"
|
||||||
|
|
||||||
|
#: .\main\models.py:39 .\main\templates\main\tag\transaction_table.html:11
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Description"
|
msgstr "Description"
|
||||||
|
|
||||||
#: main/templates/main/transaction.html:23
|
#: .\main\models.py:41 .\main\models.py:125 .\main\templates\main\index.html:23
|
||||||
msgid "Invoices"
|
#: .\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\templates\main\tag\transaction_table.html:6
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "Date"
|
||||||
|
|
||||||
|
#: .\main\models.py:44
|
||||||
|
msgid "Real date"
|
||||||
|
msgstr "Date réelle"
|
||||||
|
|
||||||
|
#: .\main\models.py:46 .\main\templates\main\tag\transaction_table.html:9
|
||||||
|
msgid "Trader"
|
||||||
|
msgstr "Commerçant"
|
||||||
|
|
||||||
|
#: .\main\models.py:49
|
||||||
|
msgid "Payment"
|
||||||
|
msgstr "Paiement"
|
||||||
|
|
||||||
|
#: .\main\models.py:68 .\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
|
||||||
|
msgid "Invoice"
|
||||||
msgstr "Facture"
|
msgstr "Facture"
|
||||||
|
|
||||||
|
#: .\main\models.py:96
|
||||||
|
msgid "File"
|
||||||
|
msgstr "Fichier"
|
||||||
|
|
||||||
|
#: .\main\models.py:109 .\main\templates\main\transaction.html:23
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr "Factures"
|
||||||
|
|
||||||
|
#: .\main\models.py:217
|
||||||
|
msgid "Snapshot"
|
||||||
|
msgstr "Relevé"
|
||||||
|
|
||||||
|
#: .\main\models.py:218 .\main\templates\main\index.html:19
|
||||||
|
msgid "Snapshots"
|
||||||
|
msgstr "Relevés"
|
||||||
|
|
||||||
|
#: .\main\templates\main\base.html:35
|
||||||
|
msgid "New transaction"
|
||||||
|
msgstr "Nouvelle transaction"
|
||||||
|
|
||||||
|
#: .\main\templates\main\base.html:40
|
||||||
|
msgid "New category"
|
||||||
|
msgstr "Nouvelle catégorie"
|
||||||
|
|
||||||
|
#: .\main\templates\main\base.html:45
|
||||||
|
msgid "New snapshot"
|
||||||
|
msgstr "Nouveau relevé"
|
||||||
|
|
||||||
|
#: .\main\templates\main\index.html:24
|
||||||
|
msgid "Difference"
|
||||||
|
msgstr "Différence"
|
||||||
|
|
||||||
|
#: .\main\templates\main\index.html:26
|
||||||
|
msgid "Valid"
|
||||||
|
msgstr "Valide"
|
||||||
|
|
||||||
|
#: .\main\templates\main\login.html:12 .\main\templates\main\login.html:24
|
||||||
|
msgid "Log In"
|
||||||
|
msgstr "Se connecter"
|
||||||
|
|
||||||
|
#: .\main\templates\main\tag\form_buttons.html:4
|
||||||
|
#: .\main\templates\main\transaction.html:29
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Supprimer"
|
||||||
|
|
||||||
|
#: .\main\templates\main\tag\form_buttons.html:14
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Enregistrer"
|
||||||
|
|
||||||
|
#: .\main\templates\main\transaction.html:36
|
||||||
|
msgid "Add invoice"
|
||||||
|
msgstr "Ajouter une facture"
|
||||||
|
|
||||||
|
#: .\main\templates\main\transaction.html:41
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Ajouter"
|
||||||
|
|
|
@ -3,18 +3,24 @@ import uuid
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.forms import ModelForm
|
from django.forms import ModelForm
|
||||||
from django.core.validators import FileExtensionValidator
|
from django.core.validators import FileExtensionValidator
|
||||||
|
from django.utils.text import lazy
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class Category(models.Model):
|
class Category(models.Model):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
name = models.CharField(max_length=64, default="New Category")
|
name = models.CharField(
|
||||||
icon = models.CharField(max_length=64, default="folder")
|
max_length=64, default=_("Category"), verbose_name=_("Name")
|
||||||
|
)
|
||||||
|
icon = models.CharField(max_length=64, default="folder", verbose_name=_("Icon"))
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return str(self.name)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["name"]
|
ordering = ["name"]
|
||||||
|
verbose_name = _("Category")
|
||||||
|
verbose_name_plural = _("Categories")
|
||||||
|
|
||||||
|
|
||||||
class CategoryForm(ModelForm):
|
class CategoryForm(ModelForm):
|
||||||
|
@ -27,15 +33,27 @@ class CategoryForm(ModelForm):
|
||||||
|
|
||||||
class Transaction(models.Model):
|
class Transaction(models.Model):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
name = models.CharField(max_length=256, default="New Transaction")
|
name = models.CharField(
|
||||||
description = models.TextField(null=True, blank=True)
|
max_length=256, default=_("Transaction"), verbose_name=_("Name")
|
||||||
value = models.DecimalField(max_digits=12, decimal_places=2, default=0)
|
)
|
||||||
date = models.DateField(default=date.today)
|
description = models.TextField(null=True, blank=True, verbose_name=_("Description"))
|
||||||
real_date = models.DateField(blank=True, null=True)
|
value = models.DecimalField(
|
||||||
trader = models.CharField(max_length=128, blank=True, null=True)
|
max_digits=12, decimal_places=2, default=0, verbose_name=_("Value")
|
||||||
payment = models.CharField(max_length=128, blank=True, null=True)
|
)
|
||||||
|
date = models.DateField(default=date.today, verbose_name=_("Date"))
|
||||||
|
real_date = models.DateField(blank=True, null=True, verbose_name=_("Real date"))
|
||||||
|
trader = models.CharField(
|
||||||
|
max_length=128, blank=True, null=True, verbose_name=_("Trader")
|
||||||
|
)
|
||||||
|
payment = models.CharField(
|
||||||
|
max_length=128, blank=True, null=True, verbose_name=_("Payment")
|
||||||
|
)
|
||||||
category = models.ForeignKey(
|
category = models.ForeignKey(
|
||||||
Category, on_delete=models.SET_NULL, blank=True, null=True
|
Category,
|
||||||
|
on_delete=models.SET_NULL,
|
||||||
|
blank=True,
|
||||||
|
null=True,
|
||||||
|
verbose_name=_("Category"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -46,6 +64,8 @@ class Transaction(models.Model):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["-date"]
|
ordering = ["-date"]
|
||||||
|
verbose_name = _("Transaction")
|
||||||
|
verbose_name_plural = _("Transactions")
|
||||||
|
|
||||||
|
|
||||||
class TransactionForm(ModelForm):
|
class TransactionForm(ModelForm):
|
||||||
|
@ -67,9 +87,13 @@ class TransactionForm(ModelForm):
|
||||||
|
|
||||||
class Invoice(models.Model):
|
class Invoice(models.Model):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
name = models.CharField(max_length=256, default="New Invoice")
|
name = models.CharField(
|
||||||
|
max_length=256, default=_("Invoice"), verbose_name=_("Name")
|
||||||
|
)
|
||||||
file = models.FileField(
|
file = models.FileField(
|
||||||
upload_to="invoices/", validators=[FileExtensionValidator(["pdf"])]
|
upload_to="invoices/",
|
||||||
|
validators=[FileExtensionValidator(["pdf"])],
|
||||||
|
verbose_name=_("File"),
|
||||||
)
|
)
|
||||||
transaction = models.ForeignKey(Transaction, on_delete=models.CASCADE)
|
transaction = models.ForeignKey(Transaction, on_delete=models.CASCADE)
|
||||||
|
|
||||||
|
@ -80,6 +104,10 @@ class Invoice(models.Model):
|
||||||
self.file.delete()
|
self.file.delete()
|
||||||
super().delete(*args, **kwargs)
|
super().delete(*args, **kwargs)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = _("Invoice")
|
||||||
|
verbose_name_plural = _("Invoices")
|
||||||
|
|
||||||
|
|
||||||
class InvoiceForm(ModelForm):
|
class InvoiceForm(ModelForm):
|
||||||
template_name = "main/form.html"
|
template_name = "main/form.html"
|
||||||
|
@ -92,8 +120,10 @@ class InvoiceForm(ModelForm):
|
||||||
|
|
||||||
class Snapshot(models.Model):
|
class Snapshot(models.Model):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
date = models.DateField(unique=True)
|
date = models.DateField(unique=True, verbose_name=_("Date"))
|
||||||
value = models.DecimalField(max_digits=12, decimal_places=2, default=0)
|
value = models.DecimalField(
|
||||||
|
max_digits=12, decimal_places=2, default=0, verbose_name=_("Value")
|
||||||
|
)
|
||||||
previous = models.OneToOneField(
|
previous = models.OneToOneField(
|
||||||
"self", on_delete=models.SET_NULL, blank=True, null=True, editable=False
|
"self", on_delete=models.SET_NULL, blank=True, null=True, editable=False
|
||||||
)
|
)
|
||||||
|
@ -184,6 +214,8 @@ class Snapshot(models.Model):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["-date"]
|
ordering = ["-date"]
|
||||||
|
verbose_name = _("Snapshot")
|
||||||
|
verbose_name_plural = _("Snapshots")
|
||||||
|
|
||||||
|
|
||||||
class SnapshotForm(ModelForm):
|
class SnapshotForm(ModelForm):
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<input hidden value="{{ next }}" name="next" />
|
<input hidden value="{{ next }}" name="next" />
|
||||||
<input type="reset" />
|
<input type="reset" />
|
||||||
<input type="submit" value="Log In" />
|
<input type="submit" value="{% translate "Log In" %}" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input type="reset" />
|
<input type="reset" />
|
||||||
<input type="submit" value="{% translate 'Save' %} {{ name }}" />
|
<input type="submit" value="{% translate 'Save' %}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,18 +26,18 @@
|
||||||
<div class="invoice">
|
<div class="invoice">
|
||||||
<a href="{% url 'invoice' inv.id %}">{{ inv.name }}</a>
|
<a href="{% url 'invoice' inv.id %}">{{ inv.name }}</a>
|
||||||
<a href="{% url 'del_invoice' transaction.id inv.id %}"
|
<a href="{% url 'del_invoice' transaction.id inv.id %}"
|
||||||
onclick="return confirm('Supprimer <{{ inv.name }}> ?')">
|
onclick="return confirm('{% translate "Delete" %} <{{ inv.name }}> ?')">
|
||||||
<i class="fa-regular fa-trash-can"></i>
|
<i class="fa-regular fa-trash-can"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Add Invoice</h3>
|
<h3>{% translate "Add invoice" %}</h3>
|
||||||
<form action="{% url 'transaction' transaction.id %}" method="post" enctype="multipart/form-data">
|
<form action="{% url 'transaction' transaction.id %}" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="form" value="invoice" />
|
<input type="hidden" name="form" value="invoice" />
|
||||||
{{ invoice_form }}
|
{{ invoice_form }}
|
||||||
<div class="buttons"><input class="btn" type="submit" value="Add Invoice" /></div>
|
<div class="buttons"><input class="btn" type="submit" value="{% translate "Add" %}" /></div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -39,6 +39,5 @@ def form_buttons(instance):
|
||||||
return {
|
return {
|
||||||
"instance": instance,
|
"instance": instance,
|
||||||
"adding": instance._state.adding,
|
"adding": instance._state.adding,
|
||||||
"name": instance.__class__.__name__,
|
|
||||||
"del_url": f"del_{instance.__class__.__name__.lower()}",
|
"del_url": f"del_{instance.__class__.__name__.lower()}",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue