diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79aab7a..dca2089 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ jobs: env: scheme: ${{ 'r2-navigator-swift' }} platform: ${{ 'iOS Simulator' }} + device: ${{ 'iPhone 13' }} steps: - name: Checkout @@ -31,9 +32,7 @@ jobs: rm -rf r2-navigator-swift.xcodeproj - name: Build run: | - device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device" - name: Test run: | - device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device" diff --git a/CHANGELOG.md b/CHANGELOG.md index a638250..8893529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file. **Warning:** Features marked as *alpha* may change or be removed in a future release without notice. Use with *caution. - +## [Unreleased] + +### Added + +* A new `translate` EPUB and PDF editing action is available for iOS 15. + ## [2.1.0] diff --git a/r2-navigator-swift/EditingAction.swift b/r2-navigator-swift/EditingAction.swift index cb6121d..fb5c49d 100644 --- a/r2-navigator-swift/EditingAction.swift +++ b/r2-navigator-swift/EditingAction.swift @@ -17,7 +17,7 @@ public struct EditingAction: Hashable { /// Default editing actions enabled in the navigator. public static var defaultActions: [EditingAction] { - [copy, share, lookup] + [copy, share, lookup, translate] } /// Copy the text selection. @@ -26,6 +26,9 @@ public struct EditingAction: Hashable { /// Look up the text selection in the dictionary. public static let lookup = EditingAction(kind: .native("_lookup:")) + /// Translate the text selection. + public static let translate = EditingAction(kind: .native("_translate:")) + /// Share the text selection. /// /// Implementation detail: We use a custom share action to make sure the user is allowed to share the content. We