From 2454de2032d60493e6da4dc1ea31dc68436b5b80 Mon Sep 17 00:00:00 2001 From: Laouen Fernet Date: Sat, 16 Nov 2019 14:02:32 +0000 Subject: [PATCH] Mark strings for translation in cotisations --- cotisations/forms.py | 10 +-- cotisations/models.py | 64 +++++++++---------- cotisations/payment_methods/balance/models.py | 11 ++-- cotisations/payment_methods/cheque/models.py | 2 +- cotisations/payment_methods/comnpay/models.py | 7 +- cotisations/payment_methods/forms.py | 8 +-- cotisations/payment_methods/free/models.py | 2 +- .../payment_methods/note_kfet/forms.py | 2 +- .../templates/cotisations/aff_paiement.html | 2 +- .../templates/cotisations/control.html | 12 ++-- cotisations/templates/cotisations/delete.html | 2 +- .../templates/cotisations/email_invoice | 14 ++-- .../cotisations/email_subscription_accepted | 7 +- .../templates/cotisations/index_article.html | 6 +- .../templates/cotisations/index_banque.html | 2 +- .../templates/cotisations/index_paiement.html | 2 +- .../templates/cotisations/sidebar.html | 2 +- cotisations/tex.py | 1 - cotisations/views.py | 52 +++++++++++---- 19 files changed, 117 insertions(+), 91 deletions(-) diff --git a/cotisations/forms.py b/cotisations/forms.py index 6f4a9a45..76db358c 100644 --- a/cotisations/forms.py +++ b/cotisations/forms.py @@ -116,7 +116,7 @@ class DiscountForm(Form): """ is_relative = forms.BooleanField( - label=_("Discount is on percentage."), required=False + label=_("Discount is in percentage."), required=False ) discount = forms.DecimalField( label=_("Discount"), @@ -136,7 +136,7 @@ class DiscountForm(Form): else: amount = discount if amount: - name = _("{}% discount") if is_relative else _("{}€ discount") + name = _("{}% discount") if is_relative else _("{} € discount") name = name.format(discount) Vente.objects.create(facture=invoice, name=name, prix=-amount, number=1) @@ -184,7 +184,7 @@ class DelArticleForm(FormRevMixin, Form): articles = forms.ModelMultipleChoiceField( queryset=Article.objects.none(), - label=_("Available articles"), + label=_("Current articles"), widget=forms.CheckboxSelectMultiple, ) @@ -226,7 +226,7 @@ class DelPaiementForm(FormRevMixin, Form): # TODO : change paiement to payment paiements = forms.ModelMultipleChoiceField( queryset=Paiement.objects.none(), - label=_("Available payment methods"), + label=_("Current payment methods"), widget=forms.CheckboxSelectMultiple, ) @@ -266,7 +266,7 @@ class DelBanqueForm(FormRevMixin, Form): # TODO : change banque to bank banques = forms.ModelMultipleChoiceField( queryset=Banque.objects.none(), - label=_("Available banks"), + label=_("Current banks"), widget=forms.CheckboxSelectMultiple, ) diff --git a/cotisations/models.py b/cotisations/models.py index 5cab9212..c2d23171 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -56,7 +56,7 @@ from cotisations.validators import check_no_balance class BaseInvoice(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model): - date = models.DateTimeField(auto_now_add=True, verbose_name=_("Date")) + date = models.DateTimeField(auto_now_add=True, verbose_name=_("date")) # TODO : change prix to price def prix(self): @@ -138,7 +138,7 @@ class Facture(BaseInvoice): abstract = False permissions = ( # TODO : change facture to invoice - ("change_facture_control", _('Can edit the "controlled" state')), + ("change_facture_control", _("Can edit the \"controlled\" state")), ("view_facture", _("Can view an invoice object")), ("change_all_facture", _("Can edit all the previous invoices")), ) @@ -174,8 +174,8 @@ class Facture(BaseInvoice): return ( False, _( - "You don't have the right to edit an invoice " - "already controlled or invalidated." + "You don't have the right to edit an invoice" + " already controlled or invalidated." ), ("cotisations.change_all_facture",), ) @@ -206,8 +206,8 @@ class Facture(BaseInvoice): return ( False, _( - "You don't have the right to delete an invoice " - "already controlled or invalidated." + "You don't have the right to delete an invoice" + " already controlled or invalidated." ), ("cotisations.change_all_facture",), ) @@ -220,8 +220,8 @@ class Facture(BaseInvoice): return ( False, _( - "You don't have the right to view someone else's " - "invoices history." + "You don't have the right to view someone else's" + " invoices history." ), ("cotisations.view_facture",), ) @@ -243,7 +243,7 @@ class Facture(BaseInvoice): can = user_request.has_perm("cotisations.change_facture_control") return ( can, - _('You don\'t have the right to edit the "controlled" state.') + _("You don't have the right to edit the \"controlled\" state.") if not can else None, ("cotisations.change_facture_control",), @@ -262,13 +262,13 @@ class Facture(BaseInvoice): if len(Paiement.find_allowed_payments(user_request)) <= 0: return ( False, - _("There are no payment method which you can use."), + _("There are no payment methods that you can use."), ("cotisations.add_facture",), ) if len(Article.find_allowed_articles(user_request, user_request)) <= 0: return ( False, - _("There are no article that you can buy."), + _("There are no articles that you can buy."), ("cotisations.add_facture",), ) return True, None, None @@ -346,11 +346,11 @@ class CustomInvoice(BaseInvoice): class Meta: permissions = (("view_custominvoice", _("Can view a custom invoice object")),) - recipient = models.CharField(max_length=255, verbose_name=_("Recipient")) - payment = models.CharField(max_length=255, verbose_name=_("Payment type")) - address = models.CharField(max_length=255, verbose_name=_("Address")) - paid = models.BooleanField(verbose_name=_("Paid"), default=False) - remark = models.TextField(verbose_name=_("Remark"), blank=True, null=True) + recipient = models.CharField(max_length=255, verbose_name=_("recipient")) + payment = models.CharField(max_length=255, verbose_name=_("payment type")) + address = models.CharField(max_length=255, verbose_name=_("address")) + paid = models.BooleanField(verbose_name=_("paid"), default=False) + remark = models.TextField(verbose_name=_("remark"), blank=True, null=True) class CostEstimate(CustomInvoice): @@ -358,7 +358,7 @@ class CostEstimate(CustomInvoice): permissions = (("view_costestimate", _("Can view a cost estimate object")),) validity = models.DurationField( - verbose_name=_("Period of validity"), help_text="DD HH:MM:SS" + verbose_name=_("period of validity"), help_text="DD HH:MM:SS" ) final_invoice = models.ForeignKey( CustomInvoice, @@ -547,7 +547,7 @@ class Vente(RevMixin, AclMixin, models.Model): if not user_request.has_perm("cotisations.change_vente"): return ( False, - _("You don't have the right to edit the purchases."), + _("You don't have the right to edit a purchase."), ("cotisations.change_vente",), ) elif not (user_request.has_perm("cotisations.change_all_facture") or user_can): @@ -562,8 +562,8 @@ class Vente(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to edit a purchase " - "already controlled or invalidated." + "You don't have the right to edit a purchase" + " already controlled or invalidated." ), ("cotisations.change_all_vente",), ) @@ -590,8 +590,8 @@ class Vente(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to delete a purchase " - "already controlled or invalidated." + "You don't have the right to delete a purchase" + " already controlled or invalidated." ), None, ) @@ -606,8 +606,8 @@ class Vente(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to view someone " - "else's purchase history." + "You don't have the right to view someone" + " else's purchase history." ), ("cotisations.view_vente",), ) @@ -731,7 +731,7 @@ class Article(RevMixin, AclMixin, models.Model): def clean(self): if self.name.lower() == "solde": - raise ValidationError(_("Balance is a reserved article name.")) + raise ValidationError(_("Solde is a reserved article name.")) if self.type_cotisation and not (self.duration or self.duration_days): raise ValidationError(_("Duration must be specified for a subscription.")) @@ -921,7 +921,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 methods.") class Cotisation(RevMixin, AclMixin, models.Model): @@ -976,8 +976,8 @@ class Cotisation(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to edit a subscription " - "already controlled or invalidated." + "You don't have the right to edit a subscription" + " already controlled or invalidated." ), ("cotisations.change_all_cotisation",), ) @@ -995,8 +995,8 @@ class Cotisation(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to delete a subscription " - "already controlled or invalidated." + "You don't have the right to delete a subscription" + " already controlled or invalidated." ), None, ) @@ -1011,8 +1011,8 @@ class Cotisation(RevMixin, AclMixin, models.Model): return ( False, _( - "You don't have the right to view someone else's " - "subscription history." + "You don't have the right to view someone else's" + " subscription history." ), ("cotisations.view_cotisation",), ) diff --git a/cotisations/payment_methods/balance/models.py b/cotisations/payment_methods/balance/models.py index a252affb..afa43c48 100644 --- a/cotisations/payment_methods/balance/models.py +++ b/cotisations/payment_methods/balance/models.py @@ -44,18 +44,17 @@ class BalancePayment(PaymentMethodMixin, models.Model): editable=False, ) minimum_balance = models.DecimalField( - verbose_name=_("Minimum 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." + "The minimal amount of money allowed for the balance at the end" + " of a payment. You can specify a negative amount." ), max_digits=5, decimal_places=2, default=0, ) maximum_balance = models.DecimalField( - verbose_name=_("Maximum balance"), + verbose_name=_("maximum balance"), help_text=_("The maximal amount of money allowed for the balance."), max_digits=5, decimal_places=2, @@ -64,7 +63,7 @@ class BalancePayment(PaymentMethodMixin, models.Model): null=True, ) credit_balance_allowed = models.BooleanField( - verbose_name=_("Allow user to credit their balance"), default=False + verbose_name=_("allow user to credit their balance"), default=False ) def end_payment(self, invoice, request): diff --git a/cotisations/payment_methods/cheque/models.py b/cotisations/payment_methods/cheque/models.py index 53acef6a..62479f22 100644 --- a/cotisations/payment_methods/cheque/models.py +++ b/cotisations/payment_methods/cheque/models.py @@ -33,7 +33,7 @@ class ChequePayment(PaymentMethodMixin, models.Model): """ class Meta: - verbose_name = _("Cheque") + verbose_name = _("cheque") payment = models.OneToOneField( Paiement, diff --git a/cotisations/payment_methods/comnpay/models.py b/cotisations/payment_methods/comnpay/models.py index ff35650c..2c46f685 100644 --- a/cotisations/payment_methods/comnpay/models.py +++ b/cotisations/payment_methods/comnpay/models.py @@ -51,9 +51,10 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): max_length=255, null=True, blank=True, verbose_name=_("ComNpay secret key") ) minimum_payment = models.DecimalField( - verbose_name=_("Minimum payment"), + verbose_name=_("minimum payment"), help_text=_( - "The minimal amount of money you have to use when paying" " with ComNpay" + "The minimal amount of money you have to use when paying with" + " ComNpay." ), max_digits=5, decimal_places=2, @@ -62,7 +63,7 @@ class ComnpayPayment(PaymentMethodMixin, models.Model): production = models.BooleanField( default=True, verbose_name=_( - "Production mode enabled (production URL, instead of homologation)" + "production mode enabled (production URL, instead of homologation)" ), ) diff --git a/cotisations/payment_methods/forms.py b/cotisations/payment_methods/forms.py index fdcd50b8..a6bac3ed 100644 --- a/cotisations/payment_methods/forms.py +++ b/cotisations/payment_methods/forms.py @@ -58,9 +58,9 @@ class PaymentMethodForm(forms.Form): payment_method = forms.ChoiceField( 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." + "Warning: you will not be able to change the payment" + " method later. But you will be allowed to edit the other" + " options." ), required=False, ) @@ -71,7 +71,7 @@ class PaymentMethodForm(forms.Form): self.fields["payment_method"].choices = [ (i, p.NAME) for (i, p) in enumerate(PAYMENT_METHODS) ] - self.fields["payment_method"].choices.insert(0, ("", _("no"))) + self.fields["payment_method"].choices.insert(0, ("", _("No"))) self.fields["payment_method"].widget.attrs = {"id": "paymentMethodSelect"} self.templates = [ forms.modelform_factory(p.PaymentMethod, fields="__all__")(prefix=prefix) diff --git a/cotisations/payment_methods/free/models.py b/cotisations/payment_methods/free/models.py index b64744fe..39a3aa80 100644 --- a/cotisations/payment_methods/free/models.py +++ b/cotisations/payment_methods/free/models.py @@ -51,4 +51,4 @@ class FreePayment(PaymentMethodMixin, models.Model): """Checks that the price meets the requirement to be paid with user balance. """ - return (price == 0, _("You cannot validate this invoice for free.")) + return (price == 0, _("You can't pay this invoice for free.")) diff --git a/cotisations/payment_methods/note_kfet/forms.py b/cotisations/payment_methods/note_kfet/forms.py index 098315b7..7d82b93f 100644 --- a/cotisations/payment_methods/note_kfet/forms.py +++ b/cotisations/payment_methods/note_kfet/forms.py @@ -30,5 +30,5 @@ class NoteCredentialForm(forms.Form): object. """ - login = forms.CharField(label=_("pseudo note")) + login = forms.CharField(label=_("Username")) password = forms.CharField(label=_("Password"), widget=forms.PasswordInput) diff --git a/cotisations/templates/cotisations/aff_paiement.html b/cotisations/templates/cotisations/aff_paiement.html index edd485f1..6043da67 100644 --- a/cotisations/templates/cotisations/aff_paiement.html +++ b/cotisations/templates/cotisations/aff_paiement.html @@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% trans "Payment type" %} - {% trans "Is available for everyone" %} + {% trans "Available for everyone" %} {% trans "Custom payment method" %} diff --git a/cotisations/templates/cotisations/control.html b/cotisations/templates/cotisations/control.html index b199ba2d..497de6f4 100644 --- a/cotisations/templates/cotisations/control.html +++ b/cotisations/templates/cotisations/control.html @@ -45,12 +45,12 @@ with this program; if not, write to the Free Software Foundation, Inc., {% trans "Profile" %} - {% trans "Last name" as tr_last_name %} - {% include 'buttons/sort.html' with prefix='control' col='name' text=tr_last_name %} + {% trans "First name" as tr_first_name %} + {% include 'buttons/sort.html' with prefix='control' col='name' text=tr_first_name %} - {% trans "First name" as tr_first_name %} - {% include 'buttons/sort.html' with prefix='control' col='surname' text=tr_first_name %} + {% trans "Surname" as tr_surname %} + {% include 'buttons/sort.html' with prefix='control' col='surname' text=tr_surname %} {% trans "Invoice ID" as tr_invoice_id %} @@ -104,8 +104,8 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endfor %} - {% trans "Edit" as tr_edit %} - {% bootstrap_button tr_edit button_type='submit' icon='ok' button_class='btn-success' %} + {% trans "Confirm" as tr_confirm %} + {% bootstrap_button tr_confirm button_type='submit' icon='ok' button_class='btn-success' %} {% endblock %} diff --git a/cotisations/templates/cotisations/delete.html b/cotisations/templates/cotisations/delete.html index 483dd218..e6f1b362 100644 --- a/cotisations/templates/cotisations/delete.html +++ b/cotisations/templates/cotisations/delete.html @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% csrf_token %}

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

{% trans "Confirm" as tr_confirm %} {% bootstrap_button tr_confirm button_type='submit' icon='trash' button_class='btn-danger' %} diff --git a/cotisations/templates/cotisations/email_invoice b/cotisations/templates/cotisations/email_invoice index 8d6b2cc2..01f80225 100644 --- a/cotisations/templates/cotisations/email_invoice +++ b/cotisations/templates/cotisations/email_invoice @@ -6,17 +6,17 @@ Nous vous remercions pour votre achat auprès de {{asso_name}} et nous vous en j En cas de question, n’hésitez pas à nous contacter par mail à {{contact_mail}}. -Cordialement, -L’équipe de {{asso_name}} +Respectueusement, +L’équipe de {{asso_name}}. === English version === -Dear {{name}}, +Hello {{name}}, -Thank you for your purchase. Here is your invoice. +Thank you for your purchase at {{asso_name}}. Here is your invoice. -Should you need extra information, you can email us at {{contact_mail}}. +Should you need extra information, do not hesitate to email us at {{contact_mail}}. -Best regards, - {{ asso_name }}'s team +Regards, +The {{ asso_name }} team. diff --git a/cotisations/templates/cotisations/email_subscription_accepted b/cotisations/templates/cotisations/email_subscription_accepted index bd1c7628..cb0eb760 100644 --- a/cotisations/templates/cotisations/email_subscription_accepted +++ b/cotisations/templates/cotisations/email_subscription_accepted @@ -6,17 +6,18 @@ Vous trouverez en pièce jointe un reçu. Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous envoyer un mail à {{asso_email}}. -À bientôt, +Respectueusement, L'équipe de {{asso_name}}. --- +Hello {{name}}! + Your subscription to {{asso_name}} has just been accepted. You are now a full member of {{asso_name}} until {{ date_end|date:"d/m/Y" }}. You will find with this email a subscription voucher. -For any information, suggestion or problem, you can contact us via email at -{{asso_email}}. +To express any comment, suggestion or problem, you can send us an email to {{asso_email}}. Regards, The {{asso_name}} team. diff --git a/cotisations/templates/cotisations/index_article.html b/cotisations/templates/cotisations/index_article.html index 8adc7639..1a4c3c8d 100644 --- a/cotisations/templates/cotisations/index_article.html +++ b/cotisations/templates/cotisations/index_article.html @@ -30,14 +30,14 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}{% trans "Articles" %}{% endblock %} {% block content %} -

{% trans "List of article types" %}

+

{% trans "List of articles" %}

{% can_create Article %} - {% trans "Add an article type" %} + {% trans "Add an article" %} {% acl_end %} - {% trans "Delete one or several article types" %} + {% trans "Delete one or several articles" %} {% 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 a497198f..c653acfd 100644 --- a/cotisations/templates/cotisations/index_banque.html +++ b/cotisations/templates/cotisations/index_banque.html @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

{% trans "List of banks" %}

{% can_create Banque %} - {% trans "Add a bank" %} + {% trans "Add a bank" %} {% acl_end %} diff --git a/cotisations/templates/cotisations/index_paiement.html b/cotisations/templates/cotisations/index_paiement.html index b76dec65..1411add0 100644 --- a/cotisations/templates/cotisations/index_paiement.html +++ b/cotisations/templates/cotisations/index_paiement.html @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

{% trans "List of payment methods" %}

{% can_create Paiement %}
- {% trans "Add a payment method" %} + {% trans "Add a payment method" %} {% acl_end %} diff --git a/cotisations/templates/cotisations/sidebar.html b/cotisations/templates/cotisations/sidebar.html index 96a674f9..8e69a8c9 100644 --- a/cotisations/templates/cotisations/sidebar.html +++ b/cotisations/templates/cotisations/sidebar.html @@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% acl_end %} {% can_view_all Article %} - {% trans "Available articles" %} + {% trans "Articles" %} {% acl_end %} {% can_view_all Banque %} diff --git a/cotisations/tex.py b/cotisations/tex.py index 6872ac6a..2930fffe 100644 --- a/cotisations/tex.py +++ b/cotisations/tex.py @@ -36,7 +36,6 @@ from django.template.loader import get_template from django.http import HttpResponse from django.conf import settings from django.utils.text import slugify -from django.utils.translation import ugettext_lazy as _ from re2o.mixins import AclMixin, RevMixin from preferences.models import CotisationsOption diff --git a/cotisations/views.py b/cotisations/views.py index 4510aff9..562326e3 100644 --- a/cotisations/views.py +++ b/cotisations/views.py @@ -166,6 +166,7 @@ def new_facture(request, user, userid): "articlelist": article_list, "balance": balance, "action_name": _("Confirm"), + "title": _("New invoice"), }, "cotisations/facture.html", request, @@ -222,7 +223,7 @@ def new_cost_estimate(request): "articlesformset": articles_formset, "articlelist": articles, "discount_form": discount_form, - "title": _("Cost estimate"), + "title": _("New cost estimate"), }, "cotisations/facture.html", request, @@ -278,6 +279,7 @@ def new_custom_invoice(request): "articlesformset": articles_formset, "articlelist": articles, "discount_form": discount_form, + "title": _("New custom invoice"), }, "cotisations/facture.html", request, @@ -373,7 +375,7 @@ def del_facture(request, facture, **_kwargs): messages.success(request, _("The invoice was deleted.")) return redirect(reverse("cotisations:index")) return form( - {"objet": facture, "objet_name": _("Invoice")}, + {"objet": facture, "objet_name": _("invoice")}, "cotisations/delete.html", request, ) @@ -437,7 +439,11 @@ def edit_custom_invoice(request, invoice, **kwargs): return redirect(reverse("cotisations:index-custom-invoice")) return form( - {"factureform": invoice_form, "venteform": purchase_form}, + { + "factureform": invoice_form, + "venteform": purchase_form, + "title": _("Edit custom invoice"), + }, "cotisations/edit_facture.html", request, ) @@ -501,7 +507,7 @@ def del_cost_estimate(request, estimate, **_kwargs): messages.success(request, _("The cost estimate was deleted.")) return redirect(reverse("cotisations:index-cost-estimate")) return form( - {"objet": estimate, "objet_name": _("Cost estimate")}, + {"objet": estimate, "objet_name": _("cost estimate")}, "cotisations/delete.html", request, ) @@ -564,7 +570,7 @@ def del_custom_invoice(request, invoice, **_kwargs): messages.success(request, _("The invoice was deleted.")) return redirect(reverse("cotisations:index-custom-invoice")) return form( - {"objet": invoice, "objet_name": _("Invoice")}, + {"objet": invoice, "objet_name": _("invoice")}, "cotisations/delete.html", request, ) @@ -588,7 +594,11 @@ def add_article(request): messages.success(request, _("The article was created.")) return redirect(reverse("cotisations:index-article")) return form( - {"factureform": article, "action_name": _("Add"), "title": _("New article")}, + { + "factureform": article, + "action_name": _("Add"), + "title": _("New article"), + }, "cotisations/facture.html", request, ) @@ -607,7 +617,11 @@ def edit_article(request, article_instance, **_kwargs): messages.success(request, _("The article was edited.")) return redirect(reverse("cotisations:index-article")) return form( - {"factureform": article, "action_name": _("Edit"), "title": _("Edit article")}, + { + "factureform": article, + "action_name": _("Edit"), + "title": _("Edit article"), + }, "cotisations/facture.html", request, ) @@ -718,8 +732,8 @@ def del_paiement(request, instances): messages.error( request, _( - "The payment method %(method_name)s can't be deleted \ - because there are invoices using it." + "The payment method %(method_name)s can't be deleted" + " because there are invoices using it." ) % {"method_name": payment_del}, ) @@ -748,7 +762,11 @@ def add_banque(request): messages.success(request, _("The bank was created.")) return redirect(reverse("cotisations:index-banque")) return form( - {"factureform": bank, "action_name": _("Add"), "title": _("New bank")}, + { + "factureform": bank, + "action_name": _("Add"), + "title": _("New bank"), + }, "cotisations/facture.html", request, ) @@ -768,7 +786,11 @@ def edit_banque(request, banque_instance, **_kwargs): messages.success(request, _("The bank was edited.")) return redirect(reverse("cotisations:index-banque")) return form( - {"factureform": bank, "action_name": _("Edit"), "title": _("Edit bank")}, + { + "factureform": bank, + "action_name": _("Edit"), + "title": _("Edit bank"), + }, "cotisations/facture.html", request, ) @@ -802,7 +824,11 @@ def del_banque(request, instances): ) return redirect(reverse("cotisations:index-banque")) return form( - {"factureform": bank, "action_name": _("Delete"), "title": _("Delete bank")}, + { + "factureform": bank, + "action_name": _("Delete"), + "title": _("Delete bank"), + }, "cotisations/facture.html", request, ) @@ -833,7 +859,7 @@ def control(request): ) if control_invoices_form.is_valid(): control_invoices_form.save() - reversion.set_comment("Controle") + reversion.set_comment("Control") messages.success( request, _("Your changes have been properly taken into account.") )