feat: use Worte/Weise labels and render metadata at page bottom (Closes #5)

Add metadata_labels ("abbreviated"/"german") and metadata_position
("top"/"bottom") options to LayoutConfig. German labels use "Worte:" and
"Weise:" instead of "T:" and "M:", with "Worte und Weise:" when lyricist
and composer are the same person. Metadata at bottom position renders
after notes with word-wrapping. MeasurementEngine accounts for two-line
metadata in German label mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-03-17 09:41:48 +01:00
parent 0139327034
commit 62aa32c13d
4 changed files with 106 additions and 17 deletions

View File

@@ -214,6 +214,31 @@ class ConfigParserTest {
config.toc.highlightColumn.shouldBeNull()
}
@Test
fun `parse config with german metadata labels`() {
val yaml = """
book:
title: "Test"
layout:
metadata_labels: german
metadata_position: bottom
""".trimIndent()
val config = ConfigParser.parse(yaml)
config.layout.metadataLabels shouldBe "german"
config.layout.metadataPosition shouldBe "bottom"
}
@Test
fun `parse config with default metadata settings`() {
val yaml = """
book:
title: "Test"
""".trimIndent()
val config = ConfigParser.parse(yaml)
config.layout.metadataLabels shouldBe "abbreviated"
config.layout.metadataPosition shouldBe "top"
}
@Test
fun `parse config ignores unknown properties`() {
val yaml = """