Skip to content

Commit

Permalink
feat(YouTube - Layout component filter): Add locale support for a vid…
Browse files Browse the repository at this point in the history
…eo filter based on view count
  • Loading branch information
anddea committed Mar 27, 2024
1 parent 9c8698d commit 689193f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
6 changes: 6 additions & 0 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,12 @@ Videos with a gray description include videos that are not related to search ter
<string name="revanced_hide_video_with_low_view_title">Hide videos based on views</string>
<string name="revanced_hide_video_with_low_view_num_summary">Videos with views less than this number will be hidden.</string>
<string name="revanced_hide_video_with_low_view_num_title">Number of views</string>
<string name="revanced_hide_video_with_low_view_num_multiplier_summary">Specify your language view keys as it\'s shown for each video. Each key -> value must be on a new line. Keys go before "->" sign. If you switch app or system language you have to reset this setting.\n\nExamples:\nEnglish: 10K views = K -> 1000, views -> views\nSpanish: 10 K vistas = K -> 1000, vistas -> views</string>
<string name="revanced_hide_video_with_low_view_num_multiplier_title">View keys</string>
<string name="revanced_hide_video_with_low_view_num_multiplier_value">K -> 1 000\nM -> 1 000 000\nB -> 1 000 000 000\nviews -> views\nwatching -> views</string>
<string name="revanced_hide_video_with_low_view_old_summary">"Hide videos with less than 1,000 views exposed to the home feed.
Some videos, including those from channels you subscribe to, may not be hidden even if they have fewer than 1,000 views."</string>
<string name="revanced_hide_video_with_low_view_old_title">Hide videos with low views</string>
<string name="revanced_hide_view_products_summary_off">View products banner is shown.</string>
<string name="revanced_hide_view_products_summary_on">View products banner is hidden.</string>
<string name="revanced_hide_view_products_title">Hide view products banner</string>
Expand Down
23 changes: 14 additions & 9 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_layout_title" />
<PreferenceScreen android:title="@string/revanced_keyword_filter_title" android:key="keyword" android:summary="@string/revanced_keyword_filter_summary">
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_keyword_filter_title" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_feed_title" android:key="revanced_hide_keyword_content_feed" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_feed_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_feed_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_sub_title" android:key="revanced_hide_keyword_content_sub" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_sub_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_sub_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_comment_title" android:key="revanced_hide_keyword_content_comment" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_comment_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_comment_summary_off" />
<app.revanced.integrations.youtube.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_keyword_filter_strings_title" android:key="revanced_hide_keyword_content_strings" android:summary="@string/revanced_keyword_filter_strings_summary" android:defaultValue="" android:inputType="textMultiLine" />
<Preference android:title="@string/revanced_inform" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_summary" />
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_keyword_filter_title" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_feed_title" android:key="revanced_hide_keyword_content_feed" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_feed_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_feed_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_sub_title" android:key="revanced_hide_keyword_content_sub" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_sub_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_sub_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_comment_title" android:key="revanced_hide_keyword_content_comment" android:defaultValue="false" android:summaryOn="@string/revanced_hide_keyword_content_comment_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_comment_summary_off" />
<app.revanced.integrations.youtube.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_keyword_filter_strings_title" android:key="revanced_hide_keyword_content_strings" android:summary="@string/revanced_keyword_filter_strings_summary" android:defaultValue="" android:inputType="textMultiLine" />
<Preference android:title="@string/revanced_inform" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_summary" />
</PreferenceScreen>
<SwitchPreference android:title="@string/revanced_custom_filter_title" android:key="revanced_custom_filter" android:defaultValue="false" android:summaryOn="@string/revanced_custom_filter_summary_on" android:summaryOff="@string/revanced_custom_filter_summary_off" />
Expand Down Expand Up @@ -125,8 +125,13 @@
<!-- SETTINGS: HIDE_LAYOUT_COMPONENTS
<SwitchPreference android:title="@string/revanced_hide_home_feed_membership_video_title" android:key="revanced_hide_home_feed_membership_video" android:defaultValue="false" android:summary="@string/revanced_hide_home_feed_membership_video_summary" />
<SwitchPreference android:title="@string/revanced_hide_video_with_gray_description_title" android:key="revanced_hide_video_with_gray_description" android:defaultValue="false" android:summary="@string/revanced_hide_video_with_gray_description_summary" />
<SwitchPreference android:title="@string/revanced_hide_video_with_low_view_title" android:key="revanced_hide_video_with_view" android:defaultValue="false" android:summary="@string/revanced_hide_video_with_low_view_summary" />
<app.revanced.integrations.youtube.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_hide_video_with_low_view_num_title" android:key="revanced_hide_video_with_view_num" android:defaultValue="1000" android:summary="@string/revanced_hide_video_with_low_view_num_summary" android:inputType="number" /> SETTINGS: HIDE_LAYOUT_COMPONENTS -->
<PreferenceScreen android:title="@string/revanced_hide_video_with_low_view_title" android:key="low_view" android:summary="@string/revanced_hide_video_with_low_view_summary">
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_hide_video_with_low_view_title" />
<SwitchPreference android:title="@string/revanced_hide_video_with_low_view_title" android:key="revanced_hide_video_with_view" android:defaultValue="false" android:summary="@string/revanced_hide_video_with_low_view_summary" />
<app.revanced.integrations.youtube.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_hide_video_with_low_view_num_title" android:key="revanced_hide_video_with_view_num" android:defaultValue="1000" android:summary="@string/revanced_hide_video_with_low_view_num_summary" android:inputType="number" />
<app.revanced.integrations.youtube.settingsmenu.ResettableEditTextPreference android:title="@string/revanced_hide_video_with_low_view_num_multiplier_title" android:key="revanced_hide_video_with_low_view_num_multiplier" android:summary="@string/revanced_hide_video_with_low_view_num_multiplier_summary" android:defaultValue="@string/revanced_hide_video_with_low_view_num_multiplier_value" android:inputType="textMultiLine" />
<SwitchPreference android:title="@string/revanced_hide_video_with_low_view_old_title" android:key="revanced_hide_video_with_low_view_old" android:defaultValue="false" android:summary="@string/revanced_hide_video_with_low_view_old_summary" />
</PreferenceScreen> SETTINGS: HIDE_LAYOUT_COMPONENTS -->

<!-- SETTINGS: HIDE_CHANNEL_PROFILE_COMPONENTS
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_channel_profile_title" />
Expand Down Expand Up @@ -653,7 +658,7 @@
<Preference android:title=" " android:selectable="false" android:summary="@string/pref_about_category" />
<PreferenceScreen android:title="@string/revanced_patches_information" android:summary="@string/revanced_patches_information_summary" >
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_tool_used" />
<Preference android:title="ReVanced Patches" android:selectable="false" android:summary="2.223.0-dev.3" />
<Preference android:title="ReVanced Patches" android:selectable="false" android:summary="2.223.0-dev.11" />
<Preference android:title="ReVanced Integrations" android:selectable="false" android:summary="" />

<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_ads" />
Expand Down

0 comments on commit 689193f

Please sign in to comment.