Просмотр исходного кода

Merge branch 'dev' into alpha

# Conflicts:
#	FreeAPS/Sources/APS/CGM/CGMType.swift
#	FreeAPS/Sources/APS/FetchGlucoseManager.swift
Ivan Valkou 4 лет назад
Родитель
Сommit
efa1f0019f
55 измененных файлов с 1251 добавлено и 556 удалено
  1. 1 1
      Dependencies/LoopKit/LoopKit/de.lproj/Localizable.strings
  2. 3 3
      Dependencies/LoopKit/LoopKitUI/de.lproj/Localizable.strings
  3. 7 7
      Dependencies/rileylink_ios/OmniKitUI/it.lproj/Localizable.strings
  4. 6 0
      FreeAPS/Resources/Base.lproj/InfoPlist.strings
  5. 1 0
      FreeAPS/Resources/Info.plist
  6. 6 0
      FreeAPS/Resources/ar.lproj/InfoPlist.strings
  7. 6 0
      FreeAPS/Resources/ca.lproj/InfoPlist.strings
  8. 6 0
      FreeAPS/Resources/da.lproj/InfoPlist.strings
  9. 6 0
      FreeAPS/Resources/de.lproj/InfoPlist.strings
  10. 6 0
      FreeAPS/Resources/es.lproj/InfoPlist.strings
  11. 6 0
      FreeAPS/Resources/fi.lproj/InfoPlist.strings
  12. 6 0
      FreeAPS/Resources/fr.lproj/InfoPlist.strings
  13. 6 0
      FreeAPS/Resources/he.lproj/InfoPlist.strings
  14. 7 1
      FreeAPS/Resources/it.lproj/InfoPlist.strings
  15. 6 0
      FreeAPS/Resources/nb.lproj/InfoPlist.strings
  16. 6 0
      FreeAPS/Resources/nl.lproj/InfoPlist.strings
  17. 6 0
      FreeAPS/Resources/pl.lproj/InfoPlist.strings
  18. 6 0
      FreeAPS/Resources/pt-BR.lproj/InfoPlist.strings
  19. 6 0
      FreeAPS/Resources/ru.lproj/InfoPlist.strings
  20. 6 0
      FreeAPS/Resources/sk.lproj/InfoPlist.strings
  21. 6 0
      FreeAPS/Resources/sv.lproj/InfoPlist.strings
  22. 6 0
      FreeAPS/Resources/tr.lproj/InfoPlist.strings
  23. 6 0
      FreeAPS/Resources/uk.lproj/InfoPlist.strings
  24. 6 0
      FreeAPS/Resources/zh-Hans.lproj/InfoPlist.strings
  25. 37 0
      FreeAPS/Sources/APS/CGM/CGMType.swift
  26. 1 0
      FreeAPS/Sources/APS/CGM/DexcomSource.swift
  27. 1 1
      FreeAPS/Sources/APS/CGM/GlucoseSimulatorSource.swift
  28. 1 0
      FreeAPS/Sources/APS/CGM/LibreTransmitterSource.swift
  29. 13 8
      FreeAPS/Sources/APS/FetchGlucoseManager.swift
  30. 3 20
      FreeAPS/Sources/APS/Storage/GlucoseStorage.swift
  31. 16 11
      FreeAPS/Sources/Localizations/Main/ar.lproj/Localizable.strings
  32. 16 11
      FreeAPS/Sources/Localizations/Main/ca.lproj/Localizable.strings
  33. 16 11
      FreeAPS/Sources/Localizations/Main/da.lproj/Localizable.strings
  34. 69 64
      FreeAPS/Sources/Localizations/Main/de.lproj/Localizable.strings
  35. 15 20
      FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings
  36. 16 11
      FreeAPS/Sources/Localizations/Main/es.lproj/Localizable.strings
  37. 16 11
      FreeAPS/Sources/Localizations/Main/fi.lproj/Localizable.strings
  38. 16 11
      FreeAPS/Sources/Localizations/Main/fr.lproj/Localizable.strings
  39. 16 11
      FreeAPS/Sources/Localizations/Main/he.lproj/Localizable.strings
  40. 57 53
      FreeAPS/Sources/Localizations/Main/it.lproj/Localizable.strings
  41. 39 34
      FreeAPS/Sources/Localizations/Main/nb.lproj/Localizable.strings
  42. 16 11
      FreeAPS/Sources/Localizations/Main/nl.lproj/Localizable.strings
  43. 16 11
      FreeAPS/Sources/Localizations/Main/pl.lproj/Localizable.strings
  44. 16 11
      FreeAPS/Sources/Localizations/Main/pt-BR.lproj/Localizable.strings
  45. 591 140
      FreeAPS/Sources/Localizations/Main/pt-PT.lproj/Localizable.strings
  46. 16 20
      FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings
  47. 16 11
      FreeAPS/Sources/Localizations/Main/sk.lproj/Localizable.strings
  48. 18 13
      FreeAPS/Sources/Localizations/Main/sv.lproj/Localizable.strings
  49. 20 15
      FreeAPS/Sources/Localizations/Main/tr.lproj/Localizable.strings
  50. 16 11
      FreeAPS/Sources/Localizations/Main/uk.lproj/Localizable.strings
  51. 16 11
      FreeAPS/Sources/Localizations/Main/zh-Hans.lproj/Localizable.strings
  52. 10 2
      FreeAPS/Sources/Modules/CGM/View/CGMRootView.swift
  53. 1 1
      FreeAPS/Sources/Modules/HealthKit/HealthKitStateModel.swift
  54. 17 10
      FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift
  55. 1 0
      FreeAPSWatch WatchKit Extension/ComplicationController.swift

