From 036907eb5ea1894cafc6f89c806fbc42391f86d6 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Tue, 4 Oct 2016 03:03:15 +0300 Subject: [PATCH] - Changed "&" back to "and" --- openlp/core/lib/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index d7393eb4e..bec198288 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -307,13 +307,12 @@ def expand_tags(text): text = text.replace(tag['end tag'], tag['end html']) return text + def create_separated_list(string_list): """ - Returns a string that represents a join of a list of strings with a localized separator. This function corresponds - to QLocale::createSeparatedList which was introduced in Qt 4.8 and implements the algorithm from - http://www.unicode.org/reports/tr35/#ListPatterns - NOTE: translate() can change the format based on language styling (ex: Finnish not using "{} and {}" rather than - english style "{} , and {}"). + Returns a string that represents a join of a list of strings with a localized separator. + Localized separation will be done via the translate() function by the translators. + :param string_list: List of unicode strings :return: Formatted string """ @@ -321,9 +320,9 @@ def create_separated_list(string_list): if list_length == 1: return_list = string_list[0] elif list_length == 2: - return_list = translate('OpenLP.core.lib', '{one} & {two}').format(one=string_list[0], two=string_list[1]) + return_list = translate('OpenLP.core.lib', '{one} and {two}').format(one=string_list[0], two=string_list[1]) elif list_length > 2: - return_list = translate('OpenLP.core.lib', '{first}, & {last}').format(first=', '.join(string_list[:-1]), + return_list = translate('OpenLP.core.lib', '{first}, and {last}').format(first=', '.join(string_list[:-1]), last=string_list[-1]) else: return_list = ""