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:
@@ -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*'],
|
||||
|
||||
@@ -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',
|
||||
}));
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"confirmEmail": "Confirm email",
|
||||
"resetPassword": "Reset password"
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"text1": "Hey!",
|
||||
"text2": "You’re almost ready to start enjoying",
|
||||
"text3": "Simply click the big green button below to verify your email address."
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"text1": "Trouble signing in?",
|
||||
"text2": "Resetting your password is easy.",
|
||||
"text3": "Just press the button below and follow the instructions. We’ll have you up and running in no time.",
|
||||
"text4": "If you did not make this request then please ignore this email."
|
||||
}
|
||||
Reference in New Issue
Block a user