Browse Source

Merge branch 'master' of 13e7.de:lugcash2

master
Niklas Brachmann 11 years ago
parent
commit
0cea383d02
  1. 92
      cash/locale/de/LC_MESSAGES/django.po
  2. 32
      cash/management/commands/debtreminder.py
  3. 11
      cash/templates/cash/debt_reminder.txt

92
cash/locale/de/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid "" @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-10-17 18:20+0200\n"
"POT-Creation-Date: 2013-11-29 00:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,15 +18,15 @@ msgstr "" @@ -18,15 +18,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: admin.py:14 models.py:141 management/commands/dailydigest.py:40
#: admin.py:14 models.py:167 management/commands/dailydigest.py:40
msgid "amount"
msgstr "Betrag"
#: admin.py:17 models.py:95 models.py:124
#: admin.py:17 models.py:100 models.py:150
msgid "comment"
msgstr "Kommentar"
#: admin.py:22 models.py:14 views.py:81
#: admin.py:22 models.py:19 views.py:81
msgid "PIN"
msgstr "PIN"
@ -67,107 +67,111 @@ msgstr "Autorisiert von %(first)s %(last)s" @@ -67,107 +67,111 @@ msgstr "Autorisiert von %(first)s %(last)s"
msgid "Please enter only digits."
msgstr "Bitte nur Ziffern eingeben."
#: models.py:13
#: models.py:18
msgid "card number"
msgstr "Kartennummer"
#: models.py:15 views.py:77
#: models.py:20 views.py:77
msgid "daily digest"
msgstr "Tägliche Zusammenfassung"
#: models.py:17
#: models.py:22
msgid "credit"
msgstr "Guthaben"
#: models.py:23 models.py:135 models.py:148
#: models.py:28 models.py:161 models.py:174
msgid "account"
msgstr "Konto"
#: models.py:24
#: models.py:29
msgid "accounts"
msgstr "Konten"
#: models.py:52
#: models.py:57
msgid "Purchase"
msgstr "Einkauf"
#: models.py:93 models.py:106
#: models.py:98 models.py:111
msgid "name"
msgstr "Name"
#: models.py:101
#: models.py:106
msgid "product category"
msgstr "Produktkategorie"
#: models.py:102
#: models.py:107
msgid "product categories"
msgstr "Produktkategorien"
#: models.py:108 templates/cash/product_list.html:19
#: models.py:113 templates/cash/product_list.html:19
msgid "price"
msgstr "Preis"
#: models.py:109
#: models.py:114
msgid "active"
msgstr "Aktiv"
#: models.py:111
#: models.py:116
msgid "category"
msgstr "Kategorie"
#: models.py:117 models.py:125 models.py:149
#: models.py:117 models.py:120
msgid "image"
msgstr ""
#: models.py:127 models.py:151 models.py:175
msgid "product"
msgstr "Produkt"
#: models.py:118
#: models.py:128
msgid "products"
msgstr "Produkte"
#: models.py:122 models.py:131
#: models.py:148 models.py:157
msgid "barcode"
msgstr "Strichcode"
#: models.py:132
#: models.py:158
msgid "barcodes"
msgstr "Strichcodes"
#: models.py:137 models.py:154
#: models.py:163 models.py:180
msgid "timestamp"
msgstr "Zeitstempel"
#: models.py:138 management/commands/dailydigest.py:39
#: models.py:164 management/commands/dailydigest.py:39
msgid "subject"
msgstr "Betreff"
#: models.py:139
#: models.py:165
msgid "description"
msgstr "Beschreibung"
#: models.py:144
#: models.py:170
msgid "transaction"
msgstr "Transaktion"
#: models.py:145
#: models.py:171
msgid "transactions"
msgstr "Transaktionen"
#: models.py:150
#: models.py:176
msgid "count"
msgstr "Anzahl"
#: models.py:152
#: models.py:178
msgid "unit price"
msgstr "Stückpreis"
#: models.py:157
#: models.py:185
msgid "sales log entry"
msgstr "Verkaufsprotokolleintrag"
#: models.py:158
#: models.py:186
msgid "sales log entries"
msgstr "Verkaufsprotokolleinträge"
#: models.py:162
#: models.py:190
msgid "Cancellation"
msgstr "Stornierung"
@ -187,50 +191,54 @@ msgstr "Datum" @@ -187,50 +191,54 @@ msgstr "Datum"
msgid "Account Statement"
msgstr "Kontoauszug"
#: templates/cash/base.html:27 templates/cash/base.html.py:53
#: management/commands/debtreminder.py:28
msgid "Debt Reminder"
msgstr "Schuldenerinnerung"
#: templates/cash/base.html:29 templates/cash/base.html.py:62
msgid "Overview"
msgstr "Übersicht"
#: templates/cash/base.html:28 templates/cash/product_list.html:26
#: templates/cash/base.html:30 templates/cash/product_list.html:30
msgid "Buy"
msgstr "Kaufen"
#: templates/cash/base.html:29
#: templates/cash/base.html:31
msgctxt "monthly staement"
msgid "Transaction list"
msgstr "Kontoauszug"
#: templates/cash/base.html:30 templates/cash/usersettings.html:31
#: templates/cash/base.html:32 templates/cash/usersettings.html:31
#: templates/cash/usersettings_saved.html:6
msgid "Preferences"
msgstr "Einstellungen"
#: templates/cash/base.html:32
#: templates/cash/base.html:34
msgid "Administration"
msgstr "Administration"
#: templates/cash/base.html:37
#: templates/cash/base.html:39
msgid "Logout"
msgstr "Abmelden"
#: templates/cash/base.html:55
#: templates/cash/base.html:64
#, python-format
msgid "Welcome, %(firstname)s!"
msgstr "Herzlich willkommen, %(firstname)s!"
#: templates/cash/base.html:62 templates/cash/login.html:25
#: templates/cash/base.html:73 templates/cash/login.html:25
msgid "Username"
msgstr "Benutzername"
#: templates/cash/base.html:64
#: templates/cash/base.html:75
msgid "Credit"
msgstr "Guthaben"
#: templates/cash/base.html:67
#: templates/cash/base.html:78
msgid "Warning!"
msgstr "Achtung!"
#: templates/cash/base.html:67
#: templates/cash/base.html:78
#, python-format
msgid "Only %(debtlimitamount)s&nbsp;&euro; until reaching the debt limit."
msgstr ""
@ -301,7 +309,7 @@ msgstr "Alle Kategorien" @@ -301,7 +309,7 @@ msgstr "Alle Kategorien"
msgid "Actions"
msgstr "Aktionen"
#: templates/cash/product_list.html:27
#: templates/cash/product_list.html:31
msgid "Details"
msgstr "Details"

