From f0c2ba269688acec24527c9aa134fedbf58dd857 Mon Sep 17 00:00:00 2001 From: Norbert Bietsch Date: Sun, 3 Jan 2021 09:56:06 +0100 Subject: [PATCH] Push current culture to the TemplateContext --- Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj | 9 +++++---- Src/Axuno.TextTemplating/TemplateRenderer.cs | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj b/Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj index f5a14d9..9a9ceb6 100644 --- a/Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj +++ b/Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj @@ -12,7 +12,7 @@ The library is a modified version of Volo.Abp.TextTemplating 4.1 © 2013 - 2021 Volosoft. Open source license with LGPLv3.0 - 0.8.3 + 0.8.5 axuno gGmbH LGPL-3.0-only text templating netstandard c# @@ -26,10 +26,11 @@ The library is a modified version of Volo.Abp.TextTemplating 4.1 TextTemplating.png https://github.com/axuno/Axuno.TextTemplating * Updated Nuget Package Scriban 3.3.2 -* Implemented fixes of Abp framework from commit https://github.com/abpframework/abp/commit/d495686fd2f6256abdeb0b6eacfd9f73d6f961f0 +* Implemented fixes of Abp framework from commit https://github.com/abpframework/abp/commit/d495686fd2f6256abdeb0b6eacfd9f73d6f961f0 +* Bugfix Library - 0.8.3.0 - 0.8.3.0 + 0.8.5.0 + 0.8.5.0 diff --git a/Src/Axuno.TextTemplating/TemplateRenderer.cs b/Src/Axuno.TextTemplating/TemplateRenderer.cs index 436d4f1..e689ac3 100644 --- a/Src/Axuno.TextTemplating/TemplateRenderer.cs +++ b/Src/Axuno.TextTemplating/TemplateRenderer.cs @@ -191,6 +191,8 @@ protected virtual TemplateContext CreateScribanTemplateContext( scriptObject.SetValue("L", new TemplateLocalizer(localizer), true); context.PushGlobal(scriptObject); + // Culture may have been changed by the CultureSwitcher of TextTemplating + context.PushCulture(CultureInfo.CurrentCulture); return context; }