diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 17:07:48 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 17:07:48 +0200 |
| commit | 8a7839cad92a264d68635e4c853347d763b8e457 (patch) | |
| tree | 223a9d069b8f6762a743645690793cf73f732f24 /internal/cli/cli.go | |
| parent | 378926240f34759116b19e078d2b2504965f5329 (diff) | |
| download | lectio-8a7839cad92a264d68635e4c853347d763b8e457.tar.gz lectio-8a7839cad92a264d68635e4c853347d763b8e457.zip | |
export: localize calendar title (month name via i18n Months + lectionary label); --ui-lang flag overrides interface/export language (cli + web ?lang=); v0.24.0
Diffstat (limited to 'internal/cli/cli.go')
| -rw-r--r-- | internal/cli/cli.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 24d1fec..d69bce0 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -40,6 +40,7 @@ Flags: -o, --offline cache/sigla only, no network -l, --lectionary WHICH new|trad (trad -> traditional) -g, --lang LANG traditional lectionary language: pl|en + --ui-lang LANG override interface/export language: pl|en -u, --update harvest sigla maximally to the horizon (idempotent) -C, --clean prune cached readings older than a year -P, --pager page reading output (like git); default from config @@ -113,7 +114,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int { var all, raw, refresh, offline, update, clean, pagerFlag, noPager, citation, week bool var randV, randCh bool var expMD, expPDF bool - var output, calendar string + var output, calendar, uiLang string var bibleVer, compareList, lectionary, lang string var width int var list bool @@ -141,6 +142,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int { fs.StringVar(&lectionary, "lectionary", "", "new|trad") fs.StringVar(&lang, "g", "", "pl|en") fs.StringVar(&lang, "lang", "", "pl|en") + fs.StringVar(&uiLang, "ui-lang", "", "override interface/export language: pl|en") fs.BoolVar(&update, "u", false, "harvest sigla maximally to the horizon") fs.BoolVar(&update, "update", false, "harvest sigla maximally to the horizon") fs.BoolVar(&clean, "C", false, "prune cached readings older than a year") @@ -201,6 +203,9 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int { if lang != "" { cfg.TraditionalLang = lang } + if uiLang != "" { + cfg.UILanguage = config.NormalizeUILanguage(uiLang) + } if citation || week || randV || randCh { tbl, _ := bible.LoadBookTable(userBooksTOML()) |
