diff --git a/cotisations/acl.py b/cotisations/acl.py index aa98c32a..06c62fb8 100644 --- a/cotisations/acl.py +++ b/cotisations/acl.py @@ -42,4 +42,5 @@ def can_view(user): if can: return can, None else: - return can, _("You don't have the rights to see this application.") + return can, _("You don't have the right to view this application.") + diff --git a/cotisations/forms.py b/cotisations/forms.py index 244b1c13..341ccc4c 100644 --- a/cotisations/forms.py +++ b/cotisations/forms.py @@ -40,8 +40,8 @@ from django import forms from django.db.models import Q from django.forms import ModelForm, Form from django.core.validators import MinValueValidator -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _l + +from django.utils.translation import ugettext_lazy as _ from django.shortcuts import get_object_or_404 from re2o.field_permissions import FieldPermissionFormMixin @@ -93,11 +93,11 @@ class SelectUserArticleForm(FormRevMixin, Form): queryset=Article.objects.filter( Q(type_user='All') | Q(type_user='Adherent') ), - label=_l("Article"), + label=_("Article"), required=True ) quantity = forms.IntegerField( - label=_l("Quantity"), + label=_("Quantity"), validators=[MinValueValidator(1)], required=True ) @@ -117,11 +117,11 @@ class SelectClubArticleForm(Form): queryset=Article.objects.filter( Q(type_user='All') | Q(type_user='Club') ), - label=_l("Article"), + label=_("Article"), required=True ) quantity = forms.IntegerField( - label=_l("Quantity"), + label=_("Quantity"), validators=[MinValueValidator(1)], required=True ) @@ -161,7 +161,7 @@ class DelArticleForm(FormRevMixin, Form): """ articles = forms.ModelMultipleChoiceField( queryset=Article.objects.none(), - label=_l("Existing articles"), + label=_("Available articles"), widget=forms.CheckboxSelectMultiple ) @@ -201,7 +201,7 @@ class DelPaiementForm(FormRevMixin, Form): # TODO : change paiement to payment paiements = forms.ModelMultipleChoiceField( queryset=Paiement.objects.none(), - label=_l("Existing payment method"), + label=_("Available payment methods"), widget=forms.CheckboxSelectMultiple ) @@ -239,7 +239,7 @@ class DelBanqueForm(FormRevMixin, Form): # TODO : change banque to bank banques = forms.ModelMultipleChoiceField( queryset=Banque.objects.none(), - label=_l("Existing banks"), + label=_("Available banks"), widget=forms.CheckboxSelectMultiple ) @@ -258,13 +258,13 @@ class RechargeForm(FormRevMixin, Form): Form used to refill a user's balance """ value = forms.FloatField( - label=_l("Amount"), + label=_("Amount"), min_value=0.01, validators=[] ) payment = forms.ModelChoiceField( queryset=Paiement.objects.none(), - label=_l("Payment method") + label=_("Payment method") ) def __init__(self, *args, user=None, **kwargs): @@ -290,3 +290,4 @@ class RechargeForm(FormRevMixin, Form): } ) return self.cleaned_data + diff --git a/cotisations/locale/fr/LC_MESSAGES/django.mo b/cotisations/locale/fr/LC_MESSAGES/django.mo index 046a9b9b..b5a65357 100644 Binary files a/cotisations/locale/fr/LC_MESSAGES/django.mo and b/cotisations/locale/fr/LC_MESSAGES/django.mo differ diff --git a/cotisations/locale/fr/LC_MESSAGES/django.po b/cotisations/locale/fr/LC_MESSAGES/django.po index f9aee64d..129d4d72 100644 --- a/cotisations/locale/fr/LC_MESSAGES/django.po +++ b/cotisations/locale/fr/LC_MESSAGES/django.po @@ -21,24 +21,23 @@ msgid "" msgstr "" "Project-Id-Version: 2.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-25 23:22+0200\n" +"POT-Creation-Date: 2018-08-18 13:17+0200\n" "PO-Revision-Date: 2018-03-31 16:09+0002\n" -"Last-Translator: Hugo Levy-Falk \n" -"Language-Team: \n" +"Last-Translator: Laouen Fernet \n" "Language: fr_FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: acl.py:45 -msgid "You don't have the rights to see this application." -msgstr "Vous n'avez pas les droits de voir cette application." +msgid "You don't have the right to view this application." +msgstr "Vous n'avez pas le droit de voir cette application." #: forms.py:63 forms.py:274 msgid "Select a payment method" msgstr "Sélectionnez un moyen de paiement" -#: forms.py:66 +#: forms.py:66 models.py:510 msgid "Member" msgstr "Adhérent" @@ -54,230 +53,523 @@ msgstr "Facture validée" msgid "A payment method must be specified." msgstr "Un moyen de paiement doit être renseigné." +#: forms.py:96 forms.py:120 templates/cotisations/aff_article.html:33 +#: templates/cotisations/facture.html:61 +msgid "Article" +msgstr "Article" + +#: forms.py:100 forms.py:124 templates/cotisations/edit_facture.html:46 +msgid "Quantity" +msgstr "Quantité" + #: forms.py:154 msgid "Article name" msgstr "Nom de l'article" +#: forms.py:164 templates/cotisations/sidebar.html:50 +msgid "Available articles" +msgstr "Articles disponibles" + #: forms.py:192 msgid "Payment method name" msgstr "Nom du moyen de paiement" +#: forms.py:204 +msgid "Available payment methods" +msgstr "Moyens de paiement disponibles" + #: forms.py:230 msgid "Bank name" msgstr "Nom de la banque" +#: forms.py:242 +msgid "Available banks" +msgstr "Banques disponibles" + +#: forms.py:261 +msgid "Amount" +msgstr "Montant" + +#: forms.py:267 templates/cotisations/aff_cotisations.html:44 +#: templates/cotisations/aff_custom_invoice.html:42 +#: templates/cotisations/control.html:66 +msgid "Payment method" +msgstr "Moyen de paiement" + #: forms.py:287 #, python-format msgid "" "Requested amount is too high. Your balance can't exceed " "%(max_online_balance)s €." msgstr "" -"Montant demandé trop grand. Votre solde ne peut excéder " -"%(max_online_balance)s €" +"Le montant demandé trop grand. Votre solde ne peut excéder " +"%(max_online_balance)s €." -#: models.py:175 models.py:223 +#: models.py:60 templates/cotisations/aff_cotisations.html:48 +#: templates/cotisations/aff_custom_invoice.html:46 +#: templates/cotisations/control.html:70 +msgid "Date" +msgstr "Date" + +#: models.py:136 +msgid "cheque number" +msgstr "numéro de chèque" + +#: models.py:141 +msgid "validated" +msgstr "validée" + +#: models.py:146 +msgid "controlled" +msgstr "contrôlée" + +#: models.py:154 +msgid "Can edit the \"controlled\" state" +msgstr "Peut modifier l'état \"contrôlé\"" + +#: models.py:156 +msgid "Can view an invoice object" +msgstr "Peut voir un objet facture" + +#: models.py:158 +msgid "Can edit all the previous invoices" +msgstr "Peut modifier toutes les factures existantes" + +#: models.py:160 models.py:305 +msgid "invoice" +msgstr "facture" + +#: models.py:161 +msgid "invoices" +msgstr "factures" + +#: models.py:170 msgid "You don't have the right to edit an invoice." msgstr "Vous n'avez pas le droit de modifier une facture." -#: models.py:178 +#: models.py:173 msgid "You don't have the right to edit this user's invoices." -msgstr "Vous n'avez pas le droit de modifier les facture de cette utilisateur." +msgstr "Vous n'avez pas le droit de modifier les factures de cet utilisateur." -#: models.py:182 +#: models.py:177 msgid "" "You don't have the right to edit an invoice already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de modifier une facture précedement controllée ou " +"Vous n'avez pas le droit de modifier une facture précedemment contrôlée ou " "invalidée." -#: models.py:189 +#: models.py:184 msgid "You don't have the right to delete an invoice." msgstr "Vous n'avez pas le droit de supprimer une facture." -#: models.py:191 +#: models.py:186 msgid "You don't have the right to delete this user's invoices." msgstr "Vous n'avez pas le droit de supprimer les factures de cet utilisateur." -#: models.py:194 +#: models.py:189 msgid "" "You don't have the right to delete an invoice already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de supprimer une facture précedement controllée ou " +"Vous n'avez pas le droit de supprimer une facture précedement contrôlée ou " "invalidée." -#: models.py:202 -msgid "You don't have the right to see someone else's invoices history." +#: models.py:197 +msgid "You don't have the right to view someone else's invoices history." msgstr "" -"Vous n'avez pas le droit de voir l'historique de la facture de quelqu'un " -"d'autre." +"Vous n'avez pas le droit de voir l'historique des factures d'un autre " +"utilisateur." -#: models.py:205 +#: models.py:200 msgid "The invoice has been invalidated." msgstr "La facture a été invalidée." -#: models.py:215 +#: models.py:210 msgid "You don't have the right to edit the \"controlled\" state." -msgstr "Vous n'avez pas le droit de modifier l'état \"controllé\"." +msgstr "Vous n'avez pas le droit de modifier le statut \"contrôlé\"." -#: models.py:237 -msgid "There are no payment types which you can use." -msgstr "Il n'y a pas de type de paiement que vous puissiez utiliser." +#: models.py:224 +msgid "There are no payment method which you can use." +msgstr "Il n'y a pas de moyen de paiement que vous puissiez utiliser." -#: models.py:239 +#: models.py:226 msgid "There are no article that you can buy." -msgstr "Il n'y a pas d'article qui vous soit autorisé." +msgstr "Il n'y a pas d'article que vous puissiez acheter." -#: models.py:424 -msgid "A cotisation should always have a duration." -msgstr "Une cotisation devrait toujours avoir une durée." +#: models.py:261 +msgid "Can view a custom invoice object" +msgstr "Peut voir un objet facture personnalisée" -#: models.py:431 +#: models.py:265 templates/cotisations/aff_custom_invoice.html:36 +msgid "Recipient" +msgstr "Destinataire" + +#: models.py:269 templates/cotisations/aff_paiement.html:33 +msgid "Payment type" +msgstr "Type de paiement" + +#: models.py:273 +msgid "Address" +msgstr "Adresse" + +#: models.py:276 templates/cotisations/aff_custom_invoice.html:54 +msgid "Paid" +msgstr "Payé" + +#: models.py:296 models.py:516 models.py:764 +msgid "Connection" +msgstr "Connexion" + +#: models.py:297 models.py:517 models.py:765 +msgid "Membership" +msgstr "Adhésion" + +#: models.py:298 models.py:512 models.py:518 models.py:766 +msgid "Both of them" +msgstr "Les deux" + +#: models.py:310 +msgid "amount" +msgstr "montant" + +#: models.py:315 +msgid "article" +msgstr "article" + +#: models.py:322 +msgid "price" +msgstr "prix" + +#: models.py:327 models.py:535 +msgid "duration (in months)" +msgstr "durée (en mois)" + +#: models.py:335 models.py:549 models.py:780 +msgid "subscription type" +msgstr "type de cotisation" + +#: models.py:340 +msgid "Can view a purchase object" +msgstr "Peut voir un objet achat" + +#: models.py:341 +msgid "Can edit all the previous purchases" +msgstr "Peut modifier tous les achats précédents" + +#: models.py:343 models.py:774 +msgid "purchase" +msgstr "achat" + +#: models.py:344 +msgid "purchases" +msgstr "achats" + +#: models.py:411 models.py:573 +msgid "Duration must be specified for a subscription." +msgstr "La durée de la cotisation doit être indiquée." + +#: models.py:418 msgid "You don't have the right to edit the purchases." msgstr "Vous n'avez pas le droit de modifier les achats." -#: models.py:436 +#: models.py:423 msgid "You don't have the right to edit this user's purchases." msgstr "Vous n'avez pas le droit de modifier les achats de cet utilisateur." -#: models.py:440 +#: models.py:427 msgid "" "You don't have the right to edit a purchase already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de modifier un achat précédement controllé ou " +"Vous n'avez pas le droit de modifier un achat précédemment contrôlé ou " "invalidé." -#: models.py:447 +#: models.py:434 msgid "You don't have the right to delete a purchase." msgstr "Vous n'avez pas le droit de supprimer un achat." -#: models.py:449 +#: models.py:436 msgid "You don't have the right to delete this user's purchases." msgstr "Vous n'avez pas le droit de supprimer les achats de cet utilisateur." -#: models.py:452 +#: models.py:439 msgid "" "You don't have the right to delete a purchase already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de supprimer un achat précédement controllé ou " +"Vous n'avez pas le droit de supprimer un achat précédement contrôlé ou " "invalidé." -#: models.py:460 -msgid "You don't have the right to see someone else's purchase history." +#: models.py:447 +msgid "You don't have the right to view someone else's purchase history." msgstr "" -"Vous n'avez pas le droit de voir l'historique d'un achat de quelqu'un " -"d'autre." +"Vous n'avez pas le droit de voir l'historique des achats d'un autre " +"utilisateur." -#: models.py:582 -msgid "Solde is a reserved article name" -msgstr "Solde est un nom d'article réservé" +#: models.py:511 +msgid "Club" +msgstr "Club" -#: models.py:586 -msgid "Duration must be specified for a cotisation" -msgstr "La durée doit être spécifiée pour une cotisation" +#: models.py:523 +msgid "designation" +msgstr "désignation" -#: models.py:607 -msgid "You cannot buy this Article." +#: models.py:529 +msgid "unit price" +msgstr "prix unitaire" + +#: models.py:541 +msgid "type of users concerned" +msgstr "type d'utilisateurs concernés" + +#: models.py:553 models.py:649 +msgid "is available for every user" +msgstr "est disponible pour chaque utilisateur" + +#: models.py:560 +msgid "Can view an article object" +msgstr "Peut voir un objet article" + +#: models.py:561 +msgid "Can buy every article" +msgstr "Peut acheter chaque article" + +#: models.py:569 +msgid "Balance is a reserved article name." +msgstr "Solde est un nom d'article réservé." + +#: models.py:594 +msgid "You can't buy this article." msgstr "Vous ne pouvez pas acheter cet article." -#: models.py:713 payment_methods/comnpay/views.py:63 -msgid "" -"The cotisation of %(member_name)s has been extended to %(end_date)s." -msgstr "La cotisation de %(member_name)s a été étendu jusqu'à %(end_date)s." +#: models.py:624 +msgid "Can view a bank object" +msgstr "Peut voir un objet banque" -#: models.py:723 -msgid "The invoice has been created." +#: models.py:626 +msgid "bank" +msgstr "banque" + +#: models.py:627 +msgid "banks" +msgstr "banques" + +#: models.py:645 +msgid "method" +msgstr "moyen" + +#: models.py:654 +msgid "is user balance" +msgstr "est solde utilisateur" + +#: models.py:655 +msgid "There should be only one balance payment method." +msgstr "Il ne devrait y avoir qu'un moyen de paiement solde." + +#: models.py:661 +msgid "Can view a payment method object" +msgstr "Peut voir un objet moyen de paiement" + +#: models.py:662 +msgid "Can use every payment method" +msgstr "Peut utiliser chaque moyen de paiement" + +#: models.py:664 +msgid "payment method" +msgstr "moyen de paiement" + +#: models.py:665 +msgid "payment methods" +msgstr "moyens de paiement" + +#: models.py:699 payment_methods/comnpay/views.py:63 +#, python-format +msgid "The subscription of %(member_name)s was extended to %(end_date)s." +msgstr "La cotisation de %(member_name)s a été étendue au %(end_date)s." + +#: models.py:709 +msgid "The invoice was created." msgstr "La facture a été créée." -#: models.py:744 -msgid "You cannot use this Payment." -msgstr "Vous ne pouvez pas utiliser ce Paiement." +#: models.py:730 +msgid "You can't use this payment method." +msgstr "Vous ne pouvez pas utiliser ce moyen de paiement." -#: models.py:762 -msgid "No custom payment method" -msgstr "Pas de méthode de paiement personnalisée" +#: models.py:748 +msgid "No custom payment method." +msgstr "Pas de moyen de paiement personnalisé." -#: models.py:811 -msgid "You don't have the right to edit a cotisation." +#: models.py:783 +msgid "start date" +msgstr "date de début" + +#: models.py:786 +msgid "end date" +msgstr "date de fin" + +#: models.py:791 +msgid "Can view a subscription object" +msgstr "Peut voir un objet cotisation" + +#: models.py:792 +msgid "Can edit the previous subscriptions" +msgstr "Peut modifier les cotisations précédentes" + +#: models.py:794 +msgid "subscription" +msgstr "cotisation" + +#: models.py:795 +msgid "subscriptions" +msgstr "cotisations" + +#: models.py:799 +msgid "You don't have the right to edit a subscription." msgstr "Vous n'avez pas le droit de modifier une cotisation." -#: models.py:815 +#: models.py:803 msgid "" -"You don't have the right to edit a cotisation already controlled or " +"You don't have the right to edit a subscription already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de modifier une cotisaiton précédement controllée " +"Vous n'avez pas le droit de modifier une cotisation précédemment contrôlée " "ou invalidée." -#: models.py:822 -msgid "You don't have the right to delete a cotisation." +#: models.py:810 +msgid "You don't have the right to delete a subscription." msgstr "Vous n'avez pas le droit de supprimer une cotisation." -#: models.py:825 +#: models.py:813 msgid "" -"You don't have the right to delete a cotisation already controlled or " +"You don't have the right to delete a subscription already controlled or " "invalidated." msgstr "" -"Vous n'avez pas le droit de supprimer une cotisation précédement controllée " +"Vous n'avez pas le droit de supprimer une cotisation précédemment contrôlée " "ou invalidée." -#: models.py:833 -msgid "You don't have the right to see someone else's cotisation history." +#: models.py:821 +msgid "You don't have the right to view someone else's subscription history." msgstr "" -"Vous n'avez pas le droit de voir l'historique d'une cotisation de quelqu'un " -"d'autre." +"Vous n'avez pas le droit de voir l'historique des cotisations d'un autre " +"utilisateur." -#: payment_methods/balance/models.py:82 payment_methods/balance/models.py:113 +#: payment_methods/balance/models.py:38 +msgid "user balance" +msgstr "solde utilisateur" + +#: payment_methods/balance/models.py:47 +msgid "Minimum balance" +msgstr "Solde minimum" + +#: payment_methods/balance/models.py:48 +msgid "" +"The minimal amount of money allowed for the balance at the end of a payment. " +"You can specify negative amount." +msgstr "" +"Le montant minimal d'argent autorisé pour le solde à la fin d'un paiement. " +"Vous pouvez renseigner un montant négatif." + +#: payment_methods/balance/models.py:57 +msgid "Maximum balance" +msgstr "Solde maximum" + +#: payment_methods/balance/models.py:58 +msgid "The maximal amount of money allowed for the balance." +msgstr "Le montant maximal d'argent autorisé pour le solde." + +#: payment_methods/balance/models.py:66 +msgid "Allow user to credit their balance" +msgstr "Autorise l'utilisateur à créditer son solde" + +#: payment_methods/balance/models.py:81 payment_methods/balance/models.py:112 msgid "Your balance is too low for this operation." -msgstr "Votre solde est trop faible pour cette opération." +msgstr "Votre solde est trop bas pour cette opération." -#: payment_methods/balance/models.py:100 -msgid "There is already a payment type for user balance" -msgstr "Il y a déjà un type de paiement pour le solde utilisateur" +#: payment_methods/balance/models.py:99 validators.py:20 +msgid "There is already a payment method for user balance." +msgstr "Il y a déjà un moyen de paiement pour le solde utilisateur." + +#: payment_methods/cheque/models.py:36 +msgid "Cheque" +msgstr "Chèque" #: payment_methods/cheque/views.py:47 -msgid "You cannot pay this invoice with a cheque." +msgid "You can't pay this invoice with a cheque." msgstr "Vous ne pouvez pas payer cette facture avec un chèque." -#: payment_methods/comnpay/models.py:94 -msgid "Pay invoice no : " -msgstr "Payer la facture numéro : " +#: payment_methods/comnpay/models.py:39 +msgid "ComNpay" +msgstr "ComNpay" -#: payment_methods/comnpay/models.py:106 -msgid "" -"In order to pay your invoice with ComNpay, the price must be grater than {} €" +#: payment_methods/comnpay/models.py:51 +msgid "ComNpay VAT Number" +msgstr "Numéro de TVA de ComNpay" + +#: payment_methods/comnpay/models.py:57 +msgid "ComNpay secret key" +msgstr "Clé secrète de ComNpay" + +#: payment_methods/comnpay/models.py:60 +msgid "Minimum payment" +msgstr "Paiement minimum" + +#: payment_methods/comnpay/models.py:61 +msgid "The minimal amount of money you have to use when paying with ComNpay" msgstr "" -"Pour pouvoir payer votre facture avec ComNpay, le prix doit être plus grand " -"que {} €" +"Le montant minimal d'agent que vous devez utiliser en payant avec ComNpay" + +#: payment_methods/comnpay/models.py:69 +msgid "Production mode enabled (production URL, instead of homologation)" +msgstr "Mode production activé (URL de production, au lieu d'homologation)" + +#: payment_methods/comnpay/models.py:104 +msgid "Pay invoice number " +msgstr "Payer la facture numéro " + +#: payment_methods/comnpay/models.py:116 +msgid "" +"In order to pay your invoice with ComNpay, the price must be greater than {} " +"€." +msgstr "" +"Pour payer votre facture avec ComNpay, le prix doit être plus grand que {} €." #: payment_methods/comnpay/views.py:53 #, python-format -msgid "The payment of %(amount)s € has been accepted." +msgid "The payment of %(amount)s € was accepted." msgstr "Le paiement de %(amount)s € a été accepté." #: payment_methods/comnpay/views.py:84 -msgid "The payment has been refused." +msgid "The payment was refused." msgstr "Le paiment a été refusé." -#: templates/cotisations/aff_article.html:33 -#: templates/cotisations/facture.html:60 -msgid "Article" -msgstr "Article" +#: payment_methods/forms.py:60 +msgid "Special payment method" +msgstr "Moyen de paiement spécial" + +#: payment_methods/forms.py:61 +msgid "" +"Warning: you will not be able to change the payment method later. But you " +"will be allowed to edit the other options." +msgstr "" +"Attention : vous ne pourrez pas changer le moyen de paiement plus tard. Mais " +"vous pourrez modifier les autres options." + +#: payment_methods/forms.py:72 +msgid "no" +msgstr "non" #: templates/cotisations/aff_article.html:34 msgid "Price" msgstr "Prix" #: templates/cotisations/aff_article.html:35 -msgid "Cotisation type" +msgid "Subscription type" msgstr "Type de cotisation" #: templates/cotisations/aff_article.html:36 -msgid "Duration (month)" -msgstr "Durée (mois)" +msgid "Duration (in months)" +msgstr "Durée (en mois)" #: templates/cotisations/aff_article.html:37 msgid "Concerned users" @@ -285,17 +577,12 @@ msgstr "Utilisateurs concernés" #: templates/cotisations/aff_article.html:38 msgid "Available for everyone" -msgstr "Articles disponibles" +msgstr "Disponible pour tous" #: templates/cotisations/aff_article.html:52 -#: templates/cotisations/aff_banque.html:41 -#: templates/cotisations/aff_cotisations.html:70 -#: templates/cotisations/aff_cotisations.html:76 -#: templates/cotisations/aff_custom_invoice.html:73 -#: templates/cotisations/aff_custom_invoice.html:79 #: templates/cotisations/aff_paiement.html:48 -#: templates/cotisations/control.html:104 views.py:480 views.py:568 -#: views.py:649 +#: templates/cotisations/control.html:107 views.py:483 views.py:570 +#: views.py:650 msgid "Edit" msgstr "Modifier" @@ -308,179 +595,137 @@ msgid "User" msgstr "Utilisateur" #: templates/cotisations/aff_cotisations.html:41 -#: templates/cotisations/aff_custom_invoice.html:42 -#: templates/cotisations/control.html:60 +#: templates/cotisations/aff_custom_invoice.html:39 +#: templates/cotisations/control.html:63 #: templates/cotisations/edit_facture.html:45 msgid "Designation" msgstr "Désignation" #: templates/cotisations/aff_cotisations.html:42 -#: templates/cotisations/aff_custom_invoice.html:43 -#: templates/cotisations/control.html:61 +#: templates/cotisations/aff_custom_invoice.html:40 +#: templates/cotisations/control.html:64 msgid "Total price" msgstr "Prix total" -#: templates/cotisations/aff_cotisations.html:44 -#: templates/cotisations/aff_custom_invoice.html:45 -#: templates/cotisations/control.html:63 -msgid "Payment method" -msgstr "Moyen de paiement" - -#: templates/cotisations/aff_cotisations.html:48 -#: templates/cotisations/aff_custom_invoice.html:49 -#: templates/cotisations/control.html:67 -msgid "Date" -msgstr "Date" - #: templates/cotisations/aff_cotisations.html:52 -#: templates/cotisations/aff_custom_invoice.html:53 -#: templates/cotisations/control.html:53 -msgid "Invoice id" -msgstr "Id facture" +#: templates/cotisations/aff_custom_invoice.html:50 +#: templates/cotisations/control.html:56 +msgid "Invoice ID" +msgstr "ID facture" -#: templates/cotisations/aff_cotisations.html:80 +#: templates/cotisations/aff_cotisations.html:71 msgid "Controlled invoice" -msgstr "Facture controllé" +msgstr "Facture contrôlée" -#: templates/cotisations/aff_cotisations.html:85 -#: templates/cotisations/aff_custom_invoice.html:86 views.py:502 views.py:604 -#: views.py:685 -msgid "Delete" -msgstr "Supprimer" - -#: templates/cotisations/aff_cotisations.html:98 -#: templates/cotisations/aff_custom_invoice.html:98 +#: templates/cotisations/aff_cotisations.html:81 +#: templates/cotisations/aff_custom_invoice.html:79 msgid "PDF" msgstr "PDF" -#: templates/cotisations/aff_cotisations.html:101 +#: templates/cotisations/aff_cotisations.html:84 msgid "Invalidated invoice" msgstr "Facture invalidée" -#: templates/cotisations/aff_custom_invoice.html:39 -msgid "Recipient" -msgstr "Destinataire" - -#: templates/cotisations/aff_custom_invoice.html:56 -msgid "Paid" -msgstr "Payé" - -#: templates/cotisations/aff_paiement.html:33 -msgid "Payment type" -msgstr "Type de paiement" - #: templates/cotisations/aff_paiement.html:34 msgid "Is available for everyone" -msgstr "Est disponible pour tout le monde" +msgstr "Est disponible pour tous" #: templates/cotisations/aff_paiement.html:35 msgid "Custom payment method" -msgstr "Méthode de paiement personnalisée" +msgstr "Moyen de paiement personnalisé" #: templates/cotisations/control.html:30 msgid "Invoice control" msgstr "Contrôle des factures" -#: templates/cotisations/control.html:33 +#: templates/cotisations/control.html:34 msgid "Invoice control and validation" msgstr "Contrôle et validation des factures" -#: templates/cotisations/control.html:43 -msgid "Profil" +#: templates/cotisations/control.html:46 +msgid "Profile" msgstr "Profil" -#: templates/cotisations/control.html:45 +#: templates/cotisations/control.html:48 msgid "Last name" msgstr "Nom" -#: templates/cotisations/control.html:49 +#: templates/cotisations/control.html:52 msgid "First name" msgstr "Prénom" -#: templates/cotisations/control.html:57 -msgid "User id" -msgstr "Id utilisateur" +#: templates/cotisations/control.html:60 +msgid "User ID" +msgstr "ID utilisateur" -#: templates/cotisations/control.html:71 +#: templates/cotisations/control.html:74 msgid "Validated" msgstr "Validé" -#: templates/cotisations/control.html:75 +#: templates/cotisations/control.html:78 msgid "Controlled" -msgstr "Controllé" +msgstr "Contrôlé" #: templates/cotisations/delete.html:29 -msgid "Deletion of cotisations" -msgstr "Supprimer des cotisations" +msgid "Deletion of subscriptions" +msgstr "Suppression de cotisations" #: templates/cotisations/delete.html:36 #, python-format msgid "" -"\n" -" Warning. Are you sure you really want te delete this %(object_name)s " -"object ( %(objet)s ) ?\n" -" " +"Warning: are you sure you really want to delete this %(object_name)s object " +"( %(objet)s )?" msgstr "" -"\n" -" Attention. Êtes-vous vraiment sûr de vouloir supprimer cet objet " -"%(object_name)s ( %(objet)s ) ?\n" -" " +"\tAttention: voulez-vous vraiment supprimer cet objet %(object_name)s " +"( %(objet)s ) ?" -#: templates/cotisations/delete.html:40 +#: templates/cotisations/delete.html:38 #: templates/cotisations/edit_facture.html:60 msgid "Confirm" msgstr "Confirmer" #: templates/cotisations/edit_facture.html:31 #: templates/cotisations/facture.html:30 -msgid "Invoices creation and edition" +msgid "Creation and editing of invoices" msgstr "Création et modification de factures" #: templates/cotisations/edit_facture.html:38 msgid "Edit the invoice" -msgstr "Edition de factures" +msgstr "Modifier la facture" #: templates/cotisations/edit_facture.html:41 -#: templates/cotisations/facture.html:55 +#: templates/cotisations/facture.html:56 msgid "Invoice's articles" msgstr "Articles de la facture" -#: templates/cotisations/edit_facture.html:46 -msgid "Quantity" -msgstr "Quantité" - -#: templates/cotisations/facture.html:36 +#: templates/cotisations/facture.html:37 msgid "New invoice" msgstr "Nouvelle facture" -#: templates/cotisations/facture.html:39 -msgid "Maximum allowed balance : " -msgstr "Solde maximum autorisé : " +#: templates/cotisations/facture.html:40 +#, python-format +msgid "Maximum allowed balance: %(max_balance)s €" +msgstr "Solde maximum autorisé : %(max_balance)s €" -#: templates/cotisations/facture.html:43 -msgid "Current balance :" -msgstr "Solde actuel :" +#: templates/cotisations/facture.html:44 +#, python-format +msgid "Current balance: %(balance)s €" +msgstr "Solde actuel : %(balance)s €" -#: templates/cotisations/facture.html:69 +#: templates/cotisations/facture.html:70 msgid "Add an article" msgstr "Ajouter un article" -#: templates/cotisations/facture.html:71 -msgid "" -"\n" -" Total price : 0,00 €\n" -" " -msgstr "" -"\n" -" Prix total : 0,00 €\n" -" " +#: templates/cotisations/facture.html:72 +msgid "Total price: 0,00 €" +msgstr "Prix total : 0,00 €" #: templates/cotisations/index.html:29 templates/cotisations/sidebar.html:40 msgid "Invoices" msgstr "Factures" #: templates/cotisations/index.html:32 -msgid "Cotisations" +msgid "Subscriptions" msgstr "Cotisations" #: templates/cotisations/index_article.html:30 @@ -489,15 +734,15 @@ msgstr "Articles" #: templates/cotisations/index_article.html:33 msgid "Article types list" -msgstr "Liste des types d'articles" +msgstr "Liste des types d'article" #: templates/cotisations/index_article.html:36 msgid "Add an article type" msgstr "Ajouter un type d'article" #: templates/cotisations/index_article.html:40 -msgid "Delete article types" -msgstr "Supprimer des types d'articles" +msgid "Delete one or several article types" +msgstr "Supprimer un ou plusieurs types d'article" #: templates/cotisations/index_banque.html:30 #: templates/cotisations/sidebar.html:55 @@ -513,8 +758,8 @@ msgid "Add a bank" msgstr "Ajouter une banque" #: templates/cotisations/index_banque.html:40 -msgid "Delete banks" -msgstr "Supprimer des banques" +msgid "Delete one or several banks" +msgstr "Supprimer une ou plusieurs banques" #: templates/cotisations/index_custom_invoice.html:28 #: templates/cotisations/sidebar.html:45 @@ -526,36 +771,32 @@ msgid "Custom invoices list" msgstr "Liste des factures personalisées" #: templates/cotisations/index_paiement.html:30 -msgid "Payments" -msgstr "Paiement" +#: templates/cotisations/sidebar.html:60 +msgid "Payment methods" +msgstr "Moyens de paiement" #: templates/cotisations/index_paiement.html:33 -msgid "Payment types list" -msgstr "Liste des types de paiement" +msgid "List of payment methods" +msgstr "Liste des moyens de paiement" #: templates/cotisations/index_paiement.html:36 -msgid "Add a payment type" -msgstr "Ajouter un type de paiement" +msgid "Add a payment method" +msgstr "Ajouter un moyen de paiement" #: templates/cotisations/index_paiement.html:40 -msgid "Delete payment types" -msgstr "Supprimer un type de paiement" +msgid "Delete one or several payment methods" +msgstr "Supprimer un ou plusieurs moyens de paiement" #: templates/cotisations/payment.html:30 msgid "Balance refill" msgstr "Rechargement de solde" #: templates/cotisations/payment.html:34 -msgid "" -"\n" -" Pay %(amount)s €\n" -" " -msgstr "" -"\n" -" Recharger de %(amount)s €\n" -" " +#, python-format +msgid "Pay %(amount)s €" +msgstr "Recharger de %(amount)s €" -#: templates/cotisations/payment.html:44 views.py:867 +#: templates/cotisations/payment.html:42 views.py:870 msgid "Pay" msgstr "Payer" @@ -567,127 +808,116 @@ msgstr "Créer une facture" msgid "Control the invoices" msgstr "Contrôler les factures" -#: templates/cotisations/sidebar.html:50 -msgid "Available articles" -msgstr "Articles disponibles" - -#: templates/cotisations/sidebar.html:60 -msgid "Payment methods" -msgstr "Moyens de paiement" - -#: validators.py:20 -msgid "There are already payment method(s) for user balance" -msgstr "Il y a déjà une méthode de paiement pour le solde utilisateur" - -#: views.py:165 +#: views.py:167 msgid "You need to choose at least one article." msgstr "Vous devez choisir au moins un article." -#: views.py:178 views.py:232 +#: views.py:181 views.py:235 msgid "Create" msgstr "Créer" -#: views.py:225 -msgid "The custom invoice was successfully created." -msgstr "La facture a été créée avec succès." +#: views.py:228 +msgid "The custom invoice was created." +msgstr "La facture personnalisée a été créée." -#: views.py:313 views.py:367 -msgid "The invoice has been successfully edited." -msgstr "La facture a été crée avec succès." +#: views.py:316 views.py:370 +msgid "The invoice was edited." +msgstr "La facture a été modifiée." -#: views.py:333 views.py:427 -msgid "The invoice has been successfully deleted." -msgstr "La facture a été supprimée avec succès." +#: views.py:336 views.py:430 +msgid "The invoice was deleted." +msgstr "La facture a été supprimée." -#: views.py:338 views.py:432 +#: views.py:341 views.py:435 msgid "Invoice" msgstr "Facture" -#: views.py:453 -msgid "The article has been successfully created." -msgstr "L'article a été créé avec succès." +#: views.py:456 +msgid "The article was created." +msgstr "L'article a été créé." -#: views.py:458 views.py:531 views.py:626 -msgid "Address" -msgstr "Adresse" +#: views.py:461 views.py:534 views.py:627 +msgid "Add" +msgstr "Ajouter" -#: views.py:459 +#: views.py:462 msgid "New article" msgstr "Nouvel article" -#: views.py:475 -msgid "The article has been successfully edited." -msgstr "L'article a été modifié avec succès." +#: views.py:478 +msgid "The article was edited." +msgstr "L'article a été modifié." -#: views.py:481 +#: views.py:484 msgid "Edit article" -msgstr "Éditer l'article" +msgstr "Modifier l'article" -#: views.py:497 -msgid "The article(s) have been successfully deleted." -msgstr "L'(es) article(s) a(ont) été supprimé(s) avec succès. " +#: views.py:500 +msgid "The articles were deleted." +msgstr "Les articles ont été supprimés." -#: views.py:503 +#: views.py:505 views.py:605 views.py:685 +msgid "Delete" +msgstr "Supprimer" + +#: views.py:506 msgid "Delete article" msgstr "Supprimer l'article" -#: views.py:525 -msgid "The payment method has been successfully created." -msgstr "Le moyen de paiement a été créé avec succès." +#: views.py:528 +msgid "The payment method was created." +msgstr "Le moyen de paiment a été créé." -#: views.py:532 +#: views.py:535 msgid "New payment method" msgstr "Nouveau moyen de paiement" -#: views.py:562 -msgid "The payement method has been successfully edited." -msgstr "Le moyen de paiement a été modifié avec succès." +#: views.py:564 +msgid "The payment method was edited." +msgstr "Le moyen de paiment a été modifié." -#: views.py:569 +#: views.py:571 msgid "Edit payment method" -msgstr "Éditer le moyen de paiement" +msgstr "Modifier le moyen de paiement" -#: views.py:588 +#: views.py:590 #, python-format -msgid "" -"The payment method %(method_name)s has been successfully " -"deleted." -msgstr "Le moyen de paiement %(method_name)s a été supprimé avec succès." +msgid "The payment method %(method_name)s was deleted." +msgstr "Le moyen de paiement %(method_name)s a été supprimé." -#: views.py:596 +#: views.py:597 #, python-format msgid "" "The payment method %(method_name)s can't be deleted " "because there are invoices using it." msgstr "" -"Le moyen de paiement %(method_name)s ne peut pas être mis à jour car il y a " -"des factures l'utilisant." +"Le moyen de paiement %(method_name)s ne peut pas être supprimé car il y a " +"des factures qui l'utilisent." -#: views.py:605 +#: views.py:606 msgid "Delete payment method" msgstr "Supprimer le moyen de paiement" -#: views.py:621 -msgid "The bank has been successfully created." -msgstr "La banque a été crée avec succès." +#: views.py:622 +msgid "The bank was created." +msgstr "La banque a été créée." -#: views.py:627 +#: views.py:628 msgid "New bank" -msgstr "Créer la banque" +msgstr "Nouvelle banque" -#: views.py:644 -msgid "The bank has been successfully edited" -msgstr "La banque a été modifée avec succès." +#: views.py:645 +msgid "The bank was edited." +msgstr "La banque a été modifiée." -#: views.py:650 +#: views.py:651 msgid "Edit bank" -msgstr "Éditer la banque" +msgstr "Modifier la banque" -#: views.py:669 +#: views.py:670 #, python-format -msgid "" -"The bank %(bank_name)s has been successfully deleted." -msgstr "La banque %(bank_name)s a été supprimée avec succès." +msgid "The bank %(bank_name)s was deleted." +msgstr "La banque %(bank_name)s a été supprimée." #: views.py:677 #, python-format @@ -708,121 +938,8 @@ msgstr "Vos modifications ont correctement été prises en compte." #: views.py:834 msgid "You are not allowed to credit your balance." -msgstr "Vous n'êtes pas autorisé à créditer votre solde." +msgstr "Vous n'êtes pas autorisés à créditer votre solde." -#: views.py:866 +#: views.py:869 msgid "Refill your balance" -msgstr "Créditer votre solde" - -#: models.py:137 -msgid "Cheque number" -msgstr "Numéro de chèque" - -msgid "Not specified" -msgstr "Non renseigné" - -msgid "A cheque number and a bank must be specified." -msgstr "Un numéro de chèqe et une banque doivent être renseignés." - -#: models.py:155 -msgid "Can change the \"controlled\" state" -msgstr "Peut modifier l'état \"controllé\"" - -#: models.py:157 -msgid "Can see an invoice's details" -msgstr "Peut voir les détails d'une facture" - -#: models.py:159 -msgid "Can edit all the previous invoices" -msgstr "Peut modifier toutes les factures existantes" - -#: models.py:297 -msgid "Connexion" -msgstr "Connexion" - -#: models.py:336 -msgid "Membership" -msgstr "Adhésion" - -#: models.py:299 -msgid "Both of them" -msgstr "Les deux" - -#: models.py:328 -msgid "Duration (in whole month)" -msgstr "Durée (en mois entiers)" - -#: models.py:336 -msgid "Type of cotisation" -msgstr "Type de cotisation" - -#: models.py:341 -msgid "Can see a purchase's details" -msgstr "Peut voir les détails d'un achat" - -#: models.py:342 -msgid "Can edit all the previous purchases" -msgstr "Peut voir les achats existants" - -#: models.py:344 -msgid "Purchase" -msgstr "Achat" - -#: models.py:345 -msgid "Purchases" -msgstr "Achat" - -#: models.py:512 -msgid "Club" -msgstr "Club" - -#: models.py:530 -msgid "Unitary price" -msgstr "Prix unitaire" - -#: models.py:538 -msgid "Type of users concerned" -msgstr "Type d'utilisateurs concernés" - -#: models.py:561 -msgid "Can see an article's details" -msgstr "Peut voir les détails d'un article" - -#: models.py:621 -msgid "Name" -msgstr "Nom" - -#: models.py:626 -msgid "Can see a bank's details" -msgstr "Peut voir les détails d'une banque" - -#: models.py:344 -msgid "Standard" -msgstr "Standard" - -msgid "Cheque" -msgstr "Chèque" - -#: models.py:647 -msgid "Method" -msgstr "Moyen" - -#: models.py:663 -msgid "Can see a payement's details" -msgstr "Peut voir les détails d'un paiement" - -#: models.py:785 -msgid "Starting date" -msgstr "Date de début" - -#: models.py:788 -msgid "Ending date" -msgstr "Date de fin" - -#: models.py:793 -msgid "Can see a cotisation's details" -msgstr "Peut voir les détails d'une cotisation" - -#: models.py:794 -msgid "Can edit the previous cotisations" -msgstr "Peut voir les cotisations existantes" +msgstr "Recharger votre solde" diff --git a/cotisations/migrations/0033_auto_20180818_1319.py b/cotisations/migrations/0033_auto_20180818_1319.py new file mode 100644 index 00000000..2e61fbb6 --- /dev/null +++ b/cotisations/migrations/0033_auto_20180818_1319.py @@ -0,0 +1,181 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-08-18 11:19 +from __future__ import unicode_literals + +import cotisations.validators +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import re2o.aes_field + + +class Migration(migrations.Migration): + + dependencies = [ + ('cotisations', '0032_custom_invoice'), + ] + + operations = [ + migrations.AlterModelOptions( + name='article', + options={'permissions': (('view_article', 'Can view an article object'), ('buy_every_article', 'Can buy every article')), 'verbose_name': 'article', 'verbose_name_plural': 'articles'}, + ), + migrations.AlterModelOptions( + name='balancepayment', + options={'verbose_name': 'user balance'}, + ), + migrations.AlterModelOptions( + name='banque', + options={'permissions': (('view_banque', 'Can view a bank object'),), 'verbose_name': 'bank', 'verbose_name_plural': 'banks'}, + ), + migrations.AlterModelOptions( + name='cotisation', + options={'permissions': (('view_cotisation', 'Can view a subscription object'), ('change_all_cotisation', 'Can edit the previous subscriptions')), 'verbose_name': 'subscription', 'verbose_name_plural': 'subscriptions'}, + ), + migrations.AlterModelOptions( + name='custominvoice', + options={'permissions': (('view_custominvoice', 'Can view a custom invoice object'),)}, + ), + migrations.AlterModelOptions( + name='facture', + options={'permissions': (('change_facture_control', 'Can edit the "controlled" state'), ('view_facture', 'Can view an invoice object'), ('change_all_facture', 'Can edit all the previous invoices')), 'verbose_name': 'invoice', 'verbose_name_plural': 'invoices'}, + ), + migrations.AlterModelOptions( + name='paiement', + options={'permissions': (('view_paiement', 'Can view a payment method object'), ('use_every_payment', 'Can use every payment method')), 'verbose_name': 'payment method', 'verbose_name_plural': 'payment methods'}, + ), + migrations.AlterModelOptions( + name='vente', + options={'permissions': (('view_vente', 'Can view a purchase object'), ('change_all_vente', 'Can edit all the previous purchases')), 'verbose_name': 'purchase', 'verbose_name_plural': 'purchases'}, + ), + migrations.AlterField( + model_name='article', + name='available_for_everyone', + field=models.BooleanField(default=False, verbose_name='is available for every user'), + ), + migrations.AlterField( + model_name='article', + name='duration', + field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration (in months)'), + ), + migrations.AlterField( + model_name='article', + name='name', + field=models.CharField(max_length=255, verbose_name='designation'), + ), + migrations.AlterField( + model_name='article', + name='prix', + field=models.DecimalField(decimal_places=2, max_digits=5, verbose_name='unit price'), + ), + migrations.AlterField( + model_name='article', + name='type_cotisation', + field=models.CharField(blank=True, choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], default=None, max_length=255, null=True, verbose_name='subscription type'), + ), + migrations.AlterField( + model_name='article', + name='type_user', + field=models.CharField(choices=[('Adherent', 'Member'), ('Club', 'Club'), ('All', 'Both of them')], default='All', max_length=255, verbose_name='type of users concerned'), + ), + migrations.AlterField( + model_name='banque', + name='name', + field=models.CharField(max_length=255), + ), + migrations.AlterField( + model_name='comnpaypayment', + name='payment_credential', + field=models.CharField(blank=True, default='', max_length=255, verbose_name='ComNpay VAT Number'), + ), + migrations.AlterField( + model_name='comnpaypayment', + name='payment_pass', + field=re2o.aes_field.AESEncryptedField(blank=True, max_length=255, null=True, verbose_name='ComNpay secret key'), + ), + migrations.AlterField( + model_name='comnpaypayment', + name='production', + field=models.BooleanField(default=True, verbose_name='Production mode enabled (production URL, instead of homologation)'), + ), + migrations.AlterField( + model_name='cotisation', + name='date_end', + field=models.DateTimeField(verbose_name='end date'), + ), + migrations.AlterField( + model_name='cotisation', + name='date_start', + field=models.DateTimeField(verbose_name='start date'), + ), + migrations.AlterField( + model_name='cotisation', + name='type_cotisation', + field=models.CharField(choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], default='All', max_length=255, verbose_name='subscription type'), + ), + migrations.AlterField( + model_name='cotisation', + name='vente', + field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='cotisations.Vente', verbose_name='purchase'), + ), + migrations.AlterField( + model_name='facture', + name='cheque', + field=models.CharField(blank=True, max_length=255, verbose_name='cheque number'), + ), + migrations.AlterField( + model_name='facture', + name='control', + field=models.BooleanField(default=False, verbose_name='controlled'), + ), + migrations.AlterField( + model_name='facture', + name='valid', + field=models.BooleanField(default=True, verbose_name='validated'), + ), + migrations.AlterField( + model_name='paiement', + name='available_for_everyone', + field=models.BooleanField(default=False, verbose_name='is available for every user'), + ), + migrations.AlterField( + model_name='paiement', + name='is_balance', + field=models.BooleanField(default=False, editable=False, help_text='There should be only one balance payment method.', validators=[cotisations.validators.check_no_balance], verbose_name='is user balance'), + ), + migrations.AlterField( + model_name='paiement', + name='moyen', + field=models.CharField(max_length=255, verbose_name='method'), + ), + migrations.AlterField( + model_name='vente', + name='duration', + field=models.PositiveIntegerField(blank=True, null=True, verbose_name='duration (in months)'), + ), + migrations.AlterField( + model_name='vente', + name='facture', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cotisations.BaseInvoice', verbose_name='invoice'), + ), + migrations.AlterField( + model_name='vente', + name='name', + field=models.CharField(max_length=255, verbose_name='article'), + ), + migrations.AlterField( + model_name='vente', + name='number', + field=models.IntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='amount'), + ), + migrations.AlterField( + model_name='vente', + name='prix', + field=models.DecimalField(decimal_places=2, max_digits=5, verbose_name='price'), + ), + migrations.AlterField( + model_name='vente', + name='type_cotisation', + field=models.CharField(blank=True, choices=[('Connexion', 'Connection'), ('Adhesion', 'Membership'), ('All', 'Both of them')], max_length=255, null=True, verbose_name='subscription type'), + ), + ] diff --git a/cotisations/models.py b/cotisations/models.py index 7ca157eb..ac601665 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -41,8 +41,7 @@ from django.dispatch import receiver from django.forms import ValidationError from django.core.validators import MinValueValidator from django.utils import timezone -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _l +from django.utils.translation import ugettext_lazy as _ from django.urls import reverse from django.shortcuts import redirect from django.contrib import messages @@ -58,7 +57,7 @@ from cotisations.validators import check_no_balance class BaseInvoice(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model): date = models.DateTimeField( auto_now_add=True, - verbose_name=_l("Date") + verbose_name=_("Date") ) # TODO : change prix to price @@ -134,17 +133,17 @@ class Facture(BaseInvoice): cheque = models.CharField( max_length=255, blank=True, - verbose_name=_l("Cheque number") + verbose_name=_("cheque number") ) # TODO : change name to validity for clarity valid = models.BooleanField( default=True, - verbose_name=_l("Validated") + verbose_name=_("validated") ) # TODO : changed name to controlled for clarity control = models.BooleanField( default=False, - verbose_name=_l("Controlled") + verbose_name=_("controlled") ) class Meta: @@ -152,14 +151,14 @@ class Facture(BaseInvoice): permissions = ( # TODO : change facture to invoice ('change_facture_control', - _l("Can change the \"controlled\" state")), + _("Can edit the \"controlled\" state")), ('view_facture', - _l("Can see an invoice's details")), + _("Can view an invoice object")), ('change_all_facture', - _l("Can edit all the previous invoices")), + _("Can edit all the previous invoices")), ) - verbose_name = _l("Invoice") - verbose_name_plural = _l("Invoices") + verbose_name = _("invoice") + verbose_name_plural = _("invoices") def linked_objects(self): """Return linked objects : machine and domain. @@ -195,7 +194,7 @@ class Facture(BaseInvoice): def can_view(self, user_request, *_args, **_kwargs): if not user_request.has_perm('cotisations.view_facture') and \ self.user != user_request: - return False, _("You don't have the right to see someone else's " + return False, _("You don't have the right to view someone else's " "invoices history.") elif not self.valid: return False, _("The invoice has been invalidated.") @@ -222,7 +221,7 @@ class Facture(BaseInvoice): if user_request.has_perm('cotisations.add_facture'): return True, None if len(Paiement.find_allowed_payments(user_request)) <= 0: - return False, _("There are no payment types which you can use.") + return False, _("There are no payment method which you can use.") if len(Article.find_allowed_articles(user_request)) <= 0: return False, _("There are no article that you can buy.") return True, None @@ -259,22 +258,22 @@ def facture_post_delete(**kwargs): class CustomInvoice(BaseInvoice): class Meta: permissions = ( - ('view_custominvoice', _l("Can view a custom invoice")), + ('view_custominvoice', _("Can view a custom invoice object")), ) recipient = models.CharField( max_length=255, - verbose_name=_l("Recipient") + verbose_name=_("Recipient") ) payment = models.CharField( max_length=255, - verbose_name=_l("Payment type") + verbose_name=_("Payment type") ) address = models.CharField( max_length=255, - verbose_name=_l("Address") + verbose_name=_("Address") ) paid = models.BooleanField( - verbose_name="Paid" + verbose_name=_("Paid") ) @@ -294,38 +293,38 @@ class Vente(RevMixin, AclMixin, models.Model): # TODO : change this to English COTISATION_TYPE = ( - ('Connexion', _l("Connexion")), - ('Adhesion', _l("Membership")), - ('All', _l("Both of them")), + ('Connexion', _("Connection")), + ('Adhesion', _("Membership")), + ('All', _("Both of them")), ) # TODO : change facture to invoice facture = models.ForeignKey( 'BaseInvoice', on_delete=models.CASCADE, - verbose_name=_l("Invoice") + verbose_name=_("invoice") ) # TODO : change number to amount for clarity number = models.IntegerField( validators=[MinValueValidator(1)], - verbose_name=_l("Amount") + verbose_name=_("amount") ) # TODO : change this field for a ForeinKey to Article name = models.CharField( max_length=255, - verbose_name=_l("Article") + verbose_name=_("article") ) # TODO : change prix to price # TODO : this field is not needed if you use Article ForeignKey prix = models.DecimalField( max_digits=5, decimal_places=2, - verbose_name=_l("Price")) + verbose_name=_("price")) # TODO : this field is not needed if you use Article ForeignKey duration = models.PositiveIntegerField( blank=True, null=True, - verbose_name=_l("Duration (in whole month)") + verbose_name=_("duration (in months)") ) # TODO : this field is not needed if you use Article ForeignKey type_cotisation = models.CharField( @@ -333,16 +332,16 @@ class Vente(RevMixin, AclMixin, models.Model): blank=True, null=True, max_length=255, - verbose_name=_l("Type of cotisation") + verbose_name=_("subscription type") ) class Meta: permissions = ( - ('view_vente', _l("Can see a purchase's details")), - ('change_all_vente', _l("Can edit all the previous purchases")), + ('view_vente', _("Can view a purchase object")), + ('change_all_vente', _("Can edit all the previous purchases")), ) - verbose_name = _l("Purchase") - verbose_name_plural = _l("Purchases") + verbose_name = _("purchase") + verbose_name_plural = _("purchases") # TODO : change prix_total to total_price def prix_total(self): @@ -409,7 +408,7 @@ class Vente(RevMixin, AclMixin, models.Model): # Checking that if a cotisation is specified, there is also a duration if self.type_cotisation and not self.duration: raise ValidationError( - _("A cotisation should always have a duration.") + _("Duration must be specified for a subscription.") ) self.update_cotisation() super(Vente, self).save(*args, **kwargs) @@ -445,7 +444,7 @@ class Vente(RevMixin, AclMixin, models.Model): def can_view(self, user_request, *_args, **_kwargs): if (not user_request.has_perm('cotisations.view_vente') and self.facture.user != user_request): - return False, _("You don't have the right to see someone " + return False, _("You don't have the right to view someone " "else's purchase history.") else: return True, None @@ -508,38 +507,38 @@ class Article(RevMixin, AclMixin, models.Model): # TODO : Either use TYPE or TYPES in both choices but not both USER_TYPES = ( - ('Adherent', _l("Member")), - ('Club', _l("Club")), - ('All', _l("Both of them")), + ('Adherent', _("Member")), + ('Club', _("Club")), + ('All', _("Both of them")), ) COTISATION_TYPE = ( - ('Connexion', _l("Connexion")), - ('Adhesion', _l("Membership")), - ('All', _l("Both of them")), + ('Connexion', _("Connection")), + ('Adhesion', _("Membership")), + ('All', _("Both of them")), ) name = models.CharField( max_length=255, - verbose_name=_l("Designation") + verbose_name=_("designation") ) # TODO : change prix to price prix = models.DecimalField( max_digits=5, decimal_places=2, - verbose_name=_l("Unitary price") + verbose_name=_("unit price") ) duration = models.PositiveIntegerField( blank=True, null=True, validators=[MinValueValidator(0)], - verbose_name=_l("Duration (in whole month)") + verbose_name=_("duration (in months)") ) type_user = models.CharField( choices=USER_TYPES, default='All', max_length=255, - verbose_name=_l("Type of users concerned") + verbose_name=_("type of users concerned") ) type_cotisation = models.CharField( choices=COTISATION_TYPE, @@ -547,31 +546,31 @@ class Article(RevMixin, AclMixin, models.Model): blank=True, null=True, max_length=255, - verbose_name=_l("Type of cotisation") + verbose_name=_("subscription type") ) available_for_everyone = models.BooleanField( default=False, - verbose_name=_l("Is available for every user") + verbose_name=_("is available for every user") ) unique_together = ('name', 'type_user') class Meta: permissions = ( - ('view_article', _l("Can see an article's details")), - ('buy_every_article', _l("Can buy every_article")) + ('view_article', _("Can view an article object")), + ('buy_every_article', _("Can buy every article")) ) - verbose_name = "Article" - verbose_name_plural = "Articles" + verbose_name = "article" + verbose_name_plural = "articles" def clean(self): if self.name.lower() == 'solde': raise ValidationError( - _("Solde is a reserved article name") + _("Balance is a reserved article name.") ) if self.type_cotisation and not self.duration: raise ValidationError( - _("Duration must be specified for a cotisation") + _("Duration must be specified for a subscription.") ) def __str__(self): @@ -592,7 +591,7 @@ class Article(RevMixin, AclMixin, models.Model): self.available_for_everyone or user.has_perm('cotisations.buy_every_article') or user.has_perm('cotisations.add_facture'), - _("You cannot buy this Article.") + _("You can't buy this article.") ) @classmethod @@ -618,15 +617,14 @@ class Banque(RevMixin, AclMixin, models.Model): name = models.CharField( max_length=255, - verbose_name=_l("Name") ) class Meta: permissions = ( - ('view_banque', _l("Can see a bank's details")), + ('view_banque', _("Can view a bank object")), ) - verbose_name = _l("Bank") - verbose_name_plural = _l("Banks") + verbose_name = _("bank") + verbose_name_plural = _("banks") def __str__(self): return self.name @@ -644,33 +642,33 @@ class Paiement(RevMixin, AclMixin, models.Model): # TODO : change moyen to method moyen = models.CharField( max_length=255, - verbose_name=_l("Method") + verbose_name=_("method") ) available_for_everyone = models.BooleanField( default=False, - verbose_name=_l("Is available for every user") + verbose_name=_("is available for every user") ) is_balance = models.BooleanField( default=False, editable=False, - verbose_name=_l("Is user balance"), - help_text=_l("There should be only one balance payment method."), + verbose_name=_("is user balance"), + help_text=_("There should be only one balance payment method."), validators=[check_no_balance] ) class Meta: permissions = ( - ('view_paiement', _l("Can see a payement's details")), - ('use_every_payment', _l("Can use every payement")), + ('view_paiement', _("Can view a payment method object")), + ('use_every_payment', _("Can use every payment method")), ) - verbose_name = _l("Payment method") - verbose_name_plural = _l("Payment methods") + verbose_name = _("payment method") + verbose_name_plural = _("payment methods") def __str__(self): return self.moyen def clean(self): - """ + """l Override of the herited clean function to get a correct name """ self.moyen = self.moyen.title() @@ -698,8 +696,8 @@ class Paiement(RevMixin, AclMixin, models.Model): if any(sell.type_cotisation for sell in invoice.vente_set.all()): messages.success( request, - _("The cotisation of %(member_name)s has been \ - extended to %(end_date)s.") % { + _("The subscription of %(member_name)s was extended to" + " %(end_date)s.") % { 'member_name': invoice.user.pseudo, 'end_date': invoice.user.end_adhesion() } @@ -708,7 +706,7 @@ class Paiement(RevMixin, AclMixin, models.Model): else: messages.success( request, - _("The invoice has been created.") + _("The invoice was created.") ) return redirect(reverse( 'users:profil', @@ -729,7 +727,7 @@ class Paiement(RevMixin, AclMixin, models.Model): self.available_for_everyone or user.has_perm('cotisations.use_every_payment') or user.has_perm('cotisations.add_facture'), - _("You cannot use this Payment.") + _("You can't use this payment method.") ) @classmethod @@ -747,7 +745,7 @@ class Paiement(RevMixin, AclMixin, models.Model): p = find_payment_method(self) if p is not None: return p._meta.verbose_name - return _("No custom payment method") + return _("No custom payment method.") class Cotisation(RevMixin, AclMixin, models.Model): @@ -763,9 +761,9 @@ class Cotisation(RevMixin, AclMixin, models.Model): """ COTISATION_TYPE = ( - ('Connexion', _l("Connexion")), - ('Adhesion', _l("Membership")), - ('All', _l("Both of them")), + ('Connexion', _("Connection")), + ('Adhesion', _("Membership")), + ('All', _("Both of them")), ) # TODO : change vente to purchase @@ -773,34 +771,36 @@ class Cotisation(RevMixin, AclMixin, models.Model): 'Vente', on_delete=models.CASCADE, null=True, - verbose_name=_l("Purchase") + verbose_name=_("purchase") ) type_cotisation = models.CharField( choices=COTISATION_TYPE, max_length=255, default='All', - verbose_name=_l("Type of cotisation") + verbose_name=_("subscription type") ) date_start = models.DateTimeField( - verbose_name=_l("Starting date") + verbose_name=_("start date") ) date_end = models.DateTimeField( - verbose_name=_l("Ending date") + verbose_name=_("end date") ) class Meta: permissions = ( - ('view_cotisation', _l("Can see a cotisation's details")), - ('change_all_cotisation', _l("Can edit the previous cotisations")), + ('view_cotisation', _("Can view a subscription object")), + ('change_all_cotisation', _("Can edit the previous subscriptions")), ) + verbose_name = _("subscription") + verbose_name_plural = _("subscriptions") def can_edit(self, user_request, *_args, **_kwargs): if not user_request.has_perm('cotisations.change_cotisation'): - return False, _("You don't have the right to edit a cotisation.") + return False, _("You don't have the right to edit a subscription.") elif not user_request.has_perm('cotisations.change_all_cotisation') \ and (self.vente.facture.control or not self.vente.facture.valid): - return False, _("You don't have the right to edit a cotisation " + return False, _("You don't have the right to edit a subscription " "already controlled or invalidated.") else: return True, None @@ -808,9 +808,9 @@ class Cotisation(RevMixin, AclMixin, models.Model): def can_delete(self, user_request, *_args, **_kwargs): if not user_request.has_perm('cotisations.delete_cotisation'): return False, _("You don't have the right to delete a " - "cotisation.") + "subscription.") if self.vente.facture.control or not self.vente.facture.valid: - return False, _("You don't have the right to delete a cotisation " + return False, _("You don't have the right to delete a subscription " "already controlled or invalidated.") else: return True, None @@ -818,8 +818,8 @@ class Cotisation(RevMixin, AclMixin, models.Model): def can_view(self, user_request, *_args, **_kwargs): if not user_request.has_perm('cotisations.view_cotisation') and\ self.vente.facture.user != user_request: - return False, _("You don't have the right to see someone else's " - "cotisation history.") + return False, _("You don't have the right to view someone else's " + "subscription history.") else: return True, None @@ -847,3 +847,4 @@ def cotisation_post_delete(**_kwargs): """ regen('mac_ip_list') regen('mailing') + diff --git a/cotisations/payment_methods/balance/models.py b/cotisations/payment_methods/balance/models.py index 4e488405..250e6949 100644 --- a/cotisations/payment_methods/balance/models.py +++ b/cotisations/payment_methods/balance/models.py @@ -21,8 +21,7 @@ from django.db import models from django.shortcuts import redirect from django.urls import reverse -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _l +from django.utils.translation import ugettext_lazy as _ from django.contrib import messages @@ -36,7 +35,7 @@ class BalancePayment(PaymentMethodMixin, models.Model): """ class Meta: - verbose_name = _l("User Balance") + verbose_name = _("user balance") payment = models.OneToOneField( Paiement, @@ -45,8 +44,8 @@ class BalancePayment(PaymentMethodMixin, models.Model): editable=False ) minimum_balance = models.DecimalField( - verbose_name=_l("Minimum balance"), - help_text=_l("The minimal amount of money allowed for the balance" + verbose_name=_("Minimum balance"), + help_text=_("The minimal amount of money allowed for the balance" " at the end of a payment. You can specify negative " "amount." ), @@ -55,8 +54,8 @@ class BalancePayment(PaymentMethodMixin, models.Model): default=0, ) maximum_balance = models.DecimalField( - verbose_name=_l("Maximum balance"), - help_text=_l("The maximal amount of money allowed for the balance."), + verbose_name=_("Maximum balance"), + help_text=_("The maximal amount of money allowed for the balance."), max_digits=5, decimal_places=2, default=50, @@ -64,7 +63,7 @@ class BalancePayment(PaymentMethodMixin, models.Model): null=True, ) credit_balance_allowed = models.BooleanField( - verbose_name=_l("Allow user to credit their balance"), + verbose_name=_("Allow user to credit their balance"), default=False, ) @@ -97,7 +96,7 @@ class BalancePayment(PaymentMethodMixin, models.Model): if len(p) > 0: form.add_error( 'payment_method', - _("There is already a payment type for user balance") + _("There is already a payment method for user balance.") ) def alter_payment(self, payment): @@ -118,3 +117,4 @@ class BalancePayment(PaymentMethodMixin, models.Model): len(Paiement.find_allowed_payments(user_request) .exclude(is_balance=True)) > 0 ) and self.credit_balance_allowed + diff --git a/cotisations/payment_methods/cheque/models.py b/cotisations/payment_methods/cheque/models.py index c2680e7a..cd6d2920 100644 --- a/cotisations/payment_methods/cheque/models.py +++ b/cotisations/payment_methods/cheque/models.py @@ -21,7 +21,7 @@ from django.db import models from django.shortcuts import redirect from django.urls import reverse -from django.utils.translation import ugettext_lazy as _l +from django.utils.translation import ugettext_lazy as _ from cotisations.models import Paiement from cotisations.payment_methods.mixins import PaymentMethodMixin @@ -33,7 +33,7 @@ class ChequePayment(PaymentMethodMixin, models.Model): """ class Meta: - verbose_name = _l("Cheque") + verbose_name = _("Cheque") payment = models.OneToOneField( Paiement, @@ -52,3 +52,4 @@ class ChequePayment(PaymentMethodMixin, models.Model): 'cotisations:cheque:validate', kwargs={'invoice_pk': invoice.pk} )) + diff --git a/cotisations/payment_methods/cheque/views.py b/cotisations/payment_methods/cheque/views.py index 4d164a79..3cce3e5c 100644 --- a/cotisations/payment_methods/cheque/views.py +++ b/cotisations/payment_methods/cheque/views.py @@ -44,7 +44,7 @@ def cheque(request, invoice_pk): if invoice.valid or not isinstance(payment_method, ChequePayment): messages.error( request, - _("You cannot pay this invoice with a cheque.") + _("You can't pay this invoice with a cheque.") ) return redirect(reverse( 'users:profil', @@ -67,3 +67,4 @@ def cheque(request, invoice_pk): 'amount': invoice.prix_total() } ) + diff --git a/cotisations/payment_methods/comnpay/models.py b/cotisations/payment_methods/comnpay/models.py index dbc2f4ba..af389cf8 100644 --- a/cotisations/payment_methods/comnpay/models.py +++ b/cotisations/payment_methods/comnpay/models.py @@ -21,8 +21,7 @@ from django.db import models from django.shortcuts import render from django.urls import reverse -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _l +from django.utils.translation import ugettext_lazy as _ from cotisations.models import Paiement from cotisations.payment_methods.mixins import PaymentMethodMixin @@ -37,7 +36,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): """ class Meta: - verbose_name = "ComNpay" + verbose_name = _("ComNpay") payment = models.OneToOneField( Paiement, @@ -49,17 +48,17 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): max_length=255, default='', blank=True, - verbose_name=_l("ComNpay VAD Number"), + verbose_name=_("ComNpay VAT Number"), ) payment_pass = AESEncryptedField( max_length=255, null=True, blank=True, - verbose_name=_l("ComNpay Secret Key"), + verbose_name=_("ComNpay secret key"), ) minimum_payment = models.DecimalField( - verbose_name=_l("Minimum payment"), - help_text=_l("The minimal amount of money you have to use when paying" + verbose_name=_("Minimum payment"), + help_text=_("The minimal amount of money you have to use when paying" " with ComNpay"), max_digits=5, decimal_places=2, @@ -67,7 +66,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): ) production = models.BooleanField( default=True, - verbose_name=_l("Production mode enabled (production url, instead of homologation)"), + verbose_name=_("Production mode enabled (production URL, instead of homologation)"), ) def return_url_comnpay(self): @@ -102,7 +101,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): 'action': self.return_url_comnpay(), 'method': 'POST', 'content': p.buildSecretHTML( - _("Pay invoice no : ")+str(invoice.id), + _("Pay invoice number ")+str(invoice.id), invoice.prix_total(), idTransaction=str(invoice.id) ), @@ -114,6 +113,6 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): """Checks that the price meets the requirement to be paid with ComNpay. """ return ((price >= self.minimum_payment), - _('In order to pay your invoice with ComNpay' - ', the price must be grater than {} €') - .format(self.minimum_payment)) + _("In order to pay your invoice with ComNpay, the price must" + " be greater than {} €.").format(self.minimum_payment)) + diff --git a/cotisations/payment_methods/comnpay/views.py b/cotisations/payment_methods/comnpay/views.py index 89966b48..2383f1e9 100644 --- a/cotisations/payment_methods/comnpay/views.py +++ b/cotisations/payment_methods/comnpay/views.py @@ -50,7 +50,7 @@ def accept_payment(request, factureid): if invoice.valid: messages.success( request, - _("The payment of %(amount)s € has been accepted.") % { + _("The payment of %(amount)s € was accepted.") % { 'amount': invoice.prix_total() } ) @@ -60,8 +60,8 @@ def accept_payment(request, factureid): for purchase in invoice.vente_set.all()): messages.success( request, - _("The cotisation of %(member_name)s has been \ - extended to %(end_date)s.") % { + _("The subscription of %(member_name)s was extended to" + " %(end_date)s.") % { 'member_name': request.user.pseudo, 'end_date': request.user.end_adhesion() } @@ -81,7 +81,7 @@ def refuse_payment(request): """ messages.error( request, - _("The payment has been refused.") + _("The payment was refused.") ) return redirect(reverse( 'users:profil', @@ -136,3 +136,4 @@ def ipn(request): # Everything worked we send a reponse to Comnpay indicating that # it's ok for them to proceed return HttpResponse("HTTP/1.0 200 OK") + diff --git a/cotisations/payment_methods/forms.py b/cotisations/payment_methods/forms.py index d4d55a74..daa65118 100644 --- a/cotisations/payment_methods/forms.py +++ b/cotisations/payment_methods/forms.py @@ -19,8 +19,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from django import forms -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy as _l +from django.utils.translation import ugettext_lazy as _ from . import PAYMENT_METHODS from cotisations.utils import find_payment_method @@ -58,8 +57,8 @@ class PaymentMethodForm(forms.Form): """ payment_method = forms.ChoiceField( - label=_l("Special payment method"), - help_text=_l("Warning : You will not be able to change the payment " + label=_("Special payment method"), + help_text=_("Warning: you will not be able to change the payment " "method later. But you will be allowed to edit the other " "options." ), @@ -70,7 +69,7 @@ class PaymentMethodForm(forms.Form): super(PaymentMethodForm, self).__init__(*args, **kwargs) prefix = kwargs.get('prefix', None) self.fields['payment_method'].choices = [(i,p.NAME) for (i,p) in enumerate(PAYMENT_METHODS)] - self.fields['payment_method'].choices.insert(0, ('', _l('no'))) + self.fields['payment_method'].choices.insert(0, ('', _('no'))) self.fields['payment_method'].widget.attrs = { 'id': 'paymentMethodSelect' } diff --git a/cotisations/templates/cotisations/aff_article.html b/cotisations/templates/cotisations/aff_article.html index f547bcf0..b07035da 100644 --- a/cotisations/templates/cotisations/aff_article.html +++ b/cotisations/templates/cotisations/aff_article.html @@ -32,8 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc., {% trans "Article" %} {% trans "Price" %} - {% trans "Cotisation type" %} - {% trans "Duration (month)" %} + {% trans "Subscription type" %} + {% trans "Duration (in months)" %} {% trans "Concerned users" %} {% trans "Available for everyone" %} diff --git a/cotisations/templates/cotisations/aff_banque.html b/cotisations/templates/cotisations/aff_banque.html index b5074c6c..057c6995 100644 --- a/cotisations/templates/cotisations/aff_banque.html +++ b/cotisations/templates/cotisations/aff_banque.html @@ -26,25 +26,23 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load i18n %} {% load logs_extra %} - - - - - - - - {% for banque in banque_list %} +
{% trans "Bank" %}
+ - - + + - {% endfor %} -
{{ banque.name }} - {% can_edit banque %} - - - - {% acl_end %} - {% history_button banque %} - {% trans "Bank" %}
+ + {% for banque in banque_list %} + + {{ banque.name }} + + {% can_edit banque %} + {% include 'buttons/edit.html' with href='cotisations:edit-banque' id=banque.id %} + {% acl_end %} + {% history_button banque %} + + + {% endfor %} + diff --git a/cotisations/templates/cotisations/aff_cotisations.html b/cotisations/templates/cotisations/aff_cotisations.html index 6b5fa8fa..b7fe993b 100644 --- a/cotisations/templates/cotisations/aff_cotisations.html +++ b/cotisations/templates/cotisations/aff_cotisations.html @@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include 'buttons/sort.html' with prefix='cotis' col='date' text=tr_date %} - {% trans "Invoice id" as tr_invoice_id %} + {% trans "Invoice ID" as tr_invoice_id %} {% include 'buttons/sort.html' with prefix='cotis' col='id' text=tr_invoice_id %} @@ -65,32 +65,15 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ facture.date }} {{ facture.id }} - + {% can_edit facture %} + {% include 'buttons/edit.html' with href='cotisations:edit-facture' id=facture.id %} + {% acl_else %} + {% trans "Controlled invoice" %} + {% acl_end %} + {% can_delete facture %} + {% include 'buttons/suppr.html' with href='cotisations:del-facture' id=facture.id %} + {% acl_end %} + {% history_button facture text=True html_class=False %} {% if facture.valid %} @@ -109,3 +92,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include 'pagination.html' with list=facture_list %} {% endif %} + diff --git a/cotisations/templates/cotisations/aff_custom_invoice.html b/cotisations/templates/cotisations/aff_custom_invoice.html index 1d182178..41984c2c 100644 --- a/cotisations/templates/cotisations/aff_custom_invoice.html +++ b/cotisations/templates/cotisations/aff_custom_invoice.html @@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include 'buttons/sort.html' with prefix='invoice' col='date' text=tr_date %} - {% trans "Invoice id" as tr_invoice_id %} + {% trans "Invoice ID" as tr_invoice_id %} {% include 'buttons/sort.html' with prefix='invoice' col='id' text=tr_invoice_id %} diff --git a/cotisations/templates/cotisations/aff_paiement.html b/cotisations/templates/cotisations/aff_paiement.html index 46523928..633eb456 100644 --- a/cotisations/templates/cotisations/aff_paiement.html +++ b/cotisations/templates/cotisations/aff_paiement.html @@ -41,7 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ paiement.moyen }} {{ paiement.available_for_everyone|tick }} - {{paiement.get_payment_method_name}} + {{ paiement.get_payment_method_name }} {% can_edit paiement %} diff --git a/cotisations/templates/cotisations/control.html b/cotisations/templates/cotisations/control.html index bb3a06b6..6a4a5cca 100644 --- a/cotisations/templates/cotisations/control.html +++ b/cotisations/templates/cotisations/control.html @@ -30,17 +30,20 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}{% trans "Invoice control" %}{% endblock %} {% block content %} +

