Mercurial > babel > old > mirror
diff babel/messages/pofile.py @ 546:10de195cfb04
catalog.add() now returns the message instance (closes #245)
author | fschwarz |
---|---|
date | Sat, 19 Mar 2011 19:28:59 +0000 |
parents | 1869978e3895 |
children | 12d5425fb430 |
line wrap: on
line diff
--- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -345,7 +345,9 @@ >>> catalog = Catalog() >>> catalog.add(u'foo %(name)s', locations=[('main.py', 1)], ... flags=('fuzzy',)) + <Message...> >>> catalog.add((u'bar', u'baz'), locations=[('main.py', 3)]) + <Message...> >>> from StringIO import StringIO >>> buf = StringIO() >>> write_po(buf, catalog, omit_header=True)