From cb5b302b03acd6063a8b02ccae2d35d84eba4051 Mon Sep 17 00:00:00 2001
From: ILoveOpenSourceApplications
<117499019+ILoveOpenSourceApplications@users.noreply.github.com>
Date: Wed, 5 Mar 2025 12:25:44 +0530
Subject: [PATCH] refactor(YouTube): Use more consistent strings (#4526)
---
.../extension/youtube/settings/Settings.java | 2 +-
.../all/misc/versioncode/ChangeVersionCodePatch.kt | 8 ++++----
.../shared/misc/spoof/SpoofVideoStreamsPatch.kt | 2 +-
.../interaction/seekbar/EnableSeekbarTappingPatch.kt | 4 ++--
.../buttons/overlay/HidePlayerOverlayButtonsPatch.kt | 2 +-
.../hide/endscreencards/HideEndscreenCardsPatch.kt | 2 +-
.../HideEndScreenSuggestedVideoPatch.kt | 2 +-
.../layout/hide/general/HideLayoutComponentsPatch.kt | 2 +-
.../layout/hide/shorts/HideShortsComponentsPatch.kt | 2 +-
.../youtube/layout/miniplayer/MiniplayerPatch.kt | 2 +-
.../youtube/misc/links/OpenLinksExternallyPatch.kt | 2 +-
.../privacy/RemoveTrackingQueryParameterPatch.kt | 2 +-
.../main/resources/addresources/values/strings.xml | 12 ++++++------
13 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
index afa15706f..3b6b24759 100644
--- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
+++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
@@ -171,10 +171,10 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_COMMENTS_CHAT_SUMMARY = new BooleanSetting("revanced_hide_comments_chat_summary", FALSE);
public static final BooleanSetting HIDE_COMMENTS_BY_MEMBERS_HEADER = new BooleanSetting("revanced_hide_comments_by_members_header", FALSE);
public static final BooleanSetting HIDE_COMMENTS_CREATE_A_SHORT_BUTTON = new BooleanSetting("revanced_hide_comments_create_a_short_button", TRUE);
+ public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE);
public static final BooleanSetting HIDE_COMMENTS_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_comments_preview_comment", FALSE);
public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE);
public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
- public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE);
// Description
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE);
public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);
diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
index 617f18a42..a50fe58da 100644
--- a/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
@@ -8,9 +8,8 @@ import org.w3c.dom.Element
@Suppress("unused")
val changeVersionCodePatch = resourcePatch(
name = "Change version code",
- description = "Changes the version code of the app. By default the highest version code is set. " +
- "This allows older versions of an app to be installed " +
- "if their version code is set to the same or a higher value and can stop app stores to update the app.",
+ description = "Changes the version code of the app. This will turn off app store updates " +
+ "and allows downgrading an existing app install to an older app version.",
use = false,
) {
val versionCode by intOption(
@@ -21,7 +20,8 @@ val changeVersionCodePatch = resourcePatch(
"Highest" to Int.MAX_VALUE,
),
title = "Version code",
- description = "The version code to use",
+ description = "The version code to use. Using the highest value turns off app store " +
+ "updates and allows downgrading an existing app install to an older app version.",
required = true,
) { versionCode -> versionCode!! >= 1 }
diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt
index 4b51c50ec..55f72a938 100644
--- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt
@@ -35,7 +35,7 @@ fun spoofVideoStreamsPatch(
executeBlock: BytecodePatchContext.() -> Unit = {},
) = bytecodePatch(
name = "Spoof video streams",
- description = "Spoofs the client video streams to fix playback.",
+ description = "Adds options to spoof the client video streams to fix playback.",
) {
block()
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt
index 48c4b7468..d4d6e84cd 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt
@@ -15,8 +15,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
val enableSeekbarTappingPatch = bytecodePatch(
- name = "Seekbar tapping",
- description = "Adds an option to enable tap-to-seek on the seekbar of the video player.",
+ name = "Enable tap to seek",
+ description = "Adds an option to enable tap to seek on the seekbar of the video player.",
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt
index 76cd99d15..d02407c71 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt
@@ -43,7 +43,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
val hidePlayerOverlayButtonsPatch = bytecodePatch(
name = "Hide player overlay buttons",
- description = "Adds options to hide the player cast, autoplay, caption button and next/ previous buttons.",
+ description = "Adds options to hide the player Cast, Autoplay, Captions, and Previous & Next buttons.",
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt
index effb9caee..55a70aa1a 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt
@@ -49,7 +49,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
@Suppress("unused")
val hideEndscreenCardsPatch = bytecodePatch(
- name = "Hide endscreen cards",
+ name = "Hide end screen cards",
description = "Adds an option to hide suggested video cards at the end of videos.",
) {
dependsOn(
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt
index 76811b175..569214ee5 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt
@@ -22,7 +22,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
@Suppress("unused")
val hideEndScreenSuggestedVideoPatch = bytecodePatch(
name = "Hide end screen suggested video",
- description = "Adds an option to hide the recommended video at the end of each video.",
+ description = "Adds an option to hide the suggested video at the end of videos.",
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
index 9354115c5..53375549f 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
@@ -158,9 +158,9 @@ val hideLayoutComponentsPatch = bytecodePatch(
SwitchPreference("revanced_hide_comments_by_members_header"),
SwitchPreference("revanced_hide_comments_section"),
SwitchPreference("revanced_hide_comments_create_a_short_button"),
+ SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons"),
SwitchPreference("revanced_hide_comments_preview_comment"),
SwitchPreference("revanced_hide_comments_thanks_button"),
- SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons"),
),
sorting = PreferenceScreenPreference.Sorting.UNSORTED,
),
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt
index e41cc727c..c1153586e 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt
@@ -159,7 +159,7 @@ private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/pat
@Suppress("unused")
val hideShortsComponentsPatch = bytecodePatch(
name = "Hide Shorts components",
- description = "Adds options to hide components related to YouTube Shorts.",
+ description = "Adds options to hide components related to Shorts.",
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt
index 086c2c8bf..f367a1ae2 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt
@@ -134,7 +134,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/
@Suppress("unused")
val miniplayerPatch = bytecodePatch(
name = "Miniplayer",
- description = "Adds options to change the in app minimized player."
+ description = "Adds options to change the in-app minimized player."
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt
index 4a971e058..7acddae54 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
val openLinksExternallyPatch = bytecodePatch(
name = "Open links externally",
- description = "Adds an option to always open links in your browser instead of in the in-app-browser.",
+ description = "Adds an option to always open links in your browser instead of the in-app browser.",
) {
dependsOn(
transformInstructionsPatch(
diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt
index 9de31f30c..32c53ae4d 100644
--- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt
+++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt
@@ -20,7 +20,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
val removeTrackingQueryParameterPatch = bytecodePatch(
name = "Remove tracking query parameter",
- description = "Adds an option to remove the tracking info from links you share.",
+ description = "Adds an option to remove the tracking parameter from links you share.",
) {
dependsOn(
sharedExtensionPatch,
diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml
index 5a763a3f2..7dd13faa8 100644
--- a/patches/src/main/resources/addresources/values/strings.xml
+++ b/patches/src/main/resources/addresources/values/strings.xml
@@ -409,7 +409,7 @@ This feature is only available for older devices"
Hide self sponsored cards
Self sponsored cards are hidden
Self sponsored cards are shown
- Hide banner to view products
+ Hide \'View products\' banner
Banner is hidden
Banner is shown
Hide end screen store banner
@@ -668,7 +668,7 @@ If changing this setting does not take effect, try switching to Incognito mode."
Video quality menu footer is shown
- Hide previous & next video buttons
+ Hide Previous & Next buttons
Buttons are hidden
Buttons are shown
Hide Cast button
@@ -1042,7 +1042,7 @@ Your user id is like a password and it should never be shared.
Skip automatically
Skip automatically once
Show a Skip button
- Show in seek bar
+ Show in seekbar
Disable
Unable to submit segment: %s
SponsorBlock is temporarily down
@@ -1206,7 +1206,7 @@ If later turned off, it is recommended to clear the app data to prevent UI bugs.
Miniplayer
- Change the style of the in app minimized player
+ Change the style of the in-app minimized player
Miniplayer type
Disabled
Default
@@ -1353,8 +1353,8 @@ Enabling this can unlock higher video qualities"
Open links in browser
- Opening links externally
- Opening links in app
+ Opening links in external browser
+ Opening links in in-app browser
Remove tracking query parameter