Skip to content

Commit

Permalink
Discard changes to apps/meteor/server/services/translation/service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman authored Apr 29, 2024
1 parent 328240d commit 2ab383d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/server/services/translation/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ServiceClassInternal } from '@rocket.chat/core-services';
import type { ITranslationService } from '@rocket.chat/core-services';
import type { IUser, AtLeast } from '@rocket.chat/core-typings';
import type { IUser } from '@rocket.chat/core-typings';
import { Settings } from '@rocket.chat/models';
import mem from 'mem';

Expand All @@ -22,7 +22,7 @@ export class TranslationService extends ServiceClassInternal implements ITransla
}

// Use translate when you want to translate to the user's language, or server's as a fallback
async translate(text: string, user: AtLeast<IUser, 'language'>): Promise<string> {
async translate(text: string, user: IUser): Promise<string> {
const language = user.language || (await this.getServerLanguageCached());

return this.translateText(text, language);
Expand Down

0 comments on commit 2ab383d

Please sign in to comment.