{% trans "Invoice control and validation" %}

+ {% if facture_list.paginator %} {% include 'pagination.html' with list=facture_list %} {% endif %} +
{% csrf_token %} {{ controlform.management_form }} - + @@ -65,7 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% trans "Profil" %}{% trans "Profile" %} {% trans "Last name" as tr_last_name %} {% include 'buttons/sort.html' with prefix='control' col='name' text=tr_last_name %} @@ -50,11 +53,11 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include 'buttons/sort.html' with prefix='control' col='surname' text=tr_first_name %} - {% trans "Invoice id" as tr_invoice_id %} + {% trans "Invoice ID" as tr_invoice_id %} {% include 'buttons/sort.html' with prefix='control' col='id' text=tr_invoice_id %} - {% trans "User id" as tr_user_id %} + {% trans "User ID" as tr_user_id %} {% include 'buttons/sort.html' with prefix='control' col='user-id' text=tr_user_id %} {% trans "Designation" %} {% trans "Date" as tr_date %} - {% include 'buttons/sort.html' with prefix='control' col='date' text=tr_date %}i + {% include 'buttons/sort.html' with prefix='control' col='date' text=tr_date %} {% trans "Validated" as tr_validated %} @@ -109,3 +112,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% if facture_list.paginator %} {% include 'pagination.html' with list=facture_list %} {% endif %} + diff --git a/cotisations/templates/cotisations/delete.html b/cotisations/templates/cotisations/delete.html index a1c95d7a..dc06e5a5 100644 --- a/cotisations/templates/cotisations/delete.html +++ b/cotisations/templates/cotisations/delete.html @@ -26,18 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load bootstrap3 %} {% load i18n %} -{% block title %}{% trans "Deletion of cotisations" %}{% endblock %} +{% block title %}{% trans "Deletion of subscriptions" %}{% endblock %} {% block content %} {% csrf_token %}

