From: Petter Reinholdtsen Date: Fri, 14 Aug 2020 16:11:54 +0000 (+0200) Subject: Avoid double language indicators in the index X-Git-Tag: published-en-nb-2021-07-17~87 X-Git-Url: https://pere.pagekite.me/gitweb/text-mekanikerord.git/commitdiff_plain/bc890d9e56757e777f1be194d7f0d7bb51c2859c Avoid double language indicators in the index Do not append language indicator if there is already a '[' in the string. --- diff --git a/make-glossary b/make-glossary index 9e8f89f..b38a8c7 100755 --- a/make-glossary +++ b/make-glossary @@ -49,7 +49,7 @@ def make_glossary_docbook(lang): def indexit(entry, wlist, lang=None): for w in wlist.split(","): if "" != w: - if lang: + if lang and '[' not in w: w += "[%s]" % lang entry.append(E.indexterm(E.primary(w))) glossary = E.glosslist()