Revision c2f4725d

b/flowspec/models.py
4 4
from django.db import models
5 5
from django.conf import settings
6 6
from django.contrib.auth.models import User
7
from django.utils.translation import ugettext_lazy as _
7 8
from utils import proxy as PR
8 9
from ipaddr import *
9 10
import datetime
......
103 104
        unique_together = ("action", "action_value")
104 105

  
105 106
class Route(models.Model):
106
    name = models.SlugField(max_length=128)
107
    name = models.SlugField(max_length=128, verbose_name=_("Name"))
107 108
    applier = models.ForeignKey(User, blank=True, null=True)
108
    source = models.CharField(max_length=32, help_text=u"Network address. Use address/CIDR notation", verbose_name="Source Address")
109
    sourceport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchSourcePort", verbose_name="Source Port")
110
    destination = models.CharField(max_length=32, help_text=u"Network address. Use address/CIDR notation", verbose_name="Destination Address")
111
    destinationport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchDestinationPort", verbose_name="Destination Port")
112
    port = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchPort", verbose_name="Port" )
109
    source = models.CharField(max_length=32, help_text=_("Network address. Use address/CIDR notation"), verbose_name=_("Source Address"))
110
    sourceport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchSourcePort", verbose_name=_("Source Port"))
111
    destination = models.CharField(max_length=32, help_text=_("Network address. Use address/CIDR notation"), verbose_name=_("Destination Address"))
112
    destinationport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchDestinationPort", verbose_name=_("Destination Port"))
113
    port = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchPort", verbose_name=_("Port"))
113 114
    dscp = models.ManyToManyField(MatchDscp, blank=True, null=True, verbose_name="DSCP")
114 115
    fragmenttype = models.CharField(max_length=20, choices=FRAGMENT_CODES, blank=True, null=True, verbose_name="Fragment Type")
115 116
    icmpcode = models.CharField(max_length=32, blank=True, null=True, verbose_name="ICMP Code")
116 117
    icmptype = models.CharField(max_length=32, blank=True, null=True, verbose_name="ICMP Type")
117 118
    packetlength = models.IntegerField(blank=True, null=True, verbose_name="Packet Length")
118
    protocol = models.ManyToManyField(MatchProtocol, blank=True, null=True, verbose_name="Protocol")
119
    protocol = models.ManyToManyField(MatchProtocol, blank=True, null=True, verbose_name=_("Protocol"))
119 120
    tcpflag = models.CharField(max_length=128, blank=True, null=True, verbose_name="TCP flag")
120
    then = models.ManyToManyField(ThenAction, verbose_name="Then")
121
    then = models.ManyToManyField(ThenAction, verbose_name=_("Then"))
121 122
    filed = models.DateTimeField(auto_now_add=True)
122 123
    last_updated = models.DateTimeField(auto_now=True)
123
    status = models.CharField(max_length=20, choices=ROUTE_STATES, blank=True, null=True, verbose_name="Status", default="PENDING")
124
    status = models.CharField(max_length=20, choices=ROUTE_STATES, blank=True, null=True, verbose_name=_("Status"), default="PENDING")
124 125
#    is_online = models.BooleanField(default=False)
125 126
#    is_active = models.BooleanField(default=False)
126
    expires = models.DateField(default=days_offset)
127
    response = models.CharField(max_length=512, blank=True, null=True)
128
    comments = models.TextField(null=True, blank=True, verbose_name="Comments")
127
    expires = models.DateField(default=days_offset, verbose_name=_("Expires"))
128
    response = models.CharField(max_length=512, blank=True, null=True, verbose_name=_("Response"))
129
    comments = models.TextField(null=True, blank=True, verbose_name=_("Comments"))
129 130

  
130 131
    
131 132
    def __unicode__(self):
......
150 151
                address = IPNetwork(self.destination)
151 152
                self.destination = address.exploded
152 153
            except Exception:
153
                raise ValidationError('Invalid network address format at Destination Field')
154
                raise ValidationError(_('Invalid network address format at Destination Field'))
154 155
        if self.source:
155 156
            try:
156 157
                address = IPNetwork(self.source)
157 158
                self.source = address.exploded
158 159
            except Exception:
159
                raise ValidationError('Invalid network address format at Source Field')
160
                raise ValidationError(_('Invalid network address format at Source Field'))
160 161
   
161 162
    def commit_add(self, *args, **kwargs):
162 163
        peer = self.applier.get_profile().peer.domain_name
