diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 63aeb1dd..01b688b1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,11 +7,11 @@ on: branches: '*' env: - DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer jobs: unit-tests: - runs-on: macos-11 + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -25,9 +25,9 @@ jobs: - name: Test run: swift test -v - test-iOS: - runs-on: macos-11 - needs: build + test-iOS-ResourceApp: + runs-on: macos-12 + needs: build-rswift steps: - name: Checkout uses: actions/checkout@v2 @@ -37,26 +37,27 @@ jobs: name: rswift-dev - name: Put build into place run: | - mkdir -p build/Debug - mv rswift-dev/rswift build/Debug/rswift - chmod +x build/Debug/rswift + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift - name: Pull cache uses: actions/cache@v2 id: podcache-ios with: - path: Examples/Pods + path: Examples/ResourceApp/Pods key: ${{ runner.os }}pods${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}pods - name: Install pods if: steps.podcache-ios.outputs.cache-hit != 'true' - run: pod install --project-directory=Examples + run: pod install --project-directory=Examples/ResourceApp - name: Test - run: fastlane scan --workspace "Examples/RswiftExamples.xcworkspace" --scheme "ResourceApp" + #run: fastlane scan --workspace "Examples/ResourceApp/ResourceApp.xcworkspace" --scheme "ResourceApp" + run: xcodebuild -workspace Examples/ResourceApp/ResourceApp.xcworkspace -scheme ResourceApp -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.0' test - test-tvOS: - runs-on: macos-11 - needs: build + test-iOS-StaticFrameworks: + runs-on: macos-12 + needs: build-rswift steps: - name: Checkout uses: actions/checkout@v2 @@ -66,25 +67,52 @@ jobs: name: rswift-dev - name: Put build into place run: | - mkdir -p build/Debug - mv rswift-dev/rswift build/Debug/rswift - chmod +x build/Debug/rswift - - name: Pull cache - uses: actions/cache@v2 - id: podcache-tvos + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift + - name: Test + #run: fastlane scan --project "Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj" --scheme "App" + run: xcodebuild -project Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj -scheme App -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.0' test + + test-iOS-LocalizedStringApp: + runs-on: macos-12 + needs: build-rswift + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download build + uses: actions/download-artifact@v1 with: - path: Examples/Pods - key: ${{ runner.os }}pods${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}pods - - name: Install pods - if: steps.podcache-tvos.outputs.cache-hit != 'true' - run: pod install --project-directory=Examples + name: rswift-dev + - name: Put build into place + run: | + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift + - name: Test + run: xcodebuild -project Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj -scheme LocalizedStringApp -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.0' test + + test-tvOS: + runs-on: macos-12 + needs: build-rswift + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download build + uses: actions/download-artifact@v1 + with: + name: rswift-dev + - name: Put build into place + run: | + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift - name: Test - run: fastlane scan --workspace "Examples/RswiftExamples.xcworkspace" --scheme "ResourceApp-tvOS" + #run: fastlane scan --project "Examples/RtvApp/RtvApp.xcodeproj" --scheme "ResourceApp-tvOS" + run: xcodebuild -project Examples/RtvApp/RtvApp.xcodeproj -scheme ResourceApp-tvOS -destination 'platform=tvOS Simulator,name=Apple TV,OS=16.0' test - build: - runs-on: macos-11 + build-rswift: + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -97,7 +125,7 @@ jobs: ${{ runner.os }}spm - name: Set version run: | - sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Rswift.swift + sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Config.swift - name: Build run: swift build -v -c release - name: Store artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 881d8fc8..4d221d84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,17 +5,17 @@ on: types: created env: - DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer jobs: release-build: - runs-on: macos-11 + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 - name: Set version run: | - sed -i "" "s/\(static let version = \"\).*\(\"\)/\1${TAG}\2/" Sources/rswift/Rswift.swift + sed -i "" "s/\(static let version = \"\).*\(\"\)/\1${TAG}\2/" Sources/rswift/Config.swift env: TAG: ${{ github.event.release.tag_name }} - name: Tarball source @@ -52,7 +52,9 @@ jobs: path: .build/apple/Products/Release/rswift - name: Archive ZIP - run: zip --junk-paths ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip .build/apple/Products/Release/rswift License + run: zip --junk-paths $FILENAME .build/apple/Products/Release/rswift License && zip --recurse-paths $FILENAME Sources/RswiftResources + env: + FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip - name: Notarize ZIP run: | sh notarize.sh @@ -74,7 +76,7 @@ jobs: - name: Publish to Cocoapods run: | - export POD_VERSION=$(echo $TAG_NAME | cut -c2-) + export POD_VERSION=$TAG_NAME pod trunk push env: TAG_NAME: ${{ github.event.release.tag_name }} diff --git a/Documentation/Images/RunBuildToolPluginsBlank.png b/Documentation/Images/RunBuildToolPluginsBlank.png new file mode 100644 index 00000000..849d4f18 Binary files /dev/null and b/Documentation/Images/RunBuildToolPluginsBlank.png differ diff --git a/Documentation/Images/RunBuildToolPluginsRswift.png b/Documentation/Images/RunBuildToolPluginsRswift.png new file mode 100644 index 00000000..26b0bc99 Binary files /dev/null and b/Documentation/Images/RunBuildToolPluginsRswift.png differ diff --git a/Documentation/Images/RunXcodeModifyPackages.png b/Documentation/Images/RunXcodeModifyPackages.png new file mode 100644 index 00000000..3c45791b Binary files /dev/null and b/Documentation/Images/RunXcodeModifyPackages.png differ diff --git a/Documentation/Migration.md b/Documentation/Migration.md index a176a830..26f20096 100644 --- a/Documentation/Migration.md +++ b/Documentation/Migration.md @@ -2,6 +2,46 @@ Pointers for migration between major versions. +## Upgrading to 7.0 + +[Demo video: Updating from R.swift 6 to Rswift 7](https://www.youtube.com/watch?v=icihJ_hin3I) + +#### Running the executable + +If you're using Swift Package Manager: + - Separate R.swift.Library is no longer needed, remove dependency on that package + - Add SPM dependency on `github.com/mac-cain13/R.swift.git` package + - Add `RswiftLibrary` to your targets + - Remove custom Run Script Build Phase that invokes `rswift` binary + - Under "Run Build Tool Plug-ins" Build Phase, add `RswiftGenerateInternalResources` or `RswiftGeneratePublicResources` ([Screenshot](Images/RunBuildToolPluginsRswift.png)) + - Right-click on your project, and run `RswiftXcodeModifyPackages` to modify your Xcode project so that the build tool plug-in will actually run during builds (this seems to fix a bug in Xcode?) ([Screenshot](Images/RunXcodeModifyPackages.png)) + +If you're using Mint or manual call `rswift` executable: + - Separate R.swift.Library is no longer needed, remove dependency on that package + - Add SPM dependency on `github.com/mac-cain13/R.swift.git` package + - Add `RswiftLibrary` to your targets + +Changes to the commandline tool `rswift` (not relevant when using SPM): + - Argument `accessLevel` renamed to `access-level` + - Argument `generateUITestFile` removed, if you need a separate file with just ids, call rswift a second time with `--generators id` + - Argument `hostingBundle` removed, bundle can be specified in code: `_R(bundle: someBundle)` + - Arguments removed: `bundleIdentifier`, `productModuleName`, `infoPlistFile`, `codeSignEntitlements`, `builtProductsDir`, `developerDir`, `platformDir`, `sdkRoot`, `sourceRoot`. Use environment variables instead. + +#### Library changes + +Internal changes in the Rswift support library: + - Renamed internal module, update `import Rswift` to `import RswiftResources` + - Removed protocols: `ColorResourceType`, `FileResourceType`, `FontResourceType`, `IdentifierType`, `ImageResourceType`, `StoryboardViewControllerResourceType`, `StringResourceType`, `Validatable` + - Added `StringResource1` up to `StringResource9`, for strings with parameters + - Renamed types: + * `ReuseIdentifierType` to `ReuseIdentifierContainer` + * `NibResourceType` to `NibReferenceContainer` + * `StoryboardResourceType` to `StoryboardReference` + * `StoryboardResourceWithInitialControllerType` to `InitialControllerContainer` + * `TypedStoryboardSegueInfo` to `TypedSegue` + * `StoryboardSegueIdentifier` to `SegueIdentifier` + + ## Upgrading to 6.0 - In the Build Phase, some changes are needed, [see an example screenshot](Images/BuildPhaseExample.png): diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj similarity index 77% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj index c81f6c45..75d804bf 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj @@ -3,12 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ - 4BBE4418B51EC4EA7E8ED322 /* libPods-LocalizedStringApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */; }; - 76F4720C6B697E9677FA72D7 /* libPods-LocalizedStringAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */; }; + E258099B29325C1F008EA19C /* ten.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = E258099929325C1F008EA19C /* ten.stringsdict */; }; E264FBA12319055A008E0DB5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBA02319055A008E0DB5 /* AppDelegate.swift */; }; E264FBB82319055D008E0DB5 /* LocalizedStringAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBB72319055D008E0DB5 /* LocalizedStringAppTests.swift */; }; E264FBCF2319082F008E0DB5 /* one.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBCE2319082E008E0DB5 /* one.strings */; }; @@ -19,8 +18,8 @@ E264FBE223190A19008E0DB5 /* six.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE023190A19008E0DB5 /* six.strings */; }; E264FBE623190A2F008E0DB5 /* seven.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE423190A2F008E0DB5 /* seven.strings */; }; E264FBEB23190A49008E0DB5 /* eight.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE923190A49008E0DB5 /* eight.strings */; }; - E264FBF023190BD4008E0DB5 /* R.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBEF23190BD4008E0DB5 /* R.generated.swift */; }; E264FBF4231A7335008E0DB5 /* nine.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBF6231A7335008E0DB5 /* nine.strings */; }; + E2E58371291D3AC2006E17D9 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E2E58370291D3AC2006E17D9 /* RswiftLibrary */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -34,12 +33,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringApp.debug.xcconfig"; path = "Target Support Files/Pods-LocalizedStringApp/Pods-LocalizedStringApp.debug.xcconfig"; sourceTree = ""; }; - 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringAppTests.release.xcconfig"; path = "Target Support Files/Pods-LocalizedStringAppTests/Pods-LocalizedStringAppTests.release.xcconfig"; sourceTree = ""; }; - 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringAppTests.debug.xcconfig"; path = "Target Support Files/Pods-LocalizedStringAppTests/Pods-LocalizedStringAppTests.debug.xcconfig"; sourceTree = ""; }; - 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LocalizedStringApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LocalizedStringAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringApp.release.xcconfig"; path = "Target Support Files/Pods-LocalizedStringApp/Pods-LocalizedStringApp.release.xcconfig"; sourceTree = ""; }; + E258099A29325C1F008EA19C /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = fr; path = fr.lproj/ten.stringsdict; sourceTree = ""; }; + E258099C29325C29008EA19C /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nl; path = nl.lproj/ten.stringsdict; sourceTree = ""; }; E264FB9D2319055A008E0DB5 /* LocalizedStringApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocalizedStringApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; E264FBA02319055A008E0DB5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E264FBAE2319055D008E0DB5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -63,12 +58,12 @@ E264FBEA23190A49008E0DB5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/eight.strings; sourceTree = ""; }; E264FBEC23190A5A008E0DB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/eight.strings; sourceTree = ""; }; E264FBED23190A65008E0DB5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/eight.strings; sourceTree = ""; }; - E264FBEF23190BD4008E0DB5 /* R.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = R.generated.swift; sourceTree = ""; }; E264FBF1231A6984008E0DB5 /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/five.strings"; sourceTree = ""; }; E264FBF5231A7335008E0DB5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/nine.strings; sourceTree = ""; }; E264FBF7231A7371008E0DB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/nine.strings; sourceTree = ""; }; E264FBF8231A7392008E0DB5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/nine.strings; sourceTree = ""; }; E264FBF9231A73BA008E0DB5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/nine.strings; sourceTree = ""; }; + E2E5836E291D3AB5006E17D9 /* R.swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = R.swift; path = ../..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -76,7 +71,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4BBE4418B51EC4EA7E8ED322 /* libPods-LocalizedStringApp.a in Frameworks */, + E2E58371291D3AC2006E17D9 /* RswiftLibrary in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -84,44 +79,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 76F4720C6B697E9677FA72D7 /* libPods-LocalizedStringAppTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2B4C6133AC39DF6B72B0EE6E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */, - B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 5E55C1A9CC154E8588A1B6F3 /* Pods */ = { - isa = PBXGroup; - children = ( - 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */, - C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */, - 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */, - 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; E264FB942319055A008E0DB5 = { isa = PBXGroup; children = ( - E264FBEF23190BD4008E0DB5 /* R.generated.swift */, + E2E5836D291D3AB5006E17D9 /* Packages */, E264FB9F2319055A008E0DB5 /* LocalizedStringApp */, E264FBB62319055D008E0DB5 /* LocalizedStringAppTests */, E264FB9E2319055A008E0DB5 /* Products */, - 5E55C1A9CC154E8588A1B6F3 /* Pods */, - 2B4C6133AC39DF6B72B0EE6E /* Frameworks */, + E2E5836F291D3AC2006E17D9 /* Frameworks */, ); + indentWidth = 2; sourceTree = ""; + tabWidth = 2; }; E264FB9E2319055A008E0DB5 /* Products */ = { isa = PBXGroup; @@ -146,6 +121,7 @@ E264FBE423190A2F008E0DB5 /* seven.strings */, E264FBE923190A49008E0DB5 /* eight.strings */, E264FBF6231A7335008E0DB5 /* nine.strings */, + E258099929325C1F008EA19C /* ten.stringsdict */, ); path = LocalizedStringApp; sourceTree = ""; @@ -159,6 +135,21 @@ path = LocalizedStringAppTests; sourceTree = ""; }; + E2E5836D291D3AB5006E17D9 /* Packages */ = { + isa = PBXGroup; + children = ( + E2E5836E291D3AB5006E17D9 /* R.swift */, + ); + name = Packages; + sourceTree = ""; + }; + E2E5836F291D3AC2006E17D9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -166,8 +157,6 @@ isa = PBXNativeTarget; buildConfigurationList = E264FBBC2319055D008E0DB5 /* Build configuration list for PBXNativeTarget "LocalizedStringApp" */; buildPhases = ( - 39DE3C8105AEB010961037E4 /* [CP] Check Pods Manifest.lock */, - E264FBEE23190B03008E0DB5 /* R.swift */, E264FB992319055A008E0DB5 /* Sources */, E264FB9A2319055A008E0DB5 /* Frameworks */, E264FB9B2319055A008E0DB5 /* Resources */, @@ -175,8 +164,12 @@ buildRules = ( ); dependencies = ( + E2E58373291D3AD4006E17D9 /* PBXTargetDependency */, ); name = LocalizedStringApp; + packageProductDependencies = ( + E2E58370291D3AC2006E17D9 /* RswiftLibrary */, + ); productName = LocalizedStringApp; productReference = E264FB9D2319055A008E0DB5 /* LocalizedStringApp.app */; productType = "com.apple.product-type.application"; @@ -185,7 +178,6 @@ isa = PBXNativeTarget; buildConfigurationList = E264FBBF2319055D008E0DB5 /* Build configuration list for PBXNativeTarget "LocalizedStringAppTests" */; buildPhases = ( - 00D3DD3BE0DE0677D3835C0F /* [CP] Check Pods Manifest.lock */, E264FBAF2319055D008E0DB5 /* Sources */, E264FBB02319055D008E0DB5 /* Frameworks */, E264FBB12319055D008E0DB5 /* Resources */, @@ -207,7 +199,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1410; ORGANIZATIONNAME = R.swift; TargetAttributes = { E264FB9C2319055A008E0DB5 = { @@ -252,6 +244,7 @@ E264FBE223190A19008E0DB5 /* six.strings in Resources */, E264FBF4231A7335008E0DB5 /* nine.strings in Resources */, E264FBCF2319082F008E0DB5 /* one.strings in Resources */, + E258099B29325C1F008EA19C /* ten.stringsdict in Resources */, E264FBD22319083B008E0DB5 /* two.strings in Resources */, E264FBDD231909F6008E0DB5 /* five.strings in Resources */, E264FBE623190A2F008E0DB5 /* seven.strings in Resources */, @@ -269,80 +262,12 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 00D3DD3BE0DE0677D3835C0F /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LocalizedStringAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 39DE3C8105AEB010961037E4 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LocalizedStringApp-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E264FBEE23190B03008E0DB5 /* R.swift */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(TEMP_DIR)/rswift-lastrun", - ); - name = R.swift; - outputFileListPaths = ( - ); - outputPaths = ( - $SRCROOT/R.generated.swift, - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$SRCROOT/../build/Debug/rswift\" generate \"$SRCROOT/R.generated.swift\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ E264FB992319055A008E0DB5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E264FBA12319055A008E0DB5 /* AppDelegate.swift in Sources */, - E264FBF023190BD4008E0DB5 /* R.generated.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -362,9 +287,22 @@ target = E264FB9C2319055A008E0DB5 /* LocalizedStringApp */; targetProxy = E264FBB42319055D008E0DB5 /* PBXContainerItemProxy */; }; + E2E58373291D3AD4006E17D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = E2E58372291D3AD4006E17D9 /* RswiftGenerateInternalResources */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + E258099929325C1F008EA19C /* ten.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + E258099A29325C1F008EA19C /* fr */, + E258099C29325C29008EA19C /* nl */, + ); + name = ten.stringsdict; + sourceTree = ""; + }; E264FBD02319083B008E0DB5 /* two.strings */ = { isa = PBXVariantGroup; children = ( @@ -449,6 +387,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -471,6 +410,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -495,7 +435,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -509,6 +449,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -531,6 +472,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -549,7 +491,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -561,7 +503,6 @@ }; E264FBBD2319055D008E0DB5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -580,7 +521,6 @@ }; E264FBBE2319055D008E0DB5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -599,13 +539,11 @@ }; E264FBC02319055D008E0DB5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = LocalizedStringAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -621,13 +559,11 @@ }; E264FBC12319055D008E0DB5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = LocalizedStringAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -672,6 +608,17 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E2E58370291D3AC2006E17D9 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; + E2E58372291D3AD4006E17D9 /* RswiftGenerateInternalResources */ = { + isa = XCSwiftPackageProductDependency; + productName = "plugin:RswiftGenerateInternalResources"; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E264FB952319055A008E0DB5 /* Project object */; } diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 66% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 593ee26a..919434a6 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Examples/RswiftExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/RswiftExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..284750e1 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e", + "version" : "2.9.0" + } + } + ], + "version" : 2 +} diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme index ccbe0368..62800d09 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "nl"> diff --git a/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme new file mode 100644 index 00000000..ad85e417 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme index 42a8fc96..c07378b1 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "en"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme index 44203c86..fb4dfd2f 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "fr-CA"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme index 87bc8e30..5c2a0c44 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "fr"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme index c1e4f955..b82f8bd9 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "tr"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme similarity index 99% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme index 45d771c6..2c44d19e 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme @@ -1,6 +1,6 @@ Bool { +/* let myprefs: [String] = ["fr-CA"] print("Locale.preferredLanguages:") @@ -124,7 +125,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { print(R.string.nine.nine3()) print(R.string.nine.nine3(preferredLanguages: myprefs)) print() - +*/ return true diff --git a/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings index 2d70c182..bdc1aed9 100644 --- a/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings @@ -9,3 +9,7 @@ "eight1" = "eight 1, localized base"; "eight2" = "eight 2, localized base"; "eight3" = "eight 3, localized base"; + +"eightArg1" = "eight 1 %@, localized base"; +"eightArg2" = "eight 2 %@, localized base"; +"eightArg3" = "eight 3 %@, localized base"; diff --git a/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings index a1c055bb..46c5d870 100644 --- a/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings @@ -9,3 +9,7 @@ "nine1" = "nine 1, localized base"; "nine2" = "nine 2, localized base"; "nine3" = "nine 3, localized base"; + +"nineArg1" = "nine 1 %@, localized base"; +"nineArg2" = "nine 2 %@, localized base"; +"nineArg3" = "nine 3 %@, localized base"; diff --git a/LocalizedStringApp/LocalizedStringApp/Info.plist b/Examples/LocalizedStringApp/LocalizedStringApp/Info.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/Info.plist rename to Examples/LocalizedStringApp/LocalizedStringApp/Info.plist diff --git a/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings b/Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings similarity index 80% rename from LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings index 034bb38a..2fce0fce 100644 --- a/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings @@ -7,3 +7,4 @@ */ "four1" = "four 1, localized catalan"; +"fourArg" = "four %@, localized catalan"; diff --git a/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings similarity index 77% rename from LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings index a869aab1..5fc0e438 100644 --- a/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings @@ -7,3 +7,7 @@ */ "five1" = "five 1, localized english gb"; + + + +"fiveArg1" = "five 1 %@, localized english gb"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings index 8b0ec1c2..9c634921 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings @@ -9,3 +9,7 @@ "five1" = "five 1, localized english"; "five2" = "five 2, localized english"; "five3" = "five 3, localized english"; + +"fiveArg1" = "five 1 %@, localized english"; +"fiveArg2" = "five 2 %@, localized english"; +"fiveArg3" = "five 3 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings index 354a35db..d25d64ca 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings @@ -8,3 +8,7 @@ "nine1" = "nine 1, localized english"; "nine2" = "nine 2, localized english"; + + +"nineArg1" = "nine 1 %@, localized english"; +"nineArg2" = "nine 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings index 6113ce2b..58bc679f 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings @@ -8,3 +8,7 @@ "seven1" = "seven 1, localized english"; "seven2" = "seven 2, localized english"; + + +"sevenArg1" = "seven 1 %@, localized english"; +"sevenArg2" = "seven 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings index e491aaf1..7a30f0d3 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings @@ -8,3 +8,6 @@ "three1" = "three 1, localized english"; "three2" = "three 2, localized english"; + +"threeArg1" = "three 1 %@, localized english"; +"threeArg2" = "three 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings diff --git a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings similarity index 77% rename from LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings index a8527b0e..2c8b493d 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings @@ -7,3 +7,7 @@ */ "five1" = "five 1, localized french canada"; + + + +"fiveArg1" = "five 1 %@, localized french canada"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings similarity index 78% rename from LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings index 5d12bbb4..5c3e6b4b 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings @@ -7,3 +7,5 @@ */ "six1" = "six 1, localized french canada"; + +"sixArg1" = "six 1 %@, localized french canada"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings index eb516b34..1806af6e 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings @@ -8,3 +8,7 @@ "eight1" = "eight 1, localized french"; "eight2" = "eight 2, localized french"; + + +"eightArg1" = "eight 1 %@, localized french"; +"eightArg2" = "eight 2 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings index 510cff0d..d4aa4e5e 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings @@ -10,3 +10,7 @@ "five2" = "five 2, localized french"; "five4" = "five 4, localized french"; +"fiveArg1" = "five 1 %@, localized french"; +"fiveArg2" = "five 2 %@, localized french"; + +"fiveArg4" = "five 4 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings index dfd502f9..0eb5eedc 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings @@ -8,3 +8,7 @@ "nine1" = "nine 1, localized french"; "nine2" = "nine 2, localized french"; + + +"nineArg1" = "nine 1 %@, localized french"; +"nineArg2" = "nine 2 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings similarity index 61% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings index 0b861449..103154fa 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings @@ -10,3 +10,7 @@ "seven2" = "seven 2, localized french"; "seven3" = "seven 3, localized french"; "seven4" = "seven 4, localized french"; +"sevenArg1" = "seven 1 %@, localized french"; +"sevenArg2" = "seven 2 %@, localized french"; +"sevenArg3" = "seven 3 %@, localized french"; +"sevenArg4" = "seven 4 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings similarity index 71% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings index 4662729a..4204e05f 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings @@ -8,3 +8,5 @@ "six1" = "six 1, localized french"; "six2" = "six 2, localized french"; +"sixArg1" = "six 1 %@, localized french"; +"sixArg2" = "six 2 %@, localized french"; diff --git a/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict new file mode 100644 index 00000000..79cfd230 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict @@ -0,0 +1,22 @@ + + + + + ten1 + + NSStringLocalizedFormatKey + ten 1 - %#@things@, localized french + things + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d thing + other + %d things + + + + diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings index e021e843..201254a5 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings @@ -10,3 +10,7 @@ "eight4" = "eight 4, localized dutch"; +"eightArg1" = "eight 1 %@, localized dutch"; + + +"eightArg4" = "eight 4 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings similarity index 81% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings index 107b1298..f5166b61 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings @@ -7,3 +7,4 @@ */ "four1" = "four 1, localized dutch"; +"fourArg" = "four %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings index 731f2415..1c90ba78 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings @@ -10,3 +10,7 @@ "nine4" = "nine 4, localized dutch"; +"nineArg1" = "nine 1 %@, localized dutch"; + + +"nineArg4" = "nine 4 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings index dcc6ac44..330aae1d 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings @@ -10,3 +10,7 @@ "seven4" = "seven 4, localized dutch"; +"sevenArg1" = "seven 1 %@, localized dutch"; + + +"sevenArg4" = "seven 4 %@, localized dutch"; diff --git a/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict new file mode 100644 index 00000000..cb2470e3 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict @@ -0,0 +1,22 @@ + + + + + ten1 + + NSStringLocalizedFormatKey + ten 1 - %#@things@, localized dutch + things + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d thing + other + %d things + + + + diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings index 9ce1948e..886cdfcf 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings @@ -9,3 +9,6 @@ "three1" = "three 1, localized dutch"; "three3" = "three 3, localized dutch"; +"threeArg1" = "three 1 %@, localized dutch"; + +"threeArg3" = "three 3 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/one.strings b/Examples/LocalizedStringApp/LocalizedStringApp/one.strings similarity index 84% rename from LocalizedStringApp/LocalizedStringApp/one.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/one.strings index a7684a4f..8b41a199 100644 --- a/LocalizedStringApp/LocalizedStringApp/one.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/one.strings @@ -8,3 +8,4 @@ "one1" = "one 1, not localized"; "one2" = "one 2, not localized"; +"oneArg" = "one %@, not localized"; diff --git a/LocalizedStringApp/LocalizedStringAppTests/Info.plist b/Examples/LocalizedStringApp/LocalizedStringAppTests/Info.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringAppTests/Info.plist rename to Examples/LocalizedStringApp/LocalizedStringAppTests/Info.plist diff --git a/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift b/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift new file mode 100644 index 00000000..a180e156 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift @@ -0,0 +1,1019 @@ +// +// LocalizedStringAppTests.swift +// LocalizedStringAppTests +// +// Created by Tom Lokhorst on 2019-08-30. +// Copyright © 2019 R.swift. All rights reserved. +// + +import XCTest +@testable import LocalizedStringApp + +class LocalizedStringAppTests: XCTestCase { + + func testDefault() { + + /* one */ + XCTAssertEqual( + R.string.one.one1(), + NSLocalizedString("one1", tableName: "one", comment: "") + ) + XCTAssertEqual( + R.string.one.one2(), + NSLocalizedString("one2", tableName: "one", comment: "") + ) + XCTAssertEqual( + R.string.one.oneArg("ARG"), + String(format: NSLocalizedString("oneArg", tableName: "one", comment: ""), "ARG") + ) + + /* two */ + XCTAssertEqual( + R.string.two.two1(), + NSLocalizedString("two1", tableName: "two", comment: "") + ) + XCTAssertEqual( + R.string.two.two2("Hello"), + String(format: NSLocalizedString("two2", tableName: "two", comment: ""), locale: Locale.current, "Hello") + ) + + /* three */ + XCTAssertEqual( + R.string.three.three1(), + NSLocalizedString("three1", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.three2(), + NSLocalizedString("three2", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.three3(), + NSLocalizedString("three3", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.threeArg1("ARG"), + String(format: NSLocalizedString("threeArg1", tableName: "three", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.three.threeArg2("ARG"), + String(format: NSLocalizedString("threeArg2", tableName: "three", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.three.threeArg3("ARG"), + String(format: NSLocalizedString("threeArg3", tableName: "three", comment: ""), "ARG") + ) + + /* four */ + XCTAssertEqual( + R.string.four.four1(), + NSLocalizedString("four1", tableName: "four", comment: "") + ) + XCTAssertEqual( + R.string.four.fourArg("ARG"), + String(format: NSLocalizedString("fourArg", tableName: "four", comment: ""), "ARG") + ) + + /* five */ + XCTAssertEqual( + R.string.five.five1(), + NSLocalizedString("five1", tableName: "five", comment: "") + ) + XCTAssertEqual( + R.string.five.five2(), + NSLocalizedString("five2", tableName: "five", value: "five 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.five.five4(), + NSLocalizedString("five4", tableName: "five", value: "five 4, localized french", comment: "") + ) + XCTAssertEqual( + R.string.five.fiveArg1("ARG"), + String(format: NSLocalizedString("fiveArg1", tableName: "five", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.five.fiveArg2("ARG"), + String(format: NSLocalizedString("fiveArg2", tableName: "five", value: "five 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.five.fiveArg4("ARG"), + String(format: NSLocalizedString("fiveArg4", tableName: "five", value: "five 4 %@, localized french", comment: ""), "ARG") + ) + + /* six */ + XCTAssertEqual( + R.string.six.six1(), + NSLocalizedString("six1", tableName: "six", comment: "") + ) + XCTAssertEqual( + R.string.six.six2(), + NSLocalizedString("six2", tableName: "six", value: "six 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.six.sixArg1("ARG"), + String(format: NSLocalizedString("sixArg1", tableName: "six", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.six.sixArg2("ARG"), + String(format: NSLocalizedString("sixArg2", tableName: "six", value: "six 2 %@, localized french", comment: ""), "ARG") + ) + + /* seven */ + XCTAssertEqual( + R.string.seven.seven1(), + NSLocalizedString("seven1", tableName: "seven", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven2(), + NSLocalizedString("seven2", tableName: "seven", value: "seven 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven3(), + NSLocalizedString("seven3", tableName: "seven", value: "seven 3, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven4(), + NSLocalizedString("seven4", tableName: "seven", value: "seven 4, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.sevenArg1("ARG"), + String(format: NSLocalizedString("sevenArg1", tableName: "seven", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg2("ARG"), + String(format: NSLocalizedString("sevenArg2", tableName: "seven", value: "seven 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg3("ARG"), + String(format: NSLocalizedString("sevenArg3", tableName: "seven", value: "seven 3 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg4("ARG"), + String(format: NSLocalizedString("sevenArg4", tableName: "seven", value: "seven 4 %@, localized french", comment: ""), "ARG") + ) + + /* eight */ + XCTAssertEqual( + R.string.eight.eight1(), + NSLocalizedString("eight1", tableName: "eight", comment: "") + ) + XCTAssertEqual( + R.string.eight.eight2(), + NSLocalizedString("eight2", tableName: "eight", value: "eight 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.eight.eight3(), + NSLocalizedString("eight3", tableName: "eight", comment: "") + ) + XCTAssertEqual( + R.string.eight.eightArg1("ARG"), + String(format: NSLocalizedString("eightArg1", tableName: "eight", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.eight.eightArg2("ARG"), + String(format: NSLocalizedString("eightArg2", tableName: "eight", value: "eight 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.eight.eightArg3("ARG"), + String(format: NSLocalizedString("eightArg3", tableName: "eight", comment: ""), "ARG") + ) + + /* nine */ + XCTAssertEqual( + R.string.nine.nine1(), + NSLocalizedString("nine1", tableName: "nine", comment: "") + ) + XCTAssertEqual( + R.string.nine.nine2(), + NSLocalizedString("nine2", tableName: "nine", value: "nine 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.nine.nine3(), + NSLocalizedString("nine3", tableName: "nine", comment: "") + ) + XCTAssertEqual( + R.string.nine.nineArg1("ARG"), + String(format: NSLocalizedString("nineArg1", tableName: "nine", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.nine.nineArg2("ARG"), + String(format: NSLocalizedString("nineArg2", tableName: "nine", value: "nine 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.nine.nineArg3("ARG"), + String(format: NSLocalizedString("nineArg3", tableName: "nine", comment: ""), "ARG") + ) + + /* ten */ + XCTAssertEqual( + R.string.ten.ten1(things: 1), + String(format: NSLocalizedString("ten1", tableName: "ten", comment: ""), 1) + ) + } + + + func testTurkish() { + let myprefs = ["tr"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized french") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized french") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized french") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized french") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + func testDutch() { + let myprefs = ["nl"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized dutch") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three 3, localized dutch") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized dutch") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "three 3 ARG, localized dutch") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four 1, localized dutch") + XCTAssertEqual(strings.four.fourArg("ARG"), + "four ARG, localized dutch") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized dutch") + XCTAssertEqual(strings.seven.seven2(), + "seven2") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized dutch") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized dutch") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "sevenArg2") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized dutch") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized dutch") + XCTAssertEqual(strings.eight.eight2(), + "eight2") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized dutch") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eightArg2") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized dutch") + XCTAssertEqual(strings.nine.nine2(), + "nine2") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized dutch") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nineArg2") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized dutch") + } + + func testEnglish() { + let myprefs = ["en"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two 1, localized english") + XCTAssertEqual(strings.two.two2("Hello"), + "two 2, Hello localized english") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized english") + XCTAssertEqual(strings.three.three2(), + "three 2, localized english") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized english") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "three 2 ARG, localized english") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized english") + XCTAssertEqual(strings.five.five2(), + "five 2, localized english") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized english") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized english") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized english") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized english") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven4") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "sevenArg4") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized english") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized english") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized english") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized english") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testEnglishGB() { + let myprefs = ["en-GB"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two 1, localized english") + XCTAssertEqual(strings.two.two2("Hello"), + "two 2, Hello localized english") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized english") + XCTAssertEqual(strings.three.three2(), + "three 2, localized english") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized english") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "three 2 ARG, localized english") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized english gb") + XCTAssertEqual(strings.five.five2(), + "five2") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized english gb") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "fiveArg2") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized english") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized english") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven4") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "sevenArg4") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized base") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized base") + XCTAssertEqual(strings.nine.nine3(), + "nine 3, localized base") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nine 3 ARG, localized base") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testFrench() { + let myprefs = ["fr"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized french") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized french") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized french") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized french") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testFrenchCanada() { + let myprefs = ["fr-CA"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french canada") + XCTAssertEqual(strings.five.five2(), + "five2") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french canada") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "fiveArg2") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french canada") + XCTAssertEqual(strings.six.six2(), + "six2") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french canada") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "sixArg2") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized base") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized base") + XCTAssertEqual(strings.nine.nine3(), + "nine 3, localized base") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nine 3 ARG, localized base") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testPrefferedLanguages(myprefs: [String]) { + + /* one */ + XCTAssertEqual(R.string.one.one1(preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).one1()) + XCTAssertEqual(R.string.one.one2(preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).one2()) + XCTAssertEqual(R.string.one.oneArg("ARG", preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).oneArg("ARG")) + + /* two */ + XCTAssertEqual(R.string.two.two1(preferredLanguages: myprefs), + R.string.two(preferredLanguages: myprefs).two1()) + XCTAssertEqual(R.string.two.two2("Hello", preferredLanguages: myprefs), + R.string.two(preferredLanguages: myprefs).two2("Hello")) + + /* three */ + XCTAssertEqual(R.string.three.three1(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three1()) + XCTAssertEqual(R.string.three.three2(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three2()) + XCTAssertEqual(R.string.three.three3(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three3()) + XCTAssertEqual(R.string.three.threeArg1("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg1("ARG")) + XCTAssertEqual(R.string.three.threeArg2("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg2("ARG")) + XCTAssertEqual(R.string.three.threeArg3("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg3("ARG")) + + /* four */ + XCTAssertEqual(R.string.four.four1(preferredLanguages: myprefs), + R.string.four(preferredLanguages: myprefs).four1()) + XCTAssertEqual(R.string.four.fourArg("ARG", preferredLanguages: myprefs), + R.string.four(preferredLanguages: myprefs).fourArg("ARG")) + + /* five */ + XCTAssertEqual(R.string.five.five1(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five1()) + XCTAssertEqual(R.string.five.five2(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five2()) + XCTAssertEqual(R.string.five.five4(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five4()) + XCTAssertEqual(R.string.five.fiveArg1("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg1("ARG")) + XCTAssertEqual(R.string.five.fiveArg2("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg2("ARG")) + XCTAssertEqual(R.string.five.fiveArg4("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg4("ARG")) + + /* six */ + XCTAssertEqual(R.string.six.six1(preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).six1()) + XCTAssertEqual(R.string.six.six2(preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).six2()) + XCTAssertEqual(R.string.six.sixArg1("ARG", preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).sixArg1("ARG")) + XCTAssertEqual(R.string.six.sixArg2("ARG", preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).sixArg2("ARG")) + + /* seven */ + XCTAssertEqual(R.string.seven.seven1(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven1()) + XCTAssertEqual(R.string.seven.seven2(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven2()) + XCTAssertEqual(R.string.seven.seven3(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven3()) + XCTAssertEqual(R.string.seven.seven4(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven4()) + XCTAssertEqual(R.string.seven.sevenArg1("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg1("ARG")) + XCTAssertEqual(R.string.seven.sevenArg2("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg2("ARG")) + XCTAssertEqual(R.string.seven.sevenArg3("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg3("ARG")) + XCTAssertEqual(R.string.seven.sevenArg4("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg4("ARG")) + + /* eight */ + XCTAssertEqual(R.string.eight.eight1(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight1()) + XCTAssertEqual(R.string.eight.eight2(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight2()) + XCTAssertEqual(R.string.eight.eight3(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight3()) + XCTAssertEqual(R.string.eight.eightArg1("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg1("ARG")) + XCTAssertEqual(R.string.eight.eightArg2("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg2("ARG")) + XCTAssertEqual(R.string.eight.eightArg3("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg3("ARG")) + + /* nine */ + XCTAssertEqual(R.string.nine.nine1(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine1()) + XCTAssertEqual(R.string.nine.nine2(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine2()) + XCTAssertEqual(R.string.nine.nine3(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine3()) + XCTAssertEqual(R.string.nine.nineArg1("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg1("ARG")) + XCTAssertEqual(R.string.nine.nineArg2("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg2("ARG")) + XCTAssertEqual(R.string.nine.nineArg3("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg3("ARG")) + + /* ten */ + XCTAssertEqual(R.string.ten.ten1(things: 1, preferredLanguages: myprefs), + R.string.ten(preferredLanguages: myprefs).ten1(things: 1)) + } + +} diff --git a/Examples/Podfile b/Examples/Podfile deleted file mode 100644 index 77c965e1..00000000 --- a/Examples/Podfile +++ /dev/null @@ -1,50 +0,0 @@ -use_frameworks! -workspace 'RswiftExamples' - -def rswiftlib - pod 'R.swift.Library', :git => 'https://github.com/mac-cain13/R.swift.Library.git' # for CI builds -# pod 'R.swift.Library', :path => '../../R.swift.Library' # for development -end - -target 'ResourceApp' do - platform :ios, '9.0' - project 'ResourceApp/ResourceApp' - - pod 'SWRevealViewController' - - rswiftlib -end - -target 'ResourceAppTests' do - platform :ios, '9.0' - project 'ResourceApp/ResourceApp' - - pod 'SWRevealViewController' - - rswiftlib -end - -target 'ResourceApp-watchOS-Extension' do - platform :watchos, '2.2' - project 'RwatchApp/RwatchApp' - - rswiftlib -end - -target 'App' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end - -target 'Foo' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end - -target 'Bar' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end diff --git a/Examples/Podfile.lock b/Examples/Podfile.lock deleted file mode 100644 index 8551664d..00000000 --- a/Examples/Podfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -PODS: - - R.swift.Library (5.2.0) - - SWRevealViewController (2.3.0) - -DEPENDENCIES: - - R.swift.Library (from `https://github.com/mac-cain13/R.swift.Library.git`) - - SWRevealViewController - -SPEC REPOS: - trunk: - - SWRevealViewController - -EXTERNAL SOURCES: - R.swift.Library: - :git: https://github.com/mac-cain13/R.swift.Library.git - -CHECKOUT OPTIONS: - R.swift.Library: - :commit: 5a54805e3d08077e46edb2274ff27b20b700f568 - :git: https://github.com/mac-cain13/R.swift.Library.git - -SPEC CHECKSUMS: - R.swift.Library: 5ba4f1631300caf9a4d890186930da85d540769d - SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a - -PODFILE CHECKSUM: d9a891a898cc2f561fdd4b8424cb30a1e14741d9 - -COCOAPODS: 1.11.2 diff --git a/Examples/ResourceApp/Podfile b/Examples/ResourceApp/Podfile new file mode 100644 index 00000000..7f01c7db --- /dev/null +++ b/Examples/ResourceApp/Podfile @@ -0,0 +1,10 @@ +use_frameworks! +workspace 'ResourceApp' + +target 'ResourceApp' do + platform :ios, '11.0' + project 'ResourceApp' + + pod 'SWRevealViewController' +end + diff --git a/Examples/ResourceApp/Podfile.lock b/Examples/ResourceApp/Podfile.lock new file mode 100644 index 00000000..54e5da8c --- /dev/null +++ b/Examples/ResourceApp/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - SWRevealViewController (2.3.0) + +DEPENDENCIES: + - SWRevealViewController + +SPEC REPOS: + trunk: + - SWRevealViewController + +SPEC CHECKSUMS: + SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a + +PODFILE CHECKSUM: d26d2eef2a0dde8b4346e946f571932e6e11cf9b + +COCOAPODS: 1.11.3 diff --git a/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj b/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj index f1b4202f..2fa4d0f2 100644 --- a/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj +++ b/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj @@ -82,10 +82,10 @@ E296935A1CAD64D100401D53 /* associatedtype in Resources */ = {isa = PBXBuildFile; fileRef = E29693591CAD64D100401D53 /* associatedtype */; }; E296935C1CAD666200401D53 /* #column in Resources */ = {isa = PBXBuildFile; fileRef = E296935B1CAD666200401D53 /* #column */; }; E2A10EF81CD13779006BFC63 /* RelativeToProject.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2A10EF71CD13779006BFC63 /* RelativeToProject.xib */; }; + E2C415D028EED7890028D537 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E2C415CF28EED7890028D537 /* RswiftLibrary */; }; E2CD68671D7CADEA00BEBE59 /* hello.txt in Resources */ = {isa = PBXBuildFile; fileRef = E2CD68641D7CACC100BEBE59 /* hello.txt */; }; E2DB0EB02334DCC100815AAF /* InfoPlistTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2DB0EAF2334DCC100815AAF /* InfoPlistTests.swift */; }; E2F768FC244D92A200761E14 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2F768FB244D92A200761E14 /* SceneDelegate.swift */; }; - E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -127,25 +127,16 @@ /* Begin PBXFileReference section */ 1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 22ACD120062243785169391F /* Pods-Shared-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.debug.xcconfig"; sourceTree = ""; }; - 3677277BC1C4F3F77310381B /* Pods-Shared-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.release.xcconfig"; sourceTree = ""; }; - 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.release.xcconfig"; sourceTree = ""; }; - 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = ""; }; + 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = ""; }; 5D1AFAB01C858637003FE7AB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 5D1AFAB21C858647003FE7AB /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; 5D1AFAB31C85864F003FE7AB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 5D9E41331C96918E002172D3 /* StringsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringsTests.swift; sourceTree = ""; }; - 70B4C9EF7848D510D018EB8E /* Pods-Shared-ResourceApp-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; sourceTree = ""; }; - 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.debug.xcconfig"; sourceTree = ""; }; - 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceAppTests/Pods-Shared-ResourceAppTests.release.xcconfig"; sourceTree = ""; }; A3D0897320CF6FDA007ED462 /* Keep.dont.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Keep.dont.ignoreme.png; sourceTree = ""; }; A3D0897520CF6FE4007ED462 /* ExplicitInclude.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ExplicitInclude.ignoreme.png; sourceTree = ""; }; - BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = ""; }; + BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = ""; }; C378DD791C68C2BF003598B8 /* SupplementaryElement.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SupplementaryElement.xib; sourceTree = ""; }; CCBC9CB81EC4809D002F3D0E /* Images2.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images2.xcassets; sourceTree = ""; }; - D41BDD927A1804A5D763C750 /* Pods-Shared-ResourceApp-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.release.xcconfig"; sourceTree = ""; }; - D436146321CC7322E5ECEE24 /* Pods-Shared-ResourceAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceAppTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceAppTests/Pods-Shared-ResourceAppTests.debug.xcconfig"; sourceTree = ""; }; D50175BA1B5FEF6E00DB8314 /* rswift.log */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rswift.log; sourceTree = SOURCE_ROOT; }; D50175BD1B5FEFD000DB8314 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Secondary.storyboard; sourceTree = ""; }; D5159E9D1BBC33680013F52A /* Colors@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Colors@2x.jpg"; sourceTree = ""; }; @@ -221,6 +212,7 @@ E29693591CAD64D100401D53 /* associatedtype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associatedtype; sourceTree = ""; }; E296935B1CAD666200401D53 /* #column */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "#column"; sourceTree = ""; }; E2A10EF71CD13779006BFC63 /* RelativeToProject.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RelativeToProject.xib; sourceTree = ""; }; + E2C415CE28EED7580028D537 /* R.swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = R.swift; path = ../..; sourceTree = ""; }; E2CD68631D7CACC100BEBE59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text; name = Base; path = Base.lproj/hello.txt; sourceTree = ""; }; E2CD68651D7CACCA00BEBE59 /* es */ = {isa = PBXFileReference; lastKnownFileType = text; name = es; path = es.lproj/hello.txt; sourceTree = ""; }; E2CD68661D7CACCB00BEBE59 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text; name = nl; path = nl.lproj/hello.txt; sourceTree = ""; }; @@ -234,6 +226,7 @@ buildActionMask = 2147483647; files = ( C30DF7218982DFFDAFAD2A11 /* Pods_ResourceApp.framework in Frameworks */, + E2C415D028EED7890028D537 /* RswiftLibrary in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -241,7 +234,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -253,7 +245,6 @@ children = ( D5B799881C1B8F0C009EA901 /* AVKit.framework */, 1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */, - 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -276,16 +267,8 @@ 6BD8864A6B6559C4D6F93D81 /* Pods */ = { isa = PBXGroup; children = ( - 22ACD120062243785169391F /* Pods-Shared-ResourceApp.debug.xcconfig */, - 3677277BC1C4F3F77310381B /* Pods-Shared-ResourceApp.release.xcconfig */, - 70B4C9EF7848D510D018EB8E /* Pods-Shared-ResourceApp-tvOS.debug.xcconfig */, - D41BDD927A1804A5D763C750 /* Pods-Shared-ResourceApp-tvOS.release.xcconfig */, - D436146321CC7322E5ECEE24 /* Pods-Shared-ResourceAppTests.debug.xcconfig */, - 9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */, BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */, 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */, - 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */, - 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -311,6 +294,7 @@ D55C6CAF1B5D757300301B0D = { isa = PBXGroup; children = ( + E2C415CD28EED7580028D537 /* Packages */, E243EFA32510DFA600DC653F /* RswiftUI.xcodeproj */, D5DE480D1B5E1CC7000F6A85 /* R.generated.swift */, D5EE1B5722DEEFBF00A901EC /* R.UITest.generated.swift */, @@ -457,6 +441,14 @@ path = "ResourceApp/Relative To Project"; sourceTree = SOURCE_ROOT; }; + E2C415CD28EED7580028D537 /* Packages */ = { + isa = PBXGroup; + children = ( + E2C415CE28EED7580028D537 /* R.swift */, + ); + name = Packages; + sourceTree = ""; + }; E2CD68611D7CAC9200BEBE59 /* Localized */ = { isa = PBXGroup; children = ( @@ -485,6 +477,9 @@ dependencies = ( ); name = ResourceApp; + packageProductDependencies = ( + E2C415CF28EED7890028D537 /* RswiftLibrary */, + ); productName = ResourceApp; productReference = D55C6CB81B5D757300301B0D /* ResourceApp.app */; productType = "com.apple.product-type.application"; @@ -493,11 +488,9 @@ isa = PBXNativeTarget; buildConfigurationList = D55C6CDC1B5D757300301B0D /* Build configuration list for PBXNativeTarget "ResourceAppTests" */; buildPhases = ( - ED8FCF67313DC003391627B7 /* [CP] Check Pods Manifest.lock */, D55C6CCB1B5D757300301B0D /* Sources */, D55C6CCC1B5D757300301B0D /* Frameworks */, D55C6CCD1B5D757300301B0D /* Resources */, - 45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -515,6 +508,10 @@ D55C6CB01B5D757300301B0D /* Project object */ = { isa = PBXProject; attributes = { + KnownAssetTags = ( + one, + two, + ); LastSwiftMigration = 0700; LastSwiftUpdateCheck = 1000; LastUpgradeCheck = 1210; @@ -655,26 +652,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework", - "${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 89BF8D4EC08D38DB6564C369 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -682,12 +659,10 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ResourceApp/Pods-ResourceApp-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework", "${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -723,29 +698,12 @@ ); name = R.swift; outputPaths = ( - "$(SRCROOT)/R.generated.swift", - "$(SRCROOT)/R.UITest.generated.swift", + $SRCROOT/R.generated.swift, + $SRCROOT/R.UITest.generated.swift, ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/../../build/Debug/rswift\" generate --generateUITestFile \"$SRCROOT/R.UITest.generated.swift\" --import SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n"; - }; - ED8FCF67313DC003391627B7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ResourceAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "../../.build/release/rswift generate --import SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n../../.build/release/rswift generate \"$SRCROOT/R.UITest.generated.swift\" --generators id\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -907,7 +865,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -960,7 +918,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_VERSION = 4.0; @@ -977,7 +935,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ResourceApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -995,7 +952,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ResourceApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1010,7 +966,6 @@ }; D55C6CDD1B5D757300301B0D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -1019,6 +974,7 @@ "$(inherited)", ); INFOPLIST_FILE = ResourceAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1033,11 +989,11 @@ }; D55C6CDE1B5D757300301B0D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = ResourceAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1083,6 +1039,13 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E2C415CF28EED7890028D537 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = D55C6CB01B5D757300301B0D /* Project object */; } diff --git a/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..284750e1 --- /dev/null +++ b/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e", + "version" : "2.9.0" + } + } + ], + "version" : 2 +} diff --git a/LocalizedStringApp/LocalizedStringApp.xcworkspace/contents.xcworkspacedata b/Examples/ResourceApp/ResourceApp.xcworkspace/contents.xcworkspacedata similarity index 76% rename from LocalizedStringApp/LocalizedStringApp.xcworkspace/contents.xcworkspacedata rename to Examples/ResourceApp/ResourceApp.xcworkspace/contents.xcworkspacedata index b9227019..c3f867fe 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcworkspace/contents.xcworkspacedata +++ b/Examples/ResourceApp/ResourceApp.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:ResourceApp.xcodeproj"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..284750e1 --- /dev/null +++ b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e", + "version" : "2.9.0" + } + } + ], + "version" : 2 +} diff --git a/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard b/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard index 304eb384..c84176f9 100644 --- a/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard +++ b/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -38,7 +38,7 @@ - + @@ -114,12 +114,12 @@ - + -