Skip to content

Commit

Permalink
Merge branch 'dev' into autoISF
Browse files Browse the repository at this point in the history
  • Loading branch information
mountrcg committed May 9, 2024
2 parents b05372b + 6cab92a commit 48bfb06
Show file tree
Hide file tree
Showing 16 changed files with 273 additions and 77 deletions.
2 changes: 1 addition & 1 deletion FreeAPS/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<key>NSCalendarsFullAccessUsageDescription</key>
<string>To create events with BG reading values, so that they can be viewed on Apple Watch and CarPlay</string>
<key>NSContactsUsageDescription</key>
<string>To update contacts with BG reading values (contact trick)</string>
<string>To enable the Contact Image feature: to get live updates from iAPS to your Apple Watch Contact complication</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>UISupportedInterfaceOrientations~ipad</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@

/* Privacy - Health Share Usage Description */
"NSHealthShareUsageDescription" = "Health App is used to store blood glucose, insulin and carbohydrates";

/* Privacy - Contacts Usage Description */
"NSContactsUsageDescription" = "To enable the Contact Image feature: get live updates from iAPS to your Apple Watch Contact complication";
186 changes: 186 additions & 0 deletions FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,192 @@ Enact a temp Basal or a temp target */

/* -----------------------------------------------------------------------------------------------------------

/* */
"Man" = "Man";

/* */
"Other" = "Other";

/* */
"Secret" = "Secret";

/* */
"Birth Date" = "Birth Date";

/* */
"Share all of your Statistics" = "Share all of your Statistics";

/* */
"Just iAPS version number" = "Just iAPS version number";

/* */
"Share Bare Minimum" = "Share Bare Minimum";

/* */
"Every bit of information you choose to share is uploaded anonymously. To prevent duplicate uploads, the data is identified with a unique random string saved on your phone." = "Every bit of information you choose to share is uploaded anonymously. To prevent duplicate uploads, the data is identified with a unique random string saved on your phone.";

/* */
"Tap to display" = "Tap to display";

/* */
"Your identifier" = "Your identifier";

/* */
"Share your data anonymously" = "Share your data anonymously";

/* ——————————Contact Image ————————*/

/* Contact Image, contacts list - prefix before the contact given name */
"Contact" = "Contact";

/* Contact Image, settings, header of the contacts list */
"Contacts" = "Contacts";

/* Contact Image, settings, save your changes reminedr */
"Don't forget to save your changes." = "Don't forget to save your changes.";

/* Contact Image, settings, message about need to access contacts */
"iAPS needs access to your contacts for this feature to work" = "iAPS needs access to your contacts for this feature to work";

/* Contact Image, settings, button to grant access to contacts */
"Grant iAPS access to contacts" = "Grant iAPS access to contacts";

/* Contact Image, settings, message when access to contacts denied */
"Access to contacts denied" = "Access to contacts denied";

/* Contact Image, settings, message when access to contacts restricted */
"Access to contacts is restricted (parental control?)" = "Access to contacts is restricted (parental control?)";

/* Contact Image, settings, message when access to contacts is in unknown state */
"Access to contacts - unknown state" = "Access to contacts - unknown state";

/* Contact Image, settings, short description of the feature */
"A Contact Image can be used to get live updates from iAPS to your Apple Watch Contact complication and/or your iPhone Contact widget." = "A Contact Image can be used to get live updates from iAPS to your Apple Watch Contact complication and/or your iPhone Contact widget.";

/* Contact Image, settings, main header */
"Contact Image" = "Contact Image";

/* Contact Image, settings, label for the layout picker */
"Layout" = "Layout";

/* Contact Image, settings, single layout name */
"Single" = "Single";

/* Contact Image, settings, split layout name */
"Split" = "Split";

/* Contact Image, settings, outer ring - don't show */
"DontShowRing" = "Don't show";

/* Contact Image, settings, outer ring - Loop status */
"LoopStatusRing" = "Loop status";

/* Contact Image, settings, outer ring - IOB */
"IOBRing" = "IOB";

/* Contact Image, settings, outer ring - COB */
"COBRing" = "COB";

/* Contact Image, settings, outer ring - IOB+COB */
"IOB+COBRing" = "IOB+COB";

/* Contact Image, settings, label for the primary value picker */
"Primary" = "Primary";