32
cash/management/commands/debtreminder.py

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
from cash.models import *
from django.conf import settings
from django.core.mail import send_mass_mail
from django.core.management.base import NoArgsCommand
from django.template import Context
from django.template.loader import get_template
from django.utils import translation
from django.utils.translation import ugettext as _
class Command(NoArgsCommand):
help = 'Sends a reminder mail to every with a negative credit'
def handle_noargs(self, **options):
translation.activate('de')
tpl = get_template('cash/debt_reminder.txt')
messages = []
for a in Account.objects.all():
if a.credit < 0:
name = '%s %s' % (a.user.first_name, a.user.last_name)
context = {'name': name, 'credit': a.credit}
rcpts = ['%s <%s>' % (name, a.user.email)]
messages.append(('%s%s' % (settings.EMAIL_SUBJECT_PREFIX,
_('Debt Reminder')),
tpl.render(Context(context)),
settings.DEFAULT_FROM_EMAIL, rcpts))
send_mass_mail(tuple(messages))

11
cash/templates/cash/debt_reminder.txt

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
{% load i18n %}
Hallo, {{ name }}!
du erhältst diese automatisch generierte Mail des Kassensystems, da dein
Guthaben negativ ist. Der Kassenwart würde sich bestimmt freuen, wenn du ihm
bei deinem nächsten Besuch Geld gibst.
Dein aktuelles Guthaben beträgt {{ credit|floatformat:2 }}€.
Es grüßt
das Kassensystem
Loading…
Cancel
Save