[Please note: I don't know if this is the right place to ask, but I couldn't find a better one. Also, I posted this question on stackoverflow (http://stackoverflow.com/questions/9559756/pot-file- with-tags-instead-of-dynamic-element) yesterday but unfortunately still got no answer. So I am hoping for some answers here. Thank you very much!]
I'm trying to translate text out of a template file in a Pyramid project. More or less as in this example: http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/chameleon_i18n.html Now how do I get rid of the `<dynamic element>` in the comment of my .pot file? I'd like to see the rest of the code along with its tags. My chameleon template (.pt): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="MyDomain"> <head> ... </head> <body> <div i18n:translate="MyID"> This will appear in the comments. <span>This will NOT.</span> While this will again appear. </div> </body> </html> I use Babel and Lingua to extract the messages with the following options in my setup.py: message_extractors = { '.': [ ('**.py', 'lingua_python', None ), ('**.pt', 'lingua_xml', None ), ]} And the relevant output in my .pot file looks like this: #. Default: This will appear in the comments. <dynamic element> While this will #. again appear. #: myproject/templates/base.pt:10 msgid "MyID" msgstr "" -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
