Skip to content

Commit

Permalink
* Added translations for CNAME
Browse files Browse the repository at this point in the history
* Added some TODO reminders for cases in which the SMTP fails
  • Loading branch information
nemesisdesign committed Nov 21, 2011
1 parent 28a0eb8 commit 524410f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Binary file modified locale/it/LC_MESSAGES/django.mo
Binary file not shown.
6 changes: 6 additions & 0 deletions locale/it/LC_MESSAGES/django.po
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -966,3 +966,9 @@ msgstr "Disegna link da/a questa interfaccia (escluse interfacce VPN)"


msgid "Hide from map" msgid "Hide from map"
msgstr "Nascondi dalla mappa" msgstr "Nascondi dalla mappa"

msgid "Name used for DNS resolution. Example: eth0 becomes eth0.devicecname.nodename.domain.org. If left empty the interface type is used as default."
msgstr "Nome usato per la risoluzione DNS. Esempio: eth0 diventa eth0.nomeapparato.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il tipo interfaccia come default."

msgid "Name used for DNS resolution. Example: grid1 becomes grid1.nodename.domain.org. If left empty device name is used as default."
msgstr "Nome usato per la risoluzione DNS. Esempio: grid1 diventa grid1.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il nome dell'apparato come valore di default."
14 changes: 12 additions & 2 deletions nodeshot/utils.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def email_owners(node, subject, body_template, context, reply_to=False):
if node.email3 != '' and node.email3 != None: if node.email3 != '' and node.email3 != None:
recipient_list += [node.email3] recipient_list += [node.email3]


#try:
# send mail # send mail
if reply_to: if reply_to:
from django.core.mail import EmailMessage from django.core.mail import EmailMessage
Expand All @@ -51,6 +52,10 @@ def email_owners(node, subject, body_template, context, reply_to=False):
else: else:
from django.core.mail import send_mail from django.core.mail import send_mail
send_mail(subject, message, DEFAULT_FROM_EMAIL, recipient_list) send_mail(subject, message, DEFAULT_FROM_EMAIL, recipient_list)
#except:
# smtp is offline
# TODO: return a nice message to the user
#pass


def notify_admins(node, subject, body_template, context, skip=False): def notify_admins(node, subject, body_template, context, skip=False):
""" """
Expand All @@ -75,8 +80,13 @@ def notify_admins(node, subject, body_template, context, skip=False):
context['admin'] = admin context['admin'] = admin
# parse message # parse message
message = render_to_string(body_template,context) message = render_to_string(body_template,context)
# send email try:
admin.email_user(subject, message) # send email
admin.email_user(subject, message)
except:
# smtp is offline
# TODO: maybe this case should be logged?
pass


def jslugify(slug): def jslugify(slug):
""" """
Expand Down

0 comments on commit 524410f

Please sign in to comment.