Compare commits

...

4 Commits

Author SHA1 Message Date
Javier E. Fajardo 55bd35c50e
Merge 8cbb9e2274 into 59def28814 2024-04-26 18:59:46 -07:00
Nextcloud bot 59def28814
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-04-27 00:29:47 +00:00
Javier E. Fajardo 8cbb9e2274 Fix lint issues and the eventSourceFunction tests
Signed-off-by: Javier E. Fajardo <javier@fajardo.io>
2021-04-23 18:07:40 -07:00
Javier E. Fajardo 9caf74965b Set task start if available to allow visualization
Signed-off-by: Javier E. Fajardo <javier@fajardo.io>
2021-04-20 00:42:31 -07:00
6 changed files with 30 additions and 26 deletions

View File

@ -262,7 +262,7 @@ OC.L10N.register(
"_day_::_days_" : ["dia","dies"],
"_week_::_weeks_" : ["setmana","setmanes"],
"No attachments" : "Sense fitxers adjunts",
"Add from Files" : "Afegeix d'Arxius",
"Add from Files" : "Afegeix de Fitxers",
"Upload from device" : "Pujada des del dispositiu",
"Delete file" : "Suprimeix el fitxer",
"Choose a file to add as attachment" : "Trieu un fitxer per afegir als adjunts",

View File

@ -260,7 +260,7 @@
"_day_::_days_" : ["dia","dies"],
"_week_::_weeks_" : ["setmana","setmanes"],
"No attachments" : "Sense fitxers adjunts",
"Add from Files" : "Afegeix d'Arxius",
"Add from Files" : "Afegeix de Fitxers",
"Upload from device" : "Pujada des del dispositiu",
"Delete file" : "Suprimeix el fitxer",
"Choose a file to add as attachment" : "Trieu un fitxer per afegir als adjunts",

View File

@ -128,6 +128,7 @@ OC.L10N.register(
"Unpublishing calendar failed" : "Zrušenie zverejnenia kalendára zlyhalo",
"can edit" : "môže upraviť",
"Unshare with {displayName}" : "Zrušiť zdieľanie s {displayName}",
"{teamDisplayName} (Team)" : "{teamDisplayName} (Tím)",
"An error occurred while unsharing the calendar." : "Počas rušenia zdieľania kalendára sa vyskytla chyba.",
"An error occurred, unable to change the permission of the share." : "Vyskytla sa chyba, nie je možné zmeniť práva na zdieľanie kalendára.",
"Share with users or groups" : "Sprístupniť používateľom alebo skupinám",

View File

@ -126,6 +126,7 @@
"Unpublishing calendar failed" : "Zrušenie zverejnenia kalendára zlyhalo",
"can edit" : "môže upraviť",
"Unshare with {displayName}" : "Zrušiť zdieľanie s {displayName}",
"{teamDisplayName} (Team)" : "{teamDisplayName} (Tím)",
"An error occurred while unsharing the calendar." : "Počas rušenia zdieľania kalendára sa vyskytla chyba.",
"An error occurred, unable to change the permission of the share." : "Vyskytla sa chyba, nie je možné zmeniť práva na zdieľanie kalendára.",
"Share with users or groups" : "Sprístupniť používateľom alebo skupinám",

View File

@ -73,10 +73,12 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
jsStart = object.startDate.getInTimezone(timezone).jsDate
jsEnd = object.endDate.getInTimezone(timezone).jsDate
} else if (object.name === 'VTODO') {
// For tasks, we only want to display when it is due,
// not for how long it has been in progress already
jsStart = object.endDate.getInTimezone(timezone).jsDate
jsEnd = object.endDate.getInTimezone(timezone).jsDate
jsStart = jsEnd = object.endDate.getInTimezone(timezone).jsDate
// If available, set task start to allow visualization
if (object.startDate) {
jsStart = object.startDate.getInTimezone(timezone).jsDate
}
} else {
// We do not want to display anything that's neither
// an event nor a task

View File

@ -592,7 +592,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => {
recurrenceId: 123,
},
id: '1###1',
start: event1End,
start: event1Start,
title: 'Untitled task',
}, {
allDay: false,
@ -613,7 +613,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => {
recurrenceId: 123,
},
id: '1###2',
start: event2End,
start: event2Start,
title: 'Untitled task',
}, {
allDay: false,
@ -634,7 +634,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => {
recurrenceId: 123,
},
id: '1###3',
start: event3End,
start: event3Start,
title: 'Untitled task (99%)',
}, {
allDay: false,
@ -655,7 +655,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => {
recurrenceId: 123,
},
id: '1###4',
start: event4End,
start: event4Start,
title: 'This task has a title',
}, {
allDay: false,
@ -676,30 +676,30 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => {
recurrenceId: 123,
},
id: '1###5',
start: event5End,
start: event5Start,
title: 'This task has a title and percent (99%)',
}])
expect(eventComponentSet[0].startDate.getInTimezone).toHaveBeenCalledTimes(0)
expect(eventComponentSet[0].endDate.getInTimezone).toHaveBeenCalledTimes(2)
expect(eventComponentSet[0].startDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[0].startDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[0].endDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[0].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[0].endDate.getInTimezone).toHaveBeenNthCalledWith(2, timezone)
expect(eventComponentSet[1].startDate.getInTimezone).toHaveBeenCalledTimes(0)
expect(eventComponentSet[1].endDate.getInTimezone).toHaveBeenCalledTimes(2)
expect(eventComponentSet[1].startDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[1].startDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[1].endDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[1].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[1].endDate.getInTimezone).toHaveBeenNthCalledWith(2, timezone)
expect(eventComponentSet[2].startDate.getInTimezone).toHaveBeenCalledTimes(0)
expect(eventComponentSet[2].endDate.getInTimezone).toHaveBeenCalledTimes(2)
expect(eventComponentSet[2].startDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[2].startDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[2].endDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[2].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[2].endDate.getInTimezone).toHaveBeenNthCalledWith(2, timezone)
expect(eventComponentSet[3].startDate.getInTimezone).toHaveBeenCalledTimes(0)
expect(eventComponentSet[3].endDate.getInTimezone).toHaveBeenCalledTimes(2)
expect(eventComponentSet[3].startDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[3].startDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[3].endDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[3].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[3].endDate.getInTimezone).toHaveBeenNthCalledWith(2, timezone)
expect(eventComponentSet[4].startDate.getInTimezone).toHaveBeenCalledTimes(0)
expect(eventComponentSet[4].endDate.getInTimezone).toHaveBeenCalledTimes(2)
expect(eventComponentSet[4].startDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[4].startDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[4].endDate.getInTimezone).toHaveBeenCalledTimes(1)
expect(eventComponentSet[4].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
expect(eventComponentSet[4].endDate.getInTimezone).toHaveBeenNthCalledWith(2, timezone)
expect(translate).toHaveBeenCalledTimes(3)
expect(translate).toHaveBeenNthCalledWith(1, 'calendar', 'Untitled task')