chore: application prettier

This commit is contained in:
Luc SORIGNET
2025-04-15 19:37:47 +02:00
parent dd0884bbce
commit f7666c894b
174 changed files with 10609 additions and 8760 deletions

View File

@ -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',
},
},
},
};
});
});

View File

@ -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);