Adjust European short trip heuristic from >3 days to >1 day to correctly detect when user has returned home from European trips. This fixes the April 29-30, 2023 case where the location incorrectly showed "Sankt Georg, Hamburg" instead of "Bristol" when the user was free (no events scheduled) after the foss-north trip ended on April 27. The previous logic required more than 3 days to pass before assuming return home from European countries, but for short European trips by rail/ferry, users typically return within 1-2 days. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
function affix(buttonText) {
|
|
return (buttonText === 'Tag' || buttonText === 'Monat') ? 'r' :
|
|
buttonText === 'Jahr' ? 's' : '';
|
|
}
|
|
var l16 = {
|
|
code: 'de-at',
|
|
week: {
|
|
dow: 1,
|
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
},
|
|
buttonText: {
|
|
prev: 'Zurück',
|
|
next: 'Vor',
|
|
today: 'Heute',
|
|
year: 'Jahr',
|
|
month: 'Monat',
|
|
week: 'Woche',
|
|
day: 'Tag',
|
|
list: 'Terminübersicht',
|
|
},
|
|
weekText: 'KW',
|
|
weekTextLong: 'Woche',
|
|
allDayText: 'Ganztägig',
|
|
moreLinkText(n) {
|
|
return '+ weitere ' + n;
|
|
},
|
|
noEventsText: 'Keine Ereignisse anzuzeigen',
|
|
buttonHints: {
|
|
prev(buttonText) {
|
|
return `Vorherige${affix(buttonText)} ${buttonText}`;
|
|
},
|
|
next(buttonText) {
|
|
return `Nächste${affix(buttonText)} ${buttonText}`;
|
|
},
|
|
today(buttonText) {
|
|
// → Heute, Diese Woche, Dieser Monat, Dieses Jahr
|
|
if (buttonText === 'Tag') {
|
|
return 'Heute';
|
|
}
|
|
return `Diese${affix(buttonText)} ${buttonText}`;
|
|
},
|
|
},
|
|
viewHint(buttonText) {
|
|
// → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht
|
|
const glue = buttonText === 'Woche' ? 'n' : buttonText === 'Monat' ? 's' : 'es';
|
|
return buttonText + glue + 'ansicht';
|
|
},
|
|
navLinkHint: 'Gehe zu $0',
|
|
moreLinkHint(eventCnt) {
|
|
return 'Zeige ' + (eventCnt === 1 ?
|
|
'ein weiteres Ereignis' :
|
|
eventCnt + ' weitere Ereignisse');
|
|
},
|
|
closeHint: 'Schließen',
|
|
timeHint: 'Uhrzeit',
|
|
eventHint: 'Ereignis',
|
|
};
|
|
|
|
export { l16 as default };
|