- {% blocktrans %} - Warning. Are you sure you really want te delete this {{ object_name }} object ( {{ objet }} ) ? - {% endblocktrans %} + {% blocktrans %}Warning: are you sure you really want to delete this {{ object_name }} object ( {{ objet }} )?{% endblocktrans %}

{% trans "Confirm" as tr_confirm %} {% bootstrap_button tr_confirm button_type='submit' icon='trash' %} {% endblock %} + diff --git a/cotisations/templates/cotisations/edit_facture.html b/cotisations/templates/cotisations/edit_facture.html index d28f8511..9ddcac8c 100644 --- a/cotisations/templates/cotisations/edit_facture.html +++ b/cotisations/templates/cotisations/edit_facture.html @@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load massive_bootstrap_form %} {% load i18n %} -{% block title %}{% trans "Invoices creation and edition" %}{% endblock %} +{% block title %}{% trans "Creation and editing of invoices" %}{% endblock %} {% block content %} {% bootstrap_form_errors factureform %} @@ -62,3 +62,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endblock %} + diff --git a/cotisations/templates/cotisations/facture.html b/cotisations/templates/cotisations/facture.html index 4ec05ec1..4f905160 100644 --- a/cotisations/templates/cotisations/facture.html +++ b/cotisations/templates/cotisations/facture.html @@ -27,20 +27,21 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load staticfiles%} {% load i18n %} -{% block title %}{% trans "Invoices creation and edition" %}{% endblock %} +{% block title %}{% trans "Creation and editing of invoices" %}{% endblock %} {% block content %} + {% if title %} -

