From 5a883d9816648ad5e08898872c98019e158b952d Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Tue, 15 Dec 2020 17:50:33 +0200 Subject: [PATCH] Various fixes to localization - #6516 #6523 #6524 --- .travis.yml | 2 +- lib/report_plugins/index.js | 22 +- lib/report_plugins/loopalyzer.js | 5 +- lib/report_plugins/weektoweek.js | 503 ++++++++++++++++--------------- translations/en/en.json | 20 ++ views/index.html | 8 +- 6 files changed, 290 insertions(+), 270 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78b056b8dbc4..c62652d2a136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,5 +26,5 @@ matrix: include: - node_js: "10" <<: *node_js-steps - - node_js: "12" # Latest Node is not supported, and recommend, but we'll test it to know incompatibility issues + - node_js: "12" <<: *node_js-steps diff --git a/lib/report_plugins/index.js b/lib/report_plugins/index.js index 7431754920cf..bc945d04f362 100644 --- a/lib/report_plugins/index.js +++ b/lib/report_plugins/index.js @@ -10,17 +10,17 @@ function init(ctx) { , ORDER_NEWESTONTOP: 1 } , allPlugins = [ - require('./daytoday')() - , require('./weektoweek')() - , require('./dailystats')() - , require('./glucosedistribution')() - , require('./hourlystats')() - , require('./percentile')() - , require('./success')() - , require('./calibrations')() - , require('./treatments')() - , require('./profiles')() - , require('./loopalyzer')() + require('./daytoday')(ctx) + , require('./weektoweek')(ctx) + , require('./dailystats')(ctx) + , require('./glucosedistribution')(ctx) + , require('./hourlystats')(ctx) + , require('./percentile')(ctx) + , require('./success')(ctx) + , require('./calibrations')(ctx) + , require('./treatments')(ctx) + , require('./profiles')(ctx) + , require('./loopalyzer')(ctx) ]; consts.scaleYFromSettings = function scaleYFromSettings (client) { diff --git a/lib/report_plugins/loopalyzer.js b/lib/report_plugins/loopalyzer.js index c37c58f635fc..61499c1ad102 100644 --- a/lib/report_plugins/loopalyzer.js +++ b/lib/report_plugins/loopalyzer.js @@ -28,15 +28,14 @@ loopalyzer.html = function html (client) { var ret = ''; ret += '

Loopalyzer  

'; ret += '' + translate('The primary purpose of Loopalyzer is to visualise how the Loop closed loop system performs. It may work with other setups as well, both closed and open loop, and non loop. However depending on which uploader you use, how frequent it is able to capture your data and upload, and how it is able to backfill missing data some graphs may have gaps or even be completely empty. Always ensure the graphs look reasonable. Best is to view one day at a time and scroll through a number of days first to see.'); - ret += '

' + translate('Loopalyzer includes a time shift feature. If you for example have breakfast at 07:00 one day and at 08:00 the day after your average blood glucose curve these two days will most likely look flattened and not show the actual response after a breakfast. Time shift will compute the average time these meals were eaten and then shift all data (carbs, insulin, basal etc.) during both days the corresponding time difference so that both meals align with the average meal start time. '); + ret += '

' + translate('Loopalyzer includes a time shift feature. If you for example have breakfast at 07:00 one day and at 08:00 the day after your average blood glucose curve these two days will most likely look flattened and not show the actual response after a breakfast. Time shift will compute the average time these meals were eaten and then shift all data (carbs, insulin, basal etc.) during both days the corresponding time difference so that both meals align with the average meal start time.'); ret += '
' + translate('In this example all data from first day is pushed 30 minutes forward in time and all data from second day 30 minutes backward in time so it appears as if you had had breakfast at 07:30 both days. This allows you to see your actual average blood glucose response from a meal.'); ret += '

' + translate('Time shift highlights the period after the average meal start time in gray, for the duration of the DIA (Duration of Insulin Action). As all data points the entire day are shifted the curves outside the gray area may not be accurate.'); ret += '

' + translate('Note that time shift is available only when viewing multiple days.'); ret += '

'; ret += translate('To see this report, press SHOW while in this view'); ret += '
'; - ret += ''; + ret += ''; ret += '