/
translations.ts
277 lines (240 loc) · 7.97 KB
/
translations.ts
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/**
* @public
*
* UI strings available for translation
*/
export interface TranslationStrings {
/**
* Text on the show all link
*/
"show-all": string;
/**
* Aria label on the "show all" link shown on the multiple group view
*/
"aria-show-all": string;
/**
* Text shown when all search results are shown
*/
"all-results-shown": string;
/**
* Texton the load more button
*/
"load-more": string;
/**
* Text on the back button when user has navigated to a group
*/
"go-back": string;
/**
* Aria label on the close search button
*/
"aria-label-close-search": string;
/**
* Aria label on the close button
*/
close: string;
/**
* Aria label on the search input
*/
"aria-label-search-input": string;
/**
* Text shown on the Hit list when there is no search results
*/
"no-results": string;
/**
* Aria description on the search input
*/
"sr-search-instructions": string;
/**
* Additional aria description on the search input when using modal mode
*/
"sr-search-instructions-modal": string;
/**
* `title` attribute on the superwords match star icon
*/
"superwords-match": string;
/**
* Error title when the search fails
*/
"error-title": string;
/**
* Text on the try again button when the search fails
*/
"try-again": string;
/**
* Text on the visually hidden submit search button
*/
"submit-search": string;
/**
* `title` attribute on the group title total number
*/
"total-search-results-in-group": string;
/**
* Aria label on the search highlight link with scroll anchor. Used on the `title` attribute as well.
*/
"aria-label-highlight-link": string;
/**
*
* Announced search loading message when the Enter key is pressed on the search input
* when the search results are still loading.
*/
"aria-live-loading-results": string;
/**
* Announced error when there is too few search terms when the Enter key is pressed
* on the search input.
*/
"aria-live-too-few-search-terms": string;
/**
* Announced search results total when the Enter key is pressed on the search input
* on a single group view.
*/
"aria-live-total-results": string;
/**
* Announced search results details about the groups ands hits when
* the Enter key is pressed on the search input on multiple group search view.
*/
"aria-live-group-result-details": string;
/**
* Announced tip for focusing the first search result with Shift+Enter
*/
"aria-live-focus-search-results-with-shift-enter": string;
/**
* Aria label for the <form role="search"> landmark
*/
"aria-label-search-form": string;
/**
* Aria label for the search controls section landmark
* containing the search input,search button and the close button.
*/
"aria-label-search-controls": string;
/**
* Aria label on the <nav> land mark which contains "ShowAllLink"
*/
"aria-label-search-group-nav": string;
/**
* Aria label on the highlights component
*/
"aria-label-highlights": string;
/**
* Aria label on the Hit URL
*/
"aria-label-hit-url": string;
/**
* Aria label on the Hit group elemement
*/
"aria-label-hit": string;
/**
* Aria label for the group section landmark on the multiple group search view
*/
"aria-label-group-hit-total": string;
/**
* Title for the message box from the server which shows the
* "Powered by Findkit" for free plans
*/
"aria-label-findkit-messages": string;
/**
* Visually hidden heading for the search results when only single group is used
*/
"single-search-results-heading": string;
/**
* Announced message on group navigation on the search results heading
* when multiple groups are shown. Visually hidden.
*/
"aria-live-group-navigation-search-multiple-groups": string;
/**
* Announced message on group navigation on the search results heading
* when a single gropu is selected. Visually hidden.
*/
"aria-live-group-navigation-search-selected-group": string;
}
export const BASE_TRANSLATIONS: TranslationStrings = {
close: "Close",
"show-all": "Show more search results",
"aria-show-all": "Show all search {{total}} results in the group {{group}}",
"all-results-shown": "All results shown",
"load-more": "Load more",
"go-back": "Back",
"aria-label-close-search": "Close search",
"aria-label-search-input": "Search input",
"no-results": "No results",
"sr-search-instructions":
"Search shows search results automatically as you type. Search results can be browsed with tabulator.",
"sr-search-instructions-modal": "Exit search with escape key.",
"superwords-match": "Pinned search result",
"error-title": "Unexpected error",
"try-again": "Try again",
"total-search-results-in-group": "Total results in the group",
"submit-search": "Submit Search",
"aria-label-highlight-link": 'Highlight page content around "{{words}}"',
"aria-live-loading-results": "Loading search results...",
"aria-live-too-few-search-terms":
"Too few search terms. Minimum {{minTerms}} characters.",
"aria-live-focus-search-results-with-shift-enter":
"Focus first result with shift enter",
"aria-live-total-results": "{{total}} results found.",
"aria-live-group-result-details":
"{{allTotal}} results found in {{groupCount}} groups.",
"aria-label-search-form": "Search form",
"aria-label-search-controls": "Search controls",
"aria-label-search-group-nav": "Search group",
"aria-label-highlights": "Search hit highlights",
"aria-label-hit-url": "Search hit URL: {{href}}",
"aria-label-hit": "Search result {{number}}",
"aria-label-group-hit-total": "Search result group with {{total}} hits",
"aria-label-findkit-messages": "Findkit messages",
"single-search-results-heading": "Search results",
"aria-live-group-navigation-search-selected-group":
"Search results for the selected group",
"aria-live-group-navigation-search-multiple-groups":
"Search results for {{groupCount}} groups.",
};
export const TRANSLATIONS: Record<string, TranslationStrings> = {
en: BASE_TRANSLATIONS,
fi: {
close: "Sulje",
"go-back": "Takaisin",
"show-all": "Näytä kaikki",
"aria-show-all": "Näytä kaikki {{total}} hakutulosta ryhmässä {{group}}",
"load-more": "Lataa lisää",
"aria-label-close-search": "Sulje haku",
"all-results-shown": "Kaikki tulokset näytetty",
"aria-label-search-input": "Hakukenttä",
"no-results": "Ei hakutuloksia",
"sr-search-instructions":
"Hakutoiminto esittää hakutulokset automaattisesti kirjoittaessasi hakusanaa. Hakutuloksia on mahdollista selata tab-näppäimellä.",
"sr-search-instructions-modal": "Sulje haku esc-näppäimellä.",
"superwords-match": "Nostettu hakutulos",
"error-title": "Odottamaton virhe",
"try-again": "Yritä uudelleen",
"submit-search": "Lähetä haku",
"total-search-results-in-group": "Hakutulosmäärä ryhmässä",
"aria-label-highlight-link":
'Korosta sivun sisältöä sanojen "{{words}}" ympärillä',
"aria-live-loading-results": "Ladataan hakutuloksia...",
"aria-live-too-few-search-terms":
"Liian lyhyt hakusana. Vähintään {{minTerms}} merkkiä.",
"aria-live-focus-search-results-with-shift-enter":
"Kohdista ensimmäiseen tulokseen shift enterillä",
"aria-live-total-results": "{{total}} tulosta löydetty.",
"aria-live-group-result-details":
"{{allTotal}} tulosta löydetty {{groupCount}} ryhmästä.",
"aria-label-search-form": "Hakulomake",
"aria-label-search-controls": "Hakutoiminnot",
"aria-label-search-group-nav": "Hakuryhmä",
"aria-label-highlights": "Hakutulosten osumien korostukset",
"aria-label-hit-url": "Hakutuloksen URL: {{href}}",
"aria-label-hit": "Hakutulos {{number}}",
"aria-label-group-hit-total": "Hakutulosryhmä joss on {{total}} osumaa",
"aria-label-findkit-messages": "Findkit-viestit",
"single-search-results-heading": "Haun tulokset",
"aria-live-group-navigation-search-selected-group":
"Hakutulokset {{groupCount}} ryhmälle.",
"aria-live-group-navigation-search-multiple-groups":
"Hakutulokset valitulle ryhmälle",
},
};
export interface Translator {
(
key: keyof TranslationStrings,
data?: Record<string, string | number>,
): string;
}