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