chore(mail): remove nestjs-i18n, only ever used for the two mail templates

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-07-31 22:41:01 +02:00
parent 247aeefd4c
commit ae9de39ac4
7 changed files with 1 additions and 123 deletions

View File

@@ -6,12 +6,9 @@ import authConfig from './config/auth.config';
import appConfig from './config/app.config';
import mailConfig from './config/mail.config';
import fileConfig from './config/file.config';
import * as path from 'path';
import { MailerModule } from '@nestjs-modules/mailer';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { I18nModule } from 'nestjs-i18n/dist/i18n.module';
import { HeaderResolver } from 'nestjs-i18n';
import { TypeOrmConfigService } from './database/typeorm-config.service';
import { MailConfigService } from './mail/mail-config.service';
import { ForgotModule } from './forgot/forgot.module';
@@ -45,23 +42,6 @@ import { PenaltyModule } from './penalty/penalty.module';
MailerModule.forRootAsync({
useClass: MailConfigService,
}),
I18nModule.forRootAsync({
useFactory: (configService: ConfigService) => ({
fallbackLanguage: configService.get('app.fallbackLanguage'),
loaderOptions: { path: path.join(__dirname, '/i18n/'), watch: true },
}),
resolvers: [
{
use: HeaderResolver,
useFactory: (configService: ConfigService) => {
return [configService.get('app.headerLanguage')];
},
inject: [ConfigService],
},
],
imports: [ConfigModule],
inject: [ConfigService],
}),
ServeStaticModule.forRoot({
rootPath: join(__dirname, '../client'),
exclude: ['*/api*'],

View File

@@ -8,6 +8,4 @@ export default registerAs('app', () => ({
backendDomain: process.env.BACKEND_DOMAIN,
port: parseInt(process.env.APP_PORT || process.env.PORT, 10) || 3000,
apiPrefix: process.env.API_PREFIX || 'api',
fallbackLanguage: process.env.APP_FALLBACK_LANGUAGE || 'en',
headerLanguage: process.env.APP_HEADER_LANGUAGE || 'x-custom-lang',
}));

View File

@@ -1,4 +0,0 @@
{
"confirmEmail": "Confirm email",
"resetPassword": "Reset password"
}

View File

@@ -1,5 +0,0 @@
{
"text1": "Hey!",
"text2": "Youre almost ready to start enjoying",
"text3": "Simply click the big green button below to verify your email address."
}

View File

@@ -1,6 +0,0 @@
{
"text1": "Trouble signing in?",
"text2": "Resetting your password is easy.",
"text3": "Just press the button below and follow the instructions. Well have you up and running in no time.",
"text4": "If you did not make this request then please ignore this email."
}