Skip to content

Commit

Permalink
* Update Finnish localization
Browse files Browse the repository at this point in the history
* Change SMB visualization to be more friendly
* Add BG Clock to navigation
* Updated release version
  • Loading branch information
sulkaharo committed Dec 1, 2017
1 parent 8dd4d42 commit 26dd858
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nightscout",
"version": "0.10.2-release-20171128",
"version": "0.10.2-release-20171201",
"dependencies": {
"colorbrewer": "~1.0.0",
"jQuery-Storage-API": "~1.7.2",
Expand Down
2 changes: 1 addition & 1 deletion lib/client/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ function init (client, d3) {
.style('fill', 'white');

// reduce the treatment label font size to make it readable with SMB
var fontBaseSize = (opts.treatments >= 50) ? 40 : 50 - Math.floor((60-opts.treatments)/50 * 10);
var fontBaseSize = (opts.treatments >= 30) ? 40 : 50 - Math.floor((25-opts.treatments)/30 * 10);

label.append('text')
.style('font-size', fontBaseSize / opts.scale)
Expand Down
39 changes: 23 additions & 16 deletions lib/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -10320,7 +10320,7 @@ function init() {
, el: 'slightly dropping'
, en: 'slightly dropping'
, es: 'slightly dropping'
, fi: 'slightly dropping'
, fi: 'laskee hitaasti'
, fr: 'slightly dropping'
, he: 'slightly dropping'
, hr: 'slightly dropping'
Expand All @@ -10345,7 +10345,7 @@ function init() {
, el: 'slightly rising'
, en: 'slightly rising'
, es: 'slightly rising'
, fi: 'slightly rising'
, fi: 'nousee hitaasti'
, fr: 'slightly rising'
, he: 'slightly rising'
, hr: 'slightly rising'
Expand All @@ -10370,7 +10370,7 @@ function init() {
, el: 'holding'
, en: 'holding'
, es: 'holding'
, fi: 'holding'
, fi: 'tasainen'
, fr: 'holding'
, he: 'holding'
, hr: 'holding'
Expand All @@ -10395,7 +10395,7 @@ function init() {
, el: 'rising'
, en: 'rising'
, es: 'rising'
, fi: 'rising'
, fi: 'nousussa'
, fr: 'rising'
, he: 'rising'
, hr: 'rising'
Expand All @@ -10420,7 +10420,7 @@ function init() {
, el: 'dropping'
, en: 'dropping'
, es: 'dropping'
, fi: 'dropping'
, fi: 'laskussa'
, fr: 'dropping'
, he: 'dropping'
, hr: 'dropping'
Expand All @@ -10445,7 +10445,7 @@ function init() {
, el: 'rapidly dropping'
, en: 'rapidly dropping'
, es: 'rapidly dropping'
, fi: 'rapidly dropping'
, fi: 'laskee nopeasti'
, fr: 'rapidly dropping'
, he: 'rapidly dropping'
, hr: 'rapidly dropping'
Expand All @@ -10470,7 +10470,7 @@ function init() {
, el: 'rapidly rising'
, en: 'rapidly rising'
, es: 'rapidly rising'
, fi: 'rapidly rising'
, fi: 'nousee nopeasti'
, fr: 'rapidly rising'
, he: 'rapidly rising'
, hr: 'rapidly rising'
Expand All @@ -10495,7 +10495,7 @@ function init() {
, el: '%1 and %2 as of %3.'
, en: '%1 and %2 as of %3.'
, es: '%1 and %2 as of %3.'
, fi: '%1 and %2 as of %3.'
, fi: '%1 ja %2 alkaen %3.'
, fr: '%1 and %2 as of %3.'
, he: '%1 and %2 as of %3.'
, hr: '%1 and %2 as of %3.'
Expand All @@ -10520,7 +10520,7 @@ function init() {
, el: '%1 current basal is %2 units per hour'
, en: '%1 current basal is %2 units per hour'
, es: '%1 current basal is %2 units per hour'
, fi: '%1 current basal is %2 units per hour'
, fi: '%1 nykyinen basaali on %2 yksikköä tunnissa'
, fr: '%1 current basal is %2 units per hour'
, he: '%1 current basal is %2 units per hour'
, hr: '%1 current basal is %2 units per hour'
Expand All @@ -10545,7 +10545,7 @@ function init() {
, el: '%1 temp basal of %2 units per hour will end %3'
, en: '%1 temp basal of %2 units per hour will end %3'
, es: '%1 temp basal of %2 units per hour will end %3'
, fi: '%1 temp basal of %2 units per hour will end %3'
, fi: '%1 tilapäinen basaali on %2 tunnissa, päättyy %3'
, fr: '%1 temp basal of %2 units per hour will end %3'
, he: '%1 temp basal of %2 units per hour will end %3'
, hr: '%1 temp basal of %2 units per hour will end %3'
Expand All @@ -10570,7 +10570,7 @@ function init() {
, el: 'and you have %1 insulin on board.'
, en: 'and you have %1 insulin on board.'
, es: 'and you have %1 insulin on board.'
, fi: 'and you have %1 insulin on board.'
, fi: 'ja sinulla on %1 aktivista insuliinia.'
, fr: 'and you have %1 insulin on board.'
, he: 'and you have %1 insulin on board.'
, hr: 'and you have %1 insulin on board.'
Expand All @@ -10595,7 +10595,7 @@ function init() {
, el: 'You have %1 insulin on board'
, en: 'You have %1 insulin on board'
, es: 'You have %1 insulin on board'
, fi: 'You have %1 insulin on board'
, fi: 'Sinulla on %1 aktiivista insuliinia'
, fr: 'You have %1 insulin on board'
, he: 'You have %1 insulin on board'
, hr: 'You have %1 insulin on board'
Expand All @@ -10620,7 +10620,7 @@ function init() {
, el: '%1 units of'
, en: '%1 units of'
, es: '%1 units of'
, fi: '%1 units of'
, fi: '%1 yksikköä'
, fr: '%1 units of'
, he: '%1 units of'
, hr: '%1 units of'
Expand All @@ -10644,7 +10644,7 @@ function init() {
, el: 'Your'
, en: 'Your'
, es: 'Your'
, fi: 'Your'
, fi: 'Sinun'
, fr: 'Your'
, he: 'Your'
, hr: 'Your'
Expand All @@ -10668,7 +10668,7 @@ function init() {
, el: '%1 has a '
, en: '%1 has a '
, es: '%1 has a '
, fi: '%1 has a '
, fi: '%1 on '
, fr: '%1 has a '
, he: '%1 has a '
, hr: '%1 has a '
Expand All @@ -10692,7 +10692,7 @@ function init() {
, el: 'no'
, en: 'no'
, es: 'no'
, fi: 'no'
, fi: 'ei'
, fr: 'no'
, he: 'no'
, hr: 'no'
Expand All @@ -10711,14 +10711,21 @@ function init() {
'Fat [g]': {
cs: 'Tuk [g]'
,de: 'Fett [g]'
,fi: 'Rasva [g]'
},
'Protein [g]': {
cs: 'Proteiny [g]'
,de: 'Proteine [g]'
,fi: 'Proteiini [g]'
},
'Energy [kJ]': {
cs: 'Energie [kJ]'
,de: 'Energie [kJ]'
, fi: 'Energia [kJ]'
}
,
'Clock View': {
fi: 'Kellonäkymä'
}

};
Expand Down
19 changes: 9 additions & 10 deletions lib/report_plugins/glucosedistribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,11 @@ glucosedistribution.report = function report_glucosedistribution(datastorage, so
GVITotal += Math.sqrt(25 + Math.pow(delta, 2));
glucoseTotal += entry.bgValue;

var x = entry.bgValue;
var rangeMin = options.targetLow;
var rangeMax = options.targetHigh;
if (x < rangeMin) {
RMSTotal += Math.pow(rangeMin - x, 2);
if (entry.bgValue < options.targetLow) {
RMSTotal += Math.pow(options.targetLow - entry.bgValue, 2);
}
if (x > rangeMax) {
RMSTotal += Math.pow(x - rangeMax, 2);
if (entry.bgValue > options.targetHigh) {
RMSTotal += Math.pow(entry.bgValue - options.targetHigh, 2);
}

}
Expand Down Expand Up @@ -426,12 +423,14 @@ glucosedistribution.report = function report_glucosedistribution(datastorage, so
TDC = TDC / 18.0;
TDCHourly = TDCHourly / 18.0;
unitString = ' mmol/L';

RMS = Math.sqrt(RMSTotal / events) / 18;

}

TDC = Math.round(TDC * 100) / 100;
TDCHourly = Math.round(TDCHourly * 100) / 100;


var stabilitytable = $('<table style="width: 100%;">');

var t1exp = '>5 mg/dl/5m';
Expand All @@ -448,8 +447,8 @@ glucosedistribution.report = function report_glucosedistribution(datastorage, so
$('<tr><th>' + translate('Mean Hourly Change') + '</th><th>GVI</th><th>PGS</th></tr>').appendTo(stabilitytable);
$('<tr><td class="tdborder">' + TDCHourly + unitString + '</td><td class="tdborder">' + GVI + '</td><td class="tdborder">' + PGS + '</td></tr>').appendTo(stabilitytable);

$('<tr><th>Out of Range RMS</th></tr>').appendTo(stabilitytable);
$('<tr><td class="tdborder">' + Math.round(RMS * 100) / 100 + unitString + '</td></tr>').appendTo(stabilitytable);
// $('<tr><th>Out of Range RMS</th></tr>').appendTo(stabilitytable);
// $('<tr><td class="tdborder">' + Math.round(RMS * 100) / 100 + unitString + '</td></tr>').appendTo(stabilitytable);

stabilitytable.appendTo(stability);

Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Nightscout",
"version": "0.10.2-release-20171128",
"version": "0.10.2-release-20171201",
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
"license": "AGPL-3.0",
"author": "Nightscout Team",
Expand Down
1 change: 1 addition & 0 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<li class="profilecontrol"><a id="editprofilelink" href="profile" target="profileeditor" class="translate">Profile Editor</a></li>
<li class="foodcontrol"><a id="editfoodlink" href="food" target="foodeditor" class="translate">Food Editor</a></li>
<li><a id="admintoolslink" href="admin" target="admintools" class="translate">Admin Tools</a></li>
<li><a id="clocklink" href="bgclock.html" target="admintools" class="translate">Clock View</a></li>
</ul>
<fieldset class="browserSettings">
<legend class="translate icon-cog">Settings</legend>
Expand Down

0 comments on commit 26dd858

Please sign in to comment.