Commit 24856155 authored by Cynddl's avatar Cynddl
Browse files

Merge branch 'master' of git://github.com/stef/nnmon

parents e120bf17 538e295b
......@@ -22,8 +22,8 @@ class AddViolation(forms.Form):
contract = forms.CharField(required=True, max_length=256, help_text=_('The specific contract at the ISP provider. (please be as specific as possible)'))
media = forms.ChoiceField(required=False, choices=(('',''),)+tuple(sorted(MEDIA,key=itemgetter(1))), label=_('Is the Internet connection over mobile or fixed line?'))
comment = forms.CharField(required=True, widget=AdvancedEditor(), label=_('Please describe the symptoms you are experiencing. What service or site, or person is unavailable or seems artificially slowed down.'))
email = forms.EmailField(required=True, help_text=_("We need your email to validate your report. Your email address is obligatory, but we willl never use your personal data for anything else than checking the submission."))
nick = forms.CharField(required=False, help_text=_("We need some name to display that instead of an email address."))
email = forms.EmailField(required=True, label=_('Email (set this to enable saving)'), help_text=_("We need your email to validate your report. Your email address is obligatory, but we willl never use your personal data for anything else than checking the submission."))
nick = forms.CharField(required=False, label=_("Name or nickname"), help_text=_("We need some name to display that instead of an email address."))
attachments = MultiFileField(required=False, label=_("Attach screenshot, document or any other relevant information."))
resource = forms.ChoiceField(required=False, choices=(('',''),)+tuple(sorted(RESOURCES,key=itemgetter(1))), label=_('What is the affected resource.'))
resource_name = forms.CharField(required=False, max_length=4096, label=_('Please specify the name of the affected resource.'))
......
......@@ -84,7 +84,7 @@ class Comment(models.Model):
pass
def __unicode__(self):
return "Comment #%s" % (self.pk)
return _("Comment #%s") % (self.pk)
class Attachment(models.Model):
storage = models.FileField(upload_to='static')
......
......@@ -47,7 +47,7 @@ def activate(request):
try:
v=Violation.objects.get(activationid=request.GET.get('key','asdf'))
except:
return HttpResponse("Thank you, this has been already activated")
return HttpResponse(_("Thank you, this has been already activated"))
if v:
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
to=[x.email for x in User.objects.filter(groups__name='moderator')]
......@@ -67,14 +67,14 @@ def moderate(request):
try:
v=Violation.objects.get(activationid=request.GET.get('key','asdf'))
except:
return HttpResponse("Thank you, this has been already activated")
return HttpResponse(_("Thank you, this has been already activated"))
if not v:
messages.add_message(request, messages.INFO, _('No such key'))
return HttpResponseRedirect('/') # Redirect after POST
if request.GET.get('action','')=='approve':
if settings.TWITTER_API:
try:
settings.TWITTER_API.PostUpdate("New infringement reported for %s (%s) %s" % (v.operator, v.country, v.contract))
settings.TWITTER_API.PostUpdate(_("New infringement reported for %s (%s) %s") % (v.operator, v.country, v.contract))
except:
pass
v.activationid=''
......@@ -94,9 +94,9 @@ def confirm(request, id, name=None):
try:
c=Confirmation(key=actid, email=name, violation=Violation.objects.get(pk=id))
except:
return HttpResponse("Thank you, this has been already confirmed")
return HttpResponse(_("Thank you, this has been already confirmed"))
c.save()
return HttpResponse('<div class="confirm_thanks">Thank you for your confirmation</div>')
return HttpResponse(_('<div class="confirm_thanks">Thank you for your confirmation</div>'))
c=Confirmation.objects.get(key=id)
if c:
c.key=''
......@@ -106,7 +106,7 @@ def confirm(request, id, name=None):
def sendverifymail(service,to):
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
msg = MIMEText(_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nYour report will be listed after we assured it is valid.") % (settings.ROOT_URL or 'http://localhost:8001/', service, actid))
msg = MIMEText(_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.") % (settings.ROOT_URL or 'http://localhost:8001/', service, actid))
msg['Subject'] = _('NNMon submission verification')
msg['From'] = 'nnmon@nnmon.lqdn.fr'
msg['To'] = to
......@@ -160,7 +160,7 @@ def add(request):
form = AddViolation()
return render_to_response(
'add.html',
'index.html',
{ 'form': form, },
context_instance=RequestContext(request))
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: nnmon 0.00000000000001\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-07-04 23:50+0200\n"
"POT-Creation-Date: 2011-09-21 03:38+0200\n"
"PO-Revision-Date: 2011-04-29 17:53+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: de <LL@li.org>\n"
......@@ -32,39 +32,44 @@ msgid ""
msgstr ""
#: bt/forms.py:23
msgid "Is the Internet connection over mobile or fixed line?"
msgstr ""
#: bt/forms.py:24
msgid ""
"Please describe the symptoms you are experiencing. What service or site, "
"or person is unavailable or seems artificially slowed down."
msgstr ""
#: bt/forms.py:24
msgid ""
"We need your email to validate your report. We're not storing the email "
"later on."
#: bt/forms.py:25
msgid "Email (set this to enable saving)"
msgstr ""
#: bt/forms.py:25
msgid "We need your some name to identify you later on."
msgid ""
"We need your email to validate your report. Your email address is "
"obligatory, but we willl never use your personal data for anything else "
"than checking the submission."
msgstr ""
#: bt/forms.py:26
msgid "Attach screenshot, document or any other relevant information."
msgid "We need some name to display that instead of an email address."
msgstr ""
#: bt/forms.py:27
msgid "What is the affected resource."
msgid "Attach screenshot, document or any other relevant information."
msgstr ""
#: bt/forms.py:28
msgid "Please specify the name of the affected resource."
msgid "What is the affected resource."
msgstr ""
#: bt/forms.py:29
msgid "Is the Resource Blocked or otherwise discrimated?"
msgid "Please specify the name of the affected resource."
msgstr ""
#: bt/forms.py:30
msgid "Is the Internet connection over mobile or fixed line?"
msgid "Is the Resource Blocked or otherwise discrimated?"
msgstr ""
#: bt/forms.py:31
......@@ -90,7 +95,7 @@ msgstr ""
#: bt/forms.py:35
msgid ""
"Unfortunately we must protect against automatic attacks, please forgive "
"us this inconvenience."
"us this inconvenience. (note the + and the * are somewhat confusing)"
msgstr ""
#: bt/models.py:6
......@@ -257,58 +262,71 @@ msgstr ""
msgid "An incorrect number of files were uploaded."
msgstr ""
#: bt/views.py:51
#: bt/views.py:50 bt/views.py:70
msgid "Thank you, this has been already activated"
msgstr ""
#: bt/views.py:54
#, python-format
msgid "A new report was submitted. To approve click here: %s/moderate/?key=%s\n"
msgstr ""
#: bt/views.py:52
#: bt/views.py:55
msgid "NNMon submission approval"
msgstr ""
#: bt/views.py:60
msgid "Thank you for verifying your submission."
#: bt/views.py:63
msgid ""
"Thank you for verifying your submission. It will be listed shortly, after"
" verifying it's a valid report."
msgstr ""
#: bt/views.py:66
#: bt/views.py:72
msgid "No such key"
msgstr ""
#: bt/views.py:73
#: bt/views.py:77
#, python-format
msgid "New infringement reported for %s (%s) %s"
msgstr ""
#: bt/views.py:82
msgid "Thank you for approving the submission."
msgstr ""
#: bt/views.py:77
#: bt/views.py:86
msgid "Thank you for deleting the submission."
msgstr ""
#: bt/views.py:96
#: bt/views.py:97
msgid "Thank you, this has been already confirmed"
msgstr ""
#: bt/views.py:99
msgid "<div class=\"confirm_thanks\">Thank you for your confirmation</div>"
msgstr ""
#: bt/views.py:104
msgid "Thank you for verifying your confirmation"
msgstr ""
#: bt/views.py:109
#, python-format
msgid ""
"Thank you for submitting a new report. To finalize your submission please"
" confirm using your validation key.\n"
"Your verification key is %s/%s%s\n"
"Please note that reports are moderated, it might take some time before "
"your report appears online. Thank you for your patience."
msgstr ""
#: bt/views.py:97
#: bt/views.py:110
msgid "NNMon submission verification"
msgstr ""
#: bt/views.py:144
#: bt/views.py:157
msgid ""
"Thank you for submitting this report, you will receive a verification "
"email shortly."
msgstr ""
#~ msgid "The what is the affected resource."
#~ msgstr ""
#~ msgid ""
#~ "Unfortunately we must protect against "
#~ "automatic attack, please forgive us this"
#~ " inconvenience."
#~ msgstr ""
#~ msgid "Your verification key is %s/activate?key=%s\n"
#~ msgstr ""
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: nnmon 0.00000000000001\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-07-04 23:50+0200\n"
"POT-Creation-Date: 2011-09-21 03:38+0200\n"
"PO-Revision-Date: 2011-04-29 17:49+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: fr <LL@li.org>\n"
......@@ -32,39 +32,44 @@ msgid ""
msgstr ""
#: bt/forms.py:23
msgid "Is the Internet connection over mobile or fixed line?"
msgstr ""
#: bt/forms.py:24
msgid ""
"Please describe the symptoms you are experiencing. What service or site, "
"or person is unavailable or seems artificially slowed down."
msgstr ""
#: bt/forms.py:24
msgid ""
"We need your email to validate your report. We're not storing the email "
"later on."
#: bt/forms.py:25
msgid "Email (set this to enable saving)"
msgstr ""
#: bt/forms.py:25
msgid "We need your some name to identify you later on."
msgid ""
"We need your email to validate your report. Your email address is "
"obligatory, but we willl never use your personal data for anything else "
"than checking the submission."
msgstr ""
#: bt/forms.py:26
msgid "Attach screenshot, document or any other relevant information."
msgid "We need some name to display that instead of an email address."
msgstr ""
#: bt/forms.py:27
msgid "What is the affected resource."
msgid "Attach screenshot, document or any other relevant information."
msgstr ""
#: bt/forms.py:28
msgid "Please specify the name of the affected resource."
msgid "What is the affected resource."
msgstr ""
#: bt/forms.py:29
msgid "Is the Resource Blocked or otherwise discrimated?"
msgid "Please specify the name of the affected resource."
msgstr ""
#: bt/forms.py:30
msgid "Is the Internet connection over mobile or fixed line?"
msgid "Is the Resource Blocked or otherwise discrimated?"
msgstr ""
#: bt/forms.py:31
......@@ -90,7 +95,7 @@ msgstr ""
#: bt/forms.py:35
msgid ""
"Unfortunately we must protect against automatic attacks, please forgive "
"us this inconvenience."
"us this inconvenience. (note the + and the * are somewhat confusing)"
msgstr ""
#: bt/models.py:6
......@@ -257,58 +262,71 @@ msgstr ""
msgid "An incorrect number of files were uploaded."
msgstr ""
#: bt/views.py:51
#: bt/views.py:50 bt/views.py:70
msgid "Thank you, this has been already activated"
msgstr ""
#: bt/views.py:54
#, python-format
msgid "A new report was submitted. To approve click here: %s/moderate/?key=%s\n"
msgstr ""
#: bt/views.py:52
#: bt/views.py:55
msgid "NNMon submission approval"
msgstr ""
#: bt/views.py:60
msgid "Thank you for verifying your submission."
#: bt/views.py:63
msgid ""
"Thank you for verifying your submission. It will be listed shortly, after"
" verifying it's a valid report."
msgstr ""
#: bt/views.py:66
#: bt/views.py:72
msgid "No such key"
msgstr ""
#: bt/views.py:73
#: bt/views.py:77
#, python-format
msgid "New infringement reported for %s (%s) %s"
msgstr ""
#: bt/views.py:82
msgid "Thank you for approving the submission."
msgstr ""
#: bt/views.py:77
#: bt/views.py:86
msgid "Thank you for deleting the submission."
msgstr ""
#: bt/views.py:96
#: bt/views.py:97
msgid "Thank you, this has been already confirmed"
msgstr ""
#: bt/views.py:99
msgid "<div class=\"confirm_thanks\">Thank you for your confirmation</div>"
msgstr ""
#: bt/views.py:104
msgid "Thank you for verifying your confirmation"
msgstr ""
#: bt/views.py:109
#, python-format
msgid ""
"Thank you for submitting a new report. To finalize your submission please"
" confirm using your validation key.\n"
"Your verification key is %s/%s%s\n"
"Please note that reports are moderated, it might take some time before "
"your report appears online. Thank you for your patience."
msgstr ""
#: bt/views.py:97
#: bt/views.py:110
msgid "NNMon submission verification"
msgstr ""
#: bt/views.py:144
#: bt/views.py:157
msgid ""
"Thank you for submitting this report, you will receive a verification "
"email shortly."
msgstr ""
#~ msgid "The what is the affected resource."
#~ msgstr ""
#~ msgid ""
#~ "Unfortunately we must protect against "
#~ "automatic attack, please forgive us this"
#~ " inconvenience."
#~ msgstr ""
#~ msgid "Your verification key is %s/activate?key=%s\n"
#~ msgstr ""
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: nnmon 0.00000000000001\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-07-04 23:50+0200\n"
"POT-Creation-Date: 2011-09-21 03:38+0200\n"
"PO-Revision-Date: 2011-04-29 17:53+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: hu <LL@li.org>\n"
......@@ -32,39 +32,44 @@ msgid ""
msgstr ""
#: bt/forms.py:23
msgid "Is the Internet connection over mobile or fixed line?"
msgstr ""
#: bt/forms.py:24
msgid ""
"Please describe the symptoms you are experiencing. What service or site, "
"or person is unavailable or seems artificially slowed down."
msgstr ""
#: bt/forms.py:24
msgid ""
"We need your email to validate your report. We're not storing the email "
"later on."
#: bt/forms.py:25
msgid "Email (set this to enable saving)"
msgstr ""
#: bt/forms.py:25
msgid "We need your some name to identify you later on."
msgid ""
"We need your email to validate your report. Your email address is "
"obligatory, but we willl never use your personal data for anything else "
"than checking the submission."
msgstr ""
#: bt/forms.py:26
msgid "Attach screenshot, document or any other relevant information."
msgid "We need some name to display that instead of an email address."
msgstr ""
#: bt/forms.py:27
msgid "What is the affected resource."
msgid "Attach screenshot, document or any other relevant information."
msgstr ""
#: bt/forms.py:28
msgid "Please specify the name of the affected resource."
msgid "What is the affected resource."
msgstr ""
#: bt/forms.py:29
msgid "Is the Resource Blocked or otherwise discrimated?"
msgid "Please specify the name of the affected resource."
msgstr ""
#: bt/forms.py:30
msgid "Is the Internet connection over mobile or fixed line?"
msgid "Is the Resource Blocked or otherwise discrimated?"
msgstr ""
#: bt/forms.py:31
......@@ -90,7 +95,7 @@ msgstr ""
#: bt/forms.py:35
msgid ""
"Unfortunately we must protect against automatic attacks, please forgive "
"us this inconvenience."
"us this inconvenience. (note the + and the * are somewhat confusing)"
msgstr ""
#: bt/models.py:6
......@@ -257,58 +262,71 @@ msgstr ""
msgid "An incorrect number of files were uploaded."
msgstr ""
#: bt/views.py:51
#: bt/views.py:50 bt/views.py:70
msgid "Thank you, this has been already activated"
msgstr ""
#: bt/views.py:54
#, python-format
msgid "A new report was submitted. To approve click here: %s/moderate/?key=%s\n"
msgstr ""
#: bt/views.py:52
#: bt/views.py:55
msgid "NNMon submission approval"
msgstr ""
#: bt/views.py:60
msgid "Thank you for verifying your submission."
#: bt/views.py:63
msgid ""
"Thank you for verifying your submission. It will be listed shortly, after"
" verifying it's a valid report."
msgstr ""
#: bt/views.py:66
#: bt/views.py:72
msgid "No such key"
msgstr ""
#: bt/views.py:73
#: bt/views.py:77
#, python-format
msgid "New infringement reported for %s (%s) %s"
msgstr ""
#: bt/views.py:82
msgid "Thank you for approving the submission."
msgstr ""
#: bt/views.py:77
#: bt/views.py:86
msgid "Thank you for deleting the submission."
msgstr ""
#: bt/views.py:96
#: bt/views.py:97
msgid "Thank you, this has been already confirmed"
msgstr ""
#: bt/views.py:99
msgid "<div class=\"confirm_thanks\">Thank you for your confirmation</div>"
msgstr ""
#: bt/views.py:104
msgid "Thank you for verifying your confirmation"
msgstr ""
#: bt/views.py:109
#, python-format
msgid ""
"Thank you for submitting a new report. To finalize your submission please"
" confirm using your validation key.\n"
"Your verification key is %s/%s%s\n"
"Please note that reports are moderated, it might take some time before "
"your report appears online. Thank you for your patience."
msgstr ""
#: bt/views.py:97
#: bt/views.py:110
msgid "NNMon submission verification"
msgstr ""
#: bt/views.py:144
#: bt/views.py:157
msgid ""
"Thank you for submitting this report, you will receive a verification "
"email shortly."
msgstr ""
#~ msgid "The what is the affected resource."
#~ msgstr ""
#~ msgid ""
#~ "Unfortunately we must protect against "
#~ "automatic attack, please forgive us this"
#~ " inconvenience."
#~ msgstr ""
#~ msgid "Your verification key is %s/activate?key=%s\n"
#~ msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: nnmon 0.00000000000001\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2011-07-04 23:50+0200\n"
"POT-Creation-Date: 2011-09-21 03:38+0200\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"
......@@ -32,39 +32,44 @@ msgid ""
msgstr ""
#: bt/forms.py:23
msgid "Is the Internet connection over mobile or fixed line?"
msgstr ""
#: bt/forms.py:24
msgid ""
"Please describe the symptoms you are experiencing. What service or site, "
"or person is unavailable or seems artificially slowed down."
msgstr ""
#: bt/forms.py:24
msgid ""
"We need your email to validate your report. We're not storing the email "
"later on."
#: bt/forms.py:25
msgid "Email (set this to enable saving)"
msgstr ""
#: bt/forms.py:25
msgid "We need your some name to identify you later on."
msgid ""
"We need your email to validate your report. Your email address is "
"obligatory, but we willl never use your personal data for anything else "
"than checking the submission."
msgstr ""
#: bt/forms.py:26
msgid "Attach screenshot, document or any other relevant information."
msgid "We need some name to display that instead of an email address."
msgstr ""
#: bt/forms.py:27
msgid "What is the affected resource."
msgid "Attach screenshot, document or any other relevant information."
msgstr ""
#: bt/forms.py:28
msgid "Please specify the name of the affected resource."
msgid "What is the affected resource."
msgstr ""
#: bt/forms.py:29
msgid "Is the Resource Blocked or otherwise discrimated?"
msgid "Please specify the name of the affected resource."
msgstr ""
#: bt/forms.py:30
msgid "Is the Internet connection over mobile or fixed line?"
msgid "Is the Resource Blocked or otherwise discrimated?"
msgstr ""
#: bt/forms.py:31
......@@ -90,7 +95,7 @@ msgstr ""
#: bt/forms.py:35
msgid ""
"Unfortunately we must protect against automatic attacks, please forgive "
"us this inconvenience."
"us this inconvenience. (note the + and the * are somewhat confusing)"
msgstr ""
#: bt/models.py:6
......@@ -257,44 +262,69 @@ msgstr ""
msgid "An incorrect number of files were uploaded."
msgstr ""
#: bt/views.py:51
#: bt/views.py:50 bt/views.py:70