From 1d6ad353b2840013a1c3f8f421130e0222e1530e Mon Sep 17 00:00:00 2001 From: Kristian <53874567+kristianjokela@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:27:47 +0200 Subject: [PATCH] fix: fix i18next null translations, enable turbotrace on hobbies --- .../src/domain/event/eventCard/EventCard.tsx | 16 ++++++++ apps/hobbies-helsinki/next.config.js | 4 -- .../event/eventDetails/EventDetails.tsx | 2 +- .../src/domain/event/eventHero/EventHero.tsx | 6 +-- .../src/domain/event/eventInfo/EventInfo.tsx | 35 ++++++++-------- .../event/eventInfo/EventsHierarchy.tsx | 2 +- .../event/eventInfo/OrganizationInfo.tsx | 10 +---- .../event/eventInfo/OtherEventTimes.tsx | 6 +-- .../event/eventInfo/eventList/EventList.tsx | 6 +-- .../event/similarEvents/SimilarEvents.tsx | 2 +- .../search/eventSearch/AdvancedSearch.tsx | 6 +-- apps/hobbies-helsinki/src/i18n.ts | 21 ++++++++++ .../src/pages/articles/index.tsx | 4 +- .../dateRangePicker/DateRangePicker.tsx | 6 +-- .../components/dateSelector/DateSelector.tsx | 2 +- .../useEventEnrolmentStatus.tsx | 3 +- .../EventsCookieConsent.tsx | 40 +++++++++---------- .../components/filterButton/FilterButton.tsx | 8 ++-- .../src/components/search/AutoSuggestMenu.tsx | 2 +- .../src/components/shareLinks/ShareLinks.tsx | 6 +-- packages/components/src/i18n.ts | 21 ++++++++++ .../components/src/utils/getLinkArrowLabel.ts | 2 +- 22 files changed, 127 insertions(+), 83 deletions(-) create mode 100644 apps/hobbies-helsinki/src/i18n.ts create mode 100644 packages/components/src/i18n.ts diff --git a/apps/events-helsinki/src/domain/event/eventCard/EventCard.tsx b/apps/events-helsinki/src/domain/event/eventCard/EventCard.tsx index 6d449d336..b1888c321 100644 --- a/apps/events-helsinki/src/domain/event/eventCard/EventCard.tsx +++ b/apps/events-helsinki/src/domain/event/eventCard/EventCard.tsx @@ -143,7 +143,23 @@ const EventCard: React.FC = ({ event }) => { showKeywords={false} /> +<<<<<<< HEAD +======= + +
+
+ ('eventCard.ariaLabelLink', { + name, + })} + icon={} + onClick={goToEventPage} + size="default" + /> +
+
+>>>>>>> 3a115588 (fix: fix i18next null translations, enable turbotrace on hobbies) diff --git a/apps/hobbies-helsinki/next.config.js b/apps/hobbies-helsinki/next.config.js index 4d48a8773..656c79eeb 100644 --- a/apps/hobbies-helsinki/next.config.js +++ b/apps/hobbies-helsinki/next.config.js @@ -176,14 +176,10 @@ const nextConfig = { output: 'standalone', experimental: { - outputFileTracingRoot: path.resolve(__dirname, '../..'), - /* turbotrace: { contextDirectory: path.resolve(__dirname, '../..'), - processCwd: path.resolve(__dirname, '../..'), logDetail: true, }, - */ // Prefer loading of ES Modules over CommonJS // @link {https://nextjs.org/blog/next-11-1#es-modules-support|Blog 11.1.0} // @link {https://github.com/vercel/next.js/discussions/27876|Discussion} diff --git a/apps/hobbies-helsinki/src/domain/event/eventDetails/EventDetails.tsx b/apps/hobbies-helsinki/src/domain/event/eventDetails/EventDetails.tsx index 731a791dc..377697b05 100644 --- a/apps/hobbies-helsinki/src/domain/event/eventDetails/EventDetails.tsx +++ b/apps/hobbies-helsinki/src/domain/event/eventDetails/EventDetails.tsx @@ -39,7 +39,7 @@ const EventDetails: React.FC = (props) => { end: endTime, locale, includeTime: true, - timeAbbreviation: t('timeAbbreviation') ?? '', + timeAbbreviation: t('timeAbbreviation'), })} diff --git a/apps/hobbies-helsinki/src/domain/event/eventHero/EventHero.tsx b/apps/hobbies-helsinki/src/domain/event/eventHero/EventHero.tsx index 2a8b56822..7b67c093a 100644 --- a/apps/hobbies-helsinki/src/domain/event/eventHero/EventHero.tsx +++ b/apps/hobbies-helsinki/src/domain/event/eventHero/EventHero.tsx @@ -147,7 +147,7 @@ const EventHero: React.FC = ({ event, superEvent }) => { locale, includeTime: true, timeAbbreviation: - commonTranslation('timeAbbreviation') ?? '', + commonTranslation('timeAbbreviation'), }) )} @@ -166,7 +166,7 @@ const EventHero: React.FC = ({ event, superEvent }) => { {showBuyButton && (