+ 1 - 1
Dependencies/LoopKit/LoopKit/de.lproj/Localizable.strings

@@ -53,7 +53,7 @@
 "mg/dL/U" = "mg/dL/IE";
 
 /* The short unit display string for millimoles per liter */
-"mmol/L" = "mmol/L";
+"mmol/L" = "mmol/l";
 
 /* The short unit display string for millimoles per liter per U */
 "mmol/L/U" = "mmol/L/IE";

+ 3 - 3
Dependencies/LoopKit/LoopKitUI/de.lproj/Localizable.strings

@@ -78,7 +78,7 @@
 "com.loudnate.InsulinKit.totalDateLabel" = "seit %1$@";
 
 /* The title of the action used to dismiss an error alert */
-"com.loudnate.LoopKit.errorAlertActionTitle" = "OK";
+"com.loudnate.LoopKit.errorAlertActionTitle" = "Ok";
 
 /* The title for the override emoji condition section */
 "Condition" = "Bedingung";
@@ -141,7 +141,7 @@
 "Medium" = "Mittlere";
 
 /* Placeholder for minimum value in glucose range */
-"min" = "min";
+"min" = "minimal";
 
 /* Alert action title to open error help */
 "More Info" = "Weitere Info";
@@ -166,7 +166,7 @@
 "Override presets can be set up under the 'Configuration' section of the settings screen." = "Voreinstellungen der Overrides können im Abschnitt Konfiguration des Einstellungsbildschirms eingerichtet werden.";
 
 /* The section title of glucose overrides */
-"Overrides" = "Overrides";
+"Overrides" = "Zeitliche Anpassungen";
 
 /* Title for the pre-meal override range */
 "Pre-Meal" = "Vor dem Essen";

+ 7 - 7
Dependencies/rileylink_ios/OmniKitUI/it.lproj/Localizable.strings

@@ -72,7 +72,7 @@
 "Configuration" = "Configurazione";
 
 /* The title of the Insulin Type */
-"Insulin Type" = "Insulin Type";
+"Insulin Type" = "Tipo di Insulina";
 
 /* The title of the continue action in an action sheet */
 "Continue" = "Continua";
@@ -106,16 +106,16 @@
 "Error enabling bolus beeps" = "Errore durante l’attivazione dei bip bolo";
 
 /* The alert title for enable Confirmation Beeps */
-"Enable Confirmation Beeps" = "Enable Confirmation Beeps";
+"Enable Confirmation Beeps" = "Abilita Bip di Conferma";
 
 /* The alert title for Disable Confirmation Beep */
-"Disable Confirmation Beeps" = "Disable Confirmation Beeps";
+"Disable Confirmation Beeps" = "Disabilita Bip di Conferma";
 
 /* The alert title for enable Automatic Bolus Beeps */
-"Enable Automatic Bolus Beeps" = "Enable Automatic Bolus Beeps";
+"Enable Automatic Bolus Beeps" = "Abilita Bip Automatici di Bolus";
 
 /* The alert title for Disable Automatic Bolus Beeps */
-"Disable Automatic Bolus Beeps" = "Disable Automatic Bolus Beeps";
+"Disable Automatic Bolus Beeps" = "Disabilita Bip Automatici di Bolus";
 
 /* The alert title for a resume error */
 "Error Resuming" = "Errore durante la ripresa";
@@ -249,13 +249,13 @@
 "Unknown" = "Sconosciuto";
 
 /* The title of the diagnostics section in settings */
-"Diagnostics" = "Diagnostics";
+"Diagnostics" = "Diagnostica";
 
 /* The diagnostic command Read Pod Status */
 "Read Pod Status" = "Read Pod Status";
 
 /* The diagnostic command Read Pulse Log */
-"Read Pulse Log" = "Read Pulse Log";
+"Read Pulse Log" = "Leggi Registro Battiti";
 
 /* The title of the pod details section in settings */
 "Pod Details" = "Pod Details";

+ 6 - 0
FreeAPS/Resources/Base.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 1 - 0
FreeAPS/Resources/Info.plist

@@ -40,6 +40,7 @@
 		<string>dexcomcgm</string>
 		<string>diabox</string>
 		<string>spikeapp</string>
+		<string>libredirect</string>
 	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>

