From c92194dd56b847d9643e000c981d5a91ee6d9f1a Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Wed, 6 Nov 2019 19:13:16 +1030 Subject: [PATCH] Give option to go english only --- config/baseSchema.json | 4 ++++ locales/it.json | 3 ++- routes/index.js | 2 +- views/layouts/layout.hbs | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/baseSchema.json b/config/baseSchema.json index 3a2aced..498fe55 100644 --- a/config/baseSchema.json +++ b/config/baseSchema.json @@ -115,6 +115,10 @@ }, "defaultLocale": { "type": "string" + }, + "enableLanguages": { + "type": "boolean", + "default": true } }, "required": [ diff --git a/locales/it.json b/locales/it.json index 1ead5f5..4a7f080 100644 --- a/locales/it.json +++ b/locales/it.json @@ -161,5 +161,6 @@ "Leave a comment?": "Lascia un commento?", "Cart contents": "Contenuto del carrello", "Shipping": "Spedizione:", - "Empty cart": "Svuota carrello" + "Empty cart": "Svuota carrello", + "Payment ID": "Payment ID" } \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index ec5bae5..9faa208 100644 --- a/routes/index.js +++ b/routes/index.js @@ -615,7 +615,7 @@ router.get('/:page?', async (req, res, next) => { message: clearSessionValue(req.session, 'message'), messageType: clearSessionValue(req.session, 'messageType'), pageCloseBtn: showCartCloseBtn('page'), - config: req.app.config, + config, productsPerPage: numberProducts, totalProductCount: results.totalProducts, pageNum: 1, diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index 08cdfd0..f401cf3 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -103,6 +103,7 @@