Localize the semester dates manually (Closes #291)
Format numbers correctly on food page
Replaces food preferences icon with simpler (more modern) icon
Caches meals translations for 24h to reduce DeepL API calls
🤖 Generated by Copilot at 1df677c
Summary
🌐🍽️💖
This pull request adds localization support for the calendar and food pages of the neuland.app, using the next-i18next package and the i18n object. It also improves the caching and formatting of the calendar events and the food menu, and introduces a new custom icon for the food preferences. The main files affected are CalendarCard.js, calendar.json, cl-events.js, food.js, and calendar.js.
Oh, we're the crew of the next-i18next shipAnd we sail the web with a multilingual gripWe heave and we ho, we localize and cacheWe make the calendar events look good in a flash
Walkthrough
Localize the event names in the calendar based on the user's language (link, link, link)
Add a custom icon faHeartCircleCheck to replace the faThumbsUp icon in the food menu and preferences (link, link, link)
Improve the currency and number formatting in the food menu according to the user's locale, using the getAdjustedLocale function from locale-utils.js (link, link, link)
Trim and remove trailing dots from the organizer names of the remote events, using the trim and replace methods (link)
Conditionally load or save the events from the remote source or the local cache, depending on the development mode, using the isDev constant (link, link, link)
Fix the indentation of the span element that contains the faExclamationTriangle icon in the food preferences modal (link)
This PR includes various small fixes like:
🤖 Generated by Copilot at 1df677c
Summary
🌐🍽️💖
This pull request adds localization support for the calendar and food pages of the neuland.app, using the
next-i18next
package and thei18n
object. It also improves the caching and formatting of the calendar events and the food menu, and introduces a new custom icon for the food preferences. The main files affected areCalendarCard.js
,calendar.json
,cl-events.js
,food.js
, andcalendar.js
.Walkthrough
faHeartCircleCheck
to replace thefaThumbsUp
icon in the food menu and preferences (link, link, link)getAdjustedLocale
function fromlocale-utils.js
(link, link, link)trim
andreplace
methods (link)isDev
constant (link, link, link)span
element that contains thefaExclamationTriangle
icon in the food preferences modal (link)