From 7735fd31d4a47b17ab22d9b52263d80fedcb5b30 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Thu, 28 Sep 2017 18:06:45 +0300 Subject: [PATCH 1/2] One two many fix --- Sources/Extensions/String/String+LocalizedComponent.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: From 56ef65c7a843d06e099b9c08f81628d89710749c Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Thu, 28 Sep 2017 18:10:53 +0300 Subject: [PATCH 2/2] Changelog and version --- CHANGELOG.md | 4 ++++ LeadKit.podspec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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"