Add translation

This commit is contained in:
Raphael Michel 2018-03-03 21:06:14 +01:00
parent 90e50b8084
commit a28234f826
3 changed files with 65 additions and 5 deletions

View file

@ -2,11 +2,36 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-07 19:01+0100\n" "POT-Creation-Date: 2018-03-03 21:23+0100\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: Raphael Michel\n" "Last-Translator: Raphael Michel <michel@rami.io>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
#: pretix_servicefees/__init__.py:10
msgid "pretix Service Fees"
msgstr "pretix Servicegebühren"
#: pretix_servicefees/__init__.py:12
msgid "Allows you to impose a service fee on all non-free orders."
msgstr "Erlaubt Ihnen, eine Servicegebühr für alle Bestellungen zu verlangen."
#: pretix_servicefees/signals.py:19
msgid "Service Fee"
msgstr "Servicegebühr"
#: pretix_servicefees/signals.py:68
msgid "A service fee of {} will be added on top of each order."
msgstr "Alle Preise zzgl. einer Servicegebühr von {} pro Bestellung."
#: pretix_servicefees/templates/pretix_servicefees/settings.html:9
msgid "Service fees"
msgstr "Servicegebühren"
#: pretix_servicefees/templates/pretix_servicefees/settings.html:14
msgid "Save"
msgstr "Speichern"

View file

@ -2,11 +2,36 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-07 19:01+0100\n" "POT-Creation-Date: 2018-03-03 21:23+0100\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: Raphael Michel\n" "Last-Translator: Raphael Michel <michel@rami.io>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
#: pretix_servicefees/__init__.py:10
msgid "pretix Service Fees"
msgstr "pretix Servicegebühren"
#: pretix_servicefees/__init__.py:12
msgid "Allows you to impose a service fee on all non-free orders."
msgstr "Erlaubt dir, eine Servicegebühr für alle Bestellungen zu verlangen."
#: pretix_servicefees/signals.py:19
msgid "Service Fee"
msgstr "Servicegebühr"
#: pretix_servicefees/signals.py:68
msgid "A service fee of {} will be added on top of each order."
msgstr "Alle Preise zzgl. einer Servicegebühr von {} pro Bestellung."
#: pretix_servicefees/templates/pretix_servicefees/settings.html:9
msgid "Service fees"
msgstr "Servicegebühren"
#: pretix_servicefees/templates/pretix_servicefees/settings.html:14
msgid "Save"
msgstr "Speichern"

View file

@ -7,8 +7,9 @@ from django.utils.translation import ugettext_lazy as _
from pretix.base.models import Event, Order, TaxRule from pretix.base.models import Event, Order, TaxRule
from pretix.base.models.orders import OrderFee from pretix.base.models.orders import OrderFee
from pretix.base.signals import order_fee_calculation from pretix.base.signals import order_fee_calculation
from pretix.base.templatetags.money import money_filter
from pretix.control.signals import nav_event_settings from pretix.control.signals import nav_event_settings
from pretix.presale.signals import fee_calculation_for_cart from pretix.presale.signals import fee_calculation_for_cart, front_page_top
@receiver(nav_event_settings, dispatch_uid='service_fee_nav_settings') @receiver(nav_event_settings, dispatch_uid='service_fee_nav_settings')
@ -58,3 +59,12 @@ def cart_fee(sender: Event, request: HttpRequest, invoice_address, total, **kwar
@receiver(order_fee_calculation, dispatch_uid="service_fee_calc_order") @receiver(order_fee_calculation, dispatch_uid="service_fee_calc_order")
def order_fee(sender: Event, invoice_address, total, **kwargs): def order_fee(sender: Event, invoice_address, total, **kwargs):
return get_fees(sender, total, invoice_address) return get_fees(sender, total, invoice_address)
@receiver(front_page_top, dispatch_uid="service_fee_front_page_top")
def front_page_top_recv(sender: Event, **kwargs):
fee = sender.settings.get('service_fee_abs', as_type=Decimal)
if fee:
return '<p>%s</p>' % _('A service fee of {} will be added on top of each order.'.format(
money_filter(fee, sender.currency)
))