feat(YouTube/Settings): add strings that provide no translation

This commit is contained in:
inotia00 2024-05-02 03:51:55 +09:00
parent f49fc6affa
commit 9e93427d11
2 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package app.revanced.patches.youtube.utils.settings package app.revanced.patches.youtube.utils.settings
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patches.shared.elements.StringsElementsUtils.removeStringsElements
import app.revanced.patches.shared.mapping.ResourceMappingPatch import app.revanced.patches.shared.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.integrations.IntegrationsPatch import app.revanced.patches.youtube.utils.integrations.IntegrationsPatch
@ -93,6 +94,21 @@ object SettingsPatch : BaseResourcePatch(
.also { it.shutdown() } .also { it.shutdown() }
.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS) .awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS)
/**
* remove strings duplicated with RVX resources
*
* YouTube does not provide translations for these strings.
* That's why it's been added to RVX resources.
* This string also exists in RVX resources, so it must be removed to avoid being duplicated.
*/
context.removeStringsElements(
arrayOf("values"),
arrayOf(
"accessibility_settings_edu_opt_in_text",
"accessibility_settings_edu_opt_out_text"
)
)
/** /**
* copy arrays, strings and preference * copy arrays, strings and preference
*/ */

View File

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Translations for YouTube -->
<string name="accessibility_settings_edu_opt_in_text">Turn on accessibility controls for the video player?</string>
<string name="accessibility_settings_edu_opt_out_text">Your controls are modified because an accessibility service is on.</string>
<!-- Shared PreferenceScreen --> <!-- Shared PreferenceScreen -->
<string name="revanced_extended_settings_title">ReVanced Extended</string> <string name="revanced_extended_settings_title">ReVanced Extended</string>