From 8e22fd03693cac4806baf528ea431c3b4e593507 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Thu, 24 Oct 2024 18:03:12 +0200 Subject: [PATCH 1/2] feat: use multi-language data for PDF title --- lib.typ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.typ b/lib.typ index 3aa5de5..0d13bc8 100644 --- a/lib.typ +++ b/lib.typ @@ -208,7 +208,7 @@ set document( author: author.firstname + " " + author.lastname, - title: "resume", + title: linguify("resume", from: lang_data), ) set text( @@ -552,7 +552,7 @@ set document( author: author.firstname + " " + author.lastname, - title: "cover-letter", + title: linguify("cover-letter", from: lang_data), ) set text( From ed24813dd5e18f39d10ecc7b1f680184abcfe374 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Thu, 24 Oct 2024 19:27:24 +0200 Subject: [PATCH 2/2] fixup! feat: use multi-language data for PDF title --- lib.typ | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib.typ b/lib.typ index 0d13bc8..a90b303 100644 --- a/lib.typ +++ b/lib.typ @@ -205,12 +205,15 @@ } let lang_data = toml("lang.toml") - - set document( - author: author.firstname + " " + author.lastname, - title: linguify("resume", from: lang_data), - ) - + + show: body => context { + set document( + author: author.firstname + " " + author.lastname, + title: lflib._linguify("resume", lang: language, from: lang_data).ok, + ) + body + } + set text( font: font, lang: language, @@ -549,12 +552,15 @@ if closing == none { closing = default-closing(lang_data) } - - set document( - author: author.firstname + " " + author.lastname, - title: linguify("cover-letter", from: lang_data), - ) - + + show: body => context { + set document( + author: author.firstname + " " + author.lastname, + title: lflib._linguify("cover-letter", lang: language, from: lang_data).ok, + ) + body + } + set text( font: font, lang: language,