Skip to content

Commit aade17f

Browse files
committed
fix: remove unused i18n imports
1 parent b06a981 commit aade17f

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

apps/nestjs-backend/src/app.module.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ import { Module } from '@nestjs/common';
44
import { ConditionalModule, ConfigService } from '@nestjs/config';
55
import { SentryModule } from '@sentry/nestjs/setup';
66
import Redis from 'ioredis';
7-
import {
8-
I18nModule,
9-
QueryResolver,
10-
AcceptLanguageResolver,
11-
HeaderResolver,
12-
CookieResolver,
13-
} from 'nestjs-i18n';
147
import type { ICacheConfig } from './configs/cache.config';
158
import { ConfigModule } from './configs/config.module';
169
import { AccessTokenModule } from './features/access-token/access-token.module';
@@ -52,7 +45,6 @@ import { UserModule } from './features/user/user.module';
5245
import { GlobalModule } from './global/global.module';
5346
import { InitBootstrapProvider } from './global/init-bootstrap.provider';
5447
import { LoggerModule } from './logger/logger.module';
55-
import { getI18nPath } from './utils/i18n';
5648
import { WsModule } from './ws/ws.module';
5749

5850
export const appModules = {

apps/nestjs-backend/src/features/comment/comment-open-api.service.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -653,15 +653,14 @@ export class CommentOpenApiService {
653653
return;
654654
}
655655

656-
const { name: baseName } =
657-
(await this.prismaService.base.findFirst({
658-
where: {
659-
id: baseId,
660-
},
661-
select: {
662-
name: true,
663-
},
664-
})) || {};
656+
const { name: baseName } = await this.prismaService.base.findUniqueOrThrow({
657+
where: {
658+
id: baseId,
659+
},
660+
select: {
661+
name: true,
662+
},
663+
});
665664

666665
const recordName = await this.recordService.getCellValue(tableId, recordId, fieldId);
667666

apps/nestjs-backend/src/features/notification/notification.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class NotificationService {
162162
? text
163163
: (this.i18n.t(text.i18nKey, {
164164
args: text.context,
165-
lang: lang,
165+
lang,
166166
}) as string);
167167
}
168168

packages/common-i18n/src/locales/en/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@
743743
},
744744
"recordComment": {
745745
"title": "Record Comment Notification",
746-
"message": "{{fromUserName}} made a commented on {{recordName}} in {{tableName}} {{baseName ? `in ${baseName}` : ''}}"
746+
"message": "{{fromUserName}} made a comment on {{recordName}} in {{tableName}} in {{baseName}}"
747747
},
748748
"automation": {
749749
"title": "Automation Notification",

packages/common-i18n/src/locales/zh/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@
740740
},
741741
"recordComment": {
742742
"title": "记录评论通知",
743-
"message": "{{fromUserName}} {{tableName}} {{baseName ? `in ${baseName}` : ''}} 的 {{recordName}} 上评论了"
743+
"message": "{{fromUserName}} 在数据库 {{baseName}} 的 {{tableName}} 的 {{recordName}} 上评论了"
744744
},
745745
"automation": {
746746
"title": "自动化通知",

0 commit comments

Comments
 (0)