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:
xhzeem
2026-07-21 23:07:40 +02:00
committed by Linus Rath
parent 953355d2a5
commit d531ad1930
+2
View File
@@ -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,