Skip to content

Commit

Permalink
Fix cars.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Dec 11, 2024
1 parent 7b516ec commit 4e030f1
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions frontend/src/lang/cars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import LocalizedStrings from 'react-localization'
import * as langHelper from '@/common/langHelper'
import env from '@/config/env.config'
import * as UserService from '@/services/UserService'
import { strings as commonStrings } from '@/lang/common'

const language = UserService.getLanguage()
const isUS = language === 'en' && env.CURRENCY === '$'
const isUS = language === 'en' && commonStrings.CURRENCY === '$'

const strings = new LocalizedStrings({
fr: {
Expand Down Expand Up @@ -72,9 +73,9 @@ const strings = new LocalizedStrings({
GEARBOX: 'Transmission',
ENGINE: 'Moteur',
DEPOSIT: 'Dépôt de garantie',
LESS_THAN_VALUE_1: `Moins de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Moins de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Moins de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_1: `Moins de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Moins de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Moins de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
TRIPS: 'locations',
CO2: 'Effet CO2',
FROM_YOU: ' de vous',
Expand Down Expand Up @@ -149,9 +150,9 @@ const strings = new LocalizedStrings({
GEARBOX: 'Gearbox',
ENGINE: 'Engine',
DEPOSIT: 'Deposit at pick-up',
LESS_THAN_VALUE_1: `Less than ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Less than ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Less than ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_1: `Less than ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Less than ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Less than ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
TRIPS: 'trips',
CO2: 'CO2 effect',
FROM_YOU: ' from you',
Expand Down Expand Up @@ -226,9 +227,9 @@ const strings = new LocalizedStrings({
GEARBOX: 'Caja de cambios',
ENGINE: 'Motor',
DEPOSIT: 'Depósito al recoger',
LESS_THAN_VALUE_1: `Menos de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Menos de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Menos de ${isUS ? env.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${env.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_1: `Menos de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_1}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_2: `Menos de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_2}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
LESS_THAN_VALUE_3: `Menos de ${isUS ? commonStrings.CURRENCY : ''}${env.DEPOSIT_FILTER_VALUE_3}${!isUS ? (` ${commonStrings.CURRENCY}`) : ''}`,
TRIPS: 'viajes',
CO2: 'Efecto CO2',
FROM_YOU: ' de ti',
Expand Down

0 comments on commit 4e030f1

Please sign in to comment.