diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-03 23:39:49 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-03 23:39:49 +0200 |
| commit | 14c4540d3f06299bf65d74ea864ae7c6c4c33f72 (patch) | |
| tree | 396bbb80e9f342e6f8dc1a15faf56c93d3a0ecd0 /internal/i18n | |
| parent | da1818a73de736dffd1580137352c32bea81be8c (diff) | |
| download | lectio-14c4540d3f06299bf65d74ea864ae7c6c4c33f72.tar.gz lectio-14c4540d3f06299bf65d74ea864ae7c6c4c33f72.zip | |
i18n: drop the colour word table, it has no consumer
Diffstat (limited to 'internal/i18n')
| -rw-r--r-- | internal/i18n/golden_test.go | 8 | ||||
| -rw-r--r-- | internal/i18n/i18n.go | 6 | ||||
| -rw-r--r-- | internal/i18n/lang/en.ini | 6 | ||||
| -rw-r--r-- | internal/i18n/lang/pl.ini | 6 | ||||
| -rw-r--r-- | internal/i18n/vocab_test.go | 11 |
5 files changed, 1 insertions, 36 deletions
diff --git a/internal/i18n/golden_test.go b/internal/i18n/golden_test.go index b3ad125..d07d20a 100644 --- a/internal/i18n/golden_test.go +++ b/internal/i18n/golden_test.go @@ -30,10 +30,6 @@ var enUI = UI{ "class-3": "III class", "class-4": "IV class", "commemoration": "commemoration", }, - Colour: map[string]string{ - "white": "white", "red": "red", "green": "green", - "violet": "violet", "rose": "rose", "black": "black", - }, FooterKeys: "tab/⇧tab version ←/→ day d date j/k scroll space/b page g/G top/bottom q quit", Loading: "loading…", NoReadingsFor: "no readings for ", @@ -130,10 +126,6 @@ var plUI = UI{ "class-3": "III klasy", "class-4": "IV klasy", "commemoration": "komemoracja", }, - Colour: map[string]string{ - "white": "biały", "red": "czerwony", "green": "zielony", - "violet": "fioletowy", "rose": "różowy", "black": "czarny", - }, FooterKeys: "tab/⇧tab wersja ←/→ dzień d data j/k przewiń spacja/b strona g/G góra/dół q wyjście", Loading: "ładowanie…", NoReadingsFor: "brak czytań na ", diff --git a/internal/i18n/i18n.go b/internal/i18n/i18n.go index 3928da8..356cc66 100644 --- a/internal/i18n/i18n.go +++ b/internal/i18n/i18n.go @@ -30,12 +30,6 @@ type UI struct { // by the dlectio app's day banner and calendar rows. Rank map[string]string - // Colour names each normalized liturgical colour, keyed by the string form - // of calendar.Colour (white, red, green, violet, rose, black). Rendered by - // the CLI's day header only -- the dlectio app draws a coloured swatch - // instead and deliberately shows no colour word. - Colour map[string]string - // TUI keybar and status messages. NoReadingsFor and ErrorPrefix each // carry their own single trailing space (the TUI concatenates a date or // error string directly onto them, no separator added at the call site). diff --git a/internal/i18n/lang/en.ini b/internal/i18n/lang/en.ini index 12adf7c..a2b53f3 100644 --- a/internal/i18n/lang/en.ini +++ b/internal/i18n/lang/en.ini @@ -17,12 +17,6 @@ rank.ferial = feria rank.memorial = memorial rank.optional = optional memorial rank.solemnity = solemnity -colour.black = black -colour.green = green -colour.red = red -colour.rose = rose -colour.violet = violet -colour.white = white footer_keys = tab/⇧tab version ←/→ day d date j/k scroll space/b page g/G top/bottom q quit loading = loading… no_readings_for = "no readings for " diff --git a/internal/i18n/lang/pl.ini b/internal/i18n/lang/pl.ini index 3521718..d1817f9 100644 --- a/internal/i18n/lang/pl.ini +++ b/internal/i18n/lang/pl.ini @@ -17,12 +17,6 @@ rank.ferial = dzień powszedni rank.memorial = wspomnienie obowiązkowe rank.optional = wspomnienie dowolne rank.solemnity = uroczystość -colour.black = czarny -colour.green = zielony -colour.red = czerwony -colour.rose = różowy -colour.violet = fioletowy -colour.white = biały footer_keys = tab/⇧tab wersja ←/→ dzień d data j/k przewiń spacja/b strona g/G góra/dół q wyjście loading = ładowanie… no_readings_for = "brak czytań na " diff --git a/internal/i18n/vocab_test.go b/internal/i18n/vocab_test.go index 73115bb..d25533a 100644 --- a/internal/i18n/vocab_test.go +++ b/internal/i18n/vocab_test.go @@ -6,7 +6,7 @@ import ( "github.com/lukaszkasprzak/lectio/internal/calendar" ) -// Every rank and colour the calendar can emit must have a word in every shipped +// Every rank the calendar can emit must have a word in every shipped // language. This is the guard against adding a constant later and silently // rendering a raw key like "class-2" in the UI. func TestVocabularyCoversEveryConstant(t *testing.T) { @@ -16,10 +16,6 @@ func TestVocabularyCoversEveryConstant(t *testing.T) { calendar.RankClass1, calendar.RankClass2, calendar.RankClass3, calendar.RankClass4, calendar.RankCommemoration, } - colours := []calendar.Colour{ - calendar.White, calendar.Red, calendar.Green, - calendar.Violet, calendar.Rose, calendar.Black, - } for _, lang := range []string{"en", "pl"} { ui := Get(lang) for _, r := range ranks { @@ -27,11 +23,6 @@ func TestVocabularyCoversEveryConstant(t *testing.T) { t.Errorf("%s: no rank word for %q", lang, r) } } - for _, c := range colours { - if ui.Colour[string(c)] == "" { - t.Errorf("%s: no colour word for %q", lang, c) - } - } } } |
