Commit ab02d61c authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added more translations...

parent c2f4725d
......@@ -49,11 +49,11 @@ class RouteForm(forms.ModelForm):
else:
return self.cleaned_data["source"]
except Exception:
error_text = 'Invalid network address format'
error_text = _('Invalid network address format')
if private_error:
error_text = 'Private addresses not allowed'
error_text = _('Private addresses not allowed')
if protected_error:
error_text = 'You have no authority on this subnet'
error_text = _('You have no authority on this subnet')
raise forms.ValidationError(error_text)
def clean_destination(self):
......@@ -74,15 +74,15 @@ class RouteForm(forms.ModelForm):
settings.NOTIFY_ADMIN_MAILS, fail_silently=True)
raise Exception
if address.prefixlen < settings.PREFIX_LENGTH:
error = "Currently no prefix lengths < %s are allowed" %settings.PREFIX_LENGTH
error = _("Currently no prefix lengths < %s are allowed") %settings.PREFIX_LENGTH
raise Exception
return self.cleaned_data["destination"]
except Exception:
error_text = 'Invalid network address format'
error_text = _('Invalid network address format')
if error:
error_text = error
if protected_error:
error_text = 'You have no authority on this subnet'
error_text = _('You have no authority on this subnet')
raise forms.ValidationError(error_text)
def clean_expires(self):
......@@ -96,7 +96,7 @@ class RouteForm(forms.ModelForm):
def clean(self):
if self.errors:
raise forms.ValidationError('Errors in form. Please review and fix them')
raise forms.ValidationError(_('Errors in form. Please review and fix them'))
name = self.cleaned_data.get('name', None)
source = self.cleaned_data.get('source', None)
sourceports = self.cleaned_data.get('sourceport', None)
......@@ -116,19 +116,19 @@ class RouteForm(forms.ModelForm):
if IPNetwork(destination) in net:
mynetwork = True
if not mynetwork:
raise forms.ValidationError('Destination address/network should belong to your administrative address space. Check My Profile to review your networks')
raise forms.ValidationError(_('Destination address/network should belong to your administrative address space. Check My Profile to review your networks'))
if (sourceports and ports):
raise forms.ValidationError('Cannot create rule for source ports and ports at the same time. Select either ports or source ports')
raise forms.ValidationError(_('Cannot create rule for source ports and ports at the same time. Select either ports or source ports'))
if (destinationports and ports):
raise forms.ValidationError('Cannot create rule for destination ports and ports at the same time. Select either ports or destination ports')
raise forms.ValidationError(_('Cannot create rule for destination ports and ports at the same time. Select either ports or destination ports'))
if sourceports and not source:
raise forms.ValidationError('Once source port is matched, source has to be filled as well. Either deselect source port or fill source address')
raise forms.ValidationError(_('Once source port is matched, source has to be filled as well. Either deselect source port or fill source address'))
if destinationports and not destination:
raise forms.ValidationError('Once destination port is matched, destination has to be filled as well. Either deselect destination port or fill destination address')
raise forms.ValidationError(_('Once destination port is matched, destination has to be filled as well. Either deselect destination port or fill destination address'))
if not (source or sourceports or ports or destination or destinationports):
raise forms.ValidationError('Fill at least a Rule Match Condition')
raise forms.ValidationError(_('Fill at least a Rule Match Condition'))
if not user.is_superuser and then[0].action not in settings.UI_USER_THEN_ACTIONS:
raise forms.ValidationError('This action "%s" is not permitted' %(then[0].action))
raise forms.ValidationError(_('This action "%s" is not permitted') %(then[0].action))
existing_routes = Route.objects.exclude(status='EXPIRED').exclude(status='ERROR').exclude(status='ADMININACTIVE')
existing_routes = existing_routes.filter(applier__userprofile__peer=peer)
if source:
......@@ -180,17 +180,17 @@ class ThenPlainForm(forms.ModelForm):
try:
assert(int(action_value))
if int(action_value) < 50:
raise forms.ValidationError('Rate-limiting cannot be < 50kbps')
raise forms.ValidationError(_('Rate-limiting cannot be < 50kbps'))
return "%s" %self.cleaned_data["action_value"]
except:
raise forms.ValidationError('Rate-limiting should be an integer < 50')
raise forms.ValidationError(_('Rate-limiting should be an integer < 50'))
else:
raise forms.ValidationError('Cannot be empty')
raise forms.ValidationError(_('Cannot be empty'))
def clean_action(self):
action = self.cleaned_data['action']
if action != 'rate-limit':
raise forms.ValidationError('Cannot select something other than rate-limit')
raise forms.ValidationError(_('Cannot select something other than rate-limit'))
else:
return self.cleaned_data["action"]
......@@ -207,9 +207,9 @@ class PortPlainForm(forms.ModelForm):
assert(int(port))
return "%s" %self.cleaned_data["port"]
except:
raise forms.ValidationError('Port should be an integer')
raise forms.ValidationError(_('Port should be an integer'))
else:
raise forms.ValidationError('Cannot be empty')
raise forms.ValidationError(_('Cannot be empty'))
def value_list_to_list(valuelist):
vl = []
......
......@@ -15,6 +15,7 @@ from django.shortcuts import get_object_or_404, render_to_response
from django.core.context_processors import request
from django.template.context import RequestContext
from django.template.loader import get_template, render_to_string
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.contrib import messages
from flowspy.accounts.models import *
......@@ -79,7 +80,7 @@ def add_route(request):
applier_peer_networks = request.user.get_profile().peer.networks.all()
if not applier_peer_networks:
messages.add_message(request, messages.WARNING,
"Insufficient rights on administrative networks. Cannot add rule. Contact your administrator")
_("Insufficient rights on administrative networks. Cannot add rule. Contact your administrator"))
return HttpResponseRedirect(reverse("group-routes"))
if request.method == "GET":
form = RouteForm()
......@@ -124,7 +125,7 @@ def edit_route(request, route_slug):
route_edit_applier_peer = route_edit.applier.get_profile().peer
if applier_peer != route_edit_applier_peer:
messages.add_message(request, messages.WARNING,
"Insufficient rights to edit rule %s" %(route_slug))
_("Insufficient rights to edit rule %s") %(route_slug))
return HttpResponseRedirect(reverse("group-routes"))
# if route_edit.status == "ADMININACTIVE" :
# messages.add_message(request, messages.WARNING,
......@@ -136,7 +137,7 @@ def edit_route(request, route_slug):
# return HttpResponseRedirect(reverse("group-routes"))
if route_edit.status == "PENDING" :
messages.add_message(request, messages.WARNING,
"Cannot edit a pending rule: %s." %(route_slug))
_("Cannot edit a pending rule: %s.") %(route_slug))
return HttpResponseRedirect(reverse("group-routes"))
route_original = deepcopy(route_edit)
if request.POST:
......@@ -238,13 +239,13 @@ def user_login(request):
if not mail:
error_mail = True
if error_username:
error = "Your idP should release the HTTP_EPPN attribute towards this service<br>"
error = _("Your idP should release the HTTP_EPPN attribute towards this service<br>")
if error_orgname:
error = error + "Your idP should release the HTTP_SHIB_HOMEORGANIZATION attribute towards this service<br>"
error = error + _("Your idP should release the HTTP_SHIB_HOMEORGANIZATION attribute towards this service<br>")
if error_entitlement:
error = error + "Your idP should release an appropriate HTTP_SHIB_EP_ENTITLEMENT attribute towards this service<br>"
error = error + _("Your idP should release an appropriate HTTP_SHIB_EP_ENTITLEMENT attribute towards this service<br>")
if error_mail:
error = error + "Your idP should release the HTTP_SHIB_INETORGPERSON_MAIL attribute towards this service"
error = error + _("Your idP should release the HTTP_SHIB_INETORGPERSON_MAIL attribute towards this service")
if error_username or error_orgname or error_entitlement or error_mail:
return render_to_response('error.html', {'error': error, "missing_attributes": True},
context_instance=RequestContext(request))
......@@ -259,7 +260,7 @@ def user_login(request):
peer = Peer.objects.get(domain_name=organization)
up = UserProfile.objects.get_or_create(user=user,peer=peer)
except:
error = "Your organization's domain name does not match our peers' domain names<br>Please contact Helpdesk to resolve this issue"
error = _("Your organization's domain name does not match our peers' domain names<br>Please contact Helpdesk to resolve this issue")
return render_to_response('error.html', {'error': error})
if not user_exists:
user_activation_notify(user)
......@@ -267,15 +268,15 @@ def user_login(request):
login(request, user)
return HttpResponseRedirect(reverse("group-routes"))
else:
error = "User account <strong>%s</strong> is pending activation. Administrators have been notified and will activate this account within the next days. <br>If this account has remained inactive for a long time contact your technical coordinator or GRNET Helpdesk" %user.username
error = _("User account <strong>%s</strong> is pending activation. Administrators have been notified and will activate this account within the next days. <br>If this account has remained inactive for a long time contact your technical coordinator or GRNET Helpdesk") %user.username
return render_to_response('error.html', {'error': error, 'inactive': True},
context_instance=RequestContext(request))
else:
error = "Something went wrong during user authentication. Contact your administrator"
error = _("Something went wrong during user authentication. Contact your administrator")
return render_to_response('error.html', {'error': error,},
context_instance=RequestContext(request))
except Exception:
error = "Invalid login procedure"
error = _("Invalid login procedure")
return render_to_response('error.html', {'error': error,},
context_instance=RequestContext(request))
# Return an 'invalid login' error message.
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-23 11:58+0200\n"
"POT-Creation-Date: 2012-02-23 16:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Leonidas Poulopoulos <leopoul@grnet.gr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -29,10 +29,92 @@ msgstr "Αγγλικά"
#: accounts/views.py:22
#, python-format
msgid "%sUser account activated"
msgstr "%s Ενεργοποιήθηκε ο λογαριασμός του χρήστη"
#: flowspec/forms.py:52 flowspec/forms.py:81
msgid "Invalid network address format"
msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Πηγή"
#: flowspec/forms.py:54
msgid "Private addresses not allowed"
msgstr "Δεν επιτρέπονται οι private διευθύνσεις"
#: flowspec/forms.py:56 flowspec/forms.py:85
msgid "You have no authority on this subnet"
msgstr "Δεν έχετε δικαιώματα σε αυτό το υποδίκτυο"
#: flowspec/forms.py:77
#, python-format
msgid "Currently no prefix lengths < %s are allowed"
msgstr "Προς το παρόν δεν επιτρέπονται υποδίκτυα <%s"
#: flowspec/forms.py:99
msgid "Errors in form. Please review and fix them"
msgstr "Σφάλματα στη φόρμα. Παρακαλώ διορθώστε τα"
#: flowspec/forms.py:119
msgid ""
"Destination address/network should belong to your administrative address "
"space. Check My Profile to review your networks"
msgstr ""
"Η διεύθυνση προορισμού πρέπει να ανήκει στα διαχειριστικά σας δίκτυα. "
"Επισκεφθείτε 'Το Προφίλ μου' για την προβολή των διαχειριστικών σας δικτύων"
#: flowspec/forms.py:121
msgid ""
"Cannot create rule for source ports and ports at the same time. Select "
"either ports or source ports"
msgstr ""
#: flowspec/forms.py:123
msgid ""
"Cannot create rule for destination ports and ports at the same time. Select "
"either ports or destination ports"
msgstr ""
#: flowspec/forms.py:125
msgid ""
"Once source port is matched, source has to be filled as well. Either "
"deselect source port or fill source address"
msgstr ""
#: flowspec/forms.py:127
msgid ""
"Once destination port is matched, destination has to be filled as well. "
"Either deselect destination port or fill destination address"
msgstr ""
#: flowspec/forms.py:129
msgid "Fill at least a Rule Match Condition"
msgstr "Συμπληρώστε τουλάχιστον έναν όρο ταύτισης"
#: flowspec/forms.py:131
#, python-format
msgid "This action \"%s\" is not permitted"
msgstr "Η ενέργεια %s δεν επιτρέπεται"
#: flowspec/forms.py:183
msgid "Rate-limiting cannot be < 50kbps"
msgstr ""
#: flowspec/forms.py:186
msgid "Rate-limiting should be an integer < 50"
msgstr ""
#: flowspec/forms.py:188 flowspec/forms.py:212
msgid "Cannot be empty"
msgstr "Το πεδίο δεν μπορεί να είναι κενό"
#: flowspec/forms.py:193
msgid "Cannot select something other than rate-limit"
msgstr ""
#: flowspec/forms.py:210
msgid "Port should be an integer"
msgstr "Η port θα πρέπει να είναι ένας ακέραιος αριθμός"
#: flowspec/models.py:107 templates/review.html:49
#: templates/review.html.py:107 templates/user_routes.html:257
#: templates/review.html.py:107 templates/user_routes.html:271
msgid "Name"
msgstr "Όνομα"
......@@ -46,7 +128,7 @@ msgstr "Διεύθυνση Πηγής"
#: flowspec/models.py:110
msgid "Source Port"
msgstr "Πόρτα Πηγής"
msgstr "Port Πηγής"
#: flowspec/models.py:111
msgid "Destination Address"
......@@ -54,31 +136,32 @@ msgstr "Διεύθυνση Προορισμού"
#: flowspec/models.py:112
msgid "Destination Port"
msgstr "Πόρτα Προορισμού"
msgstr "Port Προορισμού"
#: flowspec/models.py:113
#: flowspec/models.py:113 templates/add_port.html:14 templates/apply.html:308
#: templates/apply.html.py:327 templates/apply.html:346
msgid "Port"
msgstr "Πόρτα"
msgstr "Port"
#: flowspec/models.py:119
msgid "Protocol"
msgstr "Πρωτόκολλο"
#: flowspec/models.py:121 templates/user_routes.html:259
#: flowspec/models.py:121 templates/user_routes.html:273
msgid "Then"
msgstr "Ενέργειες"
#: flowspec/models.py:124 templates/user_routes.html:260
#: flowspec/models.py:124 templates/user_routes.html:274
msgid "Status"
msgstr "Κατάσταση"
#: flowspec/models.py:127 templates/user_routes.html:263
#: flowspec/models.py:127 templates/user_routes.html:277
msgid "Expires"
msgstr "Λήγει"
#: flowspec/models.py:128 templates/user_routes.html:264
#: flowspec/models.py:128 templates/user_routes.html:278
msgid "Response"
msgstr "Απόκριση Συσκευής"
msgstr "Απόκριση Δικτύου"
#: flowspec/models.py:129 templates/review.html:57
#: templates/review.html.py:115
......@@ -93,6 +176,80 @@ msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο
msgid "Invalid network address format at Source Field"
msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Πηγή"
#: flowspec/views.py:83
msgid ""
"Insufficient rights on administrative networks. Cannot add rule. Contact "
"your administrator"
msgstr ""
#: flowspec/views.py:128
#, python-format
msgid "Insufficient rights to edit rule %s"
msgstr "Μη επαρκή δικαιώματα για την επεξεργασία του φίλτρου %s"
#: flowspec/views.py:140
#, python-format
msgid "Cannot edit a pending rule: %s."
msgstr "Δεν είναι δυνατή η επεξεργασία ενός φίλτρου (%s) σε κατάσταση pending "
#: flowspec/views.py:242
msgid ""
"Your idP should release the HTTP_EPPN attribute towards this service<br>"
msgstr ""
"Ο idP σας θα πρέπει να παρέχει την HTTP_EPPN παράμετερο στην υπηρεσία<br>"
#: flowspec/views.py:244
msgid ""
"Your idP should release the HTTP_SHIB_HOMEORGANIZATION attribute towards "
"this service<br>"
msgstr ""
"Ο idP σας θα πρέπει να παρέχει την HTTP_SHIB_HOMEORGANIZATION παράμετερο "
"στην υπηρεσία<br>"
#: flowspec/views.py:246
msgid ""
"Your idP should release an appropriate HTTP_SHIB_EP_ENTITLEMENT attribute "
"towards this service<br>"
msgstr ""
"Ο idP σας θα πρέπει να παρέχει την HTTP_SHIB_EP_ENTITLEMENT παράμετερο στην "
"υπηρεσία<br>"
#: flowspec/views.py:248
msgid ""
"Your idP should release the HTTP_SHIB_INETORGPERSON_MAIL attribute towards "
"this service"
msgstr ""
"Ο idP σας θα πρέπει να παρέχει την HTTP_SHIB_INETORGPERSON_MAIL παράμετερο "
"στην υπηρεσία<br>"
#: flowspec/views.py:263
msgid ""
"Your organization's domain name does not match our peers' domain "
"names<br>Please contact Helpdesk to resolve this issue"
msgstr ""
"Το domain name του οργανισμού σας δε βρέθηκε στ βάση φορέων μας.<br>Παρακαλώ "
"επικοινωνήστε με το Helpdesk για τη διευθέτηση του προβλήματος"
#: flowspec/views.py:271
#, python-format
msgid ""
"User account <strong>%s</strong> is pending activation. Administrators have "
"been notified and will activate this account within the next days. <br>If "
"this account has remained inactive for a long time contact your technical "
"coordinator or GRNET Helpdesk"
msgstr ""
#: flowspec/views.py:275
msgid ""
"Something went wrong during user authentication. Contact your administrator"
msgstr ""
"Παρουσιάστηκε ένα σφάλμα κατά την είσοδο του χρήστη. Επικοινωνήστε με το "
"διαχειριστή σας"
#: flowspec/views.py:279
msgid "Invalid login procedure"
msgstr "Εσφαλμένη διαδικασία εισόδου"
#: monkey_patch/forms.py:11
#, python-format
msgid ""
......@@ -160,6 +317,15 @@ msgstr "Επεξεργασία φίλτρου"
msgid "Create rule"
msgstr "Δημιουργία φίλτρου"
#: templates/apply.html:35 templates/apply.html.py:67
msgid "Add"
msgstr "Προσθήκη"
#: templates/apply.html:55 templates/apply.html.py:88
#: templates/user_routes.html:32
msgid "Cancel"
msgstr "Άκυρο"
#: templates/apply.html:229
msgid "Apply for a new rule"
msgstr "Αίτηση δημιουργίας νέου φίλτρου"
......@@ -170,7 +336,17 @@ msgstr "Βασικές Πληροφορίες Φίλτρου"
#: templates/apply.html:261
msgid "Rule Match Conditions"
msgstr "Όροι ταύτισης"
msgstr "Όροι ταύτισης φίλτρου"
#: templates/apply.html:297
msgid "Advanced Settings (Ports)"
msgstr "Προηγμένες Ρυθμίσεις (Ports)"
#: templates/apply.html:299
msgid ""
"Select source/destination port(s), or select common port(s) for both source/"
"destination"
msgstr ""
#: templates/apply.html:364
msgid "Rule Actions"
......@@ -194,6 +370,10 @@ msgstr ""
msgid "Apply"
msgstr "Εφαρμογή"
#: templates/apply.html:415
msgid "Add new port"
msgstr ""
#: templates/base.html:40 templates/error.html:48 templates/welcome.html:7
msgid "Welcome"
msgstr "Καλωσήρθατε"
......@@ -215,8 +395,8 @@ msgstr "Έξοδος"
msgid "Shibboleth Login"
msgstr "Είσοδος με Shibboleth"
#: templates/base.html:68 templates/user_routes.html:216
#: templates/user_routes.html.py:220
#: templates/base.html:68 templates/user_routes.html:230
#: templates/user_routes.html.py:234
msgid "My rules"
msgstr "Τα φίλτρα μου"
......@@ -246,6 +426,37 @@ msgstr "Επανάληψη Εισόδου"
msgid "My routes"
msgstr "Τα φίλτρα μου"
#: templates/profile.html:9
msgid "My data"
msgstr "Τα στοιχεία μου"
#: templates/profile.html:10
msgid "First name"
msgstr "Όνομα"
#: templates/profile.html:11
msgid "Last name"
msgstr "Επώνυμο"
#: templates/profile.html:12 templates/review.html:50
#: templates/review.html.py:108
msgid "Email"
msgstr ""
#: templates/profile.html:13
msgid "Organization"
msgstr "Φορέας"
#: templates/profile.html:14
msgid "Admin Networks"
msgstr "Δίκτυα Διαχείρισης"
#: templates/profile.html:18
msgid ""
"Ooops! Seems you have no networks associated with your peer. Contact "
"Helpdesk to resolve this issue."
msgstr ""
#: templates/review.html:3 templates/review.html.py:27
msgid "Review application"
msgstr ""
......@@ -266,10 +477,6 @@ msgstr ""
msgid "Administrative contact"
msgstr ""
#: templates/review.html:50 templates/review.html.py:108
msgid "Email"
msgstr ""
#: templates/review.html:51 templates/review.html.py:109
msgid "Phone"
msgstr ""
......@@ -327,30 +534,114 @@ msgstr ""
msgid "Add key"
msgstr ""
#: templates/user_routes.html:96
#: templates/user_routes.html:19 templates/user_routes.html.py:311
msgid "Suspend"
msgstr "Κατάργηση"
#: templates/user_routes.html:97
msgid "Display"
msgstr "Προβολή"
#: templates/user_routes.html:96
#: templates/user_routes.html:97
msgid "All"
msgstr "Όλα"
msgstr "όλων των"
#: templates/user_routes.html:97
msgid "rules"
msgstr "φίλτρων"
#: templates/user_routes.html:99
msgid "No records to display"
msgstr "Δεν βρέθηκαν εγγραφές"
#: templates/user_routes.html:101
msgid "Showing 0 to 0 of 0 entries"
msgstr "Δείχνοντας 0 εως 0 από 0 εγγραφές"
#: templates/user_routes.html:104
msgid "Search:"
msgstr "Αναζήτηση:"
#: templates/user_routes.html:107
msgid "First"
msgstr "Πρώτη"
#: templates/user_routes.html:108
msgid "Previous"
msgstr "Προηγούμενη"
#: templates/user_routes.html:109
msgid "Next"
msgstr "Επόμενη"
#: templates/user_routes.html:110
msgid "Last"
msgstr "Τελευταία"
#: templates/user_routes.html:237 templates/user_routes.html.py:336
msgid "Console"
msgstr "Κονσόλα"
#: templates/user_routes.html:237
msgid "Add Rule"
msgstr "Δημιουργία φίλτρου"
#: templates/user_routes.html:258
#: templates/user_routes.html:272
msgid "Match"
msgstr "Όροι"
#: templates/user_routes.html:261
#: templates/user_routes.html:275
msgid "Details"
msgstr "Λεπτομέρειες"
#: templates/user_routes.html:262
#: templates/user_routes.html:276
msgid "Applier"
msgstr "Χρήστης"
#: templates/user_routes.html:265
#: templates/user_routes.html:279
msgid "Actions"
msgstr "Ενέργειες"
#: templates/user_routes.html:307
msgid "Rule expired"
msgstr "Λήξη Φίλτρου"
#: templates/user_routes.html:307
msgid "Suspended by administrator"
msgstr "Απενεργοποιήθηκε από το διαχειριστή"
#: templates/user_routes.html:307
msgid "Suspended by user"
msgstr "Απενεργοποιήθηκε από το χρήστη"
#: templates/user_routes.html:310
msgid "Edit"
msgstr "Επεξεργασία"
#: templates/user_routes.html:315
msgid "Reactivate"
msgstr ""
#: templates/user_routes.html:318
msgid "ReSync"
msgstr ""
#: templates/user_routes.html:332
msgid "You are about to suspend rule"
msgstr "Πρόκειται να απενεργοποιήσετε το φίλτρο"
#: templates/user_routes.html:333
msgid ""
"Suspending the rule will automatically remove the configuration from the "
"network and mark this rule as inactive."
msgstr ""
"Η απενεργοποίηση του φίλτρου θα προκαλέσει την αυτόματη αφαίρεση της "
"συγκρότησης από το δίκτυο."
#: templates/user_routes.html:334
msgid "Are you sure you want to proceed?"
msgstr "Είστε βέβαιοι ότι επιθυμείτε να συνεχίσετε;"
#: templates/welcome.html:3
msgid "Login"
msgstr "Είσοδος"
......