Update all non-major dependencies
[ProtonMail-WebClient.git] / applications / calendar / src / app / helpers / i18n.ts
blobd29377f6b0f937d37b5500d1933eb4263daab217
1 import { c } from 'ttag';
3 import { VIEWS } from '@proton/shared/lib/calendar/constants';
5 const { DAY, WEEK, MONTH, YEAR, AGENDA, CUSTOM, MAIL, DRIVE, SEARCH } = VIEWS;
7 export const getNavigationArrowsText = (view: VIEWS) => {
8     const dayText = {
9         previous: c('Action').t`Previous day`,
10         next: c('Action').t`Next day`,
11     };
12     const weekText = {
13         previous: c('Action').t`Previous week`,
14         next: c('Action').t`Next week`,
15     };
16     const monthText = {
17         previous: c('Action').t`Previous month`,
18         next: c('Action').t`Next month`,
19     };
20     const yearText = {
21         previous: c('Action').t`Previous year`,
22         next: c('Action').t`Next year`,
23     };
25     const previous = {
26         [DAY]: dayText.previous,
27         [WEEK]: weekText.previous,
28         [MONTH]: monthText.previous,
29         [AGENDA]: monthText.previous,
30         [CUSTOM]: monthText.previous,
31         [YEAR]: yearText.previous,
32         [MAIL]: weekText.previous,
33         [DRIVE]: weekText.previous,
34         [SEARCH]: weekText.previous,
35     };
37     const next = {
38         [DAY]: dayText.next,
39         [WEEK]: weekText.next,
40         [MONTH]: monthText.next,
41         [AGENDA]: monthText.next,
42         [CUSTOM]: monthText.next,
43         [YEAR]: yearText.next,
44         [MAIL]: weekText.next,
45         [DRIVE]: weekText.next,
46         [SEARCH]: weekText.next,
47     };
49     return {
50         next: next[view],
51         previous: previous[view],
52     };