b/locale/el/LC_MESSAGES/django.po
1
# SOME DESCRIPTIVE TITLE.
2
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
1
# Translation file for FoD application.
2
# Copyright (C) 2012
3 3
# This file is distributed under the same license as the PACKAGE package.
4 4
# Leonidas Poulopoulos <leopoul@grnet.gr>, 2012.
5 5
#
......
8 8
msgstr ""
9 9
"Project-Id-Version: PACKAGE VERSION\n"
10 10
"Report-Msgid-Bugs-To: \n"
11
"POT-Creation-Date: 2012-02-20 19:14+0200\n"
11
"POT-Creation-Date: 2012-02-23 11:58+0200\n"
12 12
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13
"Last-Translator: Leonidas Poulopoulos <leopoul@grnet.gr>\n"
14 14
"Language-Team: LANGUAGE <LL@li.org>\n"
......
16 16
"MIME-Version: 1.0\n"
17 17
"Content-Type: text/plain; charset=UTF-8\n"
18 18
"Content-Transfer-Encoding: 8bit\n"
19
"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
19
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 20

  
21 21
#: settings.py:49
22 22
msgid "Greek"
......
31 31
msgid "%sUser account activated"
32 32
msgstr ""
33 33

  
34
#: flowspec/models.py:107 templates/review.html:49
35
#: templates/review.html.py:107 templates/user_routes.html:257
36
msgid "Name"
37
msgstr "Όνομα"
38

  
39
#: flowspec/models.py:109 flowspec/models.py:111
40
msgid "Network address. Use address/CIDR notation"
41
msgstr "Διεύθυνση δικτύου/υποδικτύου. Χρησιμοποιήστε σύνταξη διεύθυνσης/CIDR"
42

  
43
#: flowspec/models.py:109
44
msgid "Source Address"
45
msgstr "Διεύθυνση Πηγής"
46

  
47
#: flowspec/models.py:110
48
msgid "Source Port"
49
msgstr "Πόρτα Πηγής"
50

  
51
#: flowspec/models.py:111
52
msgid "Destination Address"
53
msgstr "Διεύθυνση Προορισμού"
54

  
55
#: flowspec/models.py:112
56
msgid "Destination Port"
57
msgstr "Πόρτα Προορισμού"
58

  
59
#: flowspec/models.py:113
60
msgid "Port"
61
msgstr "Πόρτα"
62

  
63
#: flowspec/models.py:119
64
msgid "Protocol"
65
msgstr "Πρωτόκολλο"
66

  
67
#: flowspec/models.py:121 templates/user_routes.html:259
68
msgid "Then"
69
msgstr "Ενέργειες"
70

  
71
#: flowspec/models.py:124 templates/user_routes.html:260
72
msgid "Status"
73
msgstr "Κατάσταση"
74

  
75
#: flowspec/models.py:127 templates/user_routes.html:263
76
msgid "Expires"
77
msgstr "Λήγει"
78

  
79
#: flowspec/models.py:128 templates/user_routes.html:264
80
msgid "Response"
81
msgstr "Απόκριση Συσκευής"
82

  
83
#: flowspec/models.py:129 templates/review.html:57
84
#: templates/review.html.py:115
85
msgid "Comments"
86
msgstr "Σχόλια"
87

  
88
#: flowspec/models.py:154
89
msgid "Invalid network address format at Destination Field"
90
msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Προορισμός"
91

  
92
#: flowspec/models.py:160
93
msgid "Invalid network address format at Source Field"
94
msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Πηγή"
95

  
34 96
#: monkey_patch/forms.py:11
35 97
#, python-format
36 98
msgid ""
......
122 184
msgid "Use/Comments"
123 185
msgstr "Χρήση/Σχόλια"
124 186

  
125
#: templates/apply.html:396
187
#: templates/apply.html:397
126 188
msgid ""
127
"\n"
128
"                <p class=\"roundbox\">\n"
129
"                    Give a short description of the intended use of this "
130
"rule, that justifies the parameter selection above. Feel free to include any "
131
"additional comments.\n"
132
"                </p>\n"
133
"                "
189
"Give a short description of the intended use of this rule, that justifies "
190
"the parameter selection above. Feel free to include any additional comments."
134 191
msgstr ""
135 192

  
136
#: templates/apply.html:409
193
#: templates/apply.html:408
137 194
msgid "Apply"
138 195
msgstr "Εφαρμογή"
139 196

  
......
154 211
msgid "Logout"
155 212
msgstr "Έξοδος"
156 213

  
157
#: templates/base.html:60
214
#: templates/base.html:60 templates/welcome.html:17
158 215
msgid "Shibboleth Login"
159 216
msgstr "Είσοδος με Shibboleth"
160 217

  
......
209 266
msgid "Administrative contact"
210 267
msgstr ""
211 268

  
212
#: templates/review.html:49 templates/review.html.py:107
213
#: templates/user_routes.html:257
214
msgid "Name"
215
msgstr ""
216

  
217 269
#: templates/review.html:50 templates/review.html.py:108
218 270
msgid "Email"
219 271
msgstr ""
......
222 274
msgid "Phone"
223 275
msgstr ""
224 276

  
225
#: templates/review.html:57 templates/review.html.py:115
226
msgid "Comments"
227
msgstr ""
228

  
229 277
#: templates/review.html:64 templates/review.html.py:122
230 278
msgid "Placement"
231 279
msgstr ""
......
291 339
msgid "Match"
292 340
msgstr "Όροι"
293 341

  
294
#: templates/user_routes.html:259
295
msgid "Then"
296
msgstr "Ενέργειες"
297

  
298
#: templates/user_routes.html:260
299
msgid "Status"
300
msgstr "Κατάσταση"
301

  
302 342
#: templates/user_routes.html:261
303 343
msgid "Details"
304 344
msgstr "Λεπτομέρειες"
......
307 347
msgid "Applier"
308 348
msgstr "Χρήστης"
309 349

  
310
#: templates/user_routes.html:263
311
msgid "Expires"
312
msgstr "Λήγει"
313

  
314
#: templates/user_routes.html:264
315
msgid "Response"
316
msgstr "Απόκριση Συσκευής"
317

  
318 350
#: templates/user_routes.html:265
319 351
msgid "Actions"
320 352
msgstr "Ενέργειες"
......
323 355
msgid "Login"
324 356
msgstr "Είσοδος"
325 357

  
358
#: templates/welcome.html:8
359
msgid "Welcome to GRNET's FoD service."
360
msgstr "Καλωσήρθατε στην υπηρεσία FoD του ΕΔΕΤ."
361

  
362
#: templates/welcome.html:9
363
msgid ""
364
"If you are new to the service, take some time to read the service description"
365
msgstr ""
366
"Εάν χρησιμοποιείτε την υπηρεσία για πρώτη φορά, αφιερώστε λίγο χρόνο στην "
367
"ανάγνωση της περιγραφής της υπηρεσίας"
368

  
369
#: templates/welcome.html:9
370
msgid "here"
371
msgstr "εδώ"
372

  
373
#: templates/welcome.html:10
374
msgid ""
375
"If you have properly set your Shibboleth attributes, you can login using the "
376
"link on the right"
377
msgstr ""
378
"Έαν έχετε ορίσει ορθά τις απαιτούμενες παραμέτρους του Shibboleth, μπορείτε "
379
"να εισέλθετε επιλέγοντας το σύνδεσμο στα δεξιά"
380

  
381
#: templates/welcome.html:11
382
msgid ""
383
"For troubleshooting info and remarks do not hesitate to contact GRNET's "
384
"Helpdesk."
385
msgstr ""
386
"Για αντιμετώπιση σφαλμάτων και πληροφορίες, επικοινωνήστε με το Helpdesk του "
387
"ΕΔΕΤ"
388

  
326 389
#: templates/registration/activate.html:3
327 390
#: templates/registration/activation_complete.html:3
328 391
#: templates/registration/activation_complete.html:7
......
339 402

  
340 403
#: templates/registration/activate.html:11
341 404
msgid "The user has probably been already activated."
342
msgstr ""
405
msgstr "Ο χρήστης έχει ήδη ενεργοποιηθεί"
343 406

  
344 407
#: templates/registration/activation_complete.html:8
345 408
msgid "The user will be notified about his/her account activation"
346
msgstr ""
409
msgstr "Ο χρήστης θα ενημερωθεί για την ενεργοποίηση του λογαριασμού"
b/templates/apply.html
393 393
                <legend>
