feat: integrate feedback module

This commit is contained in:
2026-02-08 21:48:55 +01:00
parent 453a603392
commit 7ec826dae3
48 changed files with 4413 additions and 1168 deletions

View File

@@ -1,15 +1,14 @@
import {getRequestConfig} from 'next-intl/server';
import { getRequestConfig } from 'next-intl/server';
import * as Sentry from '@sentry/nextjs';
export default getRequestConfig(async ({requestLocale}) => {
// This typically corresponds to the `[locale]` segment
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;
// Ensure that a valid locale is used
if (!locale || !['en', 'de'].includes(locale)) {
locale = 'en';
}
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default,
@@ -21,12 +20,12 @@ export default getRequestConfig(async ({requestLocale}) => {
}
Sentry.captureException(error);
},
getMessageFallback({namespace, key, error}) {
getMessageFallback({ namespace, key, error }) {
const path = [namespace, key].filter((part) => part != null).join('.');
if (error.code === 'MISSING_MESSAGE') {
return path;
}
return 'fallback';
}
};
} as any;
});