refactor(YouTube): Use more consistent strings (#4526)

This commit is contained in:
ILoveOpenSourceApplications 2025-03-05 12:25:44 +05:30 committed by GitHub
parent 44ddc817f7
commit cb5b302b03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 22 additions and 22 deletions

View File

@ -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_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_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_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_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_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_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 // Description
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE); 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); public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);

View File

@ -8,9 +8,8 @@ import org.w3c.dom.Element
@Suppress("unused") @Suppress("unused")
val changeVersionCodePatch = resourcePatch( val changeVersionCodePatch = resourcePatch(
name = "Change version code", name = "Change version code",
description = "Changes the version code of the app. By default the highest version code is set. " + description = "Changes the version code of the app. This will turn off app store updates " +
"This allows older versions of an app to be installed " + "and allows downgrading an existing app install to an older app version.",
"if their version code is set to the same or a higher value and can stop app stores to update the app.",
use = false, use = false,
) { ) {
val versionCode by intOption( val versionCode by intOption(
@ -21,7 +20,8 @@ val changeVersionCodePatch = resourcePatch(
"Highest" to Int.MAX_VALUE, "Highest" to Int.MAX_VALUE,
), ),
title = "Version code", 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, required = true,
) { versionCode -> versionCode!! >= 1 } ) { versionCode -> versionCode!! >= 1 }

View File

@ -35,7 +35,7 @@ fun spoofVideoStreamsPatch(
executeBlock: BytecodePatchContext.() -> Unit = {}, executeBlock: BytecodePatchContext.() -> Unit = {},
) = bytecodePatch( ) = bytecodePatch(
name = "Spoof video streams", 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() block()

View File

@ -15,8 +15,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference import com.android.tools.smali.dexlib2.iface.reference.MethodReference
val enableSeekbarTappingPatch = bytecodePatch( val enableSeekbarTappingPatch = bytecodePatch(
name = "Seekbar tapping", name = "Enable tap to seek",
description = "Adds an option to enable tap-to-seek on the seekbar of the video player.", description = "Adds an option to enable tap to seek on the seekbar of the video player.",
) { ) {
dependsOn( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -43,7 +43,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
val hidePlayerOverlayButtonsPatch = bytecodePatch( val hidePlayerOverlayButtonsPatch = bytecodePatch(
name = "Hide player overlay buttons", 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( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -49,7 +49,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
@Suppress("unused") @Suppress("unused")
val hideEndscreenCardsPatch = bytecodePatch( 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.", description = "Adds an option to hide suggested video cards at the end of videos.",
) { ) {
dependsOn( dependsOn(

View File

@ -22,7 +22,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
@Suppress("unused") @Suppress("unused")
val hideEndScreenSuggestedVideoPatch = bytecodePatch( val hideEndScreenSuggestedVideoPatch = bytecodePatch(
name = "Hide end screen suggested video", 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( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -158,9 +158,9 @@ val hideLayoutComponentsPatch = bytecodePatch(
SwitchPreference("revanced_hide_comments_by_members_header"), SwitchPreference("revanced_hide_comments_by_members_header"),
SwitchPreference("revanced_hide_comments_section"), SwitchPreference("revanced_hide_comments_section"),
SwitchPreference("revanced_hide_comments_create_a_short_button"), 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_preview_comment"),
SwitchPreference("revanced_hide_comments_thanks_button"), SwitchPreference("revanced_hide_comments_thanks_button"),
SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons"),
), ),
sorting = PreferenceScreenPreference.Sorting.UNSORTED, sorting = PreferenceScreenPreference.Sorting.UNSORTED,
), ),

View File

@ -159,7 +159,7 @@ private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/pat
@Suppress("unused") @Suppress("unused")
val hideShortsComponentsPatch = bytecodePatch( val hideShortsComponentsPatch = bytecodePatch(
name = "Hide Shorts components", name = "Hide Shorts components",
description = "Adds options to hide components related to YouTube Shorts.", description = "Adds options to hide components related to Shorts.",
) { ) {
dependsOn( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -134,7 +134,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/
@Suppress("unused") @Suppress("unused")
val miniplayerPatch = bytecodePatch( val miniplayerPatch = bytecodePatch(
name = "Miniplayer", name = "Miniplayer",
description = "Adds options to change the in app minimized player." description = "Adds options to change the in-app minimized player."
) { ) {
dependsOn( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
val openLinksExternallyPatch = bytecodePatch( val openLinksExternallyPatch = bytecodePatch(
name = "Open links externally", 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( dependsOn(
transformInstructionsPatch( transformInstructionsPatch(

View File

@ -20,7 +20,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
val removeTrackingQueryParameterPatch = bytecodePatch( val removeTrackingQueryParameterPatch = bytecodePatch(
name = "Remove tracking query parameter", 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( dependsOn(
sharedExtensionPatch, sharedExtensionPatch,

View File

@ -409,7 +409,7 @@ This feature is only available for older devices"</string>
<string name="revanced_hide_self_sponsor_ads_title">Hide self sponsored cards</string> <string name="revanced_hide_self_sponsor_ads_title">Hide self sponsored cards</string>
<string name="revanced_hide_self_sponsor_ads_summary_on">Self sponsored cards are hidden</string> <string name="revanced_hide_self_sponsor_ads_summary_on">Self sponsored cards are hidden</string>
<string name="revanced_hide_self_sponsor_ads_summary_off">Self sponsored cards are shown</string> <string name="revanced_hide_self_sponsor_ads_summary_off">Self sponsored cards are shown</string>
<string name="revanced_hide_products_banner_title">Hide banner to view products</string> <string name="revanced_hide_products_banner_title">Hide \'View products\' banner</string>
<string name="revanced_hide_products_banner_summary_on">Banner is hidden</string> <string name="revanced_hide_products_banner_summary_on">Banner is hidden</string>
<string name="revanced_hide_products_banner_summary_off">Banner is shown</string> <string name="revanced_hide_products_banner_summary_off">Banner is shown</string>
<string name="revanced_hide_end_screen_store_banner_title">Hide end screen store banner</string> <string name="revanced_hide_end_screen_store_banner_title">Hide end screen store banner</string>
@ -668,7 +668,7 @@ If changing this setting does not take effect, try switching to Incognito mode."
<string name="revanced_hide_player_flyout_video_quality_footer_summary_off">Video quality menu footer is shown</string> <string name="revanced_hide_player_flyout_video_quality_footer_summary_off">Video quality menu footer is shown</string>
</patch> </patch>
<patch id="layout.buttons.overlay.hidePlayerOverlayButtonsPatch"> <patch id="layout.buttons.overlay.hidePlayerOverlayButtonsPatch">
<string name="revanced_hide_player_previous_next_buttons_title">Hide previous &amp; next video buttons</string> <string name="revanced_hide_player_previous_next_buttons_title">Hide Previous &amp; Next buttons</string>
<string name="revanced_hide_player_previous_next_buttons_summary_on">Buttons are hidden</string> <string name="revanced_hide_player_previous_next_buttons_summary_on">Buttons are hidden</string>
<string name="revanced_hide_player_previous_next_buttons_summary_off">Buttons are shown</string> <string name="revanced_hide_player_previous_next_buttons_summary_off">Buttons are shown</string>
<string name="revanced_hide_cast_button_title">Hide Cast button</string> <string name="revanced_hide_cast_button_title">Hide Cast button</string>
@ -1042,7 +1042,7 @@ Your user id is like a password and it should never be shared.
<string name="revanced_sb_skip_automatically">Skip automatically</string> <string name="revanced_sb_skip_automatically">Skip automatically</string>
<string name="revanced_sb_skip_automatically_once">Skip automatically once</string> <string name="revanced_sb_skip_automatically_once">Skip automatically once</string>
<string name="revanced_sb_skip_showbutton">Show a Skip button</string> <string name="revanced_sb_skip_showbutton">Show a Skip button</string>
<string name="revanced_sb_skip_seekbaronly">Show in seek bar</string> <string name="revanced_sb_skip_seekbaronly">Show in seekbar</string>
<string name="revanced_sb_skip_ignore">Disable</string> <string name="revanced_sb_skip_ignore">Disable</string>
<string name="revanced_sb_submit_failed_invalid">Unable to submit segment: %s</string> <string name="revanced_sb_submit_failed_invalid">Unable to submit segment: %s</string>
<string name="revanced_sb_submit_failed_timeout">SponsorBlock is temporarily down</string> <string name="revanced_sb_submit_failed_timeout">SponsorBlock is temporarily down</string>
@ -1206,7 +1206,7 @@ If later turned off, it is recommended to clear the app data to prevent UI bugs.
</patch> </patch>
<patch id="layout.miniplayer.miniplayerPatch"> <patch id="layout.miniplayer.miniplayerPatch">
<string name="revanced_miniplayer_screen_title">Miniplayer</string> <string name="revanced_miniplayer_screen_title">Miniplayer</string>
<string name="revanced_miniplayer_screen_summary">Change the style of the in app minimized player</string> <string name="revanced_miniplayer_screen_summary">Change the style of the in-app minimized player</string>
<string name="revanced_miniplayer_type_title">Miniplayer type</string> <string name="revanced_miniplayer_type_title">Miniplayer type</string>
<string name="revanced_miniplayer_type_entry_0">Disabled</string> <string name="revanced_miniplayer_type_entry_0">Disabled</string>
<string name="revanced_miniplayer_type_entry_1">Default</string> <string name="revanced_miniplayer_type_entry_1">Default</string>
@ -1353,8 +1353,8 @@ Enabling this can unlock higher video qualities"</string>
</patch> </patch>
<patch id="misc.links.openLinksExternallyPatch"> <patch id="misc.links.openLinksExternallyPatch">
<string name="revanced_external_browser_title">Open links in browser</string> <string name="revanced_external_browser_title">Open links in browser</string>
<string name="revanced_external_browser_summary_on">Opening links externally</string> <string name="revanced_external_browser_summary_on">Opening links in external browser</string>
<string name="revanced_external_browser_summary_off">Opening links in app</string> <string name="revanced_external_browser_summary_off">Opening links in in-app browser</string>
</patch> </patch>
<patch id="misc.privacy.removeTrackingQueryParameterPatch"> <patch id="misc.privacy.removeTrackingQueryParameterPatch">
<string name="revanced_remove_tracking_query_parameter_title">Remove tracking query parameter</string> <string name="revanced_remove_tracking_query_parameter_title">Remove tracking query parameter</string>