Mercurial > babel > old > babel-test
diff babel/messages/tests/pofile.py @ 80:9c84b9fa5d30
Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
author | palgarvio |
---|---|
date | Sun, 10 Jun 2007 14:21:01 +0000 |
parents | 27fba894d3ca |
children | 7cdf89eb9007 |
line wrap: on
line diff
--- a/babel/messages/tests/pofile.py +++ b/babel/messages/tests/pofile.py @@ -67,6 +67,26 @@ " throw us into an infinite " "loop\n" msgstr ""''', buf.getvalue().strip()) + + def test_pot_with_translator_comments(self): + catalog = Catalog() + catalog.add(u'foo', locations=[('main.py', 1)], + comments=['Comment About `foo`']) + catalog.add(u'bar', locations=[('utils.py', 3)], + comments=['Comment About `bar` with', + 'multiple lines.']) + buf = StringIO() + pofile.write_pot(buf, catalog, omit_header=True) + self.assertEqual('''#. Comment About `foo` +#: main.py:1 +msgid "foo" +msgstr "" + +#. Comment About `bar` with +#. multiple lines. +#: utils.py:3 +msgid "bar" +msgstr ""''', buf.getvalue().strip()) def suite():