chore: Clarify strings (#130)

* chore: Clarify string

* feat: Apply code review suggestions

* fix typo

* Make dislikes description consistent

* Revert removal of Shorts dislikes disclaimer

* feat: Apply code review suggestions

* feat: Apply code review suggestions

---------

Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:
ILoveOpenSourceApplications
2025-01-19 13:16:03 +05:30
committed by GitHub
parent 4892b701e6
commit 181bcb1221
10 changed files with 53 additions and 51 deletions

View File

@ -7,8 +7,8 @@ import app.revanced.extension.youtube.utils.VideoUtils;
@SuppressWarnings("unused")
public final class OpenChannelOfLiveAvatarPatch {
private static final boolean OPEN_CHANNEL_OF_LIVE_AVATAR =
Settings.OPEN_CHANNEL_OF_LIVE_AVATAR.get();
private static final boolean CHANGE_LIVE_RING_CLICK_ACTION =
Settings.CHANGE_LIVE_RING_CLICK_ACTION.get();
private static volatile String videoId = "";
private static volatile boolean liveChannelAvatarClicked = false;
@ -19,7 +19,7 @@ public final class OpenChannelOfLiveAvatarPatch {
public static boolean openChannelOfLiveAvatar() {
try {
if (!OPEN_CHANNEL_OF_LIVE_AVATAR) {
if (!CHANGE_LIVE_RING_CLICK_ACTION) {
return false;
}
if (!liveChannelAvatarClicked) {
@ -42,7 +42,7 @@ public final class OpenChannelOfLiveAvatarPatch {
public static void openChannelOfLiveAvatar(String newlyLoadedVideoId) {
try {
if (!OPEN_CHANNEL_OF_LIVE_AVATAR) {
if (!CHANGE_LIVE_RING_CLICK_ACTION) {
return;
}
if (newlyLoadedVideoId.isEmpty()) {

View File

@ -156,7 +156,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting REMOVE_VIEWER_DISCRETION_DIALOG = new BooleanSetting("revanced_remove_viewer_discretion_dialog", FALSE);
public static final EnumSetting<FormFactor> CHANGE_LAYOUT = new EnumSetting<>("revanced_change_layout", FormFactor.ORIGINAL, true);
public static final BooleanSetting OPEN_CHANNEL_OF_LIVE_AVATAR = new BooleanSetting("revanced_open_channel_of_live_avatar", FALSE, true);
public static final BooleanSetting CHANGE_LIVE_RING_CLICK_ACTION = new BooleanSetting("revanced_change_live_ring_click_action", FALSE, true);
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", false, true, "revanced_spoof_app_version_user_dialog_message");
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", PatchStatus.SpoofAppVersionDefaultString(), true, parent(SPOOF_APP_VERSION));
@ -236,7 +236,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting CHANGE_YOUTUBE_HEADER = new BooleanSetting("revanced_change_youtube_header", TRUE, true);
public static final BooleanSetting ENABLE_WIDE_SEARCH_BAR = new BooleanSetting("revanced_enable_wide_search_bar", FALSE, true);
public static final BooleanSetting ENABLE_WIDE_SEARCH_BAR_WITH_HEADER = new BooleanSetting("revanced_enable_wide_search_bar_with_header", TRUE, true);
public static final BooleanSetting ENABLE_WIDE_SEARCH_BAR_IN_YOU_TAB = new BooleanSetting("revanced_enable_wide_search_bar_in_you_tab", FALSE, true);
public static final BooleanSetting ENABLE_WIDE_SEARCH_BAR_IN_YOU_TAB = new BooleanSetting("revanced_enable_wide_search_bar_in_you_tab", FALSE, true, "revanced_enable_wide_search_bar_in_you_tab_user_dialog_message");
public static final BooleanSetting HIDE_TOOLBAR_CAST_BUTTON = new BooleanSetting("revanced_hide_toolbar_cast_button", TRUE, true);
public static final BooleanSetting HIDE_TOOLBAR_CREATE_BUTTON = new BooleanSetting("revanced_hide_toolbar_create_button", FALSE, true);
public static final BooleanSetting HIDE_TOOLBAR_NOTIFICATION_BUTTON = new BooleanSetting("revanced_hide_toolbar_notification_button", FALSE, true);

View File

@ -31,7 +31,7 @@ internal enum class PatchList(
),
CUSTOM_BRANDING_NAME_FOR_YOUTUBE_MUSIC(
"Custom branding name for YouTube Music",
"Renames the YouTube Music app to the name specified in patch options."
"Changes the YouTube Music app name to the name specified in patch options."
),
CUSTOM_HEADER_FOR_YOUTUBE_MUSIC(
"Custom header for YouTube Music",
@ -63,7 +63,7 @@ internal enum class PatchList(
),
ENABLE_OPUS_CODEC(
"Enable OPUS codec",
"Adds an options to enable the OPUS audio codec if the player response includes it."
"Adds an option to enable the OPUS audio codec if the player response includes it."
),
ENABLE_DEBUG_LOGGING(
"Enable debug logging",

View File

@ -11,7 +11,7 @@ internal enum class PatchList(
),
CUSTOM_BRANDING_NAME_FOR_REDDIT(
"Custom branding name for Reddit",
"Renames the Reddit app to the name specified in patch options."
"Changes the Reddit app name to the name specified in patch options."
),
DISABLE_SCREENSHOT_POPUP(
"Disable screenshot popup",

View File

@ -6,7 +6,7 @@ import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patches.shared.createPlayerRequestBodyWithModelFingerprint
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.extension.Constants.GENERAL_PATH
import app.revanced.patches.youtube.utils.patch.PatchList.LAYOUT_SWITCH
import app.revanced.patches.youtube.utils.patch.PatchList.CHANGE_LAYOUT
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
import app.revanced.patches.youtube.utils.settings.settingsPatch
import app.revanced.util.fingerprint.definingClassOrThrow
@ -24,8 +24,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
@Suppress("unused")
val layoutSwitchPatch = bytecodePatch(
LAYOUT_SWITCH.title,
LAYOUT_SWITCH.summary,
CHANGE_LAYOUT.title,
CHANGE_LAYOUT.summary,
) {
compatibleWith(COMPATIBLE_PACKAGE)
@ -71,9 +71,9 @@ val layoutSwitchPatch = bytecodePatch(
arrayOf(
"PREFERENCE_SCREEN: GENERAL",
"PREFERENCE_CATEGORY: GENERAL_EXPERIMENTAL_FLAGS",
"SETTINGS: LAYOUT_SWITCH"
"SETTINGS: CHANGE_LAYOUT"
),
LAYOUT_SWITCH
CHANGE_LAYOUT
)
// endregion

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.general.channel
package app.revanced.patches.youtube.general.livering
import app.revanced.patches.youtube.utils.resourceid.elementsImage
import app.revanced.util.fingerprint.legacyFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.general.channel
package app.revanced.patches.youtube.general.livering
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@ -7,7 +7,7 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.extension.Constants.GENERAL_PATH
import app.revanced.patches.youtube.utils.patch.PatchList.OPEN_CHANNEL_OF_LIVE_AVATAR
import app.revanced.patches.youtube.utils.patch.PatchList.CHANGE_LIVE_RING_CLICK_ACTION
import app.revanced.patches.youtube.utils.resourceid.sharedResourceIdPatch
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
import app.revanced.patches.youtube.utils.settings.settingsPatch
@ -23,9 +23,9 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
"$GENERAL_PATH/OpenChannelOfLiveAvatarPatch;"
@Suppress("unused")
val layoutSwitchPatch = bytecodePatch(
OPEN_CHANNEL_OF_LIVE_AVATAR.title,
OPEN_CHANNEL_OF_LIVE_AVATAR.summary,
val openChannelOfLiveAvatarPatch = bytecodePatch(
CHANGE_LIVE_RING_CLICK_ACTION.title,
CHANGE_LIVE_RING_CLICK_ACTION.summary,
) {
compatibleWith(COMPATIBLE_PACKAGE)
@ -79,9 +79,9 @@ val layoutSwitchPatch = bytecodePatch(
arrayOf(
"PREFERENCE_SCREEN: GENERAL",
"PREFERENCE_CATEGORY: GENERAL_EXPERIMENTAL_FLAGS",
"SETTINGS: OPEN_CHANNEL_OF_LIVE_AVATAR"
"SETTINGS: CHANGE_LIVE_RING_CLICK_ACTION"
),
OPEN_CHANNEL_OF_LIVE_AVATAR
CHANGE_LIVE_RING_CLICK_ACTION
)
// endregion

View File

@ -21,6 +21,14 @@ internal enum class PatchList(
"Bypass URL redirects",
"Adds an option to bypass URL redirects and open the original URL directly."
),
CHANGE_LAYOUT(
"Change layout",
"Adds an option to change the dp in order to use a tablet or phone layout."
),
CHANGE_LIVE_RING_CLICK_ACTION(
"Change live ring click action",
"Adds an option to open the channel instead of the live stream when clicking on the live ring."
),
CHANGE_PLAYER_FLYOUT_MENU_TOGGLES(
"Change player flyout menu toggles",
"Adds an option to use text toggles instead of switch toggles within the additional settings menu."
@ -43,7 +51,7 @@ internal enum class PatchList(
),
CUSTOM_BRANDING_NAME_FOR_YOUTUBE(
"Custom branding name for YouTube",
"Renames the YouTube app to the name specified in patch options."
"Changes the YouTube app name to the name specified in patch options."
),
CUSTOM_DOUBLE_TAP_LENGTH(
"Custom double tap length",
@ -83,7 +91,7 @@ internal enum class PatchList(
),
ENABLE_OPUS_CODEC(
"Enable OPUS codec",
"Adds an options to enable the OPUS audio codec if the player response includes it."
"Adds an option to enable the OPUS audio codec if the player response includes it."
),
ENABLE_DEBUG_LOGGING(
"Enable debug logging",
@ -153,10 +161,6 @@ internal enum class PatchList(
"Hook download actions",
"Adds support to download videos with an external downloader app using the in-app download button."
),
LAYOUT_SWITCH(
"Layout switch",
"Adds an option to spoof the dpi in order to use a tablet or phone layout."
),
MATERIALYOU(
"MaterialYou",
"Applies the MaterialYou theme for Android 12+ devices."
@ -169,13 +173,9 @@ internal enum class PatchList(
"Navigation bar components",
"Adds options to hide or change components related to the navigation bar."
),
OPEN_CHANNEL_OF_LIVE_AVATAR(
"Open channel of live avatar",
"Adds an option to open channel instead of video when clicking on live avatar."
),
OPEN_LINKS_EXTERNALLY(
"Open links externally",
"Adds an option to always open links in your browser instead of in the in-app-browser."
"Adds an option to always open links in your browser instead of the in-app browser."
),
OVERLAY_BUTTONS(
"Overlay buttons",

View File

@ -437,9 +437,9 @@ This does not bypass the age restriction. It just accepts it automatically."</st
<string name="revanced_change_layout_entry_3">Phone (Max 480 dp)</string>
<string name="revanced_change_layout_entry_4">Tablet</string>
<string name="revanced_change_layout_entry_5">Tablet (Min 600 dp)</string>
<string name="revanced_open_channel_of_live_avatar_title">Open channel of live avatar</string>
<string name="revanced_open_channel_of_live_avatar_summary_on">Channel opens when the live avatar is clicked.</string>
<string name="revanced_open_channel_of_live_avatar_summary_off">Live stream opens when the live avatar is clicked.</string>
<string name="revanced_change_live_ring_click_action_title">Change live ring click action</string>
<string name="revanced_change_live_ring_click_action_summary_on">Channel opens when the live ring is clicked.</string>
<string name="revanced_change_live_ring_click_action_summary_off">Live stream opens when the live ring is clicked.</string>
<string name="revanced_spoof_app_version_title">Spoof app version</string>
<string name="revanced_spoof_app_version_summary_on">Version spoofed</string>
<string name="revanced_spoof_app_version_summary_off">Version not spoofed</string>
@ -694,9 +694,11 @@ If this setting do not take effect, try switching to Incognito mode."</string>
To access settings, please use the following path:
You tab → View channel → Menu → Settings"</string>
<string name="revanced_enable_wide_search_bar_in_you_tab_summary_off">"Wide search bar is disabled in the You tab.
Enabling this setting will disable the Settings button in the You tab."</string>
<string name="revanced_enable_wide_search_bar_in_you_tab_summary_off">Wide search bar is disabled in the You tab.</string>
<string name="revanced_enable_wide_search_bar_in_you_tab_user_dialog_message">"Enabling this setting will disable the Settings button in the You tab.
In this case, you may need to use the following path to access the settings:
You tab → View channel → Menu → Settings"</string>
<string name="revanced_hide_toolbar_cast_button_title">Hide Cast button</string>
<string name="revanced_hide_toolbar_cast_button_summary_on">Cast button is hidden.</string>
<string name="revanced_hide_toolbar_cast_button_summary_off">Cast button is shown.</string>
@ -1653,14 +1655,14 @@ A different codec will be applied after about 20 seconds of buffering."</string>
<string name="revanced_ryd_enable_summary_on">Dislikes are shown.</string>
<string name="revanced_ryd_enable_summary_off">Dislikes are not shown.</string>
<string name="revanced_ryd_shorts_title">Show dislikes on Shorts</string>
<string name="revanced_ryd_shorts_summary_on">Dislikes shown on Shorts.</string>
<string name="revanced_ryd_shorts_summary_on_disclaimer">"Dislikes shown on Shorts.
<string name="revanced_ryd_shorts_summary_on">Dislikes are shown on Shorts.</string>
<string name="revanced_ryd_shorts_summary_on_disclaimer">"Dislikes are shown on Shorts.
Limitation: Dislikes may not appear if the user is not logged in or in incognito mode."</string>
<string name="revanced_ryd_shorts_summary_off">Dislikes hidden on Shorts.</string>
<string name="revanced_ryd_shorts_summary_off">Dislikes are hidden on Shorts.</string>
<string name="revanced_ryd_dislike_percentage_title">Dislikes as percentage</string>
<string name="revanced_ryd_dislike_percentage_summary_on">Dislikes shown as a percentage.</string>
<string name="revanced_ryd_dislike_percentage_summary_off">Dislikes shown as a number.</string>
<string name="revanced_ryd_dislike_percentage_summary_on">Dislikes are shown as a percentage.</string>
<string name="revanced_ryd_dislike_percentage_summary_off">Dislikes are shown as a number.</string>
<string name="revanced_ryd_compact_layout_title">Compact Like button</string>
<string name="revanced_ryd_compact_layout_summary_on">Like button styled for minimum width.</string>
<string name="revanced_ryd_compact_layout_summary_off">Like button styled for best appearance.</string>
@ -1923,7 +1925,7 @@ Click to see how to issue an API key."</string>
<string name="revanced_enable_debug_buffer_logging_title">Enable debug buffer logging</string>
<string name="revanced_enable_debug_buffer_logging_summary_on">Debug logs include the buffer.</string>
<string name="revanced_enable_debug_buffer_logging_summary_off">Debug logs do not include the buffer.</string>
<string name="revanced_open_links_externally_title">Open links in browser</string>
<string name="revanced_open_links_externally_title">Open links externally</string>
<string name="revanced_open_links_externally_summary_on">Opens links in the external browser.</string>
<string name="revanced_open_links_externally_summary_off">Opens links in the in-app browser.</string>
<string name="revanced_sanitize_sharing_links_title">Sanitize sharing links</string>

View File

@ -301,11 +301,11 @@
<!-- PREFERENCE_CATEGORY: GENERAL_EXPERIMENTAL_FLAGS
<PreferenceCategory android:title="@string/revanced_preference_category_experimental_flag" android:layout="@layout/revanced_settings_preferences_category"/>PREFERENCE_CATEGORY: GENERAL_EXPERIMENTAL_FLAGS -->
<!-- SETTINGS: LAYOUT_SWITCH
<ListPreference android:entries="@array/revanced_change_layout_entries" android:title="@string/revanced_change_layout_title" android:key="revanced_change_layout" android:entryValues="@array/revanced_change_layout_entry_values" />SETTINGS: LAYOUT_SWITCH -->
<!-- SETTINGS: CHANGE_LAYOUT
<ListPreference android:entries="@array/revanced_change_layout_entries" android:title="@string/revanced_change_layout_title" android:key="revanced_change_layout" android:entryValues="@array/revanced_change_layout_entry_values" />SETTINGS: CHANGE_LAYOUT -->
<!-- SETTINGS: OPEN_CHANNEL_OF_LIVE_AVATAR
<SwitchPreference android:title="@string/revanced_open_channel_of_live_avatar_title" android:key="revanced_open_channel_of_live_avatar" android:summaryOn="@string/revanced_open_channel_of_live_avatar_summary_on" android:summaryOff="@string/revanced_open_channel_of_live_avatar_summary_off" />SETTINGS: OPEN_CHANNEL_OF_LIVE_AVATAR -->
<!-- SETTINGS: CHANGE_LIVE_RING_CLICK_ACTION
<SwitchPreference android:title="@string/revanced_change_live_ring_click_action_title" android:key="revanced_change_live_ring_click_action" android:summaryOn="@string/revanced_change_live_ring_click_action_summary_on" android:summaryOff="@string/revanced_change_live_ring_click_action_summary_off" />SETTINGS: CHANGE_LIVE_RING_CLICK_ACTION -->
<!-- SETTINGS: SPOOF_APP_VERSION
<SwitchPreference android:title="@string/revanced_spoof_app_version_title" android:key="revanced_spoof_app_version" android:summaryOn="@string/revanced_spoof_app_version_summary_on" android:summaryOff="@string/revanced_spoof_app_version_summary_off" />
@ -879,6 +879,8 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/revanced_preference_screen_general_title" android:layout="@layout/revanced_settings_preferences_category">
<Preference android:title="Change layout" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Change live ring click action" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Change start page" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Disable forced auto audio tracks" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Disable forced auto captions" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
@ -886,10 +888,8 @@
<Preference android:title="Enable gradient loading screen" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Hide layout components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Hook download actions" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Layout switch" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Miniplayer" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Navigation bar components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Open channel of live avatar" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Remove viewer discretion dialog" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Spoof app version" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Toolbar components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>