Fix: Standartsprache - deutsch & andere Sprachen deaktiviert
This commit is contained in:
@@ -74,7 +74,7 @@ export const TeamDocumentPreferencesForm = ({
|
||||
documentVisibility: settings?.documentVisibility ?? 'EVERYONE',
|
||||
documentLanguage: isValidLanguageCode(settings?.documentLanguage)
|
||||
? settings?.documentLanguage
|
||||
: 'en',
|
||||
: 'de',
|
||||
includeSenderDetails: settings?.includeSenderDetails ?? false,
|
||||
includeSigningCertificate: settings?.includeSigningCertificate ?? true,
|
||||
signatureTypes: extractTeamSignatureSettings(settings),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es', 'it', 'pl'] as const;
|
||||
//export const SUPPORTED_LANGUAGE_CODES = ['de', 'de', 'fr', 'es', 'it', 'pl'] as const;
|
||||
export const SUPPORTED_LANGUAGE_CODES = ['de'] as const; //Nur Deutsch wird angeboten
|
||||
|
||||
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('de');
|
||||
|
||||
@@ -20,8 +21,8 @@ export type I18nLocaleData = {
|
||||
|
||||
export const APP_I18N_OPTIONS = {
|
||||
supportedLangs: SUPPORTED_LANGUAGE_CODES,
|
||||
sourceLang: 'en',
|
||||
defaultLocale: 'en-US',
|
||||
sourceLang: 'de',
|
||||
defaultLocale: 'de-DE',
|
||||
} as const;
|
||||
|
||||
type SupportedLanguage = {
|
||||
@@ -34,26 +35,26 @@ export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
||||
full: 'Deutsch',
|
||||
short: 'de',
|
||||
},
|
||||
en: {
|
||||
full: 'English',
|
||||
short: 'en',
|
||||
},
|
||||
fr: {
|
||||
full: 'French',
|
||||
short: 'fr',
|
||||
},
|
||||
es: {
|
||||
full: 'Spanish',
|
||||
short: 'es',
|
||||
},
|
||||
it: {
|
||||
full: 'Italian',
|
||||
short: 'it',
|
||||
},
|
||||
pl: {
|
||||
short: 'pl',
|
||||
full: 'Polish',
|
||||
},
|
||||
//en: {
|
||||
// full: 'English',
|
||||
// short: 'en',
|
||||
//},
|
||||
//fr: {
|
||||
// full: 'French',
|
||||
// short: 'fr',
|
||||
//},
|
||||
//es: {
|
||||
// full: 'Spanish',
|
||||
// short: 'es',
|
||||
//},
|
||||
//it: {
|
||||
// full: 'Italian',
|
||||
// short: 'it',
|
||||
//},
|
||||
//pl: {
|
||||
// short: 'pl',
|
||||
// full: 'Polish',
|
||||
//},
|
||||
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
||||
|
||||
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "DocumentMeta" ADD COLUMN "language" TEXT NOT NULL DEFAULT 'en';
|
||||
ALTER TABLE "DocumentMeta" ADD COLUMN "language" TEXT NOT NULL DEFAULT 'de';
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "TemplateMeta" ADD COLUMN "language" TEXT NOT NULL DEFAULT 'en';
|
||||
ALTER TABLE "TemplateMeta" ADD COLUMN "language" TEXT NOT NULL DEFAULT 'de';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "TeamGlobalSettings" ADD COLUMN "documentLanguage" TEXT NOT NULL DEFAULT 'en';
|
||||
ALTER TABLE "TeamGlobalSettings" ADD COLUMN "documentLanguage" TEXT NOT NULL DEFAULT 'de';
|
||||
|
||||
@@ -11,7 +11,7 @@ export const ZUpdateTeamDocumentSettingsRequestSchema = z.object({
|
||||
.nativeEnum(DocumentVisibility)
|
||||
.optional()
|
||||
.default(DocumentVisibility.EVERYONE),
|
||||
documentLanguage: z.enum(SUPPORTED_LANGUAGE_CODES).optional().default('en'),
|
||||
documentLanguage: z.enum(SUPPORTED_LANGUAGE_CODES).optional().default('de'),
|
||||
includeSenderDetails: z.boolean().optional().default(false),
|
||||
includeSigningCertificate: z.boolean().optional().default(true),
|
||||
typedSignatureEnabled: z.boolean().optional().default(true),
|
||||
|
||||
@@ -49,7 +49,7 @@ export const ZAddTemplateSettingsFormSchema = z.object({
|
||||
language: z
|
||||
.union([z.string(), z.enum(SUPPORTED_LANGUAGE_CODES)])
|
||||
.optional()
|
||||
.default('en'),
|
||||
.default('de'),
|
||||
emailSettings: ZDocumentEmailSettingsSchema,
|
||||
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