Skip to content

Commit

Permalink
fix(MessageService): handle number for field validation message (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn authored Oct 10, 2023
1 parent 8a24b6f commit e6eaa28
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/core/src/lib/message/shared/message.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,23 @@ export class MessageService {

if (textInterpolateParams) {
Object.keys(textInterpolateParams).map((k) => {
if (textInterpolateParams[k]) {
const value = textInterpolateParams[k];
if (value) {
translatedTextInterpolateParams[k] =
this.languageService.translate.instant(textInterpolateParams[k]);
typeof value === 'string'
? this.languageService.translate.instant(value)
: value;
}
});
}
if (titleInterpolateParams) {
Object.keys(titleInterpolateParams).map((k) => {
if (k) {
const value = titleInterpolateParams[k];
translatedTitlenterpolateParams[k] =
this.languageService.translate.instant(titleInterpolateParams[k]);
typeof value === "string"
? this.languageService.translate.instant(value)
: value;
}
});
}
Expand Down

0 comments on commit e6eaa28

Please sign in to comment.