Added more translations and translation tags
authorLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Thu, 23 Feb 2012 11:30:00 +0000 (13:30 +0200)
committerLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Thu, 23 Feb 2012 11:30:00 +0000 (13:30 +0200)
flowspec/models.py
locale/el/LC_MESSAGES/django.mo
locale/el/LC_MESSAGES/django.po
templates/apply.html
templates/base.html
templates/welcome.html

index 3f9e57f..165964b 100644 (file)
@@ -4,6 +4,7 @@
 from django.db import models
 from django.conf import settings
 from django.contrib.auth.models import User
+from django.utils.translation import ugettext_lazy as _
 from utils import proxy as PR
 from ipaddr import *
 import datetime
@@ -103,29 +104,29 @@ class ThenAction(models.Model):
         unique_together = ("action", "action_value")
 
 class Route(models.Model):
-    name = models.SlugField(max_length=128)
+    name = models.SlugField(max_length=128, verbose_name=_("Name"))
     applier = models.ForeignKey(User, blank=True, null=True)
-    source = models.CharField(max_length=32, help_text=u"Network address. Use address/CIDR notation", verbose_name="Source Address")
-    sourceport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchSourcePort", verbose_name="Source Port")
-    destination = models.CharField(max_length=32, help_text=u"Network address. Use address/CIDR notation", verbose_name="Destination Address")
-    destinationport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchDestinationPort", verbose_name="Destination Port")
-    port = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchPort", verbose_name="Port" )
+    source = models.CharField(max_length=32, help_text=_("Network address. Use address/CIDR notation"), verbose_name=_("Source Address"))
+    sourceport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchSourcePort", verbose_name=_("Source Port"))
+    destination = models.CharField(max_length=32, help_text=_("Network address. Use address/CIDR notation"), verbose_name=_("Destination Address"))
+    destinationport = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchDestinationPort", verbose_name=_("Destination Port"))
+    port = models.ManyToManyField(MatchPort, blank=True, null=True, related_name="matchPort", verbose_name=_("Port"))
     dscp = models.ManyToManyField(MatchDscp, blank=True, null=True, verbose_name="DSCP")
     fragmenttype = models.CharField(max_length=20, choices=FRAGMENT_CODES, blank=True, null=True, verbose_name="Fragment Type")
     icmpcode = models.CharField(max_length=32, blank=True, null=True, verbose_name="ICMP Code")
     icmptype = models.CharField(max_length=32, blank=True, null=True, verbose_name="ICMP Type")
     packetlength = models.IntegerField(blank=True, null=True, verbose_name="Packet Length")
-    protocol = models.ManyToManyField(MatchProtocol, blank=True, null=True, verbose_name="Protocol")
+    protocol = models.ManyToManyField(MatchProtocol, blank=True, null=True, verbose_name=_("Protocol"))
     tcpflag = models.CharField(max_length=128, blank=True, null=True, verbose_name="TCP flag")
-    then = models.ManyToManyField(ThenAction, verbose_name="Then")
+    then = models.ManyToManyField(ThenAction, verbose_name=_("Then"))
     filed = models.DateTimeField(auto_now_add=True)
     last_updated = models.DateTimeField(auto_now=True)
-    status = models.CharField(max_length=20, choices=ROUTE_STATES, blank=True, null=True, verbose_name="Status", default="PENDING")
+    status = models.CharField(max_length=20, choices=ROUTE_STATES, blank=True, null=True, verbose_name=_("Status"), default="PENDING")
 #    is_online = models.BooleanField(default=False)
 #    is_active = models.BooleanField(default=False)
-    expires = models.DateField(default=days_offset)
-    response = models.CharField(max_length=512, blank=True, null=True)
-    comments = models.TextField(null=True, blank=True, verbose_name="Comments")
+    expires = models.DateField(default=days_offset, verbose_name=_("Expires"))
+    response = models.CharField(max_length=512, blank=True, null=True, verbose_name=_("Response"))
+    comments = models.TextField(null=True, blank=True, verbose_name=_("Comments"))
 
     
     def __unicode__(self):
@@ -150,13 +151,13 @@ class Route(models.Model):
                 address = IPNetwork(self.destination)
                 self.destination = address.exploded
             except Exception:
-                raise ValidationError('Invalid network address format at Destination Field')
+                raise ValidationError(_('Invalid network address format at Destination Field'))
         if self.source:
             try:
                 address = IPNetwork(self.source)
                 self.source = address.exploded
             except Exception:
-                raise ValidationError('Invalid network address format at Source Field')
+                raise ValidationError(_('Invalid network address format at Source Field'))
    
     def commit_add(self, *args, **kwargs):
         peer = self.applier.get_profile().peer.domain_name