394 394
                    {% trans "Use/Comments" %}
395 395
                </legend>
396
                {% blocktrans %}
397 396
                <p class="roundbox">
398
                    Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.
397
                    {% blocktrans %}Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.{% endblocktrans %}
399 398
                </p>
400
                {% endblocktrans %}
399
                
401 400
                <p>
402 401
                    {{ form.comments }}
403 402
                    {% if form.errors %}
b/templates/base.html
39 39
						{% if user.is_authenticated %}
40 40
						<span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
41 41
						{% endif %}
42
						{% comment %}
42

  
43 43
						<span {% if user.is_authenticated %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
44 44
							<form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
45 45
								{% csrf_token %}
......
49 49
								{% endfor %}
50 50
							</form>
51 51
						</span>
52
						{% endcomment %}
52

  
53 53
						{% if user.is_authenticated %}
54 54
						<span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
55 55
						{% if user.is_superuser %}
b/templates/welcome.html
5 5
{% block content %}
6 6
<div id="welcome">
7 7
<h3>{% trans "Welcome" %}</h3>
8
<p>Welcome to GRNET's FoD service.</p>
9
<p>If you are new to the service, take some time to read the service description <a href="/fod/about/info/">here</a>.</p>
10
<p>If you have properly set your Shibboleth attributes, you can login using the link on the right</p>
11
<p>For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.</p>
12
</p>
8
<p>{% blocktrans %}Welcome to GRNET's FoD service.{% endblocktrans %}</p>
9
<p>{% blocktrans %}If you are new to the service, take some time to read the service description{% endblocktrans %} <a href="/fod/about/info/">{% trans "here" %}</a>.</p>
10
<p>{% blocktrans %}If you have properly set your Shibboleth attributes, you can login using the link on the right{% endblocktrans %}</p>
11
<p>{% blocktrans %}For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.{% endblocktrans %}</p>
13 12
</div>
14 13

  
15 14
<div id="loginform">
16 15
					<a href="{% url login %}">
17 16
					<img src="/static/shib_login.png" style="border:none;">
18
					<p>Shibboleth Login</p>
17
					<p>{% trans "Shibboleth Login" %}</p>
19 18
				</a>
20 19
</div>
21 20
{% endblock %}

Also available in: Unified diff