fix(i18n): register ar messages in the client IntlProvider
components/providers/intl-provider.tsx keeps its own static ALL_MESSAGES map separate from i18n/request.ts's server-side loader. It was missed when ar was added, so switching to Arabic flipped to RTL (direction.ts knew about ar) but rendered English text (messages lookup fell through to the en fallback).
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import { NextIntlClientProvider } from 'next-intl';
|
import { NextIntlClientProvider } from 'next-intl';
|
||||||
import { useLocaleStore } from '@/stores/locale-store';
|
import { useLocaleStore } from '@/stores/locale-store';
|
||||||
|
import arMessages from '@/locales/ar/common.json';
|
||||||
import csMessages from '@/locales/cs/common.json';
|
import csMessages from '@/locales/cs/common.json';
|
||||||
import daMessages from '@/locales/da/common.json';
|
import daMessages from '@/locales/da/common.json';
|
||||||
import deMessages from '@/locales/de/common.json';
|
import deMessages from '@/locales/de/common.json';
|
||||||
@@ -31,6 +32,7 @@ import zhMessages from '@/locales/zh/common.json';
|
|||||||
|
|
||||||
// Pre-loaded translations (loaded at build time, not runtime)
|
// Pre-loaded translations (loaded at build time, not runtime)
|
||||||
const ALL_MESSAGES = {
|
const ALL_MESSAGES = {
|
||||||
|
ar: arMessages,
|
||||||
cs: csMessages,
|
cs: csMessages,
|
||||||
da: daMessages,
|
da: daMessages,
|
||||||
de: deMessages,
|
de: deMessages,
|
||||||
|
|||||||
Reference in New Issue
Block a user