Skip to content

Commit

Permalink
Merge pull request #17 from Decybel07/multipleArgsForPlural
Browse files Browse the repository at this point in the history
Multiple args for plural
  • Loading branch information
Decybel07 authored Jun 20, 2019
2 parents 5fda434 + b135c48 commit 4de85ee
Show file tree
Hide file tree
Showing 32 changed files with 666 additions and 292 deletions.
34 changes: 16 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode9
osx_image: xcode10.2
language: objective-c

env:
Expand All @@ -12,29 +12,27 @@ env:

matrix:
# iOS
- DESTINATION="OS=9.1,name=iPad Air" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=9.2,name=iPad Air 2" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=10.1,name=iPad Pro (12.9-inch)" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=9.1,name=iPad Air" PLATFORM="$IOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.1,name=iPad Pro (12.9-inch)" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"

- DESTINATION="OS=9.1,name=iPhone 6" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=10.0,name=iPhone 7" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=11.0,name=iPhone 8 Plus" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=11.0,name=iPhone X" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=10.3.1,name=iPhone 7" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.4,name=iPhone 8 Plus" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=12.2,name=iPhone X" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"

# watchOS
- DESTINATION="OS=2.0,name=Apple Watch - 38mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=3.2,name=Apple Watch Series 2 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=4.0,name=Apple Watch Series 3 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=4.1,name=Apple Watch Series 2 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=5.2,name=Apple Watch Series 3 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"

# iOS + watchOS
- DESTINATION="OS=10.3.1,name=iPhone 6s Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.0,name=iPhone 8" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.2,name=iPhone 6s Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.3,name=iPhone 7 Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=12.1,name=iPhone 8" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"

# tvOS
- DESTINATION="OS=9.0,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.0,name=Apple TV 4K" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=9.0,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=12.2,name=Apple TV 4K" PLATFORM="$TVOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"

# macOS
- DESTINATION="arch=x86_64" PLATFORM="$MACOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
Expand All @@ -50,7 +48,7 @@ script:
# Build Framework
- if [ $BUILD_FRAMEWORK == "YES" ]; then
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build| xcpretty;
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi

# Run Tests
Expand All @@ -62,7 +60,7 @@ script:
# Build Example
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -project "Example/Example.xcodeproj" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
xcodebuild -project "Example/Example.xcodeproj" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build| xcpretty;
xcodebuild -project "Example/Example.xcodeproj" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
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.5.0](https://github.com/Decybel07/L10n-swift/tree/5.5.0) (2019-06-20)
* Issue [#16](https://github.com/Decybel07/L10n-swift/issues/16) support for multiple arguments in plural function.

## [5.4.1](https://github.com/Decybel07/L10n-swift/tree/5.4.1) (2018-09-08)
* `Local` includes system settings for the region

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extension PluralsViewController: UITableViewDataSource {
let item = self.items[indexPath.row]

cell.textLabel?.text = L10n.shared.locale?.localizedString(forLanguageCode: item.language)
cell.detailTextLabel?.text = "plurals.numberOfApples".l10n(item, arg: self.value)
cell.detailTextLabel?.text = "plurals.numberOfApples".l10nPlural(item, self.value)

return cell
}
Expand Down
Loading

0 comments on commit 4de85ee

Please sign in to comment.