mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: add Polish and Italian (#1618)
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es'] as const;
|
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es', 'it', 'pl'] as const;
|
||||||
|
|
||||||
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
||||||
|
|
||||||
@ -46,6 +46,14 @@ export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
|||||||
full: 'Spanish',
|
full: 'Spanish',
|
||||||
short: 'es',
|
short: 'es',
|
||||||
},
|
},
|
||||||
|
it: {
|
||||||
|
full: 'Italian',
|
||||||
|
short: 'it',
|
||||||
|
},
|
||||||
|
pl: {
|
||||||
|
short: 'pl',
|
||||||
|
full: 'Polish',
|
||||||
|
},
|
||||||
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
||||||
|
|
||||||
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
||||||
|
|||||||
Reference in New Issue
Block a user