mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
26 lines
540 B
TypeScript
26 lines
540 B
TypeScript
import { enUS, frFR } from '@clerk/localizations';
|
|
|
|
export const locales = ['en', 'fr'] as const;
|
|
|
|
export type Locale = (typeof locales)[number];
|
|
|
|
export const isLocale = (value: string | undefined): value is Locale =>
|
|
locales.includes(value as Locale);
|
|
|
|
export const Locales: Record<Locale, string> = {
|
|
en: 'English',
|
|
fr: 'Français',
|
|
};
|
|
|
|
export const getClerkLocale = (locale: string) => {
|
|
if (!isLocale(locale)) {
|
|
return enUS;
|
|
}
|
|
|
|
switch (locale) {
|
|
case 'fr':
|
|
return frFR;
|
|
default:
|
|
return enUS;
|
|
}
|
|
};
|