diff --git a/app.js b/app.js index 950609e..f4cae71 100644 --- a/app.js +++ b/app.js @@ -50,11 +50,11 @@ app.use('*', async (req, res) => { } // If daily vaccinations informed - if (day.daily_vaccinations != null) { + if (day.daily_vaccinations_raw != null) { // Insert dates array dates_daily.push(new String(`"` + day.date + `"`)); // Insert daily vaccinations array - daily.push(new String(`"` + day.daily_vaccinations + `"`)); + daily.push(new String(`"` + day.daily_vaccinations_raw + `"`)); } }); @@ -70,7 +70,7 @@ app.use('*', async (req, res) => { last_people = data.reduce((a, b) => ((b.date > a.date) && (b.people_vaccinated_per_hundred != null)) ? b : a).people_vaccinated_per_hundred; // Last - Daily vaccinations - last_daily = data.reduce((a, b) => ((b.date > a.date) && (b.daily_vaccinations != null)) ? b : a).daily_vaccinations; + last_daily = data.reduce((a, b) => ((b.date > a.date) && (b.daily_vaccinations_raw != null)) ? b : a).daily_vaccinations_raw; // Render Index with Spain data res.render('index.ejs', { diff --git a/public/texts.json b/public/texts.json new file mode 100644 index 0000000..cba5629 --- /dev/null +++ b/public/texts.json @@ -0,0 +1,46 @@ +{ + "title": { + "es": "Vacunación Covid-19 España", + "en": "Spain Covid-19 Vaccination" + }, + "fully_hundred": { + "es": "Personas totalmente vacunadas por cada 100", + "en": "People fully vaccinated per hundred" + }, + "people_hundred": { + "es": "Personas vacunadas por cada 100", + "en": "People vaccinated per hundred" + }, + "daily": { + "es": "Vacunación diaria de Covid-19 en España", + "en": "Spain Covid-19 daily vaccinations" + }, + "last_update": { + "es": "Última actualización: ", + "en": "Last update: " + }, + "card_fully": { + "es": "Personas totalmente vacunadas: ", + "en": "People fully vaccinated: " + }, + "card_people": { + "es": "Personas vacunadas: ", + "en": "People vaccinated: " + }, + "card_daily": { + "es": "Vacunaciones diarias: ", + "en": "Daily vaccinations: " + }, + "language": { + "es": "Idioma", + "en": "Language" + }, + "spanish": { + "es": "Español", + "en": "Spanish" + }, + "english": { + "es": "Inglés", + "en": "English" + } +} diff --git a/views/index.ejs b/views/index.ejs index 0b848c6..1adaa3d 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -7,7 +7,7 @@ -