diff 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
line wrap: on
line diff
--- a/babel/messages/mofile.py
+++ b/babel/messages/mofile.py
@@ -81,7 +81,7 @@
             msgstrs = []
             for idx, string in enumerate(message.string):
                 if not string:
-                    msgstrs.append(message.id[idx])
+                    msgstrs.append(message.id[min(int(idx), 1)])
                 else:
                     msgstrs.append(string)
             msgstr = '\x00'.join([
Copyright (C) 2012-2017 Edgewall Software