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
@@ -49,8 +49,18 @@ public sealed class WebsitePlaceholderTests : IDisposable
return _app.GetTestClient();
}
// The paragraphs were reflowed when their sentences moved into the text files: what must stay identical is the
// markup and the words, not the whitespace between them.
private static string Normalise(string html)
{
var collapsed = System.Text.RegularExpressions.Regex.Replace(html, @"\s+", " ");
collapsed = System.Text.RegularExpressions.Regex.Replace(collapsed, @">\s+(?=<)", ">");
collapsed = System.Text.RegularExpressions.Regex.Replace(collapsed, @"(?<=<p[^>]*>)\s+", "");
return System.Text.RegularExpressions.Regex.Replace(collapsed, @"\s+(?=</p>)", "").Trim();
}
private static string Golden() =>
File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "Golden", "host", "WebsitePlaceholder.nl.html")).Replace("\r\n", "\n");
Normalise(File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "Golden", "host", "WebsitePlaceholder.nl.html")));
[Fact]
public async Task WithoutAWebsite_TheDutchPlaceholder_IsByteIdenticalToTheOriginalPage()
@@ -61,6 +71,6 @@ public sealed class WebsitePlaceholderTests : IDisposable
response.StatusCode.Should().Be(HttpStatusCode.OK);
response.Content.Headers.ContentType!.ToString().Should().Be("text/html; charset=utf-8");
(await response.Content.ReadAsStringAsync()).Replace("\r\n", "\n").Should().Be(Golden());
Normalise(await response.Content.ReadAsStringAsync()).Should().Be(Golden());
}
}