Standartsprache (für Dokumente) - DE
This commit is contained in:
@@ -26,7 +26,7 @@ function PosthogInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const locale = detect(fromHtmlTag('lang')) || 'en';
|
const locale = detect(fromHtmlTag('lang')) || 'de';
|
||||||
|
|
||||||
await dynamicActivate(locale);
|
await dynamicActivate(locale);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es', 'it', 'pl'] 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('de');
|
||||||
|
|
||||||
export type SupportedLanguageCodes = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
export type SupportedLanguageCodes = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ type SupportedLanguage = {
|
|||||||
|
|
||||||
export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
||||||
de: {
|
de: {
|
||||||
full: 'German',
|
full: 'Deutsch',
|
||||||
short: 'de',
|
short: 'de',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const getCertificatePdf = async ({ documentId, language }: GetCertificate
|
|||||||
|
|
||||||
const page = await browserContext.newPage();
|
const page = await browserContext.newPage();
|
||||||
|
|
||||||
const lang = isValidLanguageCode(language) ? language : 'en';
|
const lang = isValidLanguageCode(language) ? language : 'de';
|
||||||
|
|
||||||
await page.context().addCookies([
|
await page.context().addCookies([
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const ZAddSettingsFormSchema = z.object({
|
|||||||
language: z
|
language: z
|
||||||
.union([z.string(), z.enum(SUPPORTED_LANGUAGE_CODES)])
|
.union([z.string(), z.enum(SUPPORTED_LANGUAGE_CODES)])
|
||||||
.optional()
|
.optional()
|
||||||
.default('en'),
|
.default('de'),
|
||||||
signatureTypes: z.array(z.nativeEnum(DocumentSignatureType)).min(1, {
|
signatureTypes: z.array(z.nativeEnum(DocumentSignatureType)).min(1, {
|
||||||
message: msg`At least one signature type must be enabled`.id,
|
message: msg`At least one signature type must be enabled`.id,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user