Mercurial > babel > old > mirror
changeset 175:c223445fdb82
Forgot to fix the pluralizable messages, regarding #28.
author | palgarvio |
---|---|
date | Tue, 26 Jun 2007 08:41:29 +0000 |
parents | aed3b2b06d19 |
children | b29bb8629a68 |
files | babel/messages/mofile.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/mofile.py +++ b/babel/messages/mofile.py @@ -72,8 +72,14 @@ msgid = '\x00'.join([ msgid.encode(catalog.charset) for msgid in message.id ]) + msgstrs = [] + for idx, string in enumerate(message.string): + if not string: + msgstrs.append(message.id[idx]) + else: + msgstrs.append(string) msgstr = '\x00'.join([ - msgstr.encode(catalog.charset) for msgstr in message.string + msgstr.encode(catalog.charset) for msgstr in msgstrs ]) else: msgid = message.id.encode(catalog.charset)