Skip to content

Commit

Permalink
Push current culture to the TemplateContext
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Jan 3, 2021
1 parent 023ea2f commit f0c2ba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Src/Axuno.TextTemplating/Axuno.TextTemplating.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

The library is a modified version of Volo.Abp.TextTemplating 4.1</Description>
<Copyright>© 2013 - 2021 Volosoft. Open source license with LGPLv3.0</Copyright>
<Version>0.8.3</Version>
<Version>0.8.5</Version>
<Authors>axuno gGmbH</Authors>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageTags>text templating netstandard c#</PackageTags>
Expand All @@ -26,10 +26,11 @@ The library is a modified version of Volo.Abp.TextTemplating 4.1</Description>
<PackageIcon>TextTemplating.png</PackageIcon>
<PackageProjectUrl>https://github.com/axuno/Axuno.TextTemplating</PackageProjectUrl>
<PackageReleaseNotes>* Updated Nuget Package Scriban 3.3.2
* Implemented fixes of Abp framework from commit https://github.com/abpframework/abp/commit/d495686fd2f6256abdeb0b6eacfd9f73d6f961f0</PackageReleaseNotes>
* Implemented fixes of Abp framework from commit https://github.com/abpframework/abp/commit/d495686fd2f6256abdeb0b6eacfd9f73d6f961f0
* Bugfix</PackageReleaseNotes>
<OutputType>Library</OutputType>
<AssemblyVersion>0.8.3.0</AssemblyVersion>
<FileVersion>0.8.3.0</FileVersion>
<AssemblyVersion>0.8.5.0</AssemblyVersion>
<FileVersion>0.8.5.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions Src/Axuno.TextTemplating/TemplateRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0c2ba2

Please sign in to comment.