From e23fbb2c2fb17a295b95a7830e3414dc2b927230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Tue, 3 Jun 2025 21:19:54 +0200 Subject: [PATCH 1/5] localize dates according to document lang in NL, DE and EN (default) --- xslt/dates.xsl | 132 ++++++++++++++++++++++++++++++++ xslt/functions_params_vars.xslt | 10 +-- xslt/localisation.xslt | 2 + xslt/placeholders.xslt | 5 +- 4 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 xslt/dates.xsl diff --git a/xslt/dates.xsl b/xslt/dates.xsl new file mode 100644 index 00000000..0277d895 --- /dev/null +++ b/xslt/dates.xsl @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TBD + + + + + + + + + + + + + TBD + + + + + + + + \ No newline at end of file diff --git a/xslt/functions_params_vars.xslt b/xslt/functions_params_vars.xslt index d11078ce..2a69984d 100644 --- a/xslt/functions_params_vars.xslt +++ b/xslt/functions_params_vars.xslt @@ -2,6 +2,7 @@ @@ -433,14 +434,7 @@ - - + diff --git a/xslt/localisation.xslt b/xslt/localisation.xslt index 4567c47f..ffc63175 100644 --- a/xslt/localisation.xslt +++ b/xslt/localisation.xslt @@ -1,8 +1,10 @@ + diff --git a/xslt/placeholders.xslt b/xslt/placeholders.xslt index 10a56287..f3abe8f5 100644 --- a/xslt/placeholders.xslt +++ b/xslt/placeholders.xslt @@ -3,6 +3,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.radical.sexy" + xmlns:dt-local="http://www.radical.sexy/schema/dt-local" exclude-result-prefixes="xs my" version="2.0" > @@ -937,9 +938,7 @@ self::p_draftdue or self::p_reportdue) and string($placeholderElement) castable as xs:date" > - + Date: Thu, 5 Jun 2025 13:26:40 +0200 Subject: [PATCH 3/5] support English dates in UK and US (default) format --- xslt/dates.xsl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xslt/dates.xsl b/xslt/dates.xsl index f64b2778..0780f449 100644 --- a/xslt/dates.xsl +++ b/xslt/dates.xsl @@ -88,7 +88,12 @@ to support internationalized dates according to document $lang - + + + + + + From 92867178527e6e58d8e1b650649ef575597850fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 9 Jun 2025 01:39:46 +0200 Subject: [PATCH 4/5] use localized dateTime format in version history --- xslt/meta.xslt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xslt/meta.xslt b/xslt/meta.xslt index 9926e46c..34c3f48f 100644 --- a/xslt/meta.xslt +++ b/xslt/meta.xslt @@ -1,6 +1,7 @@ - + From 683be03fc18e6c8ace0eaa27d60a109498987d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Fri, 20 Mar 2026 13:23:25 +0000 Subject: [PATCH 5/5] fix undeclared date variable and add language fallback Use @date attribute instead of undeclared $date variable in version history, and use the -tbd variant to handle missing dates gracefully. Default lang parameter to 'en' when xml:lang is not set. --- xslt/functions_params_vars.xslt | 2 +- xslt/meta.xslt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xslt/functions_params_vars.xslt b/xslt/functions_params_vars.xslt index 2a69984d..1d0bc86b 100644 --- a/xslt/functions_params_vars.xslt +++ b/xslt/functions_params_vars.xslt @@ -25,7 +25,7 @@ - + diff --git a/xslt/meta.xslt b/xslt/meta.xslt index 34c3f48f..f507826b 100644 --- a/xslt/meta.xslt +++ b/xslt/meta.xslt @@ -318,7 +318,7 @@ - +