[Mpuls-commits] r4840 - in base/trunk: . mpulsweb/i18n mpulsweb/i18n/de/LC_MESSAGES mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 31 11:49:26 CEST 2011


Author: ludwig
Date: 2011-03-31 11:49:24 +0200 (Thu, 31 Mar 2011)
New Revision: 4840

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
   base/trunk/mpulsweb/i18n/mpulsweb.pot
   base/trunk/mpulsweb/lib/security.py
Log:
I18n of security.py

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-03-31 09:47:12 UTC (rev 4839)
+++ base/trunk/ChangeLog	2011-03-31 09:49:24 UTC (rev 4840)
@@ -1,5 +1,12 @@
 2011-03-31  Ludwig Reiter <ludwig.reiter at intevation.de>
 
+	* mpulsweb/i18n/mpulsweb.pot
+	mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
+	mpulsweb/lib/security.py:
+	I18n of security.py
+
+2011-03-31  Ludwig Reiter <ludwig.reiter at intevation.de>
+
 	* mpulsweb/model/appointment.py:
 	Small bugfix of the appointment.py 
 

Modified: base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
===================================================================
--- base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po	2011-03-31 09:47:12 UTC (rev 4839)
+++ base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po	2011-03-31 09:49:24 UTC (rev 4840)
@@ -8,7 +8,7 @@
 "Project-Id-Version: mpulsweb 0.0.0\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
 "POT-Creation-Date: 2009-10-08 09:54+0200\n"
-"PO-Revision-Date: 2011-03-31 11:24+0200\n"
+"PO-Revision-Date: 2011-03-31 11:44+0200\n"
 "Last-Translator: Torsten Irländer <torsten.irlaender at intevation.de>\n"
 "Language-Team: de <LL at li.org>\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -1111,6 +1111,10 @@
 msgid "Open page"
 msgstr "Öffne Seite"
 
+#: mpulsweb/lib/security.py:374 mpulsweb/lib/security.py:390
+msgid "You are not authorised to look at the requested document."
+msgstr "Sie sind nicht authorisiert, das angeforderte Dokument anzuschauen."
+
 #: mpulsweb/lib/validators.py:91
 msgid "Es existiert bereits eine Datei mit dem Namen"
 msgstr "Es existiert bereits eine Datei mit dem Namen"

Modified: base/trunk/mpulsweb/i18n/mpulsweb.pot
===================================================================
--- base/trunk/mpulsweb/i18n/mpulsweb.pot	2011-03-31 09:47:12 UTC (rev 4839)
+++ base/trunk/mpulsweb/i18n/mpulsweb.pot	2011-03-31 09:49:24 UTC (rev 4840)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: mpulsweb 2.0.0-pre\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2011-03-31 11:23+0200\n"
+"POT-Creation-Date: 2011-03-31 11:44+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -922,6 +922,10 @@
 msgid "Open page"
 msgstr ""
 
+#: mpulsweb/lib/security.py:374 mpulsweb/lib/security.py:390
+msgid "You are not authorised to look at the requested document."
+msgstr ""
+
 #: mpulsweb/lib/validators.py:91
 msgid "Es existiert bereits eine Datei mit dem Namen"
 msgstr ""

Modified: base/trunk/mpulsweb/lib/security.py
===================================================================
--- base/trunk/mpulsweb/lib/security.py	2011-03-31 09:47:12 UTC (rev 4839)
+++ base/trunk/mpulsweb/lib/security.py	2011-03-31 09:49:24 UTC (rev 4840)
@@ -65,9 +65,6 @@
 WHERE login = %(login)s
 """
 UPDATE_LASTLOGIN_SQL = """SELECT set_last_logintime(%(user_id)s)"""
-UNAUTHORIZED_DETAIL = \
-"""Sie sind nicht authorisiert, das angeforderte Dokument anzuschauen.
-"""
 
 ASCII_DECODER = getdecoder("ascii")
 
@@ -374,7 +371,8 @@
 
     def validate(func, self, *args, **kwargs):
         if not hasRole(_role):
-            raise HTTPUnauthorized(detail=UNAUTHORIZED_DETAIL)
+            raise HTTPUnauthorized(detail=_('You are not authorised to '
+                'look at the requested document.'))
         try:
             return func(self, *args, **kwargs)
         except dbapi.OperationalError, err:
@@ -389,7 +387,8 @@
             # much harder.
             log.exception("Converting DB-API OperationalError into"
                           " an HTTP Unauthorized response")
-            raise HTTPUnauthorized(detail=UNAUTHORIZED_DETAIL)
+            raise HTTPUnauthorized(detail=_('You are not authorised to '
+                'look at the requested document.'))
 
     return decorator(validate)
 



More information about the Mpuls-commits mailing list