attempt to fix bug #1100277

Fixes: https://launchpad.net/bugs/1100277
This commit is contained in:
Andreas Preikschat 2013-02-05 18:36:43 +01:00
parent 864909c753
commit ede9bb70d9

View File

@ -373,16 +373,15 @@ def create_separated_list(stringlist):
elif len(stringlist) == 1:
return stringlist[0]
elif len(stringlist) == 2:
return translate('OpenLP.core.lib', '%1 and %2',
return translate('OpenLP.core.lib', '%s and %s',
'Locale list separator: 2 items') % (stringlist[0], stringlist[1])
else:
merged = translate('OpenLP.core.lib', '%1, and %2',
merged = translate('OpenLP.core.lib', '%s, and %s',
u'Locale list separator: end') % (stringlist[-2], stringlist[-1])
for index in reversed(range(1, len(stringlist) - 2)):
merged = translate('OpenLP.core.lib', '%1, %2',
u'Locale list separator: middle') % (stringlist[index], merged)
return translate('OpenLP.core.lib', '%1, %2',
u'Locale list separator: start') % (stringlist[0], merged)
merged = translate('OpenLP.core.lib', '%s, %s',
u'Locale list separator: middle') % (stringlist[index], merged)
return translate('OpenLP.core.lib', '%s, %s', u'Locale list separator: start') % (stringlist[0], merged)
from registry import Registry