Translate models

This commit is contained in:
Alexandre Iooss 2019-07-16 13:50:05 +02:00
parent 2313ebcdb4
commit 7043ab5e45
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
10 changed files with 200 additions and 48 deletions

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-16 12:37+0200\n" "POT-Creation-Date: 2019-07-16 13:45+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -13,11 +13,11 @@ 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"
#: apps.py:11 #: apps.py:11 models.py:61
msgid "activity" msgid "activity"
msgstr "activité" msgstr "activité"
#: models.py:12 models.py:25 #: models.py:12 models.py:29
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
@ -29,26 +29,46 @@ msgstr "peut inviter"
msgid "guest entry fee" msgid "guest entry fee"
msgstr "cotisation de l'entrée invité" msgstr "cotisation de l'entrée invité"
#: models.py:29 #: models.py:23
msgid "activity type"
msgstr "type d'activité"
#: models.py:24
msgid "activity types"
msgstr "types d'activité"
#: models.py:33
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: models.py:35 #: models.py:39
msgid "type" msgid "type"
msgstr "type" msgstr "type"
#: models.py:41 #: models.py:45
msgid "organizer" msgid "organizer"
msgstr "organisateur" msgstr "organisateur"
#: models.py:47 #: models.py:51
msgid "attendees club" msgid "attendees club"
msgstr "" msgstr ""
#: models.py:50 #: models.py:54
msgid "start date" msgid "start date"
msgstr "date de début" msgstr "date de début"
#: models.py:53 #: models.py:57
msgid "end date" msgid "end date"
msgstr "date de fin" msgstr "date de fin"
#: models.py:62
msgid "activities"
msgstr "activités"
#: models.py:88
msgid "guest"
msgstr "invité"
#: models.py:89
msgid "guests"
msgstr "invités"

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.conf import settings
from django.db import migrations, models from django.db import migrations, models
@ -25,6 +25,10 @@ class Migration(migrations.Migration):
('date_start', models.DateTimeField(verbose_name='start date')), ('date_start', models.DateTimeField(verbose_name='start date')),
('date_end', models.DateTimeField(verbose_name='end date')), ('date_end', models.DateTimeField(verbose_name='end date')),
], ],
options={
'verbose_name': 'activity',
'verbose_name_plural': 'activities',
},
), ),
migrations.CreateModel( migrations.CreateModel(
name='ActivityType', name='ActivityType',
@ -34,6 +38,10 @@ class Migration(migrations.Migration):
('can_invite', models.BooleanField(verbose_name='can invite')), ('can_invite', models.BooleanField(verbose_name='can invite')),
('guest_entry_fee', models.PositiveIntegerField(verbose_name='guest entry fee')), ('guest_entry_fee', models.PositiveIntegerField(verbose_name='guest entry fee')),
], ],
options={
'verbose_name': 'activity type',
'verbose_name_plural': 'activity types',
},
), ),
migrations.CreateModel( migrations.CreateModel(
name='Guest', name='Guest',
@ -45,6 +53,10 @@ class Migration(migrations.Migration):
('entry_transaction', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Transaction')), ('entry_transaction', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Transaction')),
('inviter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to=settings.AUTH_USER_MODEL)), ('inviter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to=settings.AUTH_USER_MODEL)),
], ],
options={
'verbose_name': 'guest',
'verbose_name_plural': 'guests',
},
), ),
migrations.AddField( migrations.AddField(
model_name='activity', model_name='activity',

View File

@ -19,6 +19,10 @@ class ActivityType(models.Model):
verbose_name=_('guest entry fee'), verbose_name=_('guest entry fee'),
) )
class Meta:
verbose_name = _("activity type")
verbose_name_plural = _("activity types")
class Activity(models.Model): class Activity(models.Model):
name = models.CharField( name = models.CharField(
@ -53,6 +57,10 @@ class Activity(models.Model):
verbose_name=_('end date'), verbose_name=_('end date'),
) )
class Meta:
verbose_name = _("activity")
verbose_name_plural = _("activities")
class Guest(models.Model): class Guest(models.Model):
activity = models.ForeignKey( activity = models.ForeignKey(
@ -75,3 +83,7 @@ class Guest(models.Model):
'note.Transaction', 'note.Transaction',
on_delete=models.PROTECT, on_delete=models.PROTECT,
) )
class Meta:
verbose_name = _("guest")
verbose_name_plural = _("guests")

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-16 12:37+0200\n" "POT-Creation-Date: 2019-07-16 13:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -66,54 +66,60 @@ msgstr "durée de l'adhésion"
msgid "The longest time a membership can last (NULL = infinite)." msgid "The longest time a membership can last (NULL = infinite)."
msgstr "La durée maximale d'une adhésion (NULL = infinie)." msgstr "La durée maximale d'une adhésion (NULL = infinie)."
#: models.py:79 #: models.py:80
msgid "membership start" msgid "membership start"
msgstr "début de l'adhésion" msgstr "début de l'adhésion"
#: models.py:80 #: models.py:81
msgid "How long after January 1st the members can renew their membership." msgid "How long after January 1st the members can renew their membership."
msgstr "" msgstr ""
#: models.py:84 #: models.py:86
msgid "membership end" msgid "membership end"
msgstr "fin de l'adhésion" msgstr "fin de l'adhésion"
#: models.py:85 #: models.py:87
msgid "" msgid ""
"How long the membership can last after January 1st of the next year after " "How long the membership can last after January 1st of the next year after "
"members can renew their membership." "members can renew their membership."
msgstr "" msgstr ""
#: models.py:95 #: models.py:93
msgid "club"
msgstr "club"
#: models.py:94
msgid "clubs"
msgstr "clubs"
#: models.py:102
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
#: models.py:100 #: models.py:107
msgid "role" msgid "role"
msgstr "rôle" msgstr "rôle"
#: models.py:101 #: models.py:108
msgid "roles" msgid "roles"
msgstr "rôles" msgstr "rôles"
#: models.py:118 #: models.py:125
msgid "membership starts on" msgid "membership starts on"
msgstr "l'adhésion commence le" msgstr "l'adhésion commence le"
#: models.py:121 #: models.py:128
#, fuzzy
#| msgid "membership fees"
msgid "membership ends on" msgid "membership ends on"
msgstr "l'adhésion finie le" msgstr "l'adhésion finie le"
#: models.py:125 #: models.py:132
msgid "fee" msgid "fee"
msgstr "cotisation" msgstr "cotisation"
#: models.py:129 #: models.py:136
msgid "membership" msgid "membership"
msgstr "adhésion" msgstr "adhésion"
#: models.py:130 #: models.py:137
msgid "memberships" msgid "memberships"
msgstr "adhésions" msgstr "adhésions"

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.conf import settings
from django.db import migrations, models from django.db import migrations, models
@ -25,6 +25,10 @@ class Migration(migrations.Migration):
('membership_start', models.DurationField(help_text='How long after January 1st the members can renew their membership.', null=True, verbose_name='membership start')), ('membership_start', models.DurationField(help_text='How long after January 1st the members can renew their membership.', null=True, verbose_name='membership start')),
('membership_end', models.DurationField(help_text='How long the membership can last after January 1st of the next year after members can renew their membership.', null=True, verbose_name='membership end')), ('membership_end', models.DurationField(help_text='How long the membership can last after January 1st of the next year after members can renew their membership.', null=True, verbose_name='membership end')),
], ],
options={
'verbose_name': 'club',
'verbose_name_plural': 'clubs',
},
), ),
migrations.CreateModel( migrations.CreateModel(
name='Role', name='Role',

View File

@ -89,6 +89,10 @@ class Club(models.Model):
'membership.'), 'membership.'),
) )
class Meta:
verbose_name = _("club")
verbose_name_plural = _("clubs")
class Role(models.Model): class Role(models.Model):
""" """

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,74 +18,118 @@ 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"
#: apps.py:11 #: apps.py:11 models/notes.py:34
msgid "note" msgid "note"
msgstr "note" msgstr "note"
#: models/notes.py:19 #: models/notes.py:21
msgid "account balance" msgid "account balance"
msgstr "solde du compte" msgstr "solde du compte"
#: models/notes.py:20 #: models/notes.py:22
msgid "in centimes, money credited for this instance" msgid "in centimes, money credited for this instance"
msgstr "en centimes, argent crédité pour cette instance" msgstr "en centimes, argent crédité pour cette instance"
#: models/notes.py:23 #: models/notes.py:25
msgid "active" msgid "active"
msgstr "actif" msgstr "actif"
#: models/notes.py:26 #: models/notes.py:28
msgid "" msgid ""
"Designates whether this note should be treated as active. Unselect this " "Designates whether this note should be treated as active. Unselect this "
"instead of deleting notes." "instead of deleting notes."
msgstr "" msgstr ""
"Indique si la note est active. Désactiver cela plutôt que supprimer la note." "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" msgid "one's note"
msgstr "note d'un utilisateur" msgstr "note d'un utilisateur"
#: models/notes.py:44 #: models/notes.py:50
msgid "users note" msgid "users note"
msgstr "notes des utilisateurs" msgstr "notes des utilisateurs"
#: models/notes.py:58 #: models/notes.py:64
msgid "club note" msgid "club note"
msgstr "note d'un club" msgstr "note d'un club"
#: models/notes.py:59 #: models/notes.py:65
msgid "clubs notes" msgid "clubs notes"
msgstr "notes des clubs" 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" msgid "type"
msgstr "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" msgid "name"
msgstr "nom" msgstr "nom"
#: models/transactions.py:25 models/transactions.py:47 #: models/notes.py:103
#: models/transactions.py:50 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" msgid "destination"
msgstr "destination" msgstr "destination"
#: models/transactions.py:28 models/transactions.py:57 #: models/transactions.py:28 models/transactions.py:61
msgid "amount" msgid "amount"
msgstr "montant" 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" msgid "source"
msgstr "source" msgstr "source"
#: models/transactions.py:54 #: models/transactions.py:58
msgid "quantity" msgid "quantity"
msgstr "quantité" msgstr "quantité"
#: models/transactions.py:64 #: models/transactions.py:68
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: models/transactions.py:67 #: models/transactions.py:71
msgid "valid" msgid "valid"
msgstr "valide" 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.conf import settings
from django.db import migrations, models from django.db import migrations, models
@ -11,8 +11,8 @@ class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('member', '0001_initial'), ('member', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
] ]
operations = [ 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')), ('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')), ('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( migrations.CreateModel(
name='Transaction', 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')), ('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')), ('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( migrations.CreateModel(
name='NoteSpecial', 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')), ('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')), ('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',), bases=('note.note',),
), ),
migrations.CreateModel( migrations.CreateModel(
@ -55,6 +67,10 @@ class Migration(migrations.Migration):
('template_type', models.CharField(max_length=31, verbose_name='type')), ('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')), ('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( migrations.CreateModel(
name='Alias', name='Alias',
@ -63,6 +79,10 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=255, unique=True, verbose_name='name')), ('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
('note', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Note')), ('note', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Note')),
], ],
options={
'verbose_name': 'alias',
'verbose_name_plural': 'aliases',
},
), ),
migrations.CreateModel( migrations.CreateModel(
name='NoteUser', 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')), ('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')), ('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',), bases=('note.transaction',),
), ),
] ]

