diff options
Diffstat (limited to 'internal/cli/cli.go')
| -rw-r--r-- | internal/cli/cli.go | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go index f65774f..d671c91 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -396,19 +396,9 @@ func gospelCitation(sec liturgy.Section) string { // is parsed to canonical and re-rendered in the target dialect; a citation // whose book can't be parsed comes back in its source form unchanged. func dialectCitation(cfg config.Config, tbl *bible.BookTable, sec liturgy.Section) string { - raw := gospelCitation(sec) - if raw == "" || tbl == nil { - return raw - } - sourceLang := "pl" - if cfg.Lectionary == "traditional" { - sourceLang = cfg.TraditionalLang - } - canonical, ok := tbl.ParseRef(sourceLang, raw) - if !ok { - return raw - } - return tbl.FormatRef(cfg.SiglaLang(), canonical) + // The offline loader already rendered Citation in the reader's sigla dialect + // (see readings.citationForms), so the gospel reference is shown as-is. + return gospelCitation(sec) } // runExport handles --md/--pdf: load the day's readings and write them as @@ -425,8 +415,8 @@ func runExport(cfg config.Config, date, version string, all, refresh, asPDF bool fmt.Fprintln(stderr, "lectio: no readings found for", date) return 1 } - if vs := render.EffectiveVersions([]string{version}, cfg.Lectionary, cfg.Offline); len(vs) > 0 { - version = vs[0] + if version == "" || version == "bt" { + version = vernacularVersion(cfg) } var data []byte @@ -747,8 +737,12 @@ func fetchAndPrint(cfg config.Config, version, date string, all, raw bool, width return 1 } - if vs := render.EffectiveVersions([]string{version}, cfg.Lectionary, cfg.Offline); len(vs) > 0 { - version = vs[0] + // The single-version daily view renders lectio's own reading corpus (an + // explicit reading_version, else the vernacular that matches the UI + // language, else the complete Latin Vulgate -- the same choice -L makes), + // so the former "bt" niedziela default now maps to a real, offline corpus. + if version == "" || version == "bt" { + version = vernacularVersion(cfg) } w := resolveWidth(width, false, stdout) |
