create-mercato-app 0.6.6-develop.6376.1.762b10c7dd → 0.6.6-develop.6381.1.042df302c3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import '@/lib/i18n/register-dictionary-loader'
|
|
|
4
4
|
import { AppProviders } from '@/components/AppProviders'
|
|
5
5
|
|
|
6
6
|
import { detectLocale, loadDictionary } from '@open-mercato/shared/lib/i18n/server'
|
|
7
|
+
import { resolveForcedLocale } from '@open-mercato/shared/lib/i18n/locale'
|
|
7
8
|
|
|
8
9
|
export const metadata: Metadata = {
|
|
9
10
|
title: 'Open Mercato',
|
|
@@ -20,6 +21,7 @@ export default async function RootLayout({
|
|
|
20
21
|
}>) {
|
|
21
22
|
const locale = await detectLocale()
|
|
22
23
|
const dict = await loadDictionary(locale)
|
|
24
|
+
const localeLocked = resolveForcedLocale(process.env) !== null
|
|
23
25
|
const demoModeEnabled = process.env.DEMO_MODE !== 'false'
|
|
24
26
|
const noticeBarsEnabled = process.env.OM_INTEGRATION_TEST !== 'true'
|
|
25
27
|
return (
|
|
@@ -43,7 +45,7 @@ export default async function RootLayout({
|
|
|
43
45
|
/>
|
|
44
46
|
</head>
|
|
45
47
|
<body className="antialiased" suppressHydrationWarning data-gramm="false">
|
|
46
|
-
<AppProviders locale={locale} dict={dict} demoModeEnabled={demoModeEnabled} noticeBarsEnabled={noticeBarsEnabled}>
|
|
48
|
+
<AppProviders locale={locale} dict={dict} localeLocked={localeLocked} demoModeEnabled={demoModeEnabled} noticeBarsEnabled={noticeBarsEnabled}>
|
|
47
49
|
{children}
|
|
48
50
|
</AppProviders>
|
|
49
51
|
</body>
|
|
@@ -13,13 +13,14 @@ type AppProvidersProps = {
|
|
|
13
13
|
children: ReactNode
|
|
14
14
|
locale: Locale
|
|
15
15
|
dict: Dict
|
|
16
|
+
localeLocked: boolean
|
|
16
17
|
demoModeEnabled: boolean
|
|
17
18
|
noticeBarsEnabled: boolean
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export function AppProviders({ children, locale, dict, demoModeEnabled, noticeBarsEnabled }: AppProvidersProps) {
|
|
21
|
+
export function AppProviders({ children, locale, dict, localeLocked, demoModeEnabled, noticeBarsEnabled }: AppProvidersProps) {
|
|
21
22
|
return (
|
|
22
|
-
<I18nProvider locale={locale} dict={dict}>
|
|
23
|
+
<I18nProvider locale={locale} dict={dict} localeLocked={localeLocked}>
|
|
23
24
|
<ClientBootstrapProvider>
|
|
24
25
|
<ComponentOverridesBootstrap>
|
|
25
26
|
<ThemeProvider>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"api.errors.invalidJson": "Ungültige JSON-Nutzlast.",
|
|
10
10
|
"api.errors.invalidLocale": "Ungültige Sprache",
|
|
11
11
|
"api.errors.invalidPayload": "Ungültige Nutzlast.",
|
|
12
|
+
"api.errors.localeForced": "Die Sprache ist durch die Konfiguration festgelegt",
|
|
12
13
|
"api.errors.notFound": "Nicht gefunden",
|
|
13
14
|
"api.errors.rateLimit": "Zu viele Anfragen. Bitte versuchen Sie es später erneut.",
|
|
14
15
|
"api.errors.unauthorized": "Nicht autorisiert",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"api.errors.invalidJson": "Invalid JSON payload.",
|
|
10
10
|
"api.errors.invalidLocale": "Invalid locale",
|
|
11
11
|
"api.errors.invalidPayload": "Invalid payload.",
|
|
12
|
+
"api.errors.localeForced": "Locale is fixed by configuration",
|
|
12
13
|
"api.errors.notFound": "Not Found",
|
|
13
14
|
"api.errors.rateLimit": "Too many requests. Please try again later.",
|
|
14
15
|
"api.errors.unauthorized": "Unauthorized",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"api.errors.invalidJson": "Carga JSON no válida.",
|
|
10
10
|
"api.errors.invalidLocale": "Idioma no válido",
|
|
11
11
|
"api.errors.invalidPayload": "Carga no válida.",
|
|
12
|
+
"api.errors.localeForced": "El idioma está fijado por configuración",
|
|
12
13
|
"api.errors.notFound": "No encontrado",
|
|
13
14
|
"api.errors.rateLimit": "Demasiadas solicitudes. Inténtelo de nuevo más tarde.",
|
|
14
15
|
"api.errors.unauthorized": "No autorizado",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"api.errors.invalidJson": "Nieprawidłowa ładunek JSON.",
|
|
10
10
|
"api.errors.invalidLocale": "Nieprawidłowy język",
|
|
11
11
|
"api.errors.invalidPayload": "Nieprawidłowa ładunek.",
|
|
12
|
+
"api.errors.localeForced": "Język jest ustalony w konfiguracji",
|
|
12
13
|
"api.errors.notFound": "Nie znaleziono",
|
|
13
14
|
"api.errors.rateLimit": "Zbyt wiele zapytań. Spróbuj ponownie później.",
|
|
14
15
|
"api.errors.unauthorized": "Nieautoryzowany",
|