From 6e8b69d2bfa05c6f498a8c646a325f089dc45878 Mon Sep 17 00:00:00 2001 From: "Mikhail A.Z." Date: Sun, 14 Dec 2025 16:38:08 +0700 Subject: [PATCH] ADDED: calculated title to ActionAlertText --- APPROBATION.md | 2 +- CHANGELOG.md | 6 ++++++ PGKStar.swift | 4 +++- PGKSupportingStar.swift | 7 +++++-- Package.swift | 2 +- README.md | 2 +- Sources/PerseusGeoKit/Classes/RedirectActionAlert.swift | 2 ++ 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/APPROBATION.md b/APPROBATION.md index 4701301..83f656a 100644 --- a/APPROBATION.md +++ b/APPROBATION.md @@ -1,4 +1,4 @@ -# Approbation Matrix / PerseusGeoLocationKit 1.0.0 && 1.0.1 && 1.0.2 && 1.0.2 && 1.0.3 && 1.0.4 && 1.1.0 && 1.1.1 +# Approbation Matrix / PerseusGeoLocationKit 1.0.0 && 1.0.1 && 1.0.2 && 1.0.2 && 1.0.3 && 1.0.4 && 1.1.0 && 1.1.1 && 1.1.2 > NOTE: To catch all log messages Mac Console should be started first then after a little while the logged app. diff --git a/CHANGELOG.md b/CHANGELOG.md index d51d5dc..4ef9a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Dates in this file meets Gregorian calendar. Date in format YYYY-MM-DD. +## [1.1.2] - [2025-12-14], PGK + +### Added: + +- Calculated property to ActionAlertText to simplify complex localization issues. + ## [1.1.1] - [2025-11-30], PGK ### Updated diff --git a/PGKStar.swift b/PGKStar.swift index 8becfe1..be6c872 100644 --- a/PGKStar.swift +++ b/PGKStar.swift @@ -1,6 +1,6 @@ // // PerseusGeoKitStar.swift -// Version: 1.1.1 +// Version: 1.1.2 // // Standalone PerseusGeoKit // @@ -892,6 +892,8 @@ public struct ActionAlertText { self.buttonCancel = buttonCancel self.buttonFunction = buttonFunction } + + public var titleCalculated: (() -> String)? } // MARK: - Alert for iOS diff --git a/PGKSupportingStar.swift b/PGKSupportingStar.swift index addb304..2ff29c1 100644 --- a/PGKSupportingStar.swift +++ b/PGKSupportingStar.swift @@ -1,6 +1,6 @@ // // PGKSupportingStar.swift -// Version: 1.1.1 +// Version: 1.1.2 // // PerseusGeoKit Support Code // @@ -70,7 +70,10 @@ var REDIRECT_ALERT_TITLES = ActionAlertText( extension ActionAlertText { var titleWithStatus: String { - return "Location Services: \(GeoAgent.currentStatus.description.capitalized)." + guard let status = titleCalculated else { + return "Location Services: \(GeoAgent.currentStatus.description.capitalized)." + } + return status() } } diff --git a/Package.swift b/Package.swift index c48e7ec..de899b7 100644 --- a/Package.swift +++ b/Package.swift @@ -1,7 +1,7 @@ // swift-tools-version:5.7 /* Package.swift - Version: 1.1.1 + Version: 1.1.2 For iOS and macOS only. Use Stars to adopt for the specifics you need. diff --git a/README.md b/README.md index fa99975..3a74981 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Actions Status](https://github.com/perseusrealdeal/PerseusGeoKit/actions/workflows/main.yml/badge.svg)](https://github.com/perseusrealdeal/PerseusGeoKit/actions/workflows/main.yml) [![Style](https://github.com/perseusrealdeal/PerseusGeoKit/actions/workflows/swiftlint.yml/badge.svg)](https://github.com/perseusrealdeal/PerseusGeoKit/actions/workflows/swiftlint.yml) -[![Version](https://img.shields.io/badge/Version-1.1.1-green.svg)](/CHANGELOG.md) +[![Version](https://img.shields.io/badge/Version-1.1.2-green.svg)](/CHANGELOG.md) [![Platforms](https://img.shields.io/badge/Platforms-macOS%2010.13+_|_iOS%2011.0+-orange.svg)](https://en.wikipedia.org/wiki/List_of_Apple_products) [![Xcode 14.2](https://img.shields.io/badge/Xcode-14.2+-red.svg)](https://en.wikipedia.org/wiki/Xcode) [![Swift 5.7](https://img.shields.io/badge/Swift-5.7-red.svg)](https://www.swift.org) diff --git a/Sources/PerseusGeoKit/Classes/RedirectActionAlert.swift b/Sources/PerseusGeoKit/Classes/RedirectActionAlert.swift index bc1bf49..6b285e5 100644 --- a/Sources/PerseusGeoKit/Classes/RedirectActionAlert.swift +++ b/Sources/PerseusGeoKit/Classes/RedirectActionAlert.swift @@ -44,6 +44,8 @@ public struct ActionAlertText { self.buttonCancel = buttonCancel self.buttonFunction = buttonFunction } + + public var titleCalculated: (() -> String)? } // MARK: - Alert for iOS