View File

@ -13,7 +13,9 @@ Defines each note types
class Note(models.Model): 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( balance = models.IntegerField(
verbose_name=_('account balance'), verbose_name=_('account balance'),
@ -28,6 +30,10 @@ class Note(models.Model):
), ),
) )
class Meta:
verbose_name = _("note")
verbose_name_plural = _("notes")
class NoteUser(Note): class NoteUser(Note):
""" """
@ -74,6 +80,10 @@ class NoteSpecial(Note):
unique=True, unique=True,
) )
class Meta:
verbose_name = _("special note")
verbose_name_plural = _("special notes")
class Alias(models.Model): class Alias(models.Model):
""" """
@ -88,3 +98,7 @@ class Alias(models.Model):
Note, Note,
on_delete=models.PROTECT, 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 max_length=31
) )
class Meta:
verbose_name = _("transaction template")
verbose_name_plural = _("transaction templates")
class Transaction(models.Model): class Transaction(models.Model):
source = models.ForeignKey( source = models.ForeignKey(
@ -67,6 +71,10 @@ class Transaction(models.Model):
verbose_name=_('valid'), verbose_name=_('valid'),
) )
class Meta:
verbose_name = _("transaction")
verbose_name_plural = _("transactions")
class MembershipTransaction(Transaction): class MembershipTransaction(Transaction):
membership = models.OneToOneField( membership = models.OneToOneField(
@ -74,3 +82,7 @@ class MembershipTransaction(Transaction):
on_delete=models.PROTECT, on_delete=models.PROTECT,
related_name='transaction', related_name='transaction',
) )
class Meta:
verbose_name = _("membership transaction")
verbose_name_plural = _("membership transactions")