Mercurial > babel > old > mirror
comparison babel/messages/mofile.py @ 332:a7dff175b14f
Fix for #97, compilation of message catalogs for locales with more than two plural forms where the translations were empty was failing.
author | cmlenz |
---|---|
date | Fri, 06 Jun 2008 21:51:48 +0000 |
parents | 194f927d8c5a |
children | 6e86b862af57 |
comparison
equal
deleted
inserted
replaced
331:852cd3703113 | 332:a7dff175b14f |
---|---|
79 msgid.encode(catalog.charset) for msgid in message.id | 79 msgid.encode(catalog.charset) for msgid in message.id |
80 ]) | 80 ]) |
81 msgstrs = [] | 81 msgstrs = [] |
82 for idx, string in enumerate(message.string): | 82 for idx, string in enumerate(message.string): |
83 if not string: | 83 if not string: |
84 msgstrs.append(message.id[idx]) | 84 msgstrs.append(message.id[min(int(idx), 1)]) |
85 else: | 85 else: |
86 msgstrs.append(string) | 86 msgstrs.append(string) |
87 msgstr = '\x00'.join([ | 87 msgstr = '\x00'.join([ |
88 msgstr.encode(catalog.charset) for msgstr in msgstrs | 88 msgstr.encode(catalog.charset) for msgstr in msgstrs |
89 ]) | 89 ]) |