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