Skip to content

Commit

Permalink
add translate for neighborhood select
Browse files Browse the repository at this point in the history
  • Loading branch information
bahram1249 committed Jun 27, 2024
1 parent 287c49e commit 856305d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/e-commerce/src/user/address/address.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ export class AddressService {

if (city.neighborhoodBase === true) {
if (!dto.neighborhoodId) {
throw new BadRequestException('neighborhood must be select it!');
throw new BadRequestException(
this.i18n.translate('ecommerce.neighborhood_must_be_select_it', {
lang: I18nContext.current().lang,
}),
);
}
const neighborhood = await this.neighborhoodRepository.findOne(
new QueryOptionsBuilder()
Expand Down Expand Up @@ -447,7 +451,11 @@ export class AddressService {

if (city.neighborhoodBase === true) {
if (!dto.neighborhoodId) {
throw new BadRequestException('neighborhood must be select it!');
throw new BadRequestException(
this.i18n.translate('ecommerce.neighborhood_must_be_select_it', {
lang: I18nContext.current().lang,
}),
);
}
const neighborhood = await this.neighborhoodRepository.findOne(
new QueryOptionsBuilder()
Expand Down

0 comments on commit 856305d

Please sign in to comment.