/* Contact Image, settings, label for the top value picker */
"Top" = "Top";

/* Contact Image, settings, label for the bottom value picker */
"Bottom" = "Bottom";

/* Contact Image, settings, header for the outer ring section */
"Ring" = "Ring";

/* Contact Image, settings, label for the outer ring picker */
"Outer" = "Outer";

/* Contact Image, settings, label for the ring width picker */
"Width" = "Width";

/* Contact Image, settings, label for the ring gap picker */
"Gap" = "Gap";

/* Contact Image, settings, header for the font section */
"Font" = "Font";

/* Contact Image, settings, label for the font size picker */
"Size" = "Size";

/* Contact Image, settings, label for the secondary font size picker */
"Secondary size" = "Secondary size";

/* Contact Image, settings, label for the font tracking picker (tracking - horizontal spacing between letters) */
"Tracking" = "Tracking";

/* Contact Image, settings, label for the font weight picker */
"Weight" = "Weight";

/* Contact Image, settings, label for the dark-mode switcher */
"Dark mode" = "Dark mode";

/* Contact Image, settings, tighter font tracking */
"TighterFontTracking" = "Tighter";

/* Contact Image, settings, tight font tracking */
"TightFontTracking" = "Tight";

/* Contact Image, settings, normal font tracking */
"NormalFontTracking" = "Normal";

/* Contact Image, settings, wide font tracking */
"WideFontTracking" = "Wide";

/* Contact Image, settings, light font weight */
"LightFontWeight" = "Light";

/* Contact Image, settings, regular font weight */
"RegularFontWeight" = "Regular";

/* Contact Image, settings, medium font weight */
"MediumFontWeight" = "Medium";

/* Contact Image, settings, semibold font weight */
"SemiboldFontWeight" = "Semibold";

/* Contact Image, settings, bold font weight */
"BoldFontWeight" = "Bold";

/* Contact Image, settings, black font weight (black is "very bold") */
"BlackFontWeight" = "Black";

/* Contact Image, settings, don't display any value */
"NoneContactValue" = "None";

/* Contact Image, settings, Glucose (data to display) */
"GlucoseContactValue" = "Glucose";

/* Contact Image, settings, Eventual BG (data to display) */
"EventualBGContactValue" = "Eventual BG";

/* Contact Image, settings, Delta (data to display) */
"DeltaContactValue" = "Delta";

/* Contact Image, settings, Trend (data to display) */
"TrendContactValue" = "Trend";

/* Contact Image, settings, Last loop time (data to display) */
"LastLoopTimeContactValue" = "Last loop time";

/* Contact Image, settings, COB (data to display) */
"COBContactValue" = "COB";

/* Contact Image, settings, IOB (data to display) */
"IOBContactValue" = "IOB";

/* Contact Image, settings, loop status (data to display) */
"LoopStatusContactValue" = "Loop status";

