diff --git a/src/glossary.typ b/src/glossary.typ index 0439a5c..2173a67 100644 --- a/src/glossary.typ +++ b/src/glossary.typ @@ -46,7 +46,21 @@ type(v.group) == str, message: "The optional group of glossary entry `" + k + "` is not a string") } else { - panic("Missing group for glossary entry: `" + k + "`") + let group = if "long" in v { + if (context text.lang) == "de" { + "Akronym" + } else { + "Acronym" + } + } else { + if (context text.lang) == "de" { + "Begriff" + } else { + "Term" + } + } + + entries.at(k).group = group } } diff --git a/template/glossary.yml b/template/glossary.yml index 83548c7..c45422f 100644 --- a/template/glossary.yml +++ b/template/glossary.yml @@ -3,9 +3,7 @@ oidc: short: OIDC long: OpenID Connect desc: "OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link(\"https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation\")[OpenID Foundation]." - group: Acronym potato: short: potato - desc: "#lorem(50)" - group: Acronym \ No newline at end of file + desc: "#lorem(50)" \ No newline at end of file