##// END OF EJS Templates
i18n: fix translation of empty paragraphs
Martin Geisler -
r11403:f7d7de6e default
parent child Browse files
Show More
@@ -36,7 +36,10 b' def gettext(message):'
36 if message is None:
36 if message is None:
37 return message
37 return message
38
38
39 u = u'\n\n'.join([t.ugettext(m) for m in message.split('\n\n')])
39 paragraphs = message.split('\n\n')
40 # Be careful not to translate the empty string -- it holds the
41 # meta data of the .po file.
42 u = u'\n\n'.join([p and t.ugettext(p) or '' for p in paragraphs])
40 try:
43 try:
41 # encoding.tolocal cannot be used since it will first try to
44 # encoding.tolocal cannot be used since it will first try to
42 # decode the Unicode string. Calling u.decode(enc) really
45 # decode the Unicode string. Calling u.decode(enc) really
General Comments 0
You need to be logged in to leave comments. Login now