Files
TREK/shared/src/i18n/externalNotifications/index.ts
T
Dolev Benezri d159aec78b feat(i18n): add Hebrew (he) locale with RTL support
Full Hebrew translation of every UI domain plus email/notification
templates. Registered in SUPPORTED_LANGUAGES, marked right-to-left,
wired into the client locale loader and the rate-limit message table.
2026-10-31 00:40:23 +00:00

84 lines
2.3 KiB
TypeScript

import ar from '../ar/externalNotifications';
import az from '../az/externalNotifications';
import br from '../br/externalNotifications';
import ca from '../ca/externalNotifications';
import cs from '../cs/externalNotifications';
import de from '../de/externalNotifications';
import en from '../en/externalNotifications';
import es from '../es/externalNotifications';
import et from '../et/externalNotifications';
import fr from '../fr/externalNotifications';
import gr from '../gr/externalNotifications';
import he from '../he/externalNotifications';
import hu from '../hu/externalNotifications';
import id from '../id/externalNotifications';
import it from '../it/externalNotifications';
import ja from '../ja/externalNotifications';
import ko from '../ko/externalNotifications';
import type { SupportedLanguageCode } from '../languages';
import nl from '../nl/externalNotifications';
import pl from '../pl/externalNotifications';
import ru from '../ru/externalNotifications';
import sk from '../sk/externalNotifications';
import sv from '../sv/externalNotifications';
import th from '../th/externalNotifications';
import tr from '../tr/externalNotifications';
import uk from '../uk/externalNotifications';
import vi from '../vi/externalNotifications';
import zhTW from '../zh-TW/externalNotifications';
import zh from '../zh/externalNotifications';
import type {
NotificationLocale,
EmailStrings,
EventTextFn,
PasswordResetStrings,
NotificationEventKey,
} from './types';
export * from './types';
const LOCALES = {
en,
de,
fr,
es,
et,
hu,
nl,
br,
cs,
sk,
pl,
ru,
zh,
'zh-TW': zhTW,
it,
tr,
ar,
az,
he,
id,
ja,
ko,
th,
uk,
gr,
sv,
vi,
ca,
// Every language the app ships, or the compiler says which one is missing:
// a locale left out here sent its users English mails without anyone noticing.
} satisfies Record<SupportedLanguageCode, NotificationLocale>;
export const EMAIL_I18N: Record<string, EmailStrings> = Object.fromEntries(
Object.entries(LOCALES).map(([k, v]) => [k, v.email]),
);
export const EVENT_TEXTS: Record<string, Record<NotificationEventKey, EventTextFn>> = Object.fromEntries(
Object.entries(LOCALES).map(([k, v]) => [k, v.events]),
);
export const PASSWORD_RESET_I18N: Record<string, PasswordResetStrings> = Object.fromEntries(
Object.entries(LOCALES).map(([k, v]) => [k, v.passwordReset]),
);