Skip to content

Commit

Permalink
[#32] Bugfix - Plurals does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Decybel07 committed Apr 14, 2022
1 parent 5dbeb46 commit 813aa72
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Change Log
---

## [5.10.2](https://github.com/Decybel07/L10n-swift/tree/5.10.2) (2022-04-14)
* Bugfix - Plurals does not work [#32](https://github.com/Decybel07/L10n-swift/issues/32)

## [5.10.1](https://github.com/Decybel07/L10n-swift/tree/5.10.1) (2022-04-08)
* Bugfix - Plurals does not work [#32](https://github.com/Decybel07/L10n-swift/issues/32)

Expand Down
4 changes: 2 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = bobrowski.adrian.iOS;
Expand Down Expand Up @@ -649,7 +649,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = bobrowski.adrian.iOS;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion L10n-swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|
spec.name = 'L10n-swift'
spec.module_name = 'L10n_swift'
spec.version = '5.10.1'
spec.version = '5.10.2'
spec.summary = 'Localization of an application with ability to change language "on the fly" and support for plural forms in any language.'

spec.description = <<-DESC
Expand Down
16 changes: 8 additions & 8 deletions L10n_swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-iOS";
Expand Down Expand Up @@ -1541,7 +1541,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-iOS";
PRODUCT_NAME = "$(PROJECT_NAME)";
Expand Down Expand Up @@ -1721,7 +1721,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-watchOS";
Expand Down Expand Up @@ -1784,7 +1784,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-watchOS";
PRODUCT_NAME = "$(PROJECT_NAME)";
Expand Down Expand Up @@ -1851,7 +1851,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-tvOS";
Expand Down Expand Up @@ -1913,7 +1913,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-tvOS";
PRODUCT_NAME = "$(PROJECT_NAME)";
Expand Down Expand Up @@ -2088,7 +2088,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-macOS";
Expand Down Expand Up @@ -2151,7 +2151,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 5.10.1;
MARKETING_VERSION = 5.10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "CodingLifestyle.L10n-macOS";
PRODUCT_NAME = "$(PROJECT_NAME)";
Expand Down
4 changes: 4 additions & 0 deletions Source/Core/Plural/Plural.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ extension Plural {
private static func createFormat() -> String {
let table = "Plural"
let `extension` = "stringsdict"
#if SWIFT_PACKAGE
var bundle = Bundle.module
#else
var bundle = Bundle(for: L10n.self)
#endif

if bundle.url(forResource: table, withExtension: `extension`) == nil {
self.createFileIfNeeded(table: table, extension: `extension`, bundle: &bundle)
Expand Down

0 comments on commit 813aa72

Please sign in to comment.