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 was merged in pull request #12.
This commit is contained in:
@@ -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 = """
|
||||
|
||||
Reference in New Issue
Block a user