{{title}}

+

{{ title }}

{% else %}

{% trans "New invoice" %}

{% endif %} {% if max_balance %} -

{% trans "Maximum allowed balance : "%}{{max_balance}} €

+

{% blocktrans %}Maximum allowed balance: {{ max_balance }} €{% endblocktrans %}

{% endif %} {% if balance is not None %}

- {% trans "Current balance :" %} {{ balance }} € +{% blocktrans %}Current balance: {{ balance }} €{% endblocktrans %}

{% endif %} @@ -68,9 +69,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

- {% blocktrans %} - Total price : 0,00 € - {% endblocktrans %} + {% blocktrans %}Total price: 0,00 €{% endblocktrans %}

{% endif %} {% bootstrap_button action_name button_type='submit' icon='star' %} @@ -183,3 +182,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endif %} {% endblock %} + diff --git a/cotisations/templates/cotisations/index.html b/cotisations/templates/cotisations/index.html index 9482cb5a..ca9cde5b 100644 --- a/cotisations/templates/cotisations/index.html +++ b/cotisations/templates/cotisations/index.html @@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}{% trans "Invoices" %}{% endblock %} {% block content %} -

{% trans "Cotisations" %}

+

{% trans "Subscriptions" %}

{% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %} {% endblock %} diff --git a/cotisations/templates/cotisations/index_article.html b/cotisations/templates/cotisations/index_article.html index 5e6c3967..41ffb62e 100644 --- a/cotisations/templates/cotisations/index_article.html +++ b/cotisations/templates/cotisations/index_article.html @@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% acl_end %} - {% trans "Delete article types" %} + {% trans "Delete one or several article types" %} {% include 'cotisations/aff_article.html' with article_list=article_list %} {% endblock %} diff --git a/cotisations/templates/cotisations/index_banque.html b/cotisations/templates/cotisations/index_banque.html index e9118d75..f4dea1b1 100644 --- a/cotisations/templates/cotisations/index_banque.html +++ b/cotisations/templates/cotisations/index_banque.html @@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% acl_end %} - {% trans "Delete banks" %} + {% trans "Delete one or several banks" %} {% include 'cotisations/aff_banque.html' with banque_list=banque_list %} {% endblock %} diff --git a/cotisations/templates/cotisations/index_paiement.html b/cotisations/templates/cotisations/index_paiement.html index d84c72eb..f4908d02 100644 --- a/cotisations/templates/cotisations/index_paiement.html +++ b/cotisations/templates/cotisations/index_paiement.html @@ -27,17 +27,17 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load acl %} {% load i18n %} -{% block title %}{% trans "Payments" %}{% endblock %} +{% block title %}{% trans "Payment methods" %}{% endblock %} {% block content %} -

