translations done

This commit is contained in:
ruchi 2021-04-08 18:40:26 -04:00
parent c98523772a
commit 10f081a8fe
4 changed files with 78 additions and 23 deletions

View file

@ -52,7 +52,22 @@
"Contact-Submit": "Submit", "Contact-Submit": "Submit",
"Contact-Error1": "Please select an item in the list.", "Contact-Error1": "Please select an item in the list.",
"Contact-Error2": "Please fill out this field.", "Contact-Error2": "Please fill out this field.",
"Contact-Error3": "Invalid email address." "Contact-Error3": "Invalid email address.",
"Search-Bar":"Search your location",
"Budget":"Select Budget",
"Beds": "Number of Beds",
"Baths": "Number of Beds",
"Any": "Any",
"Listing-Button": "Show Listing",
"FULL_DESCRIPTION_ENG":"RUN DON'T WALK to this beautiful former Jayman show home. This home has every feature and convenience you could want in a home. When you enter you will be greeted with a large entry way, open concept main floor with a very spacious chef-like kitchen, the big eat in dinning area is an entertainers dream and plenty of room in the living room as to cozy up to the fireplace. When you head upstairs the owner 's suite will impress with a gorgeous ensuite consisting of a large soaker tub, oversized shower, separate vanities, in-floor heating and 2 separate closest. You will also find a nice sized flex room, spacious laundry room up stairs, 4 piece main bathroom and 2 more bedrooms. Then head downstairs where you will find another bedroom, bathroom and Theatre room with wet bar and beverage station that is perfect for any movie lover. Must not forget that this home is air conditioned, has front and back irrigation outside and speakers throughout the house. All of this can be yours in the lake community of Auburn Bay close to all amenities and year round lake access just a short distance away",
"listing_desc": "{{desc}}",
"listing_address": "{{address}}"

View file

@ -52,5 +52,21 @@
"Contact-Submit": "Soumettre", "Contact-Submit": "Soumettre",
"Contact-Error1": "Veuillez sélectionner un élément dans la liste.", "Contact-Error1": "Veuillez sélectionner un élément dans la liste.",
"Contact-Error2": "Veuillez remplir ce champ.", "Contact-Error2": "Veuillez remplir ce champ.",
"Contact-Error3": "Adresse e-mail invalide." "Contact-Error3": "Adresse e-mail invalide.",
"Search-Bar": "Rechercher",
"Budget":"Sélectionnez Budget",
"Beds": "Nombre de lits",
"Baths": "Nombre de bains",
"Any": "quelconque",
"Listing-Button": "Afficher la liste",
"listing_desc": "{{desc}}",
"listing_address": "{{address}}"
} }

View file

