From e1b8eceea6bda12be10d508216d9b4630370af42 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 26 Aug 2024 16:10:52 +0200 Subject: [PATCH] fix heading supplement not translated (#52) --- src/pages/outline.typ | 8 +++++++- src/style.typ | 8 +++++++- template/main.typ | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/pages/outline.typ b/src/pages/outline.typ index 98c73b9..4d6aeab 100644 --- a/src/pages/outline.typ +++ b/src/pages/outline.typ @@ -80,9 +80,15 @@ "Table of Contents" } + let header-supplement = if (text.lang == "de") { + "Kapitel" + } else { + "chapter" + } + pagebreak(weak: true) outline( - target: heading.where(supplement: [chapter]), + target: heading.where(supplement: [#header-supplement]), title: title, indent: auto, ) diff --git a/src/style.typ b/src/style.typ index f4a5623..ae015b5 100644 --- a/src/style.typ +++ b/src/style.typ @@ -69,7 +69,13 @@ weight: "semibold", ) - set heading(supplement: [chapter]) + let header-supplement = if config.lang == "de" { + "Kapitel" + } else { + "chapter" + } + + set heading(supplement: [#header-supplement]) set math.equation(numbering: "(1)") diff --git a/template/main.typ b/template/main.typ index 77d6df8..94d4001 100644 --- a/template/main.typ +++ b/template/main.typ @@ -51,7 +51,7 @@ #lorem(200) @einstein -= Lorem Ipsum 3 += Lorem Ipsum 3 #lorem(15) t `Hello, World!` #lorem(50) @@ -68,7 +68,7 @@ $ lorem(200), ) -#url("https://github.com", "text") +#url("https://github.com", "text") @sec:hello #lorem(50)