Skip to content

Commit

Permalink
Merge pull request #427 from TortugaPower/feature/localization
Browse files Browse the repository at this point in the history
Localization
  • Loading branch information
GianniCarlo committed Feb 26, 2020
2 parents bf1ffd0 + e73e648 commit e306406
Show file tree
Hide file tree
Showing 65 changed files with 2,529 additions and 362 deletions.
216 changes: 176 additions & 40 deletions BookPlayer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions BookPlayer.xcodeproj/xcshareddata/xcschemes/BookPlayer.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "418B6CF71D2707F800F974FB"
BuildableName = "BookPlayer.app"
BlueprintName = "BookPlayer"
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "418B6CF71D2707F800F974FB"
BuildableName = "BookPlayer.app"
BlueprintName = "BookPlayer"
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -52,8 +50,8 @@
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -65,7 +63,8 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "32">
launchAutomaticallySubstyle = "32"
notificationPayloadFile = "BookPlayerWatch Extension/PushNotificationPayload.apns">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
Expand All @@ -78,17 +77,6 @@
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4140EA2E227288ED0009F794"
BuildableName = "BookPlayerWatch.app"
BlueprintName = "BookPlayerWatch"
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -52,8 +50,8 @@
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -64,7 +62,8 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
allowLocationSimulation = "YES"
notificationPayloadFile = "BookPlayerWatch Extension/PushNotificationPayload.apns">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
Expand All @@ -77,17 +76,6 @@
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4140EA2E227288ED0009F794"
BuildableName = "BookPlayerWatch.app"
BlueprintName = "BookPlayerWatch"
ReferencedContainer = "container:BookPlayer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
11 changes: 11 additions & 0 deletions BookPlayer/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

override func accessibilityPerformMagicTap() -> Bool {
guard PlayerManager.shared.currentBook != nil else {
UIAccessibility.post(notification: .announcement, argument: "voiceover_no_title".localized)
return false
}

PlayerManager.shared.playPause()

return true
}