@ -26,8 +26,9 @@ import * as listingData from "./data/property-data.json";
import "./ListingsPage.css"; import "./ListingsPage.css";
import compassImg from "./compass.svg"; import compassImg from "./compass.svg";
import { withTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import Cookies from "js-cookie";
import i18next from "i18next";
const libraries = ["places"]; const libraries = ["places"];
@ -47,6 +48,10 @@ const center = {
}; };
export default function ListingsPage() { export default function ListingsPage() {
const {t} = useTranslation();
const price_filter = [ const price_filter = [
{ {
value: null, value: null,
@ -77,15 +82,15 @@ export default function ListingsPage() {
}, },
{ {
value: 1, value: 1,
label: "One Bed", label: "1",
}, },
{ {
value: 2, value: 2,
label: "Two Beds", label: "2",
}, },
{ {
value: 3, value: 3,
label: "Three Beds", label: "3",
} }
]; ];
@ -97,20 +102,21 @@ export default function ListingsPage() {
}, },
{ {
value: 1, value: 1,
label: "One Bath", label: "1",
}, },
{ {
value: 2, value: 2,
label: "Two Baths", label: "2",
}, },
{ {
value: 3, value: 3,
label: "Three Baths", label: "3",
} }
]; ];
//console.log(data1[0]); //console.log(data1[0]);
const { isLoaded, loadError } = useLoadScript({ const { isLoaded, loadError } = useLoadScript({
googleMapsApiKey: `https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key= googleMapsApiKey: `https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=
AIzaSyC5TiZoTEwEcB_HUZRhe_rXrcSWW1Z5x8I`, AIzaSyC5TiZoTEwEcB_HUZRhe_rXrcSWW1Z5x8I`,
@ -159,7 +165,7 @@ export default function ListingsPage() {
setBath(e.value); setBath(e.value);
}; };
const { t } = this.props;
return ( return (
<div className="main_borders"> <div className="main_borders">
@ -170,7 +176,7 @@ export default function ListingsPage() {
<Select <Select
class="search" class="search"
placeholder="Select Budget" placeholder={t("Budget")}
value={selectedBudget} // set selected value value={selectedBudget} // set selected value
options={price_filter} // set list of the data options={price_filter} // set list of the data
onChange={handleBudgetChange} // assign onChange function onChange={handleBudgetChange} // assign onChange function
@ -178,7 +184,7 @@ export default function ListingsPage() {
<Select <Select
class="search" class="search"
placeholder="# Beds" placeholder={t("Beds")}
value={selectedBeds} // set selected value value={selectedBeds} // set selected value
options={bed_filter} // set list of the data options={bed_filter} // set list of the data
onChange={handleBedChange} // assign onChange function onChange={handleBedChange} // assign onChange function
@ -186,7 +192,7 @@ export default function ListingsPage() {
<Select <Select
class="search" class="search"
placeholder="# Baths" placeholder={t("Baths")}
value={selectedBaths} // set selected value value={selectedBaths} // set selected value
options={bath_filter} // set list of the data options={bath_filter} // set list of the data
onChange={handleBathChange} // assign onChange function onChange={handleBathChange} // assign onChange function
@ -253,8 +259,11 @@ export default function ListingsPage() {
}} }}
> >
<div> <div>
<h2>{selected.ADDRESS}</h2> <h2>{Cookies.get("i18next") === "en"? i18next.t("listing_address", {address:selected.ADDRESS_ENG}): i18next.t("listing_address", {address:selected.ADDRESS_FR})}</h2>
<p> {selected.DESC}</p>
<p> {Cookies.get("i18next") === "en"? i18next.t("listing_desc", {desc:selected.DESCRIPTION_ENG}): i18next.t("listing_desc", {desc:selected.DESCRIPTION_FR})}</p>
<div> <div>
<div class="row"> <div class="row">
<div className="col-6"> <div className="col-6">
@ -265,8 +274,8 @@ export default function ListingsPage() {
</div> </div>
<div className="col-6 booking_button"> <div className="col-6 booking_button">
<button onClick={() => { window.location.href='/listing-page-'+selected.LISTING_ID <button type="button" class="btn btn-outline-primary" onClick={() => { window.location.href='/listing-page-'+selected.LISTING_ID
}}>Show Listing</button> }}>{t("Listing-Button")}</button>
</div> </div>
</div> </div>
</div> </div>
@ -336,6 +345,8 @@ function Search({ panTo }) {
} }
}; };
const {t} = useTranslation()
return ( return (
<div className="search"> <div className="search">
<Combobox onSelect={handleSelect}> <Combobox onSelect={handleSelect}>
@ -343,7 +354,7 @@ function Search({ panTo }) {
value={value} value={value}
onChange={handleInput} onChange={handleInput}
disabled={!ready} disabled={!ready}
placeholder="Search your location" placeholder= {t("Search-Bar")}
/> />
<ComboboxPopover> <ComboboxPopover>
<ComboboxList> <ComboboxList>

View file

@ -4,7 +4,8 @@
{ {
"LISTING_ID": 1, "LISTING_ID": 1,
"ADDRESS": "8720 Russell Road", "ADDRESS_ENG": "8720 Russell Road",
"ADDRESS_FR":"8720, Chemin Russell",
"PRICE": 400000, "PRICE": 400000,
"BEDS":3, "BEDS":3,
"BATHS":3, "BATHS":3,
@ -16,6 +17,8 @@
], ],
"DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.", "DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.",
"FULL_DESCRIPTION": "RUN DON'T WALK to this beautiful former Jayman show home. This home has every feature and convenience you could want in a home. When you enter you will be greeted with a large entry way, open concept main floor with a very spacious chef-like kitchen, the big eat in dinning area is an entertainers dream and plenty of room in the living room as to cozy up to the fireplace. When you head upstairs the owner 's suite will impress with a gorgeous ensuite consisting of a large soaker tub, oversized shower, separate vanities, in-floor heating and 2 separate closest. You will also find a nice sized flex room, spacious laundry room up stairs, 4 piece main bathroom and 2 more bedrooms. Then head downstairs where you will find another bedroom, bathroom and Theatre room with wet bar and beverage station that is perfect for any movie lover. Must not forget that this home is air conditioned, has front and back irrigation outside and speakers throughout the house. All of this can be yours in the lake community of Auburn Bay close to all amenities and year round lake access just a short distance away", "FULL_DESCRIPTION": "RUN DON'T WALK to this beautiful former Jayman show home. This home has every feature and convenience you could want in a home. When you enter you will be greeted with a large entry way, open concept main floor with a very spacious chef-like kitchen, the big eat in dinning area is an entertainers dream and plenty of room in the living room as to cozy up to the fireplace. When you head upstairs the owner 's suite will impress with a gorgeous ensuite consisting of a large soaker tub, oversized shower, separate vanities, in-floor heating and 2 separate closest. You will also find a nice sized flex room, spacious laundry room up stairs, 4 piece main bathroom and 2 more bedrooms. Then head downstairs where you will find another bedroom, bathroom and Theatre room with wet bar and beverage station that is perfect for any movie lover. Must not forget that this home is air conditioned, has front and back irrigation outside and speakers throughout the house. All of this can be yours in the lake community of Auburn Bay close to all amenities and year round lake access just a short distance away",
"DESCRIPTION_ENG": "This home has every feature and convenience you could want in a home. When you head upstairs the owners suite will impress with a gorgeous ensuite consisting of a large soaker tub, oversized shower, separate vanities, in-floor heating and 2 separate closest. ",
"DESCRIPTION_FR": "Cette maison a toutes les caractéristiques et commodités que vous pourriez souhaiter dans une maison. Lorsque vous montez à l'étage, la suite des propriétaires impressionnera avec une magnifique salle de bains comprenant une grande baignoire, une douche surdimensionnée, des vanités séparées, le chauffage au sol et 2 séparés plus proches.",
"FOR_SALE": true, "FOR_SALE": true,
"coordinates": [-75.3372987731628, 45.383321536272049], "coordinates": [-75.3372987731628, 45.383321536272049],
"BEDROOM": "2", "BEDROOM": "2",
@ -27,7 +30,8 @@
{ {
"LISTING_ID": 2, "LISTING_ID": 2,
"ADDRESS": "1490 Youville Drive", "ADDRESS_ENG": "1490 Youville Drive",
"ADDRESS_FR":"1490, Promenade Youville",
"PRICE": 100000, "PRICE": 100000,
"BEDS":1, "BEDS":1,
"BATHS":1, "BATHS":1,
@ -39,6 +43,8 @@
], ],
"DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.", "DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.",
"FULL_DESCRIPTION": "Nature at its Finest The Shores of Toney Bay are located at the mouth of River Phillip where it meets the Northumberland Straight with direct access to the incredible recreational waterways of River Phillip and nature rich Toney Bay. This nature lovers paradise boasts a plethora of migratory bird life and the rich fish stock of River Philip. The warm waters of the Northumberland Straight are swimmable from your shorefront, easy access to year-around activities and close proximity to the quaint community of Pugwash make this an ideal spot for a permeant residence or cottage. There are also ocean view / deeded access lots available. Large lots with unobstructed views and well away from highway noise. Swim in the warm waters at beautiful Heather's Beach just 4km away, fly fishing in the spring on River Phillip, book at tee time at Northumberland links, 16km away or enjoy a day at the Luxury Fox Harb'r Resort and Spa less then 30 mins away, and in winter enjoy skiing at Ski Wentworth a short 30 minutes drive. Lots are flat, cleared and ready for your dream home. All septic and building lot approvals are in place, good roads, and power to the lot line are included. Please take a few minutes to watch the video of the stunning Shores at Toney Bay", "FULL_DESCRIPTION": "Nature at its Finest The Shores of Toney Bay are located at the mouth of River Phillip where it meets the Northumberland Straight with direct access to the incredible recreational waterways of River Phillip and nature rich Toney Bay. This nature lovers paradise boasts a plethora of migratory bird life and the rich fish stock of River Philip. The warm waters of the Northumberland Straight are swimmable from your shorefront, easy access to year-around activities and close proximity to the quaint community of Pugwash make this an ideal spot for a permeant residence or cottage. There are also ocean view / deeded access lots available. Large lots with unobstructed views and well away from highway noise. Swim in the warm waters at beautiful Heather's Beach just 4km away, fly fishing in the spring on River Phillip, book at tee time at Northumberland links, 16km away or enjoy a day at the Luxury Fox Harb'r Resort and Spa less then 30 mins away, and in winter enjoy skiing at Ski Wentworth a short 30 minutes drive. Lots are flat, cleared and ready for your dream home. All septic and building lot approvals are in place, good roads, and power to the lot line are included. Please take a few minutes to watch the video of the stunning Shores at Toney Bay",
"DESCRIPTION_ENG": "This nature lovers paradise boasts a plethora of migratory bird life and the rich fish stock of River Philip. Swim in the warm waters at beautiful Heather's Beach just 4km away, fly fishing in the spring on River Phillip, book at tee time at Northumberland links, 16km away or enjoy a day at the Luxury Fox Harb'r Resort and Spa less then 30 mins away, and in winter enjoy skiing at Ski Wentworth a short 30 minutes drive.",
"DESCRIPTION_FR": "Ce paradis des amoureux de la nature possède une pléthore d'oiseaux migrateurs et le riche stock de poissons de la rivière Philip. Nagez dans les eaux chaudes de la magnifique plage de Heather à seulement 4 km, pêchez à la mouche au printemps sur la rivière Phillip, réservez à l'heure du départ à Northumberland links, à 16 km ou profitez d'une journée au Luxury Fox Harb'r Resort and Spa à moins de 30 minutes loin, et en hiver, profitez du ski à Ski Wentworth à 30 minutes en voiture.",
"FOR_SALE": true, "FOR_SALE": true,
"coordinates": [-75.546518086577947, 45.467134581917357], "coordinates": [-75.546518086577947, 45.467134581917357],
"BEDROOM": "7", "BEDROOM": "7",
@ -52,7 +58,9 @@
{ {
"LISTING_ID": 3, "LISTING_ID": 3,
"ADDRESS": "100 Charlie Rogers Place", "ADDRESS_ENG": "100 Charlie Rogers Place",
"ADDRESS_FR":"100, Place Charlie Rogers",
"PRICE": 200000, "PRICE": 200000,
"BEDS":2, "BEDS":2,
"BATHS":3, "BATHS":3,
@ -64,6 +72,8 @@
], ],
"DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.", "DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.",
"FULL_DESCRIPTION": "Custom, Hi-Ranch home located in sought after neighborhood in the Heart of Petawawa. This home features 2+1 bedrooms and 4 bathrooms. Main level features spacious foyer, hardwood staircase, gleaming hardwood floors and open concept living. Large windows provide lots of natural light, vaulted ceilings in living room, a spectacular spacious kitchen with stainless steel appliances and large island. Master bedroom with walk through closet and 3 piece en-suite with custom tile shower and heated tile floor. Lower level features a finished rec room with cozy gas fireplace, bedroom and 3 piece bathroom. Patio door in foyer leads to large private backyard with no rear neighbours, spacious wood deck and hot tub. Double attached garage completes the package. Pack your backs and move right in! No Conveyances of offers until Friday April 9th at 3PM however the seller has the right to view and may accept pre-emptive offers", "FULL_DESCRIPTION": "Custom, Hi-Ranch home located in sought after neighborhood in the Heart of Petawawa. This home features 2+1 bedrooms and 4 bathrooms. Main level features spacious foyer, hardwood staircase, gleaming hardwood floors and open concept living. Large windows provide lots of natural light, vaulted ceilings in living room, a spectacular spacious kitchen with stainless steel appliances and large island. Master bedroom with walk through closet and 3 piece en-suite with custom tile shower and heated tile floor. Lower level features a finished rec room with cozy gas fireplace, bedroom and 3 piece bathroom. Patio door in foyer leads to large private backyard with no rear neighbours, spacious wood deck and hot tub. Double attached garage completes the package. Pack your backs and move right in! No Conveyances of offers until Friday April 9th at 3PM however the seller has the right to view and may accept pre-emptive offers",
"DESCRIPTION_ENG": "Main level features spacious foyer, hardwood staircase, gleaming hardwood floors and open concept living. ",
"DESCRIPTION_FR": "Le niveau principal comprend un hall d'entrée spacieux, un escalier en bois franc, des planchers de bois franc étincelants et un salon à aire ouverte.",
"FOR_SALE": true, "FOR_SALE": true,
"coordinates": [-75.898610599532319, 45.295014379864874], "coordinates": [-75.898610599532319, 45.295014379864874],
"BEDROOM": "2", "BEDROOM": "2",
@ -77,7 +87,8 @@
{ {
"LISTING_ID": 4, "LISTING_ID": 4,
"ADDRESS": "2785 8th Line Road", "ADDRESS_ENG": "2785 8th Line Road",
"ADDRESS_FR": "2785, Chemin 8th Line",
"PRICE": 300000, "PRICE": 300000,
"BEDS":3, "BEDS":3,
"BATHS":3, "BATHS":3,
@ -89,6 +100,8 @@
], ],
"DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.", "DESC":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.",
"FULL_DESCRIPTION": "Nestled in a quiet cul-de-sac in the family-friendly Ski Club/Widdifield neighbourhood, is 62 Riddle Court, a hidden gem that has everything you've been searching for - inside and out! Look up and take in the picturesque views of the escarpment, take a short walk or drive to the Laurentian Ski Hill with the family, or simply savour your very own property by having dinner on the patio, a glass of wine on the deck/balcony, and admire the breathtaking landscape (designed by an award-winning landscape artist) that wraps around your home. Lush perennials, tall grasses, interlocking brick pathways, in-ground sprinkler system and outdoor lighting make this property standout from the rest! Step inside to relish in all of the updated features this home has to offer - gleaming maple hardwood floors & stairs, updated maple kitchen cabinets, ceramic tile with in-floor radiant heat in bathrooms and office, built-in entertainment units, finished laundry room, low-maintenance composite deck off dining area, recessed lighting, updated windows, doors, insulation... the list goes on! Working from home these days? Enter the private & professional home office right off the recreation room through french doors. Enjoy the under-cabinet lighting, as well as the natural light beaming through the window with views of the backyard. Pride of ownership is obvious. Nothing left to do, but move-in! Pre-inspected for your peace of mind.", "FULL_DESCRIPTION": "Nestled in a quiet cul-de-sac in the family-friendly Ski Club/Widdifield neighbourhood, is 62 Riddle Court, a hidden gem that has everything you've been searching for - inside and out! Look up and take in the picturesque views of the escarpment, take a short walk or drive to the Laurentian Ski Hill with the family, or simply savour your very own property by having dinner on the patio, a glass of wine on the deck/balcony, and admire the breathtaking landscape (designed by an award-winning landscape artist) that wraps around your home. Lush perennials, tall grasses, interlocking brick pathways, in-ground sprinkler system and outdoor lighting make this property standout from the rest! Step inside to relish in all of the updated features this home has to offer - gleaming maple hardwood floors & stairs, updated maple kitchen cabinets, ceramic tile with in-floor radiant heat in bathrooms and office, built-in entertainment units, finished laundry room, low-maintenance composite deck off dining area, recessed lighting, updated windows, doors, insulation... the list goes on! Working from home these days? Enter the private & professional home office right off the recreation room through french doors. Enjoy the under-cabinet lighting, as well as the natural light beaming through the window with views of the backyard. Pride of ownership is obvious. Nothing left to do, but move-in! Pre-inspected for your peace of mind.",
"DESCRIPTION_ENG": "A hidden gem that has everything you've been searching for - inside and out! Look up and take in the picturesque views of the escarpment, take a short walk or drive to the Laurentian Ski Hill with the family, or simply savour your very own property by having dinner on the patio.",
"DESCRIPTION_FR": "Un joyau caché qui a tout ce que vous cherchiez - à l'intérieur comme à l'extérieur! Levez les yeux et admirez les vues pittoresques de l'escarpement, faites une courte promenade ou conduisez jusqu'à la station de ski des Laurentides en famille, ou savourez simplement votre propriété en dînant sur la terrasse.",
"FOR_SALE": true, "FOR_SALE": true,
"coordinates": [-75.468561642270757, 45.23032561834377], "coordinates": [-75.468561642270757, 45.23032561834377],
"BEDROOM": "4", "BEDROOM": "4",