Merge branch 'master' of github.com:rossp/django-helpdesk

This commit is contained in:
Ross Poulton 2011-11-08 18:01:00 +11:00
commit 6e33408a7d
16 changed files with 2767 additions and 314 deletions

View File

@ -54,13 +54,7 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
import os
context = Context(email_context)
locale = 'en';
if hasattr(context['queue'], 'locale'):
locale = getattr(context['queue'], 'locale', '')
else:
locale = context['queue'].get('locale', 'en')
if not locale:
locale = 'en'
locale = context['queue'].get('locale', 'en')
t = None
try:
@ -85,15 +79,15 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
email_html_base_file = os.path.join('helpdesk', locale, 'email_html_base.html')
''' keep new lines in html emails '''
from django.utils.safestring import mark_safe
if context.has_key('comment'):
html_txt = context['comment']
html_txt = html_txt.replace('\r\n', '<br>')
context['comment'] = mark_safe(html_txt)
html_part = loader.get_template_from_string(
"{%% extends '%s' %%}{%% block title %%}%s{%% endblock %%}{%% block content %%}%s{%% endblock %%}" % (email_html_base_file, t.heading, t.html)
).render(context)
@ -150,13 +144,13 @@ def apply_query(queryset, params):
"""
Apply a dict-based set of filters & paramaters to a queryset.
queryset is a Django queryset, eg MyModel.objects.all() or
queryset is a Django queryset, eg MyModel.objects.all() or
MyModel.objects.filter(user=request.user)
params is a dictionary that contains the following:
filtering: A dict of Django ORM filters, eg:
{'user__id__in': [1, 3, 103], 'title__contains': 'foo'}
other_filter: Another filter of some type, most likely a
other_filter: Another filter of some type, most likely a
set of Q() objects.
sorting: The name of the column to sort by
"""
@ -180,7 +174,7 @@ def safe_template_context(ticket):
"""
Return a dictionary that can be used as a template context to render
comments and other details with ticket or queue paramaters. Note that
we don't just provide the Ticket & Queue objects to the template as
we don't just provide the Ticket & Queue objects to the template as
they could reveal confidential information. Just imagine these two options:
* {{ ticket.queue.email_box_password }}
* {{ ticket.assigned_to.password }}
@ -204,7 +198,7 @@ def safe_template_context(ticket):
else:
context['queue'][field] = attr
for field in ( 'title', 'created', 'modified', 'submitter_email',
for field in ( 'title', 'created', 'modified', 'submitter_email',
'status', 'get_status_display', 'on_hold', 'description',
'resolution', 'priority', 'get_priority_display',
'last_escalation', 'ticket', 'ticket_for_url',
@ -225,7 +219,7 @@ def safe_template_context(ticket):
def text_is_spam(text, request):
# Based on a blog post by 'sciyoshi':
# http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/
# This will return 'True' is the given text is deemed to be spam, or
# This will return 'True' is the given text is deemed to be spam, or
# False if it is not spam. If it cannot be checked for some reason, we
# assume it isn't spam.
from django.contrib.sites.models import Site

View File

@ -2,15 +2,17 @@
# Copyright (C) 2011 Ross Poulton
# This file is distributed under the same license as the django-helpdesk package.
#
# Ross Poulton <ross@rossp.org>, 2011.
# Translators:
# Jannis Leidel <jannis@leidel.info>, 2011.
# Marc-Stefan Cassola <maccesch@web.de>, 2011.
# Ross Poulton <ross@rossp.org>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: django-helpdesk\n"
"Report-Msgid-Bugs-To: http://github.com/RossP/django-helpdesk/issues\n"
"POT-Creation-Date: 2011-05-11 15:05+1000\n"
"PO-Revision-Date: 2011-05-12 00:22+0000\n"
"Last-Translator: Jannis <jannis@leidel.info>\n"
"PO-Revision-Date: 2011-11-05 00:48+0000\n"
"Last-Translator: rossp <ross@rossp.org>\n"
"Language-Team: German (http://www.transifex.net/projects/p/django-helpdesk/team/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -295,6 +297,9 @@ msgid ""
"all new tickets created for this queue. Enter a comma between multiple "
"e-mail addresses."
msgstr ""
"Jede eingegebene E-Mail Adresse wird benachrichtigt wenn ein neues Ticket in"
" dieser Sammlung erstellt wird. Mehrere E-Mail Adressen durch Kommata "
"getrennt."
#: models.py:94
msgid "Updated Ticket CC Address"
@ -306,6 +311,9 @@ msgid ""
"all activity (new tickets, closed tickets, updates, reassignments, etc) for "
"this queue. Separate multiple addresses with a comma."
msgstr ""
"Jede eingegebene E-Mail Adresse wird über jede Aktivität (neues Ticket, "
"Tickets geschlossen, Aktualisierungen, Neuzuweisungen, usw.) in dieser "
"Sammlung benachrichtigt. Mehrere E-Mail Adressen durch Kommata getrennt."
#: models.py:105
msgid "E-Mail Box Type"
@ -428,7 +436,7 @@ msgstr "Geschlossen"
#: models.py:244 templates/helpdesk/ticket.html:90
#: templates/helpdesk/ticket.html.py:96 templates/helpdesk/ticket.html:109
msgid "Duplicate"
msgstr "Duplizieren"
msgstr "Duplikat"
#: models.py:248
msgid "1. Critical"
@ -538,7 +546,7 @@ msgstr "Nicht zugeordnet"
#: models.py:381
msgid " - On Hold"
msgstr "Zurückgehalten"
msgstr " - Zurückgehalten"
#: models.py:475 models.py:1067 models.py:1207 models.py:1232
#: templates/helpdesk/public_homepage.html:9
@ -726,7 +734,7 @@ msgstr "Hier steht der gleiche Kontext wie oben als einfacher Text."
#: models.py:764
msgid "Locale of this template."
msgstr ""
msgstr "Gebietsschema dieses Templates."
#: models.py:811 templates/helpdesk/kb_index.html:10
msgid "Category"
@ -981,7 +989,7 @@ msgstr ""
#: models.py:1238
msgid "Depends On Ticket"
msgstr ""
msgstr "hängt ab von Ticket"
#: management/commands/create_usersettings.py:21
msgid ""
@ -989,6 +997,9 @@ msgid ""
"required. Uses settings.DEFAULT_USER_SETTINGS which can be overridden to "
"suit your situation."
msgstr ""
"Suche nach Benutzern ohne django-helpdesk UserSettings und erstelle diese. "
"Verwendet settings.DEFAULT_USER_SETTINGS, die bei Bedarf überschrieben "
"werden können."
#: management/commands/escalate_tickets.py:146
#, python-format
@ -1326,8 +1337,8 @@ msgid ""
"<strong>Note:</strong> If the 'Keep' option is not selected, emails sent "
"from that address will be deleted permanently."
msgstr ""
"\n"
"<strong>Achtung:</strong> Falls Sie sich nicht für 'behalten' entscheiden, werden alle E-Mails von dieser Adresse für immer gelöscht."
"<strong>Achtung:</strong> Falls Sie sich nicht für 'behalten' entscheiden, "
"werden alle E-Mails von dieser Adresse für immer gelöscht."
#: templates/helpdesk/followup_edit.html:2
msgid "Edit followup"
@ -1576,33 +1587,35 @@ msgstr "Berichte &amp; Statistiken"
#: templates/helpdesk/report_index.html:9
msgid "You haven't created any tickets yet, so you cannot run any reports."
msgstr ""
"Sie können keine Berichte erstellen, da Sie noch keine Tickets angelegt "
"haben."
#: templates/helpdesk/report_index.html:13
msgid "Reports By User"
msgstr ""
msgstr "Berichte nach Benutzer"
#: templates/helpdesk/report_index.html:15
#: templates/helpdesk/report_index.html:24
msgid "by Priority"
msgstr ""
msgstr "nach Priorität"
#: templates/helpdesk/report_index.html:16
msgid "by Queue"
msgstr ""
msgstr "nach Sammlung"
#: templates/helpdesk/report_index.html:17
#: templates/helpdesk/report_index.html:25
msgid "by Status"
msgstr ""
msgstr "nach Status"
#: templates/helpdesk/report_index.html:18
#: templates/helpdesk/report_index.html:26
msgid "by Month"
msgstr ""
msgstr "nach Monat"
#: templates/helpdesk/report_index.html:22
msgid "Reports By Queue"
msgstr ""
msgstr "Berichte nach Sammlung"
#: templates/helpdesk/rss_list.html:6
msgid ""
@ -1763,6 +1776,8 @@ msgid ""
"This ticket cannot be resolved or closed until the tickets it depends on are"
" resolved."
msgstr ""
"Dieses Ticket kann gelöst oder geschlossen werden, bis die Tickets, von "
"denen dieses abhängt, gelöst werden."
#: templates/helpdesk/ticket.html:112
msgid "Is this update public?"
@ -1813,6 +1828,7 @@ msgid ""
"\n"
"<p>To automatically send an email to a user or e-mail address when this ticket is updated, select the user or enter an e-mail address below.</p>"
msgstr ""
"\n"
"<h2>Ticket CC hinzufügen</h2>\n"
"\n"
"<p>Wählen Sie einen Benutzer oder geben Sie eine E-Mail-Adresse ein, die bei Aktualisierungen dieses Tickets automatisch per Mail benachrichtig werden sollen.</p>"
@ -1888,7 +1904,7 @@ msgstr "Zurück zu <em>%(ticket_title)s</em>"
#: templates/helpdesk/ticket_dependency_add.html:3
msgid "Add Ticket Dependency"
msgstr ""
msgstr "Ticket Abhängigkeit hinzufügen"
#: templates/helpdesk/ticket_dependency_add.html:5
msgid ""
@ -1897,14 +1913,18 @@ msgid ""
"\n"
"<p>Adding a dependency will stop you resolving this ticket until the dependent ticket has been resolved or closed.</p>"
msgstr ""
"\n"
"<h2>Ticket Abhängigkeit hinzufügen</h2>\n"
"\n"
"<p>Das Hinzufügen einer Abhängigkeit verhindert die Lösung dieses Tickets bis alle abhängigen Tickets gelöst oder geschlossen wurden.</p>"
#: templates/helpdesk/ticket_dependency_add.html:21
msgid "Save Ticket Dependency"
msgstr ""
msgstr "Ticket Abhängigkeit speichern"
#: templates/helpdesk/ticket_dependency_del.html:3
msgid "Delete Ticket Dependency"
msgstr ""
msgstr "Ticket Abhängigkeit löschen"
#: templates/helpdesk/ticket_dependency_del.html:5
msgid ""
@ -1913,14 +1933,18 @@ msgid ""
"\n"
"<p>Are you sure you wish to remove the dependency on this ticket?</p>\n"
msgstr ""
"\n"
"<h2>Ticket Abhängigkeit löschen</h2>\n"
"\n"
"<p>Sind Sie sicher, dass Sie die Abhängigkeit von diesem Ticket entfernen möchten?</p>\n"
#: templates/helpdesk/ticket_desc_table.html:3
msgid "Unhold"
msgstr "Wieder freigegeben"
msgstr "Wieder freigeben"
#: templates/helpdesk/ticket_desc_table.html:3
msgid "Hold"
msgstr "Zurückgehalten"
msgstr "Zurückhalten"
#: templates/helpdesk/ticket_desc_table.html:4
#, python-format
@ -1945,24 +1969,26 @@ msgstr "Verwalten"
#: templates/helpdesk/ticket_desc_table.html:39
msgid "Dependencies"
msgstr ""
msgstr "Abhängigkeiten"
#: templates/helpdesk/ticket_desc_table.html:41
msgid ""
"This ticket cannot be resolved until the following ticket(s) are resolved"
msgstr ""
"Dieses Ticket kann nicht gelöst werden, bis die folgenden Ticket(s) gelöst "
"werden"
#: templates/helpdesk/ticket_desc_table.html:42
msgid "Remove Dependency"
msgstr ""
msgstr "Abhängigkeit entfernen"
#: templates/helpdesk/ticket_desc_table.html:45
msgid "This ticket has no dependencies."
msgstr ""
msgstr "Dieses Ticket hat keine Abhängigkeiten."
#: templates/helpdesk/ticket_desc_table.html:47
msgid "Add Dependency"
msgstr ""
msgstr "Abhängigkeit hinzufügen"
#: templates/helpdesk/ticket_list.html:2
msgid "Ticket Listing"
@ -2004,7 +2030,7 @@ msgstr "Filter anwenden"
#: templates/helpdesk/ticket_list.html:134
#, python-format
msgid "You are currently viewing saved query <em>%(query_name)s</em>."
msgstr ""
msgstr "Sie sehen die gespeicherte Abfrage <em>%(query_name)s</em>."
#: templates/helpdesk/ticket_list.html:141
#: templates/helpdesk/ticket_list.html:156
@ -2253,78 +2279,78 @@ msgstr "Ticket zurückgehalten"
#: views/staff.py:784
msgid "Jan"
msgstr ""
msgstr "Jan"
#: views/staff.py:785
msgid "Feb"
msgstr ""
msgstr "Feb"
#: views/staff.py:786
msgid "Mar"
msgstr ""
msgstr "Mär"
#: views/staff.py:787
msgid "Apr"
msgstr ""
msgstr "Apr"
#: views/staff.py:788
msgid "May"
msgstr ""
msgstr "Mai"
#: views/staff.py:789
msgid "Jun"
msgstr ""
msgstr "Jun"
#: views/staff.py:790
msgid "Jul"
msgstr ""
msgstr "Jul"
#: views/staff.py:791
msgid "Aug"
msgstr ""
msgstr "Aug"
#: views/staff.py:792
msgid "Sep"
msgstr ""
msgstr "Sep"
#: views/staff.py:793
msgid "Oct"
msgstr ""
msgstr "Okt"
#: views/staff.py:794
msgid "Nov"
msgstr ""
msgstr "Nov"
#: views/staff.py:795
msgid "Dec"
msgstr ""
msgstr "Dez"
#: views/staff.py:821
msgid "User by Priority"
msgstr ""
msgstr "Benutzer je Priorität"
#: views/staff.py:827
msgid "User by Queue"
msgstr ""
msgstr "Benutzer je Sammlung"
#: views/staff.py:833
msgid "User by Status"
msgstr ""
msgstr "Benutzer je Status"
#: views/staff.py:839
msgid "User by Month"
msgstr ""
msgstr "Benutzer je Monat"
#: views/staff.py:845
msgid "Queue by Priority"
msgstr ""
msgstr "Sammlung je Priorität"
#: views/staff.py:851
msgid "Queue by Status"
msgstr ""
msgstr "Sammlung je Status"
#: views/staff.py:857
msgid "Queue by Month"
msgstr ""
msgstr "Sammlung je Monat"

View File

@ -2,6 +2,7 @@
# Copyright (C) 2011 Ross Poulton
# This file is distributed under the same license as the django-helpdesk package.
#
# Translators:
# Alberto Gaona <gaona_consulting@yahoo.com>, 2011.
# Erik Rivera <erik.river@gmail.com>, 2011.
# Ross Poulton <ross@rossp.org>, 2011.
@ -10,8 +11,8 @@ msgstr ""
"Project-Id-Version: django-helpdesk\n"
"Report-Msgid-Bugs-To: http://github.com/RossP/django-helpdesk/issues\n"
"POT-Creation-Date: 2011-05-11 15:05+1000\n"
"PO-Revision-Date: 2011-06-09 17:17+0000\n"
"Last-Translator: albertogaona <gaona_consulting@yahoo.com>\n"
"PO-Revision-Date: 2011-11-05 00:47+0000\n"
"Last-Translator: rossp <ross@rossp.org>\n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/django-helpdesk/team/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -1110,6 +1111,7 @@ msgid ""
"\n"
"<p>Are you sure you want to delete this saved filter (<em>%(query_title)s</em>)? To re-create it, you will need to manually re-filter your ticket listing.</p>\n"
msgstr ""
"\n"
"<h2>Eliminar Consulta</h2>\n"
"\n"
"<p> ¿Estás seguro que quieres eliminar este filtro guardado <em>( %(query_title)s )?</em> Para volver a crearlo, tendrá que volver a filtrar manualmente la lista de tickets. </p>\n"
@ -1119,9 +1121,8 @@ msgid ""
"\n"
"<p>You have shared this query, so other users may be using it. If you delete it, they will have to manually create their own query.</p>\n"
msgstr ""
"<p> Ha compartido esta consulta para que los otros usuarios pueden "
"utilizarla. Si la elimina tendrá que crear manualmente su propia consulta. "
"</p>\n"
"\n"
"<p> Ha compartido esta consulta para que los otros usuarios pueden utilizarla. Si la elimina tendrá que crear manualmente su propia consulta. </p>\n"
#: templates/helpdesk/confirm_delete_saved_query.html:15
#: templates/helpdesk/delete_ticket.html:11
@ -1831,6 +1832,7 @@ msgid ""
"\n"
"<p>To automatically send an email to a user or e-mail address when this ticket is updated, select the user or enter an e-mail address below.</p>"
msgstr ""
"\n"
"<h2>Añadir CC al Ticket</h2>\n"
"\n"
"<p>Para enviar un e-mail automático a un usuario o dirección de e-mail cuando este ticket sea actualizado, seleccione el usuario o ingrese una dirección de correo abajo.</p>"
@ -2107,6 +2109,7 @@ msgid ""
"\n"
"<p>Use the following options to change the way your helpdesk system works for you. These settings do not impact any other user.</p>"
msgstr ""
"\n"
"<h2>Configuración de usuario</h2>\n"
"\n"
"<p>Usar las siguientes opciones para cambiar la forma en que el sistema Helpdesk trabaja para usted. Estos ajuste no tendrán impacto en otros usuarios.</p>"
@ -2127,6 +2130,7 @@ msgid ""
"<p>Thanks for being here. Hopefully you've helped resolve a few tickets and make the world a better place.</p>\n"
"\n"
msgstr ""
"\n"
"<h2>Sesión cerrada</h2>\n"
"\n"
"<p>Gracias por estar aquí. Esperando que haya ayudado a resolver algunos tickets y haya hecho del mundo, un lugar mejor</p>\n"

View File

@ -2,6 +2,7 @@
# Copyright (C) 2011 Ross Poulton
# This file is distributed under the same license as the django-helpdesk package.
#
# Translators:
# Alberto Gaona <gaona_consulting@yahoo.com>, 2011.
# Erik Rivera <erik.river@gmail.com>, 2011.
# Ross Poulton <ross@rossp.org>, 2011.
@ -10,8 +11,8 @@ msgstr ""
"Project-Id-Version: django-helpdesk\n"
"Report-Msgid-Bugs-To: http://github.com/RossP/django-helpdesk/issues\n"
"POT-Creation-Date: 2011-05-11 15:05+1000\n"
"PO-Revision-Date: 2011-06-09 17:38+0000\n"
"Last-Translator: albertogaona <gaona_consulting@yahoo.com>\n"
"PO-Revision-Date: 2011-11-05 00:47+0000\n"
"Last-Translator: rossp <ross@rossp.org>\n"
"Language-Team: Spanish (Mexican) (http://www.transifex.net/projects/p/django-helpdesk/team/es_MX/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -2,6 +2,7 @@
# Copyright (C) 2011 Ross Poulton
# This file is distributed under the same license as the django-helpdesk package.
#
# Translators:
# kolin22 <kolin22@gmail.com>, 2011.
# Ross Poulton <ross@rossp.org>, 2011.
msgid ""
@ -9,8 +10,8 @@ msgstr ""
"Project-Id-Version: django-helpdesk\n"
"Report-Msgid-Bugs-To: http://github.com/RossP/django-helpdesk/issues\n"
"POT-Creation-Date: 2011-05-11 15:05+1000\n"
"PO-Revision-Date: 2011-05-12 00:22+0000\n"
"Last-Translator: kolin22 <kolin22@gmail.com>\n"
"PO-Revision-Date: 2011-11-05 00:47+0000\n"
"Last-Translator: rossp <ross@rossp.org>\n"
"Language-Team: French (http://www.transifex.net/projects/p/django-helpdesk/team/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
# Copyright (C) 2011 Ross Poulton
# This file is distributed under the same license as the django-helpdesk package.
#
# Translators:
# mpasternak <michal.dtz@gmail.com>, 2011.
# Ross Poulton <ross@rossp.org>, 2011.
msgid ""
@ -9,7 +10,7 @@ msgstr ""
"Project-Id-Version: django-helpdesk\n"
"Report-Msgid-Bugs-To: http://github.com/RossP/django-helpdesk/issues\n"
"POT-Creation-Date: 2011-05-11 15:05+1000\n"
"PO-Revision-Date: 2011-05-12 00:22+0000\n"
"PO-Revision-Date: 2011-11-05 00:46+0000\n"
"Last-Translator: rossp <ross@rossp.org>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/django-helpdesk/team/pl/)\n"
"MIME-Version: 1.0\n"

File diff suppressed because it is too large Load Diff

View File

@ -157,15 +157,15 @@ if helpdesk_settings.HELPDESK_KB_ENABLED:
urlpatterns += patterns('helpdesk.views.kb',
url(r'^kb/$',
'index', name='helpdesk_kb_index'),
url(r'^kb/(?P<slug>[A-Za-z_-]+)/$',
'category', name='helpdesk_kb_category'),
url(r'^kb/(?P<item>[0-9]+)/$',
'item', name='helpdesk_kb_item'),
url(r'^kb/(?P<item>[0-9]+)/vote/$',
'vote', name='helpdesk_kb_vote'),
url(r'^kb/(?P<slug>[A-Za-z0-9_-]+)/$',
'category', name='helpdesk_kb_category'),
)
urlpatterns += patterns('',