1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
// Package i18n holds lectio's UI-chrome string tables (English and Polish)
// for the ui_language config setting. It localises the chrome only --
// version-column labels, the TUI keybar/messages, the CLI banner words, the
// web control labels, and the modern-lectionary section-heading label words
// -- never the scripture verse text or citation, which stay source-language.
package i18n
// UI is one language's complete set of chrome strings.
type UI struct {
// Version names each bible version for column headers / prose, keyed by
// version code (pl, wuj, vul, grb, drb).
Version map[string]string
// PartLabel names each modern-lectionary section's heading label word,
// keyed by liturgy.Section.PartID (pierwsze_czytanie, psalm,
// drugie_czytanie, aklamacja, ewangelia). The pl entries are the exact
// prefixes niedziela.pl's scraped headings carry, used by
// render.LocalizeHeading to recognise and swap the label word while
// keeping the citation untouched.
PartLabel map[string]string
// TUI keybar and status messages.
FooterKeys, Loading, NoReadingsFor, ErrorPrefix, ErrorHint string
// CLI banner label words: the banner is "<word> — <date>".
BannerGospel, BannerReadings string
// Web control labels.
Lectionary, OptModern, OptTraditional string
Parts, OptGospel, OptAll string
Layout, OptHorizontal, OptColumns string
OptInterlinear, Theme, Mono string
}
// Get returns lang's chrome string set, falling back to English for
// anything other than "pl".
func Get(lang string) UI {
if lang == "pl" {
return plUI
}
return enUI
}
var enUI = UI{
Version: map[string]string{
"pl": "Polish (niedziela.pl)",
"wuj": "Wujek (Polish)",
"vul": "Vulgate (Latin)",
"grb": "Greek",
"drb": "Douay-Rheims (English)",
},
PartLabel: map[string]string{
"pierwsze_czytanie": "1st reading",
"psalm": "Psalm",
"drugie_czytanie": "2nd reading",
"aklamacja": "Acclamation",
"ewangelia": "Gospel",
},
FooterKeys: "tab/⇧tab version ←/→ day j/k scroll space/b page g/G top/bottom r refresh q quit",
Loading: "loading…",
NoReadingsFor: "no readings for ",
ErrorPrefix: "error: ",
ErrorHint: "change date (←/→) or refresh (r)",
BannerGospel: "Gospel",
BannerReadings: "Readings",
Lectionary: "lectionary",
OptModern: "modern",
OptTraditional: "traditional",
Parts: "parts",
OptGospel: "Gospel",
OptAll: "all parts",
Layout: "layout",
OptHorizontal: "horizontal",
OptColumns: "columns",
OptInterlinear: "interlinear",
Theme: "theme",
Mono: "mono",
}
var plUI = UI{
Version: map[string]string{
"pl": "Polski (niedziela.pl)",
"wuj": "Wujek (pol.)",
"vul": "Wulgata (lac.)",
"grb": "Grecki",
"drb": "Douay-Rheims (ang.)",
},
PartLabel: map[string]string{
"pierwsze_czytanie": "1. czytanie",
"psalm": "Psalm",
"drugie_czytanie": "2. czytanie",
"aklamacja": "Aklamacja",
"ewangelia": "Ewangelia",
},
FooterKeys: "tab/⇧tab wersja ←/→ dzień j/k przewiń spacja/b strona g/G góra/dół r odśwież q wyjście",
Loading: "ładowanie…",
NoReadingsFor: "brak czytań na ",
ErrorPrefix: "błąd: ",
ErrorHint: "zmień datę (←/→) lub odśwież (r)",
BannerGospel: "Ewangelia",
BannerReadings: "Czytania",
Lectionary: "lekcjonarz",
OptModern: "nowy",
OptTraditional: "tradycyjny",
Parts: "zakres",
OptGospel: "Ewangelia",
OptAll: "wszystkie części",
Layout: "układ",
OptHorizontal: "poziomo",
OptColumns: "kolumny",
OptInterlinear: "interlinearnie",
Theme: "motyw",
Mono: "mono",
}
|