index 856ecad..4af495a 100644 (file)
Binary files a/locale/el/LC_MESSAGES/django.mo and b/locale/el/LC_MESSAGES/django.mo differ
index 3d1f42b..a85290c 100644 (file)
@@ -1,5 +1,5 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# Translation file for FoD application.
+# Copyright (C) 2012
 # This file is distributed under the same license as the PACKAGE package.
 # Leonidas Poulopoulos <leopoul@grnet.gr>, 2012.
 #
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-20 19:14+0200\n"
+"POT-Creation-Date: 2012-02-23 11:58+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"
@@ -16,7 +16,7 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: settings.py:49
 msgid "Greek"
@@ -31,6 +31,68 @@ msgstr "Αγγλικά"
 msgid "%sUser account activated"
 msgstr ""
 
+#: flowspec/models.py:107 templates/review.html:49
+#: templates/review.html.py:107 templates/user_routes.html:257
+msgid "Name"
+msgstr "Όνομα"
+
+#: flowspec/models.py:109 flowspec/models.py:111
+msgid "Network address. Use address/CIDR notation"
+msgstr "Διεύθυνση δικτύου/υποδικτύου. Χρησιμοποιήστε σύνταξη διεύθυνσης/CIDR"
+
+#: flowspec/models.py:109
+msgid "Source Address"
+msgstr "Διεύθυνση Πηγής"
+
+#: flowspec/models.py:110
+msgid "Source Port"
+msgstr "Πόρτα Πηγής"
+
+#: flowspec/models.py:111
+msgid "Destination Address"
+msgstr "Διεύθυνση Προορισμού"
+
+#: flowspec/models.py:112
+msgid "Destination Port"
+msgstr "Πόρτα Προορισμού"
+
+#: flowspec/models.py:113
+msgid "Port"
+msgstr "Πόρτα"
+
+#: flowspec/models.py:119
+msgid "Protocol"
+msgstr "Πρωτόκολλο"
+
+#: flowspec/models.py:121 templates/user_routes.html:259
+msgid "Then"
+msgstr "Ενέργειες"
+
+#: flowspec/models.py:124 templates/user_routes.html:260
+msgid "Status"
+msgstr "Κατάσταση"
+
+#: flowspec/models.py:127 templates/user_routes.html:263
+msgid "Expires"
+msgstr "Λήγει"
+
+#: flowspec/models.py:128 templates/user_routes.html:264
+msgid "Response"
+msgstr "Απόκριση Συσκευής"
+
+#: flowspec/models.py:129 templates/review.html:57
+#: templates/review.html.py:115
+msgid "Comments"
+msgstr "Σχόλια"
+
+#: flowspec/models.py:154
+msgid "Invalid network address format at Destination Field"
+msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Προορισμός"
+
+#: flowspec/models.py:160
+msgid "Invalid network address format at Source Field"
+msgstr "Λανθασμένη μορφή διεύθυνσης δικυου στο πεδίο Πηγή"
+
 #: monkey_patch/forms.py:11
 #, python-format
 msgid ""
@@ -122,18 +184,13 @@ msgstr "Λήξη"
 msgid "Use/Comments"
 msgstr "Χρήση/Σχόλια"
 
-#: templates/apply.html:396
+#: templates/apply.html:397
 msgid ""
-"\n"
-"                <p class=\"roundbox\">\n"
-"                    Give a short description of the intended use of this "
-"rule, that justifies the parameter selection above. Feel free to include any "
-"additional comments.\n"
-"                </p>\n"
-"                "
+"Give a short description of the intended use of this rule, that justifies "
+"the parameter selection above. Feel free to include any additional comments."
 msgstr ""
 
-#: templates/apply.html:409
+#: templates/apply.html:408
 msgid "Apply"
 msgstr "Εφαρμογή"
 
@@ -154,7 +211,7 @@ msgstr "Διαχειριστής"
 msgid "Logout"
 msgstr "Έξοδος"
 
-#: templates/base.html:60
+#: templates/base.html:60 templates/welcome.html:17
 msgid "Shibboleth Login"
 msgstr "Είσοδος με Shibboleth"
 
@@ -209,11 +266,6 @@ msgstr ""
 msgid "Administrative contact"
 msgstr ""
 
-#: templates/review.html:49 templates/review.html.py:107
-#: templates/user_routes.html:257
-msgid "Name"
-msgstr ""
-
 #: templates/review.html:50 templates/review.html.py:108
 msgid "Email"
 msgstr ""
@@ -222,10 +274,6 @@ msgstr ""
 msgid "Phone"
 msgstr ""
 
-#: templates/review.html:57 templates/review.html.py:115
-msgid "Comments"
-msgstr ""
-
 #: templates/review.html:64 templates/review.html.py:122
 msgid "Placement"
 msgstr ""
@@ -291,14 +339,6 @@ msgstr "Όλα"
 msgid "Match"
 msgstr "Όροι"
 
