Skip to content

Instantly share code, notes, and snippets.

@MartinN3
Last active April 5, 2019 10:49
Show Gist options
  • Save MartinN3/4e1305cdc8724f672ec6cc1221e2f2ed to your computer and use it in GitHub Desktop.
Save MartinN3/4e1305cdc8724f672ec6cc1221e2f2ed to your computer and use it in GitHub Desktop.
const oneToFive = (number, arrayOfTranslations) => {
if (number === 1) {
return arrayOfTranslations[0]
} else if (number > 5) {
return arrayOfTranslations[2]
}
return arrayOfTranslations[1]
}
export const car = {
price_with_vat: 'bez DPH',
}
export const inputNames = {
make: ['značka', 'značky'],
model: ['model', 'modely'],
price: 'cena',
mileage: 'najeto',
body_type: 'karoserie',
}
export const inputSlider = {
unlimited: 'neomezeno',
}
export const units = {
currency: 'Kč',
mileage: 'Km',
}
export const widgetBasicFilter = {
tab_first: 'Vím, jaký vůz chci',
tab_second: 'Nechám si poradit',
button: number => `Zobrazit ${number} ${oneToFive(number, ['vůz', 'vozy', 'vozů'])}`,
buttonAdvancedSearch: 'Rozšířené vyhledávání',
}
export const widgetRecommendedModels = {
heading: 'Doporučené modely',
}
export const widgetCarsCarousel = {
heading: 'Doporučené vozy',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment