[Mpuls-commits] r4636 - in base/trunk: . mpulsweb/i18n mpulsweb/i18n/de/LC_MESSAGES mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 17 10:38:18 CET 2011
Author: roland
Date: 2011-02-17 10:38:12 +0100 (Thu, 17 Feb 2011)
New Revision: 4636
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
base/trunk/mpulsweb/i18n/mpulsweb.pot
base/trunk/mpulsweb/model/document.py
Log:
Internationalisation of document.py
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2011-02-16 14:35:59 UTC (rev 4635)
+++ base/trunk/ChangeLog 2011-02-17 09:38:12 UTC (rev 4636)
@@ -1,3 +1,8 @@
+2011-02-17 Roland Geider <roland.geider at intevation.de>
+
+ * mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po,
+ mpulsweb/model/document.py: Internationalisation of document.py
+
2011-02-16 Torsten Irlaender <torsten at intevation.de>
* mpulsweb/lib/config.py: Added new options to display the selection
Modified: base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
===================================================================
--- base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po 2011-02-16 14:35:59 UTC (rev 4635)
+++ base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po 2011-02-17 09:38:12 UTC (rev 4636)
@@ -1085,6 +1085,22 @@
"Die XML-Datei hat die Version '%s', unterstützt wird aber nur Version "
"'%s'."
+#: mpulsweb/model/document.py:158
+msgid "No document available"
+msgstr "Kein Dokumentname vorhanden."
+
+#: mpulsweb/model/document.py:193
+msgid "Could not create new document"
+msgstr "Konnte neues Dokument nicht anlegen."
+
+#: mpulsweb/model/document.py:228
+msgid "An ID is needed"
+msgstr "ID wird benötigt"
+
+#: mpulsweb/model/document.py:240
+msgid "The requested document can't be found."
+msgstr "Das angeforderte Dokument kann nicht gefunden werden."
+
#: mpulsweb/model/phase.py:208
#, python-format
msgid ""
Modified: base/trunk/mpulsweb/i18n/mpulsweb.pot
===================================================================
--- base/trunk/mpulsweb/i18n/mpulsweb.pot 2011-02-16 14:35:59 UTC (rev 4635)
+++ base/trunk/mpulsweb/i18n/mpulsweb.pot 2011-02-17 09:38:12 UTC (rev 4636)
@@ -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-02-15 12:49+0100\n"
+"POT-Creation-Date: 2011-02-16 14:07+0100\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"
@@ -907,6 +907,22 @@
msgid "The XML file has the version '%s', but supported is only version '%s'"
msgstr ""
+#: mpulsweb/model/document.py:158
+msgid "No document available"
+msgstr ""
+
+#: mpulsweb/model/document.py:193
+msgid "Could not create new document"
+msgstr ""
+
+#: mpulsweb/model/document.py:228
+msgid "An ID is needed"
+msgstr ""
+
+#: mpulsweb/model/document.py:240
+msgid "The requested document can't be found."
+msgstr ""
+
#: mpulsweb/model/phase.py:208
#, python-format
msgid ""
Modified: base/trunk/mpulsweb/model/document.py
===================================================================
--- base/trunk/mpulsweb/model/document.py 2011-02-16 14:35:59 UTC (rev 4635)
+++ base/trunk/mpulsweb/model/document.py 2011-02-17 09:38:12 UTC (rev 4636)
@@ -35,6 +35,7 @@
import mpulsweb.lib.helpers as h
from mpulsweb.lib.db import db
+from mpulsweb.lib.translation import _
MAX_SIZE = 10 * 1024 * 1024
@@ -154,7 +155,7 @@
def create(self, name, src, case=None, uuid=None):
name = name.strip().rsplit('\\', 1)[-1].rsplit('/', 1)[-1]
if not name:
- raise DocumentException("Kein Dokumentname vorhanden.")
+ raise DocumentException(_(u"No document available"))
self.name = name
@@ -187,7 +188,7 @@
row = cur.fetchone()
if row is None:
- raise DocumentException("Konnte neues Dokument nicht anlegen.")
+ raise DocumentException(_(u"Could not create new document"))
id = row[0]
fields = {'bytes': dbapi.Binary(bytes), 'size': self.size,
@@ -222,7 +223,7 @@
def load(self, asCase=False):
if self.id is None:
- raise DocumentException(u"ID wird benötigt")
+ raise DocumentException(_(u"An ID is needed"))
con, cur = None, None
try:
con = db.getConnection()
@@ -233,8 +234,7 @@
cur.execute(LOAD_GLOBAL, {'id': self.id})
row = cur.fetchone()
if not row:
- raise DocumentException(u"Das angeforderte Dokument kann nicht"
- u" gefunden werden.")
+ raise DocumentException(_(u"The requested document can't be found."))
self.case = row[0]
self.size = row[1]
self.mime = row[2]
More information about the Mpuls-commits
mailing list