-#: templates/user_routes.html:259
-msgid "Then"
-msgstr "Ενέργειες"
-
-#: templates/user_routes.html:260
-msgid "Status"
-msgstr "Κατάσταση"
-
 #: templates/user_routes.html:261
 msgid "Details"
 msgstr "Λεπτομέρειες"
@@ -307,14 +347,6 @@ msgstr "Λεπτομέρειες"
 msgid "Applier"
 msgstr "Χρήστης"
 
-#: templates/user_routes.html:263
-msgid "Expires"
-msgstr "Λήγει"
-
-#: templates/user_routes.html:264
-msgid "Response"
-msgstr "Απόκριση Συσκευής"
-
 #: templates/user_routes.html:265
 msgid "Actions"
 msgstr "Ενέργειες"
@@ -323,6 +355,37 @@ msgstr "Ενέργειες"
 msgid "Login"
 msgstr "Είσοδος"
 
+#: templates/welcome.html:8
+msgid "Welcome to GRNET's FoD service."
+msgstr "Καλωσήρθατε στην υπηρεσία FoD του ΕΔΕΤ."
+
+#: templates/welcome.html:9
+msgid ""
+"If you are new to the service, take some time to read the service description"
+msgstr ""
+"Εάν χρησιμοποιείτε την υπηρεσία για πρώτη φορά, αφιερώστε λίγο χρόνο στην "
+"ανάγνωση της περιγραφής της υπηρεσίας"
+
+#: templates/welcome.html:9
+msgid "here"
+msgstr "εδώ"
+
+#: templates/welcome.html:10
+msgid ""
+"If you have properly set your Shibboleth attributes, you can login using the "
+"link on the right"
+msgstr ""
+"Έαν έχετε ορίσει ορθά τις απαιτούμενες παραμέτρους του Shibboleth, μπορείτε "
+"να εισέλθετε επιλέγοντας το σύνδεσμο στα δεξιά"
+
+#: templates/welcome.html:11
+msgid ""
+"For troubleshooting info and remarks do not hesitate to contact GRNET's "
+"Helpdesk."
+msgstr ""
+"Για αντιμετώπιση σφαλμάτων και πληροφορίες, επικοινωνήστε με το Helpdesk του "
+"ΕΔΕΤ"
+
 #: templates/registration/activate.html:3
 #: templates/registration/activation_complete.html:3
 #: templates/registration/activation_complete.html:7
@@ -339,8 +402,8 @@ msgstr ""
 
 #: templates/registration/activate.html:11
 msgid "The user has probably been already activated."
-msgstr ""
+msgstr "Ο χρήστης έχει ήδη ενεργοποιηθεί"
 
 #: templates/registration/activation_complete.html:8
 msgid "The user will be notified about his/her account activation"
-msgstr ""
+msgstr "Ο χρήστης θα ενημερωθεί για την ενεργοποίηση του λογαριασμού"
index 7eb94fd..c5a0c0e 100644 (file)
@@ -393,11 +393,10 @@ div.roundbox, #portsacc, #id_comments{
                 <legend>
                     {% trans "Use/Comments" %}
                 </legend>
-                {% blocktrans %}
                 <p class="roundbox">
-                    Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.
+                    {% 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 %}
                 </p>
-                {% endblocktrans %}
+                
                 <p>
                     {{ form.comments }}
                     {% if form.errors %}
index 1467836..282bfa2 100644 (file)
@@ -39,7 +39,7 @@
                                                {% if user.is_authenticated %}
                                                <span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
                                                {% endif %}
-                                               {% comment %}
+
                                                <span {% if user.is_authenticated %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
                                                        <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
                                                                {% csrf_token %}
@@ -49,7 +49,7 @@
                                                                {% endfor %}
                                                        </form>
                                                </span>
-                                               {% endcomment %}
+
                                                {% if user.is_authenticated %}
                                                <span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
                                                {% if user.is_superuser %}
index 19b04ea..ebf5e33 100644 (file)
@@ -5,17 +5,16 @@
 {% block content %}
 <div id="welcome">
 <h3>{% trans "Welcome" %}</h3>
-<p>Welcome to GRNET's FoD service.</p>
-<p>If you are new to the service, take some time to read the service description <a href="/fod/about/info/">here</a>.</p>
-<p>If you have properly set your Shibboleth attributes, you can login using the link on the right</p>
-<p>For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.</p>
-</p>
+<p>{% blocktrans %}Welcome to GRNET's FoD service.{% endblocktrans %}</p>
+<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>
+<p>{% blocktrans %}If you have properly set your Shibboleth attributes, you can login using the link on the right{% endblocktrans %}</p>
+<p>{% blocktrans %}For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.{% endblocktrans %}</p>
 </div>
 
 <div id="loginform">
                                        <a href="{% url login %}">
                                        <img src="/static/shib_login.png" style="border:none;">
-                                       <p>Shibboleth Login</p>
+                                       <p>{% trans "Shibboleth Login" %}</p>
                                </a>
 </div>
 {% endblock %}