{% trans "Payment types list" %}

+

{% trans "List of payment methods" %}

{% can_create Paiement %} - {% trans "Add a payment type" %} + {% trans "Add a payment method" %} {% acl_end %} - {% trans "Delete payment types" %} + {% trans "Delete one or several payment methods" %} {% include 'cotisations/aff_paiement.html' with paiement_list=paiement_list %} {% endblock %} diff --git a/cotisations/templates/cotisations/payment.html b/cotisations/templates/cotisations/payment.html index e1c8b0d0..997168fd 100644 --- a/cotisations/templates/cotisations/payment.html +++ b/cotisations/templates/cotisations/payment.html @@ -31,11 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block content %}

- {% blocktrans %} - Pay {{ amount }} € - {% endblocktrans %} + {% blocktrans %}Pay {{ amount }} €{% endblocktrans %}

-
+ {{ content | safe }} {% if form %} {% csrf_token %} @@ -45,3 +43,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% bootstrap_button tr_pay button_type='submit' icon='piggy-bank' %}
{% endblock %} + diff --git a/cotisations/templates/cotisations/sidebar.html b/cotisations/templates/cotisations/sidebar.html index 7be91b1c..4f077fad 100644 --- a/cotisations/templates/cotisations/sidebar.html +++ b/cotisations/templates/cotisations/sidebar.html @@ -61,3 +61,4 @@ with this program; if not, write to the Free Software Foundation, Inc., {% acl_end %} {% endblock %} + diff --git a/cotisations/validators.py b/cotisations/validators.py index fa8ea2cf..b1683e82 100644 --- a/cotisations/validators.py +++ b/cotisations/validators.py @@ -17,5 +17,6 @@ def check_no_balance(is_balance): p = Paiement.objects.filter(is_balance=True) if len(p) > 0: raise ValidationError( - _("There are already payment method(s) for user balance") + _("There is already a payment method for user balance.") ) + diff --git a/cotisations/views.py b/cotisations/views.py index 90bc3632..193f4321 100644 --- a/cotisations/views.py +++ b/cotisations/views.py @@ -225,7 +225,7 @@ def new_custom_invoice(request): ) messages.success( request, - _('The custom invoice was successfully created.') + _("The custom invoice was created.") ) return redirect(reverse('cotisations:index-custom-invoice')) @@ -313,7 +313,7 @@ def edit_facture(request, facture, **_kwargs): purchase_form.save() messages.success( request, - _("The invoice has been successfully edited.") + _("The invoice was edited.") ) return redirect(reverse('cotisations:index')) return form({ @@ -333,7 +333,7 @@ def del_facture(request, facture, **_kwargs): facture.delete() messages.success( request, - _("The invoice has been successfully deleted.") + _("The invoice was deleted.") ) return redirect(reverse('cotisations:index')) return form({ @@ -367,7 +367,7 @@ def edit_custom_invoice(request, invoice, **kwargs): purchase_form.save() messages.success( request, - _("The invoice has been successfully edited.") + _("The invoice was edited.") ) return redirect(reverse('cotisations:index-custom-invoice')) @@ -427,7 +427,7 @@ def del_custom_invoice(request, invoice, **_kwargs): invoice.delete() messages.success( request, - _("The invoice has been successfully deleted.") + _("The invoice was deleted.") ) return redirect(reverse('cotisations:index-custom-invoice')) return form({ @@ -453,7 +453,7 @@ def add_article(request): article.save() messages.success( request, - _("The article has been successfully created.") + _("The article was created.") ) return redirect(reverse('cotisations:index-article')) return form({ @@ -475,7 +475,7 @@ def edit_article(request, article_instance, **_kwargs): article.save() messages.success( request, - _("The article has been successfully edited.") + _("The article was edited.") ) return redirect(reverse('cotisations:index-article')) return form({ @@ -497,7 +497,7 @@ def del_article(request, instances): article_del.delete() messages.success( request, - _("The article(s) have been successfully deleted.") + _("The articles were deleted.") ) return redirect(reverse('cotisations:index-article')) return form({ @@ -525,7 +525,7 @@ def add_paiement(request): payment_method.save(payment) messages.success( request, - _("The payment method has been successfully created.") + _("The payment method was created.") ) return redirect(reverse('cotisations:index-paiement')) return form({ @@ -561,8 +561,7 @@ def edit_paiement(request, paiement_instance, **_kwargs): if payment_method is not None: payment_method.save() messages.success( - request, - _("The payement method has been successfully edited.") + request,_("The payment method was edited.") ) return redirect(reverse('cotisations:index-paiement')) return form({ @@ -588,8 +587,7 @@ def del_paiement(request, instances): payment_del.delete() messages.success( request, - _("The payment method %(method_name)s has been \ - successfully deleted.") % { + _("The payment method %(method_name)s was deleted.") % { 'method_name': payment_del } ) @@ -621,7 +619,7 @@ def add_banque(request): bank.save() messages.success( request, - _("The bank has been successfully created.") + _("The bank was created.") ) return redirect(reverse('cotisations:index-banque')) return form({ @@ -644,7 +642,7 @@ def edit_banque(request, banque_instance, **_kwargs): bank.save() messages.success( request, - _("The bank has been successfully edited") + _("The bank was edited.") ) return redirect(reverse('cotisations:index-banque')) return form({ @@ -669,8 +667,7 @@ def del_banque(request, instances): bank_del.delete() messages.success( request, - _("The bank %(bank_name)s has been successfully \ - deleted.") % { + _("The bank %(bank_name)s was deleted.") % { 'bank_name': bank_del } ) @@ -873,3 +870,4 @@ def credit_solde(request, user, **_kwargs): 'action_name': _("Pay"), 'max_balance': p.payment_method.maximum_balance, }, 'cotisations/facture.html', request) +