// For now, seek forward/backward and next/previous track perform the same function
func setupMPRemoteCommands() {
// Play / Pause
Expand Down
172 changes: 172 additions & 0 deletions BookPlayer/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
/*
Localizable.strings
BookPlayer

Created by Gianni Carlo on 12/29/19.
Copyright © 2019 Tortuga Power. All rights reserved.
*/

/* Title that is shown as the navigation bar title */
"library_title" = "Library";
/* Title for the settings button */
"settings_button" = "Settings";
/* Title that is shown as the navigation bar title */
"settings_title" = "Settings";
"settings_autoplay_title" = "AutoPlay Library";
"settings_autoplay_description" = "Continue playback with all items in the Library that are not completed, including files in playlists.";
"settings_smartrewind_title" = "Smart Rewind";
"settings_smartrewind_description" = "Rewind 30 seconds after being paused for 10 minutes.";
"settings_boostvolume_title" = "Boost Volume";
"settings_boostvolume_description" = "Doubles the volume.\nUse with caution and care for your hearing.";
"settings_globalspeed_title" = "Global Speed Control";
"settings_globalspeed_description" = "Set speed across all books.";
"settings_autolock_title" = "Disable Autolock";
"settings_autolock_description" = "Prevent the device from locking when on the Player screen.";
"settings_siri_lastplayed_title" = "Last played book";
"settings_siri_lastplayed_description" = "Use Siri to continue the last played book.";
"settings_skip_title" = "SKIP INTERVALS";
"settings_skip_rewind_title" = "Rewind";
"settings_skip_forward_title" = "Forward";
"settings_skip_description" = "Adjust the amount skipped when using the buttons in the Player or Control Center.";
"settings_support_title" = "SUPPORT";
"settings_siri_title" = "SIRI SHORTCUT";
"settings_support_project_title" = "View project on Github";
"settings_support_project_description" = "Open new issues for your feature requests and errors";
"settings_support_email_title" = "Send us an email";
"settings_credits_title" = "Credits and Licenses";
"settings_support_compose_title" = "Unable to compose email";
"settings_support_compose_description" = "You need to set up an email account in your device settings to use this.\n\nPlease mail us at";
"settings_support_compose_copy" = "Copy information to clipboard";
"library_add_button" = "Add";
"export_button" = "Share";
"delete_button" = "Delete";
"rename_button" = "Rename";
"delete_single_item_title" = "Do you want to delete “%@”?";
"delete_single_playlist_description" = "Deleting only the playlist will move all its files back to the Library.";
"delete_shallow_button" = "Delete playlist only";
"delete_deep_button" = "Delete playlist and files";
"create_playlist_button" = "Create playlist";
"create_button" = "Create";
"import_button" = "Import files";
"import_description" = "You can also add files via AirDrop. Send an audiobook file to your device and select BookPlayer from the list that appears.";
"create_playlist_title" = "Create a new playlist";
"create_playlist_description" = "Files in playlists are automatically played one after the other";
"delete_multiple_items_description" = "This will remove all files inside selected playlists as well.";
"new_playlist_button" = "New Playlist";
"existing_playlist_button" = "Existing Playlist";
"choose_destination_title" = "Choose destination";
"delete_completely_button" = "Delete completely";
"move_library_button" = "Move to Library";
"options_button" = "Options";
"select_playlist_title" = "Select Playlist";
"sort_title_button" = "Title";
"sort_filename_button" = "Original File Name";
"sort_title" = "Sort Items by";
"cancel_button" = "Cancel";
"seconds_title" = "sec";
"ok_button" = "OK";
/* Message shown when trying to create a Siri Shortcut on devices that don't have iOS 12+ installed */
"siri_alert_description" = "Siri Shortcuts are available on iOS 12 and above";
/* Title used in the context of our tip jar to support development */
"support_bookplayer_title" = "Support BookPlayer";
/* Description used in the context of our tip jar to support development */
"support_bookplayer_description" = "Get BookPlayer Plus to support future development and get extra themes and app icons";
"learn_more_title" = "LEARN MORE";
"settings_appearance_title" = "Appearance";
"settings_theme_title" = "Theme";
"settings_app_icon_title" = "App Icon";
"settings_playback_title" = "Playback Settings";
"settings_controls_title" = "Player Controls";
"settings_power_connected_title" = "Only when connected to power";
"settings_tip_jar_title" = "Tip Jar";
"theme_system_title" = "Use System Mode";
"theme_switch_title" = "Switch automatically";
"theme_dark_title" = "Always use dark variation";
"themes_title" = "Themes";
"icons_bookplayer_credit_description" = "By your friends from BookPlayer";
"kind_tip_title" = "Kind tip of";
"excellent_tip_title" = "Excellent tip of";
"incredible_tip_title" = "Incredible tip of";
"plus_themes_description" = "Carefully picked color themes to match your favorite books";
"plus_icons_description" = "BookPlayer Plus comes with several app icons, matching the color schemes and your wallpaper";
"support_us_title" = "Support us";
"bookplayer_opensource_description" = "BookPlayer is free and Open Source and it will always remain that way. With your help we are able to implement more features and make BookPlayer even better";
"thanks_title" = "Thanks for your support!";
"extra_tips_description" = "If you're really enjoying BookPlayer, you can leave extra tips to support the app's development further. This will help to keep the lights on and features coming.";
"files_title" = "Files";
"select_all_title" = "Select All";
"deselect_all_title" = "Deselect All";
"move_title" = "Move";
"jump_start_title" = "Jump to start";
"mark_finished_title" = "Mark as Finished";
"sort_files_title" = "Sort Files By";
"rename_title" = "Rename item";
"file_error_title" = "File error!";
"file_error_description" = "This book's file couldn't be loaded. Make sure you're not using files with DRM protection (like .aax files)";
"file_missing_title" = "File missing!";
"file_missing_description" = "This book's file was removed from your device. Import the file again to play the book";
"empty_playlist_description" = "You can also move files here by dragging them on this playlist in the Library";
"playlist_add_title" = "Add files";
"player_speed_title" = "Set playback speed";
"player_sleep_title" = "Pause playback";
"sleep_chapter_option_title" = "End of current chapter";
/* This is used for the label underneath the progress bar (e.g. Chapter 1 of 35) */
"player_chapter_description" = "Chapter %d of %d";
"chapters_title" = "Chapters";
/* This is used as a description for each chapter in the chapters list (e.g. Start: 10:11 - Duration: 16:56) */
"chapters_item_description" = "Start: %@ - Duration: %@";
/* Restore purchases */
"restore_title" = "Restore";
"themes_caps_title" = "THEMES";
"plus_app_icons_title" = "App Icons";
/* This is the counterpart to Mark as Finished */
"mark_unfinished_title" = "Mark as Unfinished";
"move_playlist_button" = "Move to playlist";
"move_single_item_title" = "Do you want to move '%@' to '%@'?";
/* This is shown if while being inside a playlist, a batch of imported files are finished processing, and it will be one of the options in the alert presented */
"current_playlist_title" = "Current Playlist";
"select_item_title" = "Select Item";
"sleep_alert_description" = "Sleeping when the chapter ends";
"sleep_time_description" = "Sleeping in %@";
"sleep_off_title" = "Off";
"sleep_interval_title" = "In %@";
"chapter_number_title" = "Chapter %d";
"progress_complete_description" = "%d percent Complete";
"chapter_duration_title" = "Chapter duration: ";
"chapter_time_remaining_title" = "Remaining Chapter Time: ";
"book_time_remaining_title" = "Remaining Book Time: ";
"book_duration_title" = "Book duration: ";
"icon_error_description" = "Changing the app icon wasn't successful. Try again later";
"error_title" = "Error";
"generic_retry_description" = "Please try again later";
"network_error_title" = "Network Error";
"purchases_restored_title" = "Purchases restored!";
"tip_missing_title" = "You haven't tipped us yet";
"thanks_amazing_title" = "You are amazing!";
"play_title" = "Play";
"pause_title" = "Pause";
"voiceover_no_title" = "No Title";
"voiceover_no_author" = "No Author";
"voiceover_book_progress" = "%@ by %@, %d percent Completed";
"voiceover_no_file_title" = "No File Title";
"voiceover_no_file_subtitle" = "No File Subtitle";
"voiceover_no_playlist_title" = "No Playlist Title";
"voiceover_playlist_progress" = "%@ Playlist, %d percent Completed";
"voiceover_unknown_title" = "Unknown title";
"voiceover_unknown_author" = "Unknown author";
"voiceover_book_info" = "%@ by %@";
"voiceover_book_chapter" = "%@ by %@, chapter %@";
"voiceover_rewind_time" = "Rewind %@";
"voiceover_forward_time" = "Fast Forward %@";
"watchapp_last_played_title" = "Last Played";
"watchapp_refresh_data_title" = "Refresh data";
"carplay_recent_title" = "Recent";
"carplay_library_error" = "Unable to load books";
"siri_invocation_phrase" = "Continue my book";
"siri_activity_title" = "Continue last played book";
"watchapp_connect_error_title" = "Connectivity Error";
"watchapp_connect_error_description" = "There's a problem connecting to your phone, please try again later";
"sleep_remaining_title" = "%@ remaining until sleep";
"audio_source_title" = "Audio Source";
"speed_title" = "speed";
"import_preparing_title" = "Preparing to import files";
Loading

0 comments on commit e306406

Please sign in to comment.