chore: Fix duplicate strings that is confusing Crowdin

This commit is contained in:
LisoUseInAIKyrios 2024-04-21 08:03:11 +04:00
parent b89bd8d799
commit 4ca6886fcf
2 changed files with 14 additions and 4 deletions

View File

@ -62,7 +62,17 @@ object SettingsPatch : BytecodePatch(
AddResourcesPatch(this::class)
PreferenceScreen.MISC.OTHER.addPreferences(
SwitchPreference("revanced_debug")
// The debug setting is shared across multiple apps and the key must be the same.
// But the title and summary must be different, otherwise when the strings file is flattened
// for Crowdin push, Crowdin gets confused by the duplicate keys.
// FIXME: Ideally the shared debug strings are extracted into a common app group
// and then both apps import that. But for now unique unique title and summary keys also works.
SwitchPreference(
key = "revanced_debug",
titleKey = "revanced_twitch_debug_title",
summaryOnKey = "revanced_twitch_debug_summary_on",
summaryOffKey = "revanced_twitch_debug_summary_off"
)
)
// Hook onCreate to handle fragment creation

View File

@ -1155,9 +1155,9 @@
<string name="revanced_other_category_title">Other settings</string>
<string name="revanced_client_ads_category_title">Client-side ads</string>
<string name="revanced_surestream_ads_category_title">Server-side surestream ads</string>
<string name="revanced_debug_title">Debug logging</string>
<string name="revanced_debug_summary_on">Debug logs are enabled</string>
<string name="revanced_debug_summary_off">Debug logs are disabled</string>
<string name="revanced_twitch_debug_title">Debug logging</string>
<string name="revanced_twitch_debug_summary_on">Debug logs are enabled</string>
<string name="revanced_twitch_debug_summary_off">Debug logs are disabled</string>
</patch>
</app>
</resources>