diff babel/messages/pofile.py @ 441:942afedbb3d7 trunk

Make sure to only strip on the first occurence of ]. Submitted by: Benoit Boissinot
author jruigrok
date Fri, 19 Feb 2010 13:08:56 +0000
parents a974d298400f
children ac8961d40e61 2baa2cedd6f9
line wrap: on
line diff
--- a/babel/messages/pofile.py
+++ b/babel/messages/pofile.py
@@ -187,7 +187,7 @@
             in_msgstr[0] = True
             msg = line[6:].lstrip()
             if msg.startswith('['):
-                idx, msg = msg[1:].split(']')
+                idx, msg = msg[1:].split(']', 1)
                 translations.append([int(idx), msg.lstrip()])
             else:
                 translations.append([0, msg])
Copyright (C) 2012-2017 Edgewall Software