Skip to content

Commit

Permalink
Merge pull request #159 from paulplant/develop
Browse files Browse the repository at this point in the history
Libre 2 NFC Scan texts (+ localisation to Spanish)
  • Loading branch information
JohanDegraeve authored Jan 16, 2021
2 parents 375be0c + 9d0c2a1 commit eb15c4a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 14 deletions.
20 changes: 16 additions & 4 deletions xdrip.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
470CE1FC246802EB00D5CB74 /* BluetoothPeripheralsView.strings in Resources */ = {isa = PBXBuildFile; fileRef = 470CE1FE246802EB00D5CB74 /* BluetoothPeripheralsView.strings */; };
4749EB9B25B36E010072DF8B /* LibreNFC.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4749EB9D25B36E010072DF8B /* LibreNFC.strings */; };
47503382247420A200D2260B /* BluetoothPeripheralView.strings in Resources */ = {isa = PBXBuildFile; fileRef = 47503384247420A200D2260B /* BluetoothPeripheralView.strings */; };
A48D2DE552F4A356AA32746A /* Pods_xdrip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 662BEA7F7991B9BD2E7D3EA4 /* Pods_xdrip.framework */; };
F51B9F7D24B216CD00FC0643 /* Libre1NonFixedSlopeCalibrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51B9F7C24B216CD00FC0643 /* Libre1NonFixedSlopeCalibrator.swift */; };
Expand Down Expand Up @@ -298,7 +299,6 @@
F8A5EEAE25791F370085E660 /* Libre2BLEUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A5EEAD25791F370085E660 /* Libre2BLEUtilities.swift */; };
F8A5EEB2257CEC290085E660 /* LibreNFC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A5EEB1257CEC290085E660 /* LibreNFC.swift */; };
F8A5EEB8257CF2940085E660 /* TextsLibreNFC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A5EEB7257CF2940085E660 /* TextsLibreNFC.swift */; };
F8A5EEBC257CF38C0085E660 /* LibreNFC.strings in Resources */ = {isa = PBXBuildFile; fileRef = F8A5EEBB257CF38C0085E660 /* LibreNFC.strings */; };
F8A5EEC2257D18DC0085E660 /* LibreNFCDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A5EEC1257D18DC0085E660 /* LibreNFCDelegate.swift */; };
F8AC425E21ADEBD60078C348 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8AC425D21ADEBD60078C348 /* AppDelegate.swift */; };
F8AC426021ADEBD60078C348 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8AC425F21ADEBD60078C348 /* RootViewController.swift */; };
Expand Down Expand Up @@ -513,6 +513,9 @@
470CE1FD246802EB00D5CB74 /* es-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-ES"; path = "es-ES.lproj/BluetoothPeripheralsView.strings"; sourceTree = "<group>"; };
470CE1FF246802F400D5CB74 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/BluetoothPeripheralsView.strings; sourceTree = "<group>"; };
470CE200246803B100D5CB74 /* es-MX */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-MX"; path = "es-MX.lproj/BluetoothPeripheralsView.strings"; sourceTree = "<group>"; };
4749EB9C25B36E010072DF8B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LibreNFC.strings; sourceTree = "<group>"; };
4749EBA025B36E080072DF8B /* es-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-ES"; path = "es-ES.lproj/LibreNFC.strings"; sourceTree = "<group>"; };
4749EBA225B36E130072DF8B /* es-MX */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-MX"; path = "es-MX.lproj/LibreNFC.strings"; sourceTree = "<group>"; };
47503383247420A200D2260B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/BluetoothPeripheralView.strings; sourceTree = "<group>"; };
47503385247420B000D2260B /* es-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-ES"; path = "es-ES.lproj/BluetoothPeripheralView.strings"; sourceTree = "<group>"; };
47503387247420BA00D2260B /* es-MX */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-MX"; path = "es-MX.lproj/BluetoothPeripheralView.strings"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -837,7 +840,6 @@
F8A5EEAD25791F370085E660 /* Libre2BLEUtilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Libre2BLEUtilities.swift; sourceTree = "<group>"; };
F8A5EEB1257CEC290085E660 /* LibreNFC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibreNFC.swift; sourceTree = "<group>"; };
F8A5EEB7257CF2940085E660 /* TextsLibreNFC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextsLibreNFC.swift; sourceTree = "<group>"; };
F8A5EEBB257CF38C0085E660 /* LibreNFC.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = LibreNFC.strings; sourceTree = "<group>"; };
F8A5EEC1257D18DC0085E660 /* LibreNFCDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibreNFCDelegate.swift; sourceTree = "<group>"; };
F8A5EEC5257EDC910085E660 /* xdripDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = xdripDebug.entitlements; sourceTree = "<group>"; };
F8AC425A21ADEBD60078C348 /* xdrip.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = xdrip.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -1581,7 +1583,7 @@
F8AF11FF24B3B62D00AE5BA2 /* LibreErrors.strings */,
F82436FD24BE01F700BED341 /* LibreStates.strings */,
F8E6C79324CEC2E3007C1199 /* Snooze.strings */,
F8A5EEBB257CF38C0085E660 /* LibreNFC.strings */,
4749EB9D25B36E010072DF8B /* LibreNFC.strings */,
);
path = Storyboards;
sourceTree = "<group>";
Expand Down Expand Up @@ -2742,7 +2744,7 @@
F82437A024CB7A9900BED341 /* Siri_Missed_Readings.caf in Resources */,
F824377924CB7A9800BED341 /* Sci-Fi_Alarm_Loop_3.caf in Resources */,
F8B3A7CB226CC0B7004BA588 /* shortlow4.mp3 in Resources */,
F8A5EEBC257CF38C0085E660 /* LibreNFC.strings in Resources */,
4749EB9B25B36E010072DF8B /* LibreNFC.strings in Resources */,
F82437C624CB7A9900BED341 /* Siri_Alert_High_Glucose.caf in Resources */,
F82437A924CB7A9900BED341 /* Wake_Up_Will_You.caf in Resources */,
F889CB6F236D84AC00A81068 /* M5StackView.strings in Resources */,
Expand Down Expand Up @@ -3208,6 +3210,16 @@
name = BluetoothPeripheralsView.strings;
sourceTree = "<group>";
};
4749EB9D25B36E010072DF8B /* LibreNFC.strings */ = {
isa = PBXVariantGroup;
children = (
4749EB9C25B36E010072DF8B /* en */,
4749EBA025B36E080072DF8B /* es-ES */,
4749EBA225B36E130072DF8B /* es-MX */,
);
name = LibreNFC.strings;
sourceTree = "<group>";
};
47503384247420A200D2260B /* BluetoothPeripheralView.strings */ = {
isa = PBXVariantGroup;
children = (
Expand Down
6 changes: 0 additions & 6 deletions xdrip/Storyboards/LibreNFC.strings

This file was deleted.

5 changes: 5 additions & 0 deletions xdrip/Storyboards/en.lproj/LibreNFC.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"scanComplete" = "Scan Complete";
"holdTopOfIphoneNearSensor" = "Hold the top of your iOS device near the sensor to scan";
"deviceMustSupportNFC" = "This iPhone does not support NFC";
"deviceMustSupportIOS14" = "To connect to Libre 2, this iPhone needs upgrading to iOS14";
"donotusethelibrelinkapp" = "Connected to Libre 2.\r\n\r\nIf you want to keeping scanning sometimes the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. \r\n\r\nOtherwise, scanning the NFC with the Libre app and with the bluetooth permission allowed will break the connection between xDrip4iOS and the Libre 2.";
5 changes: 5 additions & 0 deletions xdrip/Storyboards/es-ES.lproj/LibreNFC.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"scanComplete" = "Escaneo Completado";
"holdTopOfIphoneNearSensor" = "Escanear el sensor con tu iPhone";
"deviceMustSupportNFC" = "Éste iPhone no dispone de NFC";
"deviceMustSupportIOS14" = "Para conectar a un sensor Libre 2, se debe actualizar este iPhone a iOS14";
"donotusethelibrelinkapp" = "Conectado a Libre 2.\r\n\r\nSi quieres seguir escaneando con la app official del sensor Libre, es imprescindible deshabilitar el permiso de Bluetooth en la configuración de la app del Libre. \r\n\r\nSi no esté deshabilitado el permiso de Bluetooth, al escanear con la app official, se perderá la conexión entre xDrip4iOS y el sensor Libre 2.";
5 changes: 5 additions & 0 deletions xdrip/Storyboards/es-MX.lproj/LibreNFC.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"scanComplete" = "Escaneo Completado";
"holdTopOfIphoneNearSensor" = "Escanear el sensor con tu iPhone";
"deviceMustSupportNFC" = "Éste iPhone no dispone de NFC";
"deviceMustSupportIOS14" = "Para conectar a un sensor Libre 2, se debe actualizar este iPhone a iOS14";
"donotusethelibrelinkapp" = "Conectado a Libre 2.\r\n\r\nSi quiere usted seguir escaneando con la app official del sensor Libre, es imprescindible deshabilitar el permiso de Bluetooth en la configuración de la app del Libre. \r\n\r\nSi no esté deshabilitado el permiso de Bluetooth, al escanear con la app official, se perderá la conexión entre xDrip4iOS y el sensor Libre 2.";
6 changes: 6 additions & 0 deletions xdrip/Storyboards/sl.lproj/LibreNFC.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"scanComplete" = "Scan Complete";
"holdTopOfIphoneNearSensor" = "Hold the top of your iOS device near the sensor to scan";
"deviceMustSupportNFC" = "This iPhone does not support NFC";
"deviceMustSupportIOS14" = "This iPhone must be upgraded to at least iOS14";
"donotusethelibrelinkapp" = "Connected to Libre 2.\r\n\r\nIf you want to keeping scanning sometimes the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. \r\n\r\nOtherwise, scanning the NFC with the Libre app and with the bluetooth permission allowed will break the connection between xDrip4iOS and the Libre 2";

8 changes: 4 additions & 4 deletions xdrip/Texts/TextsLibreNFC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ class TextsLibreNFC {
}()

static let holdTopOfIphoneNearSensor: String = {
return NSLocalizedString("holdTopOfIphoneNearSensor", tableName: filename, bundle: Bundle.main, value: "Hold the top of your iOS device near the sensor", comment: "when NFC scanning is started, this message will appear")
return NSLocalizedString("holdTopOfIphoneNearSensor", tableName: filename, bundle: Bundle.main, value: "Hold the top of your iOS device near the sensor to scan", comment: "when NFC scanning is started, this message will appear")
}()

static let deviceMustSupportNFC: String = {
return NSLocalizedString("deviceMustSupportNFC", tableName: filename, bundle: Bundle.main, value: "Device must support NFC", comment: "Device must support NFC")
return NSLocalizedString("deviceMustSupportNFC", tableName: filename, bundle: Bundle.main, value: "This iPhone does not support NFC", comment: "Device must support NFC")
}()

static let deviceMustSupportIOS14: String = {
return NSLocalizedString("deviceMustSupportIOS14", tableName: filename, bundle: Bundle.main, value: "Device must support at least iOS 14.0", comment: "Device must support at least iOS 14.0")
return NSLocalizedString("deviceMustSupportIOS14", tableName: filename, bundle: Bundle.main, value: "To connect to Libre 2, this iPhone needs upgrading to iOS14", comment: "Device must support at least iOS 14.0")
}()

static let donotusethelibrelinkapp: String = {
return NSLocalizedString("donotusethelibrelinkapp", tableName: filename, bundle: Bundle.main, value: "Connected to Libre 2.\r\n\r\nIf you still want to scan the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. Otherwise, scanning the NFC with the Libre app and with bluetooth permission allowed will disallow xDrip4iOS to connect to the Libre 2", comment: "After Libre NFC scanning, and after successful bluetooth connection, this message will be shown to explain that he or she should not allow bluetooth permission on the Libre app")
return NSLocalizedString("donotusethelibrelinkapp", tableName: filename, bundle: Bundle.main, value: "Connected to Libre 2.\r\n\r\nIf you want to keeping scanning sometimes the Libre sensor with the official Libre app, then disallow bluetooth permission for the Libre app. \r\n\r\nOtherwise, scanning the NFC with the Libre app and with the bluetooth permission allowed will break the connection between xDrip4iOS and the Libre 2.", comment: "After Libre NFC scanning, and after successful bluetooth connection, this message will be shown to explain that he or she should not allow bluetooth permission on the Libre app")
}()

}

0 comments on commit eb15c4a

Please sign in to comment.