1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-01 21:41:15 +02:00

Translate models

This commit is contained in:
Alexandre Iooss
2019-07-16 13:50:05 +02:00
parent 2313ebcdb4
commit 7043ab5e45
10 changed files with 200 additions and 48 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-16 12:42+0200\n"
"POT-Creation-Date: 2019-07-16 13:47+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,74 +18,118 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps.py:11
#: apps.py:11 models/notes.py:34
msgid "note"
msgstr "note"
#: models/notes.py:19
#: models/notes.py:21
msgid "account balance"
msgstr "solde du compte"
#: models/notes.py:20
#: models/notes.py:22
msgid "in centimes, money credited for this instance"
msgstr "en centimes, argent crédité pour cette instance"
#: models/notes.py:23
#: models/notes.py:25
msgid "active"
msgstr "actif"
#: models/notes.py:26
#: models/notes.py:28
msgid ""
"Designates whether this note should be treated as active. Unselect this "
"instead of deleting notes."
msgstr ""
"Indique si la note est active. Désactiver cela plutôt que supprimer la note."
#: models/notes.py:43
#: models/notes.py:35
msgid "notes"
msgstr "notes"
#: models/notes.py:49
msgid "one's note"
msgstr "note d'un utilisateur"
#: models/notes.py:44
#: models/notes.py:50
msgid "users note"
msgstr "notes des utilisateurs"
#: models/notes.py:58
#: models/notes.py:64
msgid "club note"
msgstr "note d'un club"
#: models/notes.py:59
#: models/notes.py:65
msgid "clubs notes"
msgstr "notes des clubs"
#: models/notes.py:72 models/transactions.py:31 models/transactions.py:60
#: models/notes.py:78 models/transactions.py:31 models/transactions.py:64
msgid "type"
msgstr "type"
#: models/notes.py:83 models/transactions.py:18
#: models/notes.py:84
msgid "special note"
msgstr "note spéciale"
#: models/notes.py:85
msgid "special notes"
msgstr "notes spéciale"
#: models/notes.py:93 models/transactions.py:18
msgid "name"
msgstr "nom"
#: models/transactions.py:25 models/transactions.py:47
#: models/transactions.py:50
#: models/notes.py:103
msgid "alias"
msgstr "alias"
#: models/notes.py:104
msgid "aliases"
msgstr "alias"
#: models/transactions.py:25 models/transactions.py:51
#: models/transactions.py:54
msgid "destination"
msgstr "destination"
#: models/transactions.py:28 models/transactions.py:57
#: models/transactions.py:28 models/transactions.py:61
msgid "amount"
msgstr "montant"
#: models/transactions.py:41
#: models/transactions.py:36
msgid "transaction template"
msgstr "modèle de transaction"
#: models/transactions.py:37
msgid "transaction templates"
msgstr "modèles de transaction"
#: models/transactions.py:45
msgid "source"
msgstr "source"
#: models/transactions.py:54
#: models/transactions.py:58
msgid "quantity"
msgstr "quantité"
#: models/transactions.py:64
#: models/transactions.py:68
msgid "description"
msgstr "description"
#: models/transactions.py:67
#: models/transactions.py:71
msgid "valid"
msgstr "valide"
#: models/transactions.py:75
msgid "transaction"
msgstr "transaction"
#: models/transactions.py:76
msgid "transactions"
msgstr "transactions"
#: models/transactions.py:87
msgid "membership transaction"
msgstr "transaction d'adhésion"
#: models/transactions.py:88
msgid "membership transactions"
msgstr "transactions d'adhésion"

View File

@ -1,4 +1,4 @@
# Generated by Django 2.2.3 on 2019-07-16 10:33
# Generated by Django 2.2.3 on 2019-07-16 11:44
from django.conf import settings
from django.db import migrations, models
@ -11,8 +11,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('member', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
@ -23,6 +23,10 @@ class Migration(migrations.Migration):
('balance', models.IntegerField(help_text='in centimes, money credited for this instance', verbose_name='account balance')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this note should be treated as active. Unselect this instead of deleting notes.', verbose_name='active')),
],
options={
'verbose_name': 'note',
'verbose_name_plural': 'notes',
},
),
migrations.CreateModel(
name='Transaction',
@ -37,6 +41,10 @@ class Migration(migrations.Migration):
('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='destination')),
('source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='source')),
],
options={
'verbose_name': 'transaction',
'verbose_name_plural': 'transactions',
},
),
migrations.CreateModel(
name='NoteSpecial',
@ -44,6 +52,10 @@ class Migration(migrations.Migration):
('note_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Note')),
('special_type', models.CharField(max_length=255, unique=True, verbose_name='type')),
],
options={
'verbose_name': 'special note',
'verbose_name_plural': 'special notes',
},
bases=('note.note',),
),
migrations.CreateModel(
@ -55,6 +67,10 @@ class Migration(migrations.Migration):
('template_type', models.CharField(max_length=31, verbose_name='type')),
('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='destination')),
],
options={
'verbose_name': 'transaction template',
'verbose_name_plural': 'transaction templates',
},
),
migrations.CreateModel(
name='Alias',
@ -63,6 +79,10 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
('note', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Note')),
],
options={
'verbose_name': 'alias',
'verbose_name_plural': 'aliases',
},
),
migrations.CreateModel(
name='NoteUser',
@ -94,6 +114,10 @@ class Migration(migrations.Migration):
('transaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Transaction')),
('membership', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='transaction', to='member.Membership')),
],
options={
'verbose_name': 'membership transaction',
'verbose_name_plural': 'membership transactions',
},
bases=('note.transaction',),
),
]

View File

@ -13,7 +13,9 @@ Defines each note types
class Note(models.Model):
"""
An abstract model, use to add transactions capabilities to a user
An model, use to add transactions capabilities
We do not use an abstract model to simplify the transfer between two notes.
"""
balance = models.IntegerField(
verbose_name=_('account balance'),
@ -28,6 +30,10 @@ class Note(models.Model):
),
)
class Meta:
verbose_name = _("note")
verbose_name_plural = _("notes")
class NoteUser(Note):
"""
@ -74,6 +80,10 @@ class NoteSpecial(Note):
unique=True,
)
class Meta:
verbose_name = _("special note")
verbose_name_plural = _("special notes")
class Alias(models.Model):
"""
@ -88,3 +98,7 @@ class Alias(models.Model):
Note,
on_delete=models.PROTECT,
)
class Meta:
verbose_name = _("alias")
verbose_name_plural = _("aliases")

View File

@ -32,6 +32,10 @@ class TransactionTemplate(models.Model):
max_length=31
)
class Meta:
verbose_name = _("transaction template")
verbose_name_plural = _("transaction templates")
class Transaction(models.Model):
source = models.ForeignKey(
@ -67,6 +71,10 @@ class Transaction(models.Model):
verbose_name=_('valid'),
)
class Meta:
verbose_name = _("transaction")
verbose_name_plural = _("transactions")
class MembershipTransaction(Transaction):
membership = models.OneToOneField(
@ -74,3 +82,7 @@ class MembershipTransaction(Transaction):
on_delete=models.PROTECT,
related_name='transaction',
)
class Meta:
verbose_name = _("membership transaction")
verbose_name_plural = _("membership transactions")