From 42d449f86e7818492e80ce80762b5a80c1602e61 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 19 Jul 2019 08:35:57 +0200 Subject: [PATCH] Oxford comma --- tei2imxml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tei2imxml.py b/tei2imxml.py index d1e2b60..ac14aed 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -390,7 +390,10 @@ def format_authors(list_author_id, publang, xml_tree, translation_file): author_string = "{} {} {}".format(formatted_list[0], libeoaconvert.translate("and", publang, translation_file), formatted_list[1]) elif len(formatted_list) > 2: author_string = ", ".join(formatted_list[0:-1]) - author_string += " {} {}".format(libeoaconvert.translate("and", publang, translation_file), formatted_list[-1]) + if publang == "en": + author_string += ", {} {}".format(libeoaconvert.translate("and", publang, translation_file), formatted_list[-1]) + else: + author_string += " {} {}".format(libeoaconvert.translate("and", publang, translation_file), formatted_list[-1]) return author_string # def format_authors ends here