+ 6 - 0
FreeAPS/Resources/ar.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/ca.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/da.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/de.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "BZ Werte als Kalendartermin: Jeder neue CGM-Blutzuckerwert wird als momentaner Kalendartermin gespeichert, damit er auf der Apple Watch in real-time aufgefrischt wird.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Die Health App wird zur Speicherung von Blutzuckerdaten verwendet";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Die Health App wird zur Speicherung von Blutzuckerdaten verwendet";

+ 6 - 0
FreeAPS/Resources/es.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/fi.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/fr.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/he.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 7 - 1
FreeAPS/Resources/it.lproj/InfoPlist.strings

@@ -1,5 +1,5 @@
 /* Privacy - NFC Scan Usage Description */
-"NFCReaderUsageDescription" = "NFC is used to scan Libre sensors.";
+"NFCReaderUsageDescription" = "NFC è usato per scansionare i sensori di Libre.";
 
 /* Privacy - Bluetooth Always Usage Description */
 "NSBluetoothAlwaysUsageDescription" = "Bluetooth is used to communicate with insulin pump and continuous glucose monitor devices";
@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/nb.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Kalender brukes til å opprette nye blodsukker-oppføringer.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Helseappen brukes til å lagre blodsukkerdata";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Helseappen brukes til å lagre blodsukkerdata";

+ 6 - 0
FreeAPS/Resources/nl.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/pl.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/pt-BR.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/ru.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Календарь используется для создания новых событий о глюкозе.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Приложение Здоровье используется для хранения данных о глюкозе в крови";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Приложение Здоровье используется для хранения данных о глюкозе в крови";

+ 6 - 0
FreeAPS/Resources/sk.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/sv.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Kalendern används för att skapa kalenderhändelser för glukosvärden.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Appen Hälsa används för att lagra blodsockervärden etc.";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Appen Hälsa används för att lagra blodsockervärden etc.";

+ 6 - 0
FreeAPS/Resources/tr.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Takvim, yeni bir glikoz olayı oluşturmak için kullanılır.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health Uygulaması, KŞ verilerini depolamak için kullanılır";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health Uygulaması, KŞ verilerini depolamak için kullanılır";

+ 6 - 0
FreeAPS/Resources/uk.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Для створення нових подій глюкози використовується календар.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 6 - 0
FreeAPS/Resources/zh-Hans.lproj/InfoPlist.strings

@@ -12,3 +12,9 @@
 
 /* Privacy - Calendars Usage Description */
 "NSCalendarsUsageDescription" = "Calendar is used to create a new glucose events.";
+
+/* Privacy - Health Update Usage Description */
+"NSHealthUpdateUsageDescription" = "Health App is used to store blood glucose data";
+
+/* Privacy - Health Share Usage Description */
+"NSHealthShareUsageDescription" = "Health App is used to store blood glucose data";

+ 37 - 0
FreeAPS/Sources/APS/CGM/CGMType.swift

@@ -9,6 +9,7 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
     case dexcomG5
     case simulator
     case libreTransmitter
+    case glucoseDirect
     case enlite
 
     var displayName: String {
@@ -17,6 +18,8 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
             return "Nightscout"
         case .xdrip:
             return "xDrip"
+        case .glucoseDirect:
+            return "Glucose Direct"
         case .dexcomG6:
             return "Dexcom G6"
         case .dexcomG5:
@@ -37,6 +40,8 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
             return nil
         case .xdrip:
             return URL(string: "xdripswift://")!
+        case .glucoseDirect:
+            return URL(string: "libredirect://")!
         case .dexcomG6:
             return URL(string: "dexcomg6://")!
         case .dexcomG5:
@@ -47,4 +52,36 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
             return URL(string: "freeaps-x://libre-transmitter")!
         }
     }
+
+    var externalLink: URL? {
+        switch self {
+        case .xdrip:
+            return URL(string: "https://github.com/JohanDegraeve/xdripswift")!
+        case .glucoseDirect:
+            return URL(string: "https://github.com/creepymonster/GlucoseDirectApp")!
+        default: return nil
+        }
+    }
+
+    var subtitle: String {
+        switch self {
+        case .nightscout:
+            return NSLocalizedString("Online or internal server", comment: "Online or internal server")
+        case .xdrip:
+            return NSLocalizedString("Shared app group", comment: "Shared app group")
+        case .dexcomG6:
+            return NSLocalizedString("Native G6 app", comment: "Native G6 app")
+        case .dexcomG5:
+            return NSLocalizedString("Native G5 app", comment: "Native G5 app")
+        case .simulator:
+            return NSLocalizedString("Simple simulator", comment: "Simple simulator")
+        case .libreTransmitter:
+            return NSLocalizedString(
+                "Direct connection with Libre 1 transmitters or Libre 2",
+                comment: "Direct connection with Libre 1 transmitters or Libre 2"
+            )
+        case .glucoseDirect:
+            return NSLocalizedString("Shared app group", comment: "Shared app group")
+        }
+    }
 }

+ 1 - 0
FreeAPS/Sources/APS/CGM/DexcomSource.swift

@@ -26,6 +26,7 @@ final class DexcomSource: GlucoseSource {
         }
         .timeout(60, scheduler: processQueue, options: nil, customError: nil)
         .replaceError(with: [])
+        .replaceEmpty(with: [])
         .eraseToAnyPublisher()
     }
 

+ 1 - 1
FreeAPS/Sources/APS/CGM/GlucoseSimulatorSource.swift

@@ -65,7 +65,7 @@ final class GlucoseSimulatorSource: GlucoseSource {
 
     func fetch() -> AnyPublisher<[BloodGlucose], Never> {
         guard canGenerateNewValues else {
-            return Empty().eraseToAnyPublisher()
+            return Just([]).eraseToAnyPublisher()
         }
 
         let glucoses = generator.getBloodGlucoses(

+ 1 - 0
FreeAPS/Sources/APS/CGM/LibreTransmitterSource.swift

@@ -39,6 +39,7 @@ final class BaseLibreTransmitterSource: LibreTransmitterSource, Injectable {
         }
         .timeout(60, scheduler: processQueue, options: nil, customError: nil)
         .replaceError(with: [])
+        .replaceEmpty(with: [])
         .eraseToAnyPublisher()
     }
 

+ 13 - 8
FreeAPS/Sources/APS/FetchGlucoseManager.swift

@@ -43,6 +43,8 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
             glucoseSource = simulatorSource
         case .libreTransmitter:
             glucoseSource = libreTransmitter
+        case .glucoseDirect:
+            glucoseSource = appGroupSource
         case .enlite:
             glucoseSource = deviceDataManager
         }
@@ -55,28 +57,31 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
     private func subscribe() {
         timer.publisher
             .receive(on: processQueue)
-            .flatMap { date -> AnyPublisher<(Date, Date, [BloodGlucose]), Never> in
+            .flatMap { date -> AnyPublisher<(Date, Date, [BloodGlucose], [BloodGlucose]), Never> in
                 debug(.nightscout, "FetchGlucoseManager heartbeat")
                 debug(.nightscout, "Start fetching glucose")
                 self.updateGlucoseSource()
-                return Publishers.CombineLatest3(
+                return Publishers.CombineLatest4(
                     Just(date),
                     Just(self.glucoseStorage.syncDate()),
-                    self.glucoseSource.fetch().merge(with: self.healthKitManager.fetch())
-                        .eraseToAnyPublisher()
+                    self.glucoseSource.fetch(),
+                    self.healthKitManager.fetch()
                 )
                 .eraseToAnyPublisher()
             }
-            .sink { date, syncDate, glucose in
+            .sink { date, syncDate, glucose, glucoseFromHealth in
                 // Because of Spike dosn't respect a date query
-                let filteredByDate = glucose.filter { $0.dateString > syncDate }
+                let filteredByDate = (glucose + glucoseFromHealth).filter { $0.dateString > syncDate }
                 let filtered = self.glucoseStorage.filterTooFrequentGlucose(filteredByDate, at: syncDate)
-                if !filtered.isEmpty {
+                if filtered.isNotEmpty {
                     debug(.nightscout, "New glucose found")
                     self.glucoseStorage.storeGlucose(filtered)
                     self.apsManager.heartbeat(date: date, force: false)
                     self.nightscoutManager.uploadGlucose()
-                    self.healthKitManager.save(bloodGlucoses: filtered, completion: nil)
+                    let glucoseForHealth = filteredByDate.filter { !glucoseFromHealth.contains($0) }
+                    if glucoseForHealth.isNotEmpty {
+                        self.healthKitManager.save(bloodGlucoses: glucoseForHealth, completion: nil)
+                    }
                 }
             }
             .store(in: &lifetime)

+ 3 - 20
FreeAPS/Sources/APS/Storage/GlucoseStorage.swift

@@ -4,8 +4,7 @@ import Swinject
 
 protocol GlucoseStorage {
     func storeGlucose(_ glucose: [BloodGlucose])
-    func removeGlucose(byID id: String)
-    func removeGlucose(byIDCollection ids: [String])
+    func removeGlucose(ids: [String])
     func recent() -> [BloodGlucose]
     func syncDate() -> Date
     func filterTooFrequentGlucose(_ glucose: [BloodGlucose], at: Date) -> [BloodGlucose]
@@ -50,29 +49,13 @@ final class BaseGlucoseStorage: GlucoseStorage, Injectable {
         }
     }
 
-    func removeGlucose(byIDCollection ids: [String]) {
+    func removeGlucose(ids: [String]) {
         processQueue.sync {
             let file = OpenAPS.Monitor.glucose
             self.storage.transaction { storage in
                 let bgInStorage = storage.retrieve(file, as: [BloodGlucose].self)
                 let filteredBG = bgInStorage?.filter { !ids.contains($0.id) } ?? []
-                storage.save(filteredBG, as: file)
-
-                DispatchQueue.main.async {
-                    self.broadcaster.notify(GlucoseObserver.self, on: .main) {
-                        $0.glucoseDidUpdate(filteredBG.reversed())
-                    }
-                }
-            }
-        }
-    }
-
-    func removeGlucose(byID id: String) {
-        processQueue.sync {
-            let file = OpenAPS.Monitor.glucose
-            self.storage.transaction { storage in
-                let bgInStorage = storage.retrieve(file, as: [BloodGlucose].self)
-                let filteredBG = bgInStorage?.filter { $0.id != id } ?? []
+                guard bgInStorage != filteredBG else { return }
                 storage.save(filteredBG, as: file)
 
                 DispatchQueue.main.async {

+ 16 - 11
FreeAPS/Sources/Localizations/Main/ar.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/ca.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/da.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

Разница между файлами не показана из-за своего большого размера
+ 69 - 64
FreeAPS/Sources/Localizations/Main/de.lproj/Localizable.strings


+ 15 - 20
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -2,7 +2,7 @@
   Localizable.strings
   FreeAPS X
 */
-
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
@@ -411,8 +411,8 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
-
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process"= "About the Process";
 
 /* */
@@ -670,7 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
-    
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -858,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -869,14 +864,23 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
 
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+*/
 /*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
@@ -993,12 +997,3 @@ Enact a temp Basal or a temp target */
 
 /* "Noisy CGM Target Multiplier" */
 "Defaults to 1.3. Increase target by this amount when looping off raw/noisy CGM data" = "Defaults to 1.3. Increase target by this amount when looping off raw/noisy CGM data";
-
-/* */
-"Apple Health" = "Apple Health";
-
-/* */
-"Connect to Apple Health" = "Connect to Apple Health";
-
-/* Show when have not permissions for writing to Health */
-"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";

+ 16 - 11
FreeAPS/Sources/Localizations/Main/es.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Añadir insulinar sin administrar bolo";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/fi.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/fr.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Ajouter de l'insuline sans bolus";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/he.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

Разница между файлами не показана из-за своего большого размера
+ 57 - 53
FreeAPS/Sources/Localizations/Main/it.lproj/Localizable.strings


+ 39 - 34
FreeAPS/Sources/Localizations/Main/nb.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Legg til insulin uten å gi bolus";
 
 /* Add insulin from source outside of pump */
@@ -26,7 +26,7 @@
 "Insulin recommended" = "Anbefalt insulindose";
 
 /*  */
-"Insulin required" = "Insulinbehov";
+"Insulin required" = "insulinReq";
 
 /* Bolus screen */
 "Recommendation" = "Anbefaling";
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Midlertidige mål";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Konfigurer Libre-sender";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Fjern alle";
 
 /* */
-"Calibrations" = "Kalibreringer";
-
-/* */
 "About the Process" = "Om prosessen";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Slett CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Er du sikker på at du vil fjerne denne CGM-en?";
 
@@ -785,81 +783,79 @@ Enact a temp Basal or a temp target */
 "snooze from testview clicked" = "trykket på slumre fra testvisning";
 
 /* */
-"will snooze for %@ until %@" = "will snooze for %@ until %@";
+"will snooze for %@ until %@" = "vil slumre i %@ til %@";
 
 /* */
-"Click to Snooze Alerts" = "Click to Snooze Alerts";
+"Click to Snooze Alerts" = "Klikk for å slumre varslinger";
 
 /* */
-"Strength" = "Strength";
+"Strength" = "Styrke";
 
 /* */
-"Hold the top of your iPhone near the sensor to pair" = "Hold the top of your iPhone near the sensor to pair";
+"Hold the top of your iPhone near the sensor to pair" = "Hold den øverste delen av telefonen nær sensoren for å parkoble";
 
 /* */
 "Sensor not found" = "Sensor ikke funnet";
 
 /* */
-"Also play alert sound" = "Also play alert sound";
+"Also play alert sound" = "Spill også alarmlyd";
 
 /* */
-"Notification Settings" = "Notification Settings";
+"Notification Settings" = "Varslingsinnstillinger";
 
 /* */
 "Found devices: %d" = "Fant enheter: %d";
 
 /* */
-"Backfill options" = "Backfill options";
+"Backfill options" = "Alternativer for etterfylling";
 
 /* */
-"Backfilling from trend is currently not well supported by Loop" = "Backfilling from trend is currently not well supported by Loop";
+"Backfilling from trend is currently not well supported by Loop" = "Etterfylling av data fra trenden er for øyeblikket ikke støttet av Loop";
 
 /* */
-"Backfill from history" = "Backfill from history";
+"Backfill from history" = "Etterfylling fra historikk";
 
 /* */
-"Backfill from trend" = "Backfill from trend";
+"Backfill from trend" = "Etterfylling fra trend";
 
 /* */
-"Debug options" = "Debug options";
+"Debug options" = "Alternativ for feilsøking";
 
 /* */
-"Adds a lot of data to the Issue Report " = "Adds a lot of data to the Issue Report ";
+"Adds a lot of data to the Issue Report " = "Legger til en rekke data i Hendelsesrapport ";
 
 /* */
-"Persist sensordata" = "Persist sensordata";
+"Persist sensordata" = "Vedvarende sensordata";
 
 /* */
-"Battery" = "Battery";
+"Battery" = "Batteri";
 
 /* */
-"Also add source info" = "Also add source info";
+"Also add source info" = "Legg også til kildeinfo";
 
 /* */
-"Carbs Required Threshold" = "Carbs Required Threshold";
+"Carbs Required Threshold" = "Terskel for karbo nødvendig";
 
 /* */
-"Carbs required: %d g" = "Carbs required: %d g";
+"Carbs required: %d g" = "Karbo nødvendig: %d g";
 
 /* */
-"To prevent LOW required %d g of carbs" = "To prevent LOW required %d g of carbs";
+"To prevent LOW required %d g of carbs" = "For å forhindre lavt blodsukker: %d g karbo nødvendig";
 
 /* */
-"FreeAPS X not active" = "FreeAPS X not active";
+"FreeAPS X not active" = "FreeAPS X ikke aktiv";
 
 /* */
-"Last loop was more then %d min ago" = "Last loop was more then %d min ago";
+"Last loop was more then %d min ago" = "Siste loop var mer enn %d min siden";
 
 /* Glucose badge */
-"Show glucose on the app badge" = "Show glucose on the app badge";
+"Show glucose on the app badge" = "Vis blodsukker på app-ikonet";
 
 /* */
-"Backfill glucose" = "Backfill glucose";
-
-
-/* Headers for settings ------------------- */
+"Backfill glucose" = "Tilbakefyll blodsukker";
 
 
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS hovedinnstillinger";
 
 "OpenAPS SMB settings" = "OpenAPS SMB innstillinger";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS andre innstillinger";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Blodsukker-simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/nl.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Insuline toevoegen zonder daadwerkelijke bolus";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/pl.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -413,9 +413,9 @@ Połączono z Nightscout!";
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -485,9 +485,6 @@ Połączono z Nightscout!";
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -672,6 +669,7 @@ Połączono z Nightscout!";
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -859,9 +857,7 @@ Połączono z Nightscout!";
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -870,15 +866,24 @@ Połączono z Nightscout!";
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/pt-BR.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Adicionar insulina sem tomar bolus";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

Разница между файлами не показана из-за своего большого размера
+ 591 - 140
FreeAPS/Sources/Localizations/Main/pt-PT.lproj/Localizable.strings


+ 16 - 20
FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Добавить инсулин без болюса";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Временные цели";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Настроить Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Удалить все";
 
 /* */
-"Calibrations" = "Калибровки";
-
-/* */
 "About the Process" = "О процессе";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Удалить CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Вы уверены, что хотите удалить этот CGM?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Скачать глюкозу";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "Основные настройки OpenAPS";
 
 "OpenAPS SMB settings" = "Настройки OpenAPS SMB";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "Другие настройки OpenAPS";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Симулятор глюкозы";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth состояние восстановлено (APS перезапущен?). Найдено %d периферийных устройств и подключено к %@ с идентификатором %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Подключить к Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "Чтобы записывать данные в Apple Health вам необходимо дать соответствующие разрешения, перейдя к меню Настройки > Здоровье > Доступ к данным";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */
@@ -992,12 +997,3 @@ Enact a temp Basal or a temp target */
 
 /* "Noisy CGM Target Multiplier" */
 "Defaults to 1.3. Increase target by this amount when looping off raw/noisy CGM data" = "По умолчанию 1,3. Увеличивает цель на эту величину, когда цикл отключается из за шума сенсора";
-
-/* */
-"Apple Health" = "Apple Health";
-
-/* */
-"Connect to Apple Health" = "Подключить к Apple Health";
-
-/* Show when have not permissions for writing to Health */
-"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "Чтобы записывать данные в Apple Health вам необходимо дать соответствующие разрешения, перейдя к меню Настройки > Здоровье > Доступ к данным";

+ 16 - 11
FreeAPS/Sources/Localizations/Main/sk.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Add insulin without actually bolusing";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 18 - 13
FreeAPS/Sources/Localizations/Main/sv.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Lägg till insulin utan att ge bolus";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Målvärden";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Ställ in en Libre-sändare";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Ta bort alla";
 
 /* */
-"Calibrations" = "Kalibreringar";
-
-/* */
 "About the Process" = "Om processen";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Radera CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Är du säker på att du vill ta bort denna CGM från FreeAPS X?";
 
@@ -842,7 +840,7 @@ Enact a temp Basal or a temp target */
 "Carbs required: %d g" = "Kolhydrater som krävs: %d g";
 
 /* */
-"To prevent LOW required %d g of carbs" = "För att förhindra lågt blodsocker krävs %d g kolhydrater";
+"To prevent LOW required %d g of carbs" = "För att förhindra ett lågt blodsocker krävs uppskattningsvis %d g kolhydrater";
 
 /* */
 "FreeAPS X not active" = "FreeAPS X är inte aktiv";
@@ -854,12 +852,10 @@ Enact a temp Basal or a temp target */
 "Show glucose on the app badge" = "Visa glukosvärde på app-ikon";
 
 /* */
-"Backfill glucose" = "Backfill glucose";
-
-
-/* Headers for settings ------------------- */
+"Backfill glucose" = "Återfyll glukosvärden";
 
 
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS huvudsakliga inställningar";
 
 "OpenAPS SMB settings" = "OpenAPS SMB-inställningar";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS andra inställningar";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glukossimulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth-status återställd (APS startades om?). Hittade %d perifera enheter anslutna till %@ med identifieraren %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Hälsa";
+
+/* */
+"Connect to Apple Health" = "Anslut till Apple Hälsa";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "För att kunna skriva data till Apple Hälsa måste du först ge din tillåtelse i Inställningar > Hälsa > Datatillgång och enheter";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 20 - 15
FreeAPS/Sources/Localizations/Main/tr.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Gerçekten bolus yapmadan insülin ekleyin";
 
 /* Add insulin from source outside of pump */
@@ -402,18 +402,18 @@ Enact a temp Basal or a temp target */
 "Other" = "Diğeri";
 
 /* Whatch app alert */
-"Set temp targets presets on iPhone first" = "Set temp targets presets on iPhone first";
+"Set temp targets presets on iPhone first" = "Önce iPhone'da geçici hedef ön ayarlarını belirleyin";
 
 /* Updating Watch app */
-"Updating..." = "Updating...";
+"Updating..." = "Güncelleniyor...";
 
 /* Header for Temp targets in Watch app */
-"Temp Targets" = "Temp Targets";
+"Temp Targets" = "Geçici Hedefleri";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Libre Vericiyi Yapılandır";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Tümünü kaldır";
 
 /* */
-"Calibrations" = "Kalibrasyonlar";
-
-/* */
 "About the Process" = "Süreç Hakkında";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "CGM'i Sil";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Bu CGM'i FreeAPS X'den kaldırmak istediğinizden emin misiniz?";
 
@@ -854,12 +852,10 @@ Enact a temp Basal or a temp target */
 "Show glucose on the app badge" = "Uygulama rozetinde glikozu göster";
 
 /* */
-"Backfill glucose" = "Backfill glucose";
-
-
-/* Headers for settings ------------------- */
+"Backfill glucose" = "Geri doldurma glikoz";
 
 
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS ana ayarları";
 
 "OpenAPS SMB settings" = "OpenAPS SMB ayarları";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS diğer ayarları";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glikoz Simülatörü";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth Durumu geri yüklendi (APS yeniden başlatıldı mı?). %d çevre birimi bulundu ve %@ tanımlayıcısı ile %@'a bağlandı";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Apple Health'e bağlan";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "Apple Health'e veri yazmak için Ayarlar > Sağlık > Veri Erişimi'nde izinler vermelisiniz";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/uk.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "Додати інсулін без подачі болюсу";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Налаштувати Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Вилучити все";
 
 /* */
-"Calibrations" = "Калібрування";
-
-/* */
 "About the Process" = "Про процес";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 16 - 11
FreeAPS/Sources/Localizations/Main/zh-Hans.lproj/Localizable.strings

@@ -2,8 +2,8 @@
   Localizable.strings
   FreeAPS X
 */
+/* -------------------------------- */
 /* Bolus screen when adding insulin */
-
 "Add insulin without actually bolusing" = "仅添加胰岛素 没有实际注射";
 
 /* Add insulin from source outside of pump */
@@ -411,9 +411,9 @@ Enact a temp Basal or a temp target */
 "Temp Targets" = "Temp Targets";
 
 
-/* Calendar and Libre transmitter settings --------------*/
+/* Calendar and Libre transmitter settings ---------------
+ */
 /* */
-
 "Configure Libre Transmitter" = "Configure Libre Transmitter";
 
 /* */
@@ -483,9 +483,6 @@ Enact a temp Basal or a temp target */
 "Remove All" = "Remove All";
 
 /* */
-"Calibrations" = "Calibrations";
-
-/* */
 "About the Process" = "About the Process";
 
 /* */
@@ -670,6 +667,7 @@ Enact a temp Basal or a temp target */
 
 /* */
 "Delete CGM" = "Delete CGM";
+
 /* */
 "Are you sure you want to remove this cgm from loop?" = "Are you sure you want to remove this cgm from loop?";
 
@@ -857,9 +855,7 @@ Enact a temp Basal or a temp target */
 "Backfill glucose" = "Backfill glucose";
 
 
-/* Headers for settings ------------------- */
-
-
+/* Headers for settings ----------------------- */
 "OpenAPS main settings" = "OpenAPS main settings";
 
 "OpenAPS SMB settings" = "OpenAPS SMB settings";
@@ -868,15 +864,24 @@ Enact a temp Basal or a temp target */
 
 "OpenAPS other settings" = "OpenAPS other settings";
 
-
 /* Glucose Simulator CGM */
 "Glucose Simulator" = "Glucose Simulator";
 
 /* Restored state message */
 "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@" = "Bluetooth State restored (APS restarted?). Found %d peripherals, and connected to %@ with identifier %@";
 
+/* HealthKit intergration --------------------*/
+/* */
+"Apple Health" = "Apple Health";
+
+/* */
+"Connect to Apple Health" = "Connect to Apple Health";
+
+/* Show when have not permissions for writing to Health */
+"For write data to Apple Health you must give permissions in Settings > Health > Data Access" = "For write data to Apple Health you must give permissions in Settings > Health > Data Access";
+/* --------------------------------------------
+
 
-/*
   Infotexts from openaps.docs and androidaps.docs
   FreeAPS X
 */

+ 10 - 2
FreeAPS/Sources/Modules/CGM/View/CGMRootView.swift

@@ -10,8 +10,16 @@ extension CGM {
             Form {
                 Section {
                     Picker("Type", selection: $state.cgm) {
-                        ForEach(CGMType.allCases) {
-                            Text($0.displayName).tag($0)
+                        ForEach(CGMType.allCases) { type in
+                            VStack(alignment: .leading) {
+                                Text(type.displayName)
+                                Text(type.subtitle).font(.caption).foregroundColor(.secondary)
+                            }.tag(type)
+                        }
+                    }
+                    if let link = state.cgm.externalLink {
+                        Button("About this source") {
+                            UIApplication.shared.open(link, options: [:], completionHandler: nil)
                         }
                     }
                 }

+ 1 - 1
FreeAPS/Sources/Modules/HealthKit/HealthKitStateModel.swift

@@ -23,7 +23,7 @@ extension AppleHealthKit {
                     return
                 }
 
-                self.healthKitManager.requestPermission { status, error in
+                self.healthKitManager.requestPermission { _, error in
                     guard error == nil else {
                         return
                     }

+ 17 - 10
FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift

@@ -102,7 +102,8 @@ final class BaseHealthKitManager: HealthKitManager, Injectable {
     }
 
     func save(bloodGlucoses: [BloodGlucose], completion: ((Result<Bool, Error>) -> Void)? = nil) {
-        guard settingsManager.settings.useAppleHealth else { return }
+        guard settingsManager.settings.useAppleHealth,
+              bloodGlucoses.isNotEmpty else { return }
 
         for bgItem in bloodGlucoses {
             let bgQuantity = HKQuantity(
@@ -153,14 +154,21 @@ final class BaseHealthKitManager: HealthKitManager, Injectable {
             }
 
             // loading only daily bg
-            let predicate = HKQuery.predicateForSamples(
+            let predicateByDate = HKQuery.predicateForSamples(
                 withStart: Date().addingTimeInterval(-1.days.timeInterval),
                 end: nil,
                 options: .strictStartDate
             )
+            // loading only not FreeAPS bg
+            let predicateByMeta = HKQuery.predicateForObjects(
+                withMetadataKey: "fromFreeAPSX",
+                operatorType: .notEqualTo,
+                value: 1
+            )
+            let compoundPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [predicateByDate, predicateByMeta])
 
-            healthKitStore.execute(getQueryForDeletedBloodGlucose(sampleType: bgType, predicate: predicate))
-            healthKitStore.execute(getQueryForAddedBloodGlucose(sampleType: bgType, predicate: predicate))
+            healthKitStore.execute(getQueryForDeletedBloodGlucose(sampleType: bgType, predicate: predicateByDate))
+            healthKitStore.execute(getQueryForAddedBloodGlucose(sampleType: bgType, predicate: compoundPredicate))
         }
         healthKitStore.execute(query)
     }
@@ -205,7 +213,8 @@ final class BaseHealthKitManager: HealthKitManager, Injectable {
                 let removingBGID = samples.map {
                     $0.metadata?["HKMetadataKeySyncIdentifier"] as? String ?? $0.uuid.uuidString
                 }
-                glucoseStorage.removeGlucose(byIDCollection: removingBGID)
+                glucoseStorage.removeGlucose(ids: removingBGID)
+                newGlucose = newGlucose.filter { !removingBGID.contains($0.id) }
             }
         }
         return query
@@ -268,11 +277,9 @@ final class BaseHealthKitManager: HealthKitManager, Injectable {
 
     func fetch() -> AnyPublisher<[BloodGlucose], Never> {
         guard settingsManager.settings.useAppleHealth else { return Just([]).eraseToAnyPublisher() }
-
-        let copy = newGlucose
-        newGlucose = []
-
-        return Just(copy).eraseToAnyPublisher()
+        let actualGlucose = newGlucose.filter { $0.dateString <= Date() }
+        newGlucose = newGlucose.filter { !actualGlucose.contains($0) }
+        return Just(actualGlucose).eraseToAnyPublisher()
     }
 }
 

+ 1 - 0
FreeAPSWatch WatchKit Extension/ComplicationController.swift

@@ -11,6 +11,7 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
                 displayName: "FreeAPS X",
                 supportedFamilies: [
                     .graphicCorner,
+                    .graphicCircular,
                     .modularSmall,
                     .utilitarianSmall,
                     .circularSmall