Skip to content

Commit 085590b

Browse files
authored
Merge pull request #8313 from nightscout/wip/bewest/collaborations
Wip/bewest/collaborations
2 parents 5b440b7 + 558927b commit 085590b

9 files changed

Lines changed: 647 additions & 624 deletions

File tree

lib/server/booterror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function bootError(env, ctx) {
2929
return '<dt><b>' + obj.desc + '</b></dt><dd>' + message.replace(/\\n/g, '<br/>') + '</dd>';
3030
}).join(' ');
3131

32-
res.render('error.html', {
32+
res.status(500).render('error.html', {
3333
errors,
3434
locals
3535
});

lib/server/loop.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,36 @@ function init (env, ctx) {
130130
notification.payload = payload;
131131
notification.interruptionLevel = "time-sensitive"
132132

133-
provider.send(notification, [loopSettings.deviceToken]).then( (response) => {
133+
provider.send(notification, [loopSettings.deviceToken]).then((response) => {
134134
if (response.sent && response.sent.length > 0) {
135135
completion();
136136
} else {
137-
console.log("APNs delivery failed:", response.failed)
138-
completion("APNs delivery failed: " + response.failed[0].response.reason);
137+
console.log("APNs delivery failed:", response.failed);
138+
139+
// Check if response.failed and response.failed[0] are defined
140+
if (response.failed && response.failed.length > 0) {
141+
const failedResponse = response.failed[0];
142+
const reason = failedResponse.response && failedResponse.response.reason
143+
? failedResponse.response.reason
144+
: 'Unknown reason';
145+
146+
// Provide detailed debugging information
147+
const errorMessage = `APNs delivery failed: ${reason}`;
148+
console.error(errorMessage, failedResponse);
149+
completion(errorMessage);
150+
} else {
151+
// Handle the case where response.failed is undefined or empty
152+
const errorMessage = 'APNs delivery failed: No failure details available.';
153+
console.error(errorMessage, response);
154+
completion(errorMessage);
155+
}
139156
}
157+
}).catch((error) => {
158+
// Catch any other unexpected errors
159+
console.error('Unexpected error during APNs delivery:', error);
160+
completion(`APNs delivery failed: ${error.message || 'Unknown error'}`);
140161
});
162+
141163
};
142164

143165
return loop();

translations/ar_SA.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,15 @@
329329
"Edit treatment": "تعديل المعالجة",
330330
"Duration": "المدة",
331331
"Duration in minutes": "المدة بالدقائق",
332-
"Temp Basal": "درجة الحرارة القاعدية",
333-
"Temp Basal Start": "بداية درجة الحرارة القاعدية",
334-
"Temp Basal End": "نهاية درجة الحرارة القاعدية",
332+
"Temp Basal": "الجرعة القاعدية المؤقتة",
333+
"Temp Basal Start": "بداية الجرعة القاعدية المؤقتة",
334+
"Temp Basal End": "نهاية الجرعة القاعدية المؤقتة",
335335
"Percent": "بالمائة",
336336
"Basal change in %": "التغيير الأساسي بالمائة",
337337
"Basal value": "القيمة الأساسية",
338338
"Absolute basal value": "القيمة الأساسية المطلقة",
339339
"Announcement": "إعلان",
340-
"Loading temp basal data": "تحميل درجة حرارة البيانات القاعدية",
340+
"Loading temp basal data": "جارٍ تحميل بيانات الجرعة القاعدية المؤقتة",
341341
"Save current record before changing to new?": "حفظ السجل الحالي قبل التغيير إلى جديد؟",
342342
"Profile Switch": "تبديل الملف الشخصي",
343343
"Profile": "الملف الشخصي",
@@ -413,8 +413,8 @@
413413
"Targets": "الأهداف",
414414
"Bolus insulin:": "جرعة أنسولين:",
415415
"Base basal insulin:": "الأنسولين القاعدي الأساسي:",
416-
"Positive temp basal insulin:": "الأنسولين القاعدي ذو درجة الحرارة الإيجابية:",
417-
"Negative temp basal insulin:": "الأنسولين القاعدي ذو درجة الحرارة السلبية:",
416+
"Positive temp basal insulin:": "الأنسولين القاعدي المؤقت الإيجابي:",
417+
"Negative temp basal insulin:": "الأنسولين القاعدي المؤقت السلبي:",
418418
"Total basal insulin:": "إجمالي الأنسولين القاعدي:",
419419
"Total daily insulin:": "إجمالي الأنسولين اليومي:",
420420
"Unable to save Role": "تعذر حفظ الدور",
@@ -452,10 +452,10 @@
452452
"Current Carb Ratio": "نسبة الكربوهيدرات الحالية",
453453
"Basal timezone": "المنطقة الزمنية القاعدية",
454454
"Active profile": "ملف نشط",
455-
"Active temp basal": "درجة الحرارة القاعدية النشطة",
456-
"Active temp basal start": "بداية درجة الحرارة القاعدية النشطة",
457-
"Active temp basal duration": "مدة درجة الحرارة القاعدية النشطة",
458-
"Active temp basal remaining": "درجة الحرارة القاعدية النشطة المتبقية",
455+
"Active temp basal": "الجرعة القاعدية المؤقتة النشطة",
456+
"Active temp basal start": "بداية الجرعة القاعدية المؤقتة النشطة",
457+
"Active temp basal duration": "مدة الجرعة القاعدية المؤقتة النشطة",
458+
"Active temp basal remaining": "الوقت المتبقي للجرعة القاعدية المؤقتة النشطة",
459459
"Basal profile value": "قيمة الملف القاعدي",
460460
"Active combo bolus": "جرعة تركيبة نشطة",
461461
"Active combo bolus start": "بداية جرعة تركيبة نشطة",
@@ -492,8 +492,8 @@
492492
"or adjust basal": "أو ضبط القاعدية",
493493
"Check BG using glucometer before correcting!": "-> تحقق من نسبة السكر في الدم باستخدام مقياس السكر قبل التصحيح!",
494494
"Basal reduction to account %1 units:": "التخفيض القاعدي لحساب%1 وحدة:",
495-
"30m temp basal": "30 متر من درجة الحرارة القاعدية",
496-
"1h temp basal": "ساعة واحدة من درجة الحرارة القاعدية",
495+
"30m temp basal": "جرعة قاعدية مؤقتة لمدة 30 دقيقة",
496+
"1h temp basal": "جرعة قاعدية مؤقتة لمدة ساعة واحدة",
497497
"Cannula change overdue!": "تغيير قنية متأخر!",
498498
"Time to change cannula": "ميعاد تغيير القنية الطبية",
499499
"Change cannula soon": "تغيير القنية الطبية قريبا",
@@ -578,7 +578,7 @@
578578
"virtAsstTitleDelta": "دلتا جلوكوز الدم",
579579
"virtAsstStatus": "%1 و%2 اعتبارًا من %3.",
580580
"virtAsstBasal": "%1 القاعدي الحالي هو %2 وحدة في الساعة",
581-
"virtAsstBasalTemp": "%1 درجة الحرارة القاعدية من %2 وحدة في الساعة ستنتهي %3",
581+
"virtAsstBasalTemp": "%1 جرعة قاعدية مؤقتة من %2 وحدة في الساعة ستنتهي %3",
582582
"virtAsstIob": "ولديك %1 من الأنسولين النشط.",
583583
"virtAsstIobIntent": "لديك %1 من الأنسولين النشط",
584584
"virtAsstIobUnits": "%1 وحدة من",
@@ -682,7 +682,7 @@
682682
"Previous day": "اليوم السابق",
683683
"Next day": "اليوم التالي",
684684
"Next": "التالي",
685-
"Temp basal delta": "درجة حرارة دلتا الأساسية",
685+
"Temp basal delta": "تغير الجرعة القاعدية المؤقتة",
686686
"Authorized by token": "مصرح به من قبل رمز",
687687
"Auth role": "دور المصادقة",
688688
"view without token": "عرض بدون رمز",

translations/es_ES.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"View all treatments": "Visualizar todos los tratamientos",
224224
"Enable Alarms": "Activar las alarmas",
225225
"Pump Battery Change": "Cambio batería bomba",
226-
"Pump Battery Age": "Edad de la batería en la bomba",
226+
"Pump Battery Age": "Edad de la batería de la bomba",
227227
"Pump Battery Low Alarm": "Alarma de Bomba Baja",
228228
"Pump Battery change overdue!": "Cambio de batería de bomba atrasado!",
229229
"When enabled an alarm may sound.": "Cuando estén activas, una alarma podrá sonar",
@@ -704,4 +704,5 @@
704704
"Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Detectada API_SECRET débil. Por favor, utilice una mezcla de letras en minúscula y en mayúscula, números y caracteres no alfanuméricos como !#%&/ para reducir el riesgo de acceso no autorizado. La longitud mínima de la API_SECRET es de 12 caracteres.",
705705
"less than 1": "menos de 1",
706706
"MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La contraseña de MongoDB y la API_SECRET coinciden. Esto es una muy mala idea. Por favor, cambie ambas contraseñas y no reutilice contraseñas en el sistema."
707+
"virtAsstLaunch":"¿Qué quieres saber de Nightscout?"
707708
}

translations/it_IT.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
"Move to the top": "Spostare verso l'alto",
103103
"Hidden": "Nascosto",
104104
"Hide after use": "Nascondi dopo l'uso",
105-
"Your API secret must be at least 12 characters long": "Il tuo API segreto deve essere lungo almeno 12 caratteri",
106-
"Bad API secret": "API segreto non corretto",
107-
"API secret hash stored": "Hash API segreto memorizzato",
105+
"Your API secret must be at least 12 characters long": "Il tuo \"API secret\" deve essere lungo almeno 12 caratteri",
106+
"Bad API secret": "\"API secret\" non corretto",
107+
"API secret hash stored": "Hash \"API secret\" memorizzato",
108108
"Status": "Stato",
109109
"Not loaded": "Non caricato",
110110
"Food Editor": "Database Alimenti",
@@ -115,8 +115,8 @@
115115
"Record": "Registro",
116116
"Quick picks": "Scelta rapida",
117117
"Show hidden": "Mostra nascosto",
118-
"Your API secret or token": "Il tuo API segreto o token",
119-
"Remember this device. (Do not enable this on public computers.)": "Ricorda questo dispositivo. (Da non abilitare su computer condivisi con altri.)",
118+
"Your API secret or token": "Il tuo token \"API secret\"",
119+
"Remember this device. (Do not enable this on public computers.)": "Ricorda questo dispositivo. (Da non abilitare su computer condivisi con altri)",
120120
"Treatments": "Somministrazioni",
121121
"Time": "Tempo",
122122
"Event Type": "Tipo di evento",
@@ -128,7 +128,7 @@
128128
"Event Time": "Ora Evento",
129129
"Please verify that the data entered is correct": "Verificare che i dati inseriti siano corretti",
130130
"BG": "Glicemie",
131-
"Use BG correction in calculation": "Utilizza la correzione delle Glicemia nel calcolo",
131+
"Use BG correction in calculation": "Utilizza la correzione delle Glicemie nel calcolo",
132132
"BG from CGM (autoupdated)": "Glicemie da sensore (aggiornamento automatico)",
133133
"BG from meter": "Glicemie da glucometro",
134134
"Manual BG": "Inserisci Glicemia",
@@ -424,7 +424,7 @@
424424
"admin, school, family, etc": "amministrazione, scuola, famiglia, etc",
425425
"Permissions": "Permessi",
426426
"Are you sure you want to delete: ": "Sei sicuro di voler eliminare:",
427-
"Each role will have a 1 or more permissions. The <em>*</em> permission is a wildcard, permissions are a hierarchy using <em>:</em> as a separator.": "Ogni ruolo avrà un 1 o più autorizzazioni. Il <em>*</em> il permesso è un jolly, i permessi sono una gerarchia utilizzando <em>:</em> come separatore.",
427+
"Each role will have a 1 or more permissions. The <em>*</em> permission is a wildcard, permissions are a hierarchy using <em>:</em> as a separator.": "Ogni ruolo avrà 1 o più autorizzazioni. Il permesso <em>*</em> è un jolly, i permessi sono una gerarchia utilizzando <em>:</em> come separatore.",
428428
"Add new Role": "Aggiungere un nuovo ruolo",
429429
"Roles - Groups of People, Devices, etc": "Ruoli - gruppi di persone, dispositivi, etc",
430430
"Edit this role": "Modifica questo ruolo",
@@ -470,7 +470,7 @@
470470
"Warning": "Avviso",
471471
"Info": "Informazioni",
472472
"Lowest": "Minore",
473-
"Snoozing high alarm since there is enough IOB": "Addormenta allarme alto poiché non vi è sufficiente Insulina attiva",
473+
"Snoozing high alarm since there is enough IOB": "Silenzia allarme alto poiché non vi è sufficiente Insulina attiva",
474474
"Check BG, time to bolus?": "Controllare Glicemia, ora di bolo?",
475475
"Notice": "Preavviso",
476476
"required info missing": "richiesta informazioni mancanti",
@@ -479,9 +479,9 @@
479479
"Expected effect": "Effetto Previsto",
480480
"Expected outcome": "Risultato previsto",
481481
"Carb Equivalent": "Carb equivalenti",
482-
"Excess insulin equivalent %1U more than needed to reach low target, not accounting for carbs": "L'eccesso d'insulina equivalente %1U più che necessari per raggiungere l'obiettivo basso, non rappresentano i carboidrati.",
483-
"Excess insulin equivalent %1U more than needed to reach low target, MAKE SURE IOB IS COVERED BY CARBS": "L' eccesso d'insulina equivale a %1U in più di quanto necessario per raggiungere l'obiettivo basso, ASSICURARSI CHE L'INSULINA ATTIVA SIA COPERTA DAI CARBOIDRATI",
484-
"%1U reduction needed in active insulin to reach low target, too much basal?": "Riduzione %1U necessaria dell'insulina attiva per raggiungere l'obiettivo basso, troppa basale?",
482+
"Excess insulin equivalent %1U more than needed to reach low target, not accounting for carbs": "Eccesso di insulina equivalente a %1U, più che necessaria per raggiungere l'obiettivo basso, non contando i carboidrati",
483+
"Excess insulin equivalent %1U more than needed to reach low target, MAKE SURE IOB IS COVERED BY CARBS": "Eccesso di insulina equivalente a %1U in più di quanto necessario per raggiungere l'obiettivo basso, ASSICURARSI CHE L'INSULINA ATTIVA SIA COPERTA DAI CARBOIDRATI",
484+
"%1U reduction needed in active insulin to reach low target, too much basal?": "Riduzione %1U necessaria all'insulina attiva per raggiungere l'obiettivo basso, troppa basale?",
485485
"basal adjustment out of range, give carbs?": "regolazione basale fuori intervallo, dare carboidrati?",
486486
"basal adjustment out of range, give bolus?": "regolazione basale fuori campo, dare bolo?",
487487
"above high": "sopra alto",
@@ -505,7 +505,7 @@
505505
"IAGE": "Età Insulina",
506506
"Insulin reservoir change overdue!": "Cambio serbatoio d'insulina in ritardo!",
507507
"Time to change insulin reservoir": "Momento di cambiare serbatoio d'insulina",
508-
"Change insulin reservoir soon": "Cambiare serbatoio d'insulina prossimamente",
508+
"Change insulin reservoir soon": "Cambiare serbatoio d'insulina a breve",
509509
"Insulin reservoir age %1 hours": "IAGE - Durata Serbatoio d'insulina %1 ore",
510510
"Changed": "Cambiato",
511511
"IOB": "Insulina Attiva",
@@ -521,7 +521,7 @@
521521
"RETRO": "RETRO",
522522
"SAGE": "Età Sensore",
523523
"Sensor change/restart overdue!": "Cambio/riavvio del sensore in ritardo!",
524-
"Time to change/restart sensor": "Tempo di cambiare/riavvio sensore",
524+
"Time to change/restart sensor": "Tempo di cambiare/riavviare sensore",
525525
"Change/restart sensor soon": "Modifica/riavvio sensore prossimamente",
526526
"Sensor age %1 days %2 hours": "Durata Sensore %1 giorni %2 ore",
527527
"Sensor Insert": "SAGE - inserimento sensore",
@@ -659,7 +659,7 @@
659659
"Admin messages in queue": "Messaggi di amministrazione in coda",
660660
"Queue empty": "Coda vuota",
661661
"There are no admin messages in queue": "Non ci sono messaggi di amministrazione in coda",
662-
"Please sign in using the API_SECRET to see your administration messages": "Effettua il login utilizzando API_SECRET per vedere i messaggi di amministrazione",
662+
"Please sign in using the API_SECRET to see your administration messages": "Effettua il login utilizzando \"API secret\" per vedere i messaggi di amministrazione",
663663
"Reads enabled in default permissions": "Letture abilitate nelle autorizzazioni predefinite",
664664
"Data reads enabled": "Lettura dati abilitata",
665665
"Data writes enabled": "Scrittura dati abilitata",
@@ -701,7 +701,7 @@
701701
"minutes": "minuti",
702702
"Last recorded %1 %2 ago.": "Ultima registrazione %1 %2 fa.",
703703
"Security issue": "Problema di sicurezza",
704-
"Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Rilevata API_SECRET debole. Si prega di utilizzare lettere minuscole e maiuscole, numeri e caratteri non alfanumerici come !#%&/ per ridurre il rischio di accesso non autorizzato. La lunghezza minima dell'API_SECRET è di 12 caratteri.",
704+
"Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Rilevata \"API secret\" debole. Si prega di utilizzare lettere minuscole e maiuscole, numeri e caratteri non alfanumerici come !#%&/ per ridurre il rischio di accesso non autorizzato. La lunghezza minima dell'API_SECRET è di 12 caratteri.",
705705
"less than 1": "meno di 1",
706-
"MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La password di MongoDB e API_SECRET coincidono. Questa è una cattiva idea. Cambiale entrambe e non riutilizzare le password in tutto il sistema."
706+
"MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La password di MongoDB e \"API secret\" coincidono. Questa è una cattiva idea. Cambiale entrambe e non riutilizzare le password in tutto il sistema."
707707
}

translations/pt_PT.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"Pump Battery Age": "Idade Bateria da Bomba",
227227
"Pump Battery Low Alarm": "Alarme de Bateria Fraca da Bomba",
228228
"Pump Battery change overdue!": "Troca de Bateria da Bomba atrasada!",
229-
"When enabled an alarm may sound.": "Quando activado um alarme pode soar.",
229+
"When enabled an alarm may sound.": "Quando ativado um alarme pode soar.",
230230
"Urgent High Alarm": "Alarme Muito Alto",
231231
"High Alarm": "Alarme Hiper",
232232
"Low Alarm": "Alarme Hipo",

translations/ru_RU.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
"Loading profile switch data": "Загрузка данных нового профиля",
403403
"Redirecting you to the Profile Editor to create a new profile.": "Переход к редактору профиля для создания нового",
404404
"Pump": "Помпа",
405-
"Sensor Age": "Сенсору",
405+
"Sensor Age": "Сенсор проработал",
406406
"Insulin Age": "Инсулину",
407407
"Temporary target": "Временная цель",
408408
"Reason": "Основание",
@@ -519,11 +519,11 @@
519519
"%1h ago": "%1 час назад",
520520
"%1d ago": "%1d назад",
521521
"RETRO": "ПРОШЛОЕ",
522-
"SAGE": "Сенсор работает",
522+
"SAGE": "СЕНСОРУ",
523523
"Sensor change/restart overdue!": "Рестарт сенсора пропущен",
524524
"Time to change/restart sensor": "Время замены/рестарта сенсора",
525525
"Change/restart sensor soon": "Приближается срок замены/рестарта сенсора",
526-
"Sensor age %1 days %2 hours": "Сенсору %1 дн %2 час",
526+
"Sensor age %1 days %2 hours": "Сенсор отработал %1 дн %2 час",
527527
"Sensor Insert": "Сенсор установлен",
528528
"Sensor Start": "Старт сенсора",
529529
"days": "дней",

translations/tr_TR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,8 @@
557557
"virtAsstUnknown": "Bu değer şu anda bilinmiyor. Daha fazla ayrıntı için lütfen Nightscout sitenize bakın.",
558558
"virtAsstTitleAR2Forecast": "AR2 Tahmini",
559559
"virtAsstTitleCurrentBasal": "Geçerli Bazal",
560-
"virtAsstTitleCurrentCOB": "Geçerli AKRB",
561-
"virtAsstTitleCurrentIOB": "Geçerli AİNS",
560+
"virtAsstTitleCurrentCOB": "Mevcut AKRB",
561+
"virtAsstTitleCurrentIOB": "Mevcut AİNS",
562562
"virtAsstTitleLaunch": "Nightscout'a hoş geldiniz",
563563
"virtAsstTitleLoopForecast": "Döngü Tahmini",
564564
"virtAsstTitleLastLoop": "Son Döngü",

0 commit comments

Comments
 (0)