mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
chore: application prettier
This commit is contained in:
@ -17,10 +17,15 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
||||
await Promise.all(
|
||||
namespaces.map(async (namespace) => {
|
||||
try {
|
||||
const translations = (await import(`../../messages/${locale}/${namespace}.json`)).default;
|
||||
const translations = (
|
||||
await import(`../../messages/${locale}/${namespace}.json`)
|
||||
).default;
|
||||
messages[namespace] = translations;
|
||||
} catch (error) {
|
||||
console.warn(`Erreur de chargement pour ${namespace} en ${locale}:`, error);
|
||||
console.warn(
|
||||
`Erreur de chargement pour ${namespace} en ${locale}:`,
|
||||
error
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
@ -34,9 +39,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
||||
short: {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
year: 'numeric'
|
||||
}
|
||||
}
|
||||
}
|
||||
year: 'numeric',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
import {defineRouting} from 'next-intl/routing';
|
||||
import {createNavigation} from 'next-intl/navigation';
|
||||
|
||||
|
||||
import { defineRouting } from 'next-intl/routing';
|
||||
import { createNavigation } from 'next-intl/navigation';
|
||||
|
||||
export const routing = defineRouting({
|
||||
// A list of all locales that are supported
|
||||
locales: ['fr', 'en'],
|
||||
|
||||
// Used when no locale matches
|
||||
defaultLocale: 'fr'
|
||||
defaultLocale: 'fr',
|
||||
});
|
||||
|
||||
// Lightweight wrappers around Next.js' navigation APIs
|
||||
// that will consider the routing configuration
|
||||
export const {Link, redirect, usePathname, useRouter} =
|
||||
createNavigation(routing);
|
||||
export const { Link, redirect, usePathname, useRouter } =
|
||||
createNavigation(routing);
|
||||
|
||||
Reference in New Issue
Block a user