1 # -*- coding: utf-8 -*-
2 # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from textile import Textile
8 class TextilePL(Textile):
9 glyph_defaults = [(name, repl)
10 for (name, repl) in Textile.glyph_defaults
11 if name != 'txt_quote_double_open']
12 glyph_defaults.append(('txt_quote_double_open', '„'))
16 return TextilePL().textile(text)
19 def textile_restricted_pl(text):
20 return TextilePL(restricted=True, lite=True,
21 noimage=True, auto_link=False).textile(
26 class LazyUGettextLazy():
27 """You can use it to internationalize strings in settings.
29 Just import this class as gettext.
34 def __init__(self, text):
37 def __unicode__(self):
39 from django.utils.translation import ugettext_lazy
40 LazyUGettextLazy._ = staticmethod(ugettext_lazy)
41 LazyUGettextLazy.real = True
42 return unicode(self._(self.text))