From 16ce28027c5f5e663c03ad10c6c22492c13351fa Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 31 Mar 2024 02:12:33 +0400 Subject: [PATCH] chore: Add string format indexes, to allow more flexible translations (#2956) --- .../HidePlayerFlyoutMenuPatch.kt | 31 ++++----- .../resources/addresources/values/strings.xml | 68 ++++++++++--------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index 00d9dfe61..904de9c05 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -46,7 +46,6 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch ) @Suppress("unused") object HidePlayerFlyoutMenuPatch : ResourcePatch() { - private const val KEY = "revanced_hide_player_flyout" private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/components/PlayerFlyoutMenuItemsFilter;" @@ -55,21 +54,21 @@ object HidePlayerFlyoutMenuPatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - PreferenceScreen( - key = KEY, - preferences = setOf( - SwitchPreference("${KEY}_captions"), - SwitchPreference("${KEY}_additional_settings"), - SwitchPreference("${KEY}_loop_video"), - SwitchPreference("${KEY}_ambient_mode"), - SwitchPreference("${KEY}_report"), - SwitchPreference("${KEY}_help"), - SwitchPreference("${KEY}_speed"), - SwitchPreference("${KEY}_more_info"), - SwitchPreference("${KEY}_audio_track"), - SwitchPreference("${KEY}_watch_in_vr"), - ), - ) + PreferenceScreen( + key = "revanced_hide_player_flyout", + preferences = setOf( + SwitchPreference("revanced_hide_player_flyout_captions"), + SwitchPreference("revanced_hide_player_flyout_additional_settings"), + SwitchPreference("revanced_hide_player_flyout_loop_video"), + SwitchPreference("revanced_hide_player_flyout_ambient_mode"), + SwitchPreference("revanced_hide_player_flyout_report"), + SwitchPreference("revanced_hide_player_flyout_help"), + SwitchPreference("revanced_hide_player_flyout_speed"), + SwitchPreference("revanced_hide_player_flyout_more_info"), + SwitchPreference("revanced_hide_player_flyout_audio_track"), + SwitchPreference("revanced_hide_player_flyout_watch_in_vr"), + ) + ) ) LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index b58754755..50e59bf27 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -13,7 +13,9 @@ Import failed: %s + GmsCore is not installed. Install it. + Follow the \"Don\'t kill my app\" guide for GmsCore. Action needed GmsCore is not whitelisted from battery optimization.\n\nFollow the \"Don\'t kill my app\" guide for GmsCore. @@ -187,8 +189,8 @@ Keywords and phrases to hide, separated by new lines\n\nWords with uppercase letters in the middle must be entered with the casing (ie: iPhone, TikTok, LeBlanc) About keyword filtering Home/Subscription/Search results are filtered to hide content that matches keyword phrases\n\nLimitations\n• Some Shorts may not be hidden\n• Some UI components may not be hidden\n• Searching for a keyword may show no results - Invalid keyword. Cannot use: \'%s\' as a filter - Invalid keyword. \'%s\' is less than %s characters + Invalid keyword. Cannot use: \'%s\' as a filter + Invalid keyword. \'%1$s\' is less than %2$s characters Hide general ads @@ -466,9 +468,6 @@ Button is hidden Button is shown - - Video - Disable rolling number animations Rolling numbers are not animated @@ -564,16 +563,16 @@ Return YouTube Dislike Hidden Dislikes temporarily not available (API timed out) - Dislikes not available (status %d) + Dislikes not available (status %d) Dislikes not available (client API limit reached) Dislikes not available (%s) - + Reload video to vote using ReturnYouTubeDislike Return YouTube Dislike Dislikes are shown Dislikes are not shown Show dislikes on Shorts + Dislikes shown on Shorts %s Dislikes hidden on Shorts Limitation: Dislikes may not appear in incognito mode @@ -589,6 +588,7 @@ About ReturnYouTubeDislike.com Data is provided by the Return YouTube Dislike API. Tap here to learn more + ReturnYouTubeDislike API statistics of this device API response time, average API response time, minimum @@ -599,8 +599,7 @@ No network calls made %d network calls made API fetch votes, number of timeouts - No - network calls timed out + No network calls timed out %d network calls timed out API client rate limits No client rate limits encountered @@ -731,19 +730,19 @@ Show a skip button Show in seek bar Disable - Unable to submit segment: %s + Unable to submit segment: %s SponsorBlock is temporarily down - Unable to submit segment (status: %d %s) + Unable to submit segment (status: %1$d %2$s) Unable to submit segment.\nRate Limited (too many from the same user or IP) - Can\'t submit the segment: %s + Can\'t submit the segment: %s Can\'t submit the segment.\nAlready exists Segment submitted successfully SponsorBlock temporarily not available - SponsorBlock temporarily not available (status %d) + SponsorBlock temporarily not available (status %d) SponsorBlock temporarily not available (API timed out) Unable to vote for segment (API timed out) - Unable to vote for segment (status: %d %s) - Unable to vote for segment: %s + Unable to vote for segment (status: %1$d %2$s) + Unable to vote for segment: %s Upvote Downvote Change category @@ -751,14 +750,14 @@ Choose the segment category Category is disabled in settings. Enable category to submit. New SponsorBlock segment - Set %02d:%02d:%03d as the start or end of a new segment? + Set %1$02d:%2$02d:%3$03d as the start or end of a new segment? start end now Time the segment begins at Time the segment ends at Are the times correct? - The segment lasts from %02d:%02d to %02d:%02d (%d minutes %02d seconds)\nIs it ready to submit? + The segment lasts from %1$02d:%2$02d to %3$02d:%4$02d (%5$d minutes %6$02d seconds)\nIs it ready to submit? Start must be before the end Mark two locations on the time bar first Preview the segment, and ensure it skips smoothly @@ -769,22 +768,22 @@ Stats temporarily not available (API is down) Loading... SponsorBlock is disabled - Your username: <b>%s</b> + Your username: <b>%s</b> Tap here to change your username - Unable to change username: Status: %d %s + Unable to change username: Status: %1$d %2$s Username successfully changed - Your reputation is <b>%.2f</b> - You\'ve created <b>%s</b> segments + Your reputation is <b>%.2f</b> + You\'ve created <b>%s</b> segments SponsorBlock leaderboard - You\'ve saved people from <b>%s</b> segments + You\'ve saved people from <b>%s</b> segments Tap here to see the global stats and top contributors - That\'s <b>%s</b> of their lives.<br>Tap here to see the leaderboard - You\'ve skipped <b>%s</b> segments - That\'s <b>%s</b> + That\'s <b>%s</b> of their lives.<br>Tap here to see the leaderboard + You\'ve skipped <b>%s</b> segments + That\'s <b>%s</b> Reset skipped segments counter? - %s hours %s minutes - %s minutes %s seconds - %s seconds + %1$s hours %2$s minutes + %1$s minutes %2$s seconds + %s seconds Color: Color changed Color reset @@ -800,7 +799,10 @@ Version spoofed Version not spoofed App version will be spoofed to an older version of YouTube.\n\nThis will change the appearance and features of the app, but unknown side effects may occur.\n\nIf later turned off, it is recommended to clear the app data to prevent UI bugs. + Spoof app version target + 18.33.40 - Restore RYD on Shorts incognito mode 18.20.39 - Restore wide video speed & quality menu 18.09.39 - Restore library tab @@ -897,6 +899,7 @@ Device dimensions spoofed Device dimensions not spoofed\n\nSpoofing the device dimensions can unlock higher video qualities but unknown side effects may occur + Spoof app signature Spoof the app signature to prevent playback issues @@ -941,6 +944,7 @@ Haptics are disabled Haptics are enabled + Enable auto HDR brightness Auto HDR brightness is enabled @@ -963,12 +967,12 @@ Default video quality on mobile network mobile wifi - Changed default %s quality to: %s + Changed default %1$s quality to: %2$s Custom playback speeds Add or change the available playback speeds - Custom speeds must be less than %s Using default values. + Custom speeds must be less than %s Using default values. Invalid custom playback speeds. Using default values. @@ -976,7 +980,7 @@ Playback speed changes apply to all videos Playback speed changes only apply to the current video Default playback speed - Changed default speed to: %s + Changed default speed to: %s Restore old video quality menu