]> pere.pagekite.me Git - text-mekanikerord.git/commitdiff
Avoid double language indicators in the index
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 14 Aug 2020 16:11:54 +0000 (18:11 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Fri, 14 Aug 2020 16:11:54 +0000 (18:11 +0200)
Do not append language indicator if there is already a '[' in the
string.

make-glossary

index 9e8f89fb067f53bc86cc914e46341b7c9041ead7..b38a8c726962d268d017ce00684524cd0194423a 100755 (executable)
@@ -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()