Vertaalbestanden 5-6/6: placeholder-pagina en 'Boek {name}' naar de tekstbestanden; docs/translation-files.md

Placeholder: sjabloon met {{tokens}}, zinnen in core.host.placeholder.*; vergeleken met het originele bestand (zonder witruimte). 'Boek {name}' in offerings.injection.book; ASF-golden files blijven groen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 20:49:23 +01:00
co-authored by Claude Sonnet 5.5
parent 8f867d3dda
commit 2307417134
13 changed files with 154 additions and 23 deletions
@@ -1,6 +1,7 @@
using System.Text.Json;
using System.Text.Json.Nodes;
using SlpModularCms.Core.Hosting.Website;
using SlpModularCms.Core.Texts;
using SlpModularCms.Modules.Offerings.Data.Entities;
using SlpModularCms.Modules.Offerings.Models;
@@ -12,7 +13,7 @@ namespace SlpModularCms.Modules.Offerings.Services;
/// page's JSON-LD and inline prices. It only touches what a page marks; a page without markers is not handed to it.
/// Any exception means "leave the page as it was built" (the injector logs it and serves the baked page).
/// </summary>
public sealed class OfferingsHtmlTransform(IOfferingsService offerings, IOfferingBannersService banners) : IHtmlPageTransform
public sealed class OfferingsHtmlTransform(IOfferingsService offerings, IOfferingBannersService banners, ITextCatalog? texts = null) : IHtmlPageTransform
{
public const string OfferingsRegion = "CMS:OFFERINGS-HTML";
public const string BannerTopRegion = "CMS:BANNER-TOP-HTML";
@@ -48,7 +49,7 @@ public sealed class OfferingsHtmlTransform(IOfferingsService offerings, IOfferin
if (wantsOfferings)
{
html = HtmlMarkerEditor.ReplaceRegion(html, OfferingsRegion, CmsPageHtml.OfferingsList(live));
html = HtmlMarkerEditor.ReplaceRegion(html, OfferingsRegion, CmsPageHtml.OfferingsList(live, texts));
html = HtmlMarkerEditor.EditJsonLd(html, JsonLdMarker, (slug, json) => EditOfferJsonLd(json, FindPrice(live, slug)));
html = HtmlMarkerEditor.ReplaceInlineValues(html, PriceAttribute,
slug => FindPrice(live, slug) is { } euros ? CmsPageHtml.PriceHtml(euros) : null);