/* ---------------------------------------------------------------------------------------------------------------
Infotexts from openaps.docs and androidaps.docs
iAPS
*/
Expand Down
14 changes: 7 additions & 7 deletions FreeAPS/Sources/Models/FontTracking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ enum FontTracking: String, JSON, Identifiable, CaseIterable, Codable {
var displayName: String {
switch self {
case .tighter:
NSLocalizedString("Tighter", comment: "")
NSLocalizedString("TighterFontTracking", comment: "")
case .tight:
NSLocalizedString("Tight", comment: "")
NSLocalizedString("TightFontTracking", comment: "")
case .normal:
NSLocalizedString("Normal", comment: "")
NSLocalizedString("NormalFontTracking", comment: "")
case .wide:
NSLocalizedString("Wide", comment: "")
NSLocalizedString("WideFontTracking", comment: "")
}
}

var value: Double {
switch self {
case .tighter: -0.05
case .tight: -0.025
case .tighter: -0.07
case .tight: -0.04
case .normal: 0
case .wide: 0.05
case .wide: 0.04
}
}
}
12 changes: 6 additions & 6 deletions FreeAPS/Sources/Models/FontWeight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ enum FontWeight: String, JSON, Identifiable, CaseIterable, Codable {
var displayName: String {
switch self {
case .light:
return NSLocalizedString("Light", comment: "")
return NSLocalizedString("LightFontWeight", comment: "")
case .regular:
return NSLocalizedString("Regular", comment: "")
return NSLocalizedString("RegularFontWeight", comment: "")
case .medium:
return NSLocalizedString("Medium", comment: "")
return NSLocalizedString("MediumFontWeight", comment: "")
case .semibold:
return NSLocalizedString("Semibold", comment: "")
return NSLocalizedString("SemiboldFontWeight", comment: "")
case .bold:
return NSLocalizedString("Bold", comment: "")
return NSLocalizedString("BoldFontWeight", comment: "")
case .black:
return NSLocalizedString("Black", comment: "")
return NSLocalizedString("BlackFontWeight", comment: "")
}
}
}
14 changes: 7 additions & 7 deletions FreeAPS/Sources/Modules/AutoISF/AutoISFConfStateModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -281,49 +281,49 @@ extension AutoISFConf {
),
FieldSection(
displayName: NSLocalizedString(
"Toggles & general Settings",
"Toggles & General Settings",
comment: "Switch on/off experimental stuff"
),
fields: xpmToogles
),
FieldSection(
displayName: NSLocalizedString(
"Acce-ISF settings",
"Acce-ISF Settings",
comment: "Experimental settings for acceleration based autoISF 2.2"
),
fields: xpmAcceISF
),
FieldSection(
displayName: NSLocalizedString(
"PP-ISF settings",
"PP-ISF Settings",
comment: "Experimental settings for postprandial based autoISF 2.2"
),
fields: xpmPostPrandial
),
FieldSection(
displayName: NSLocalizedString(
"Delta-ISF settings",
"Delta-ISF Settings",
comment: "Experimental settings for BG delta based autoISF2.1"
),
fields: xpmDeltaISF
),
FieldSection(
displayName: NSLocalizedString(
"BG-ISF settings",
"BG-ISF Settings",
comment: "Experimental settings for BG level based autoISF2.1"
),
fields: xpmBGISF
),
FieldSection(
displayName: NSLocalizedString(
"Dura-ISF settings",
"Dura-ISF Settings",
comment: "Experimental settings for high BG plateau based autoISF2.0"
),
fields: xpmDuraISF
),
FieldSection(
displayName: NSLocalizedString(
"SMB Delivery Ratio settings",
"SMB Delivery Ratio Settings",
comment: "Experimental settings for SMB increases autoISF 2.0"
),
fields: xpmSMB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ extension AutoISFConf {
)
}
}
} header: { Text("Enable") }
} header: { Text("Enable").textCase(nil) }
if state.autoisf {
ForEach(state.sections.indexed(), id: \.1.id) { sectionIndex, section in
Section(header: Text(section.displayName)) {
Section(header: Text(section.displayName).textCase(nil)) {
ForEach(section.fields.indexed(), id: \.1.id) { fieldIndex, field in
HStack {
switch field.type {
Expand Down
9 changes: 0 additions & 9 deletions FreeAPS/Sources/Modules/B30/B30ConfStateModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ extension AIMIB30Conf {
// MARK: - AIMI B30 fields

let xpmB30 = [
Field(
displayName: "Enable B30 EatingSoon",
type: .boolean(keypath: \.enableB30),
infoText: NSLocalizedString(
"Enables an increased basal rate after an EatingSoon TT and a manual bolus to saturate the infusion site with insulin to increase insulin absorption for SMB's following a meal with no carb counting.",
comment: "Enable B30 for autoISF"
),
settable: self
),
Field(
displayName: "TempTarget Level in mg/dl for B30 to be enacted",
type: .decimal(keypath: \.B30iTimeTarget),
Expand Down
4 changes: 2 additions & 2 deletions FreeAPS/Sources/Modules/B30/View/B30ConfRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ extension AIMIB30Conf {
}
}
}
} header: { Text("Enable") }
} header: { Text("Enable").textCase(nil) }
if state.enableB30 {
ForEach(state.sections.indexed(), id: \.1.id) { sectionIndex, section in
Section(header: Text(section.displayName)) {
Section(header: Text(section.displayName).textCase(nil)) {
ForEach(section.fields.indexed(), id: \.1.id) { fieldIndex, field in
HStack {
switch field.type {
Expand Down
Loading

0 comments on commit 48bfb06

Please sign in to comment.