Skip to content

Merge branch rel-10.7 with rel-10.6 - #25975

Merged
voloagent merged 3 commits into
rel-10.7from
auto-merge/rel-10-6/4766
Aug 12, 2026
Merged

Merge branch rel-10.7 with rel-10.6#25975
voloagent merged 3 commits into
rel-10.7from
auto-merge/rel-10-6/4766

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR generated automatically to merge rel-10.7 with rel-10.6. Please review the changed files before merging to prevent any errors that may occur.

@voloagent
voloagent marked this pull request as ready for review August 12, 2026 05:42
Copilot AI lite review requested due to automatic review settings August 12, 2026 05:42
@voloagent
voloagent merged commit 30522b2 into rel-10.7 Aug 12, 2026
2 checks passed
@voloagent
voloagent deleted the auto-merge/rel-10-6/4766 branch August 12, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR (auto-generated merge from rel-10.7 into rel-10.6) updates the text templating rendering engines (Scriban + Razor) to populate culture-related values into the rendering global context (and to avoid mutating/reusing the caller’s context), then aligns the standard email layout template and documentation accordingly, with accompanying tests.

Changes:

  • Add built-in global context keys (abp_culture, abp_dir) via TemplateRenderingEngineBase.SetCultureContext(...).
  • Update Scriban and Razor rendering engines to operate on a copy of globalContext and set culture context within the rendering scope.
  • Add/extend tests and documentation + update the standard emailing layout template to use the new context values.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTestTemplateDefinitionProvider.cs Registers a new Scriban test template for culture context.
framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine_CultureContext_Tests.cs Adds Scriban coverage for culture/dir context and context isolation.
framework/test/Volo.Abp.TextTemplating.Scriban.Tests/Volo/Abp/TextTemplating/Scriban/SampleTemplates/CultureContext.tpl Adds Scriban template that consumes abp_culture / abp_dir.
framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo/Abp/TextTemplating/Razor/SampleTemplates/RazorTestTemplates.cs Adds a Razor test template constant for culture context.
framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo/Abp/TextTemplating/Razor/SampleTemplates/CultureContext.cshtml Adds Razor template consuming GlobalContext culture/dir values.
framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo/Abp/TextTemplating/Razor/RazorTestTemplateDefinitionProvider.cs Registers the new Razor culture-context test template.
framework/test/Volo.Abp.TextTemplating.Razor.Tests/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine_CultureContext_Tests.cs Adds Razor coverage for culture/dir context and context isolation.
framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Templates/StandardEmailTemplates_Tests.cs Adds emailing test ensuring rendered emails declare correct lang/dir.
framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/AbpEmailingTestModule.cs Ensures Scriban module is available in emailing tests.
framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj Adds project reference to Scriban templating module for tests.
framework/src/Volo.Abp.TextTemplating.Scriban/Volo/Abp/TextTemplating/Scriban/ScribanTemplateRenderingEngine.cs Copies globalContext and sets culture context before rendering.
framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs Copies globalContext and sets culture context before rendering.
framework/src/Volo.Abp.TextTemplating.Core/Volo/Abp/TextTemplating/TemplateRenderingEngineBase.cs Introduces abp_culture / abp_dir keys and helpers to set them.
framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/Layout.tpl Updates standard email layout to use culture/dir placeholders.
docs/en/framework/infrastructure/text-templating/scriban.md Documents the new built-in context values for Scriban templates.
docs/en/framework/infrastructure/text-templating/razor.md Documents the new built-in context values for Razor templates.
docs/en/framework/infrastructure/emailing.md Updates emailing docs to mention/use the culture/dir context values.
Suppressed comments (2)

docs/en/framework/infrastructure/text-templating/razor.md:417

  • This Razor example has the same quoting/attribute parsing problem (@GlobalContext["..."] inside an already-quoted attribute). Wrap the expression in @(...) so Razor treats the inner quotes as part of the C# expression.
<html lang="@GlobalContext["abp_culture"]" dir="@GlobalContext["abp_dir"]">

docs/en/framework/infrastructure/text-templating/razor.md:445

  • This Razor snippet uses @GlobalContext["..."] inside quoted HTML attributes, which breaks Razor parsing. Wrap the indexer expressions in @(...) to make the example compile.
<html lang="@GlobalContext["abp_culture"]" dir="@GlobalContext["abp_dir"]" xmlns="http://www.w3.org/1999/xhtml">

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,2 @@
@inherits Volo.Abp.TextTemplating.Razor.RazorTemplatePageBase
<html lang="@GlobalContext["abp_culture"]" dir="@GlobalContext["abp_dir"]">
@inherits Volo.Abp.TextTemplating.Razor.RazorTemplatePageBase
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html lang="@GlobalContext["abp_culture"]" dir="@GlobalContext["abp_dir"]" xmlns="http://www.w3.org/1999/xhtml">
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.77%. Comparing base (6a525aa) to head (be0c29b).
⚠️ Report is 26 commits behind head on rel-10.7.

Additional details and impacted files
@@             Coverage Diff              @@
##           rel-10.7   #25975      +/-   ##
============================================
+ Coverage     48.59%   48.77%   +0.17%     
============================================
  Files          3795     3804       +9     
  Lines        131541   132231     +690     
  Branches       9979    10027      +48     
============================================
+ Hits          63926    64499     +573     
- Misses        65702    65809     +107     
- Partials       1913     1923      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants