Mercurial > p > roundup > code
comparison roundup/cgi/actions.py @ 2563:420d5c2a49d9
use client.translator instead of static translationService;
fix vim modeline
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Tue, 13 Jul 2004 09:41:15 +0000 |
| parents | 82f53c270e7c |
| children | 5a8d9465827e |
comparison
equal
deleted
inserted
replaced
| 2562:1f4791438b65 | 2563:420d5c2a49d9 |
|---|---|
| 1 #$Id: actions.py,v 1.33 2004-07-06 11:29:12 a1s Exp $ | 1 #$Id: actions.py,v 1.34 2004-07-13 09:41:15 a1s Exp $ |
| 2 | 2 |
| 3 import re, cgi, StringIO, urllib, Cookie, time, random | 3 import re, cgi, StringIO, urllib, Cookie, time, random |
| 4 | 4 |
| 5 from roundup import hyperdb, token, date, password, rcsv, exceptions | 5 from roundup import hyperdb, token, date, password, rcsv, exceptions |
| 6 from roundup.i18n import _ | 6 from roundup.i18n import _ |
| 58 return self.db.security.hasPermission(permission, self.client.userid, | 58 return self.db.security.hasPermission(permission, self.client.userid, |
| 59 self.client.classname) | 59 self.client.classname) |
| 60 | 60 |
| 61 def gettext(self, msgid): | 61 def gettext(self, msgid): |
| 62 """Return the localized translation of msgid""" | 62 """Return the localized translation of msgid""" |
| 63 return templating.translationService.translate(domain="roundup", | 63 return self.client.translator.gettext(msgid) |
| 64 msgid=msgid, context=self.context) | |
| 65 | 64 |
| 66 _ = gettext | 65 _ = gettext |
| 67 | 66 |
| 68 class ShowAction(Action): | 67 class ShowAction(Action): |
| 69 def handle(self, typere=re.compile('[@:]type'), | 68 def handle(self, typere=re.compile('[@:]type'), |
| 891 for itemid in klass.filter(matches, filterspec, sort, group): | 890 for itemid in klass.filter(matches, filterspec, sort, group): |
| 892 writer.writerow([str(klass.get(itemid, col)) for col in columns]) | 891 writer.writerow([str(klass.get(itemid, col)) for col in columns]) |
| 893 | 892 |
| 894 return '\n' | 893 return '\n' |
| 895 | 894 |
| 896 # vim: set filetype=python ts=4 sw=4 et si | 895 # vim: set filetype=python ts=4 sw=4 et si : |
