diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a49c701..6491459a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,3 +11,7 @@ ## 0.5.8 - **Fix**: Synchronization over `NSRecursiveLock` for request count tracker in NetworkService + +## 0.5.9 + +- **Fix**: One-two-many fixed for values more than 99 diff --git a/LeadKit.podspec b/LeadKit.podspec index c33bad11..88062a01 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.5.8" + s.version = "0.5.9" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" diff --git a/Sources/Extensions/String/String+LocalizedComponent.swift b/Sources/Extensions/String/String+LocalizedComponent.swift index b6d6f543..7c4727a2 100644 --- a/Sources/Extensions/String/String+LocalizedComponent.swift +++ b/Sources/Extensions/String/String+LocalizedComponent.swift @@ -31,10 +31,12 @@ public extension String { stringTwo: String, stringMany: String) -> String { - if (11...14).contains(value) { + let lastTwoDigits = value % 100 + + if (11...14).contains(lastTwoDigits) { return stringMany } else { - let lastDigit = value % 10 + let lastDigit = lastTwoDigits % 10 switch lastDigit { case 1: