Changeset 947
- Timestamp:
- 08/19/08 13:51:06 (4 years ago)
- Location:
- branches/stable/0.5.x
- Files:
-
- 5 modified
-
ChangeLog (modified) (1 diff)
-
genshi/filters/i18n.py (modified) (1 diff)
-
genshi/filters/tests/i18n.py (modified) (1 diff)
-
genshi/filters/transform.py (modified) (1 diff)
-
setup.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/0.5.x/ChangeLog
r905 r947 1 Version 0.5.2 2 http://svn.edgewall.org/repos/genshi/tags/0.5.2/ 3 (???, from branches/stable/0.5.x) 4 5 * Fix problem with I18n filter that would get confused by expressions in 6 attribute values when inside an `i18n:msg` block (ticket #250). 7 8 1 9 Version 0.5.1 2 10 http://svn.edgewall.org/repos/genshi/tags/0.5.1/ -
branches/stable/0.5.x/genshi/filters/i18n.py
r903 r947 168 168 else: 169 169 newval = list(self(_ensure(value), ctxt, 170 search_text=False , msgbuf=msgbuf)170 search_text=False) 171 171 ) 172 172 if newval != value: -
branches/stable/0.5.x/genshi/filters/tests/i18n.py
r903 r947 301 301 <p>Jim, sei gegrüßt!</p> 302 302 </html>""", tmpl.generate(user=dict(name='Jim')).render()) 303 304 def test_translate_i18n_msg_with_attribute_param(self): 305 tmpl = MarkupTemplate("""<html xmlns:py="http://genshi.edgewall.org/" 306 xmlns:i18n="http://genshi.edgewall.org/i18n"> 307 <p i18n:msg=""> 308 Hello, <a href="#${anchor}">dude</a>! 309 </p> 310 </html>""") 311 gettext = lambda s: u"Sei gegrüßt, [1:Alter]!" 312 tmpl.filters.insert(0, Translator(gettext)) 313 self.assertEqual("""<html> 314 <p>Sei gegrüßt, <a href="#42">Alter</a>!</p> 315 </html>""", tmpl.generate(anchor='42').render()) 303 316 304 317 def test_extract_i18n_msg_with_two_params(self): -
branches/stable/0.5.x/genshi/filters/transform.py
r881 r947 495 495 >>> html = HTML('<html><head><title>Some Title</title></head>' 496 496 ... '<body>Some <em>body</em> text.</body></html>') 497 >>> print html | Transformer(' title/text()').copy(buffer) \\497 >>> print html | Transformer('head/title/text()').copy(buffer) \\ 498 498 ... .end().select('body').prepend(tag.h1(buffer)) 499 499 <html><head><title>Some Title</title></head><body><h1>Some -
branches/stable/0.5.x/setup.py
r908 r947 21 21 try: 22 22 from setuptools import setup, Extension, Feature 23 from setuptools.command.bdist_egg import bdist_egg 23 24 except ImportError: 24 25 from distutils.core import setup, Extension 25 26 Feature = None 27 bdist_egg = None 26 28 import sys 27 29 … … 32 34 build_doc = test_doc = None 33 35 36 _speedup_available = False 34 37 35 38 class optional_build_ext(build_ext): … … 44 47 try: 45 48 build_ext.build_extension(self, ext) 49 global _speedup_available 50 _speedup_available = True 46 51 except CCompilerError, x: 47 52 self._unavailable() … … 66 71 speedups = None 67 72 73 74 # Setuptools need some help figuring out if the egg is "zip_safe" or not 75 if bdist_egg: 76 class my_bdist_egg(bdist_egg): 77 def zip_safe(self): 78 return not _speedup_available and bdist_egg.zip_safe(self) 79 80 81 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc, 82 'build_ext': optional_build_ext} 83 if bdist_egg: 84 cmdclass['bdist_egg'] = my_bdist_egg 85 68 86 setup( 69 87 name = 'Genshi', … … 80 98 url = 'http://genshi.edgewall.org/', 81 99 download_url = 'http://genshi.edgewall.org/wiki/Download', 82 zip_safe = True,83 100 84 101 classifiers = [ … … 113 130 114 131 features = {'speedups': speedups}, 115 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc, 116 'build_ext': optional_build_ext} 132 cmdclass = cmdclass 117 133 )
