Skip to content

Commit

Permalink
fix: Remove least spoken languages
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Dec 6, 2024
1 parent 03fdba1 commit ff0c03c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ private static void sortListPreferenceByValues(ListPreference listPreference) {
CharSequence[] entryValues = listPreference.getEntryValues();
final int entrySize = entries.length;

if (entrySize != entryValues.length) {
throw new IllegalStateException();
}

// Ensure the first entry remains the first after sorting.
String firstEntry = entries[0].toString();
String firstEntryValue = entryValues[0].toString();
CharSequence firstEntry = entries[0];
CharSequence firstEntryValue = entryValues[0];

List<Pair<String, String>> entryPairs = new ArrayList<>(entrySize);
for (int i = 1; i < entrySize; i++) {
Expand Down
47 changes: 0 additions & 47 deletions patches/src/main/resources/addresources/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@
</string-array>
<string-array name="revanced_spoof_video_streams_language_entries">
<item>@string/revanced_spoof_video_streams_language_DEFAULT</item>
<item>@string/revanced_spoof_video_streams_language_AF</item>
<item>@string/revanced_spoof_video_streams_language_AM</item>
<item>@string/revanced_spoof_video_streams_language_AR</item>
<item>@string/revanced_spoof_video_streams_language_AS</item>
<item>@string/revanced_spoof_video_streams_language_AZ</item>
<item>@string/revanced_spoof_video_streams_language_BE</item>
<item>@string/revanced_spoof_video_streams_language_BG</item>
<item>@string/revanced_spoof_video_streams_language_BN</item>
<item>@string/revanced_spoof_video_streams_language_BS</item>
<item>@string/revanced_spoof_video_streams_language_CA</item>
<item>@string/revanced_spoof_video_streams_language_CS</item>
<item>@string/revanced_spoof_video_streams_language_DA</item>
Expand All @@ -30,78 +25,55 @@
<item>@string/revanced_spoof_video_streams_language_EN</item>
<item>@string/revanced_spoof_video_streams_language_ES</item>
<item>@string/revanced_spoof_video_streams_language_ET</item>
<item>@string/revanced_spoof_video_streams_language_EU</item>
<item>@string/revanced_spoof_video_streams_language_FA</item>
<item>@string/revanced_spoof_video_streams_language_FI</item>
<item>@string/revanced_spoof_video_streams_language_FR</item>
<item>@string/revanced_spoof_video_streams_language_GL</item>
<item>@string/revanced_spoof_video_streams_language_GU</item>
<item>@string/revanced_spoof_video_streams_language_HE</item>
<item>@string/revanced_spoof_video_streams_language_HI</item>
<item>@string/revanced_spoof_video_streams_language_HR</item>
<item>@string/revanced_spoof_video_streams_language_HU</item>
<item>@string/revanced_spoof_video_streams_language_HY</item>
<item>@string/revanced_spoof_video_streams_language_ID</item>
<item>@string/revanced_spoof_video_streams_language_IS</item>
<item>@string/revanced_spoof_video_streams_language_IT</item>
<item>@string/revanced_spoof_video_streams_language_JA</item>
<item>@string/revanced_spoof_video_streams_language_KA</item>
<item>@string/revanced_spoof_video_streams_language_KK</item>
<item>@string/revanced_spoof_video_streams_language_KM</item>
<item>@string/revanced_spoof_video_streams_language_KN</item>
<item>@string/revanced_spoof_video_streams_language_KO</item>
<item>@string/revanced_spoof_video_streams_language_KY</item>
<item>@string/revanced_spoof_video_streams_language_LO</item>
<item>@string/revanced_spoof_video_streams_language_LT</item>
<item>@string/revanced_spoof_video_streams_language_LV</item>
<item>@string/revanced_spoof_video_streams_language_MK</item>
<item>@string/revanced_spoof_video_streams_language_ML</item>
<item>@string/revanced_spoof_video_streams_language_MN</item>
<item>@string/revanced_spoof_video_streams_language_MR</item>
<item>@string/revanced_spoof_video_streams_language_MS</item>
<item>@string/revanced_spoof_video_streams_language_MY</item>
<item>@string/revanced_spoof_video_streams_language_NE</item>
<item>@string/revanced_spoof_video_streams_language_NL</item>
<item>@string/revanced_spoof_video_streams_language_NB</item>
<item>@string/revanced_spoof_video_streams_language_OR</item>
<item>@string/revanced_spoof_video_streams_language_PA</item>
<item>@string/revanced_spoof_video_streams_language_PL</item>
<item>@string/revanced_spoof_video_streams_language_PT_BR</item>
<item>@string/revanced_spoof_video_streams_language_PT_PT</item>
<item>@string/revanced_spoof_video_streams_language_RO</item>
<item>@string/revanced_spoof_video_streams_language_RU</item>
<item>@string/revanced_spoof_video_streams_language_SI</item>
<item>@string/revanced_spoof_video_streams_language_SK</item>
<item>@string/revanced_spoof_video_streams_language_SL</item>
<item>@string/revanced_spoof_video_streams_language_SQ</item>
<item>@string/revanced_spoof_video_streams_language_SR</item>
<item>@string/revanced_spoof_video_streams_language_SR_LATN</item>
<item>@string/revanced_spoof_video_streams_language_SV</item>
<item>@string/revanced_spoof_video_streams_language_SW</item>
<item>@string/revanced_spoof_video_streams_language_TA</item>
<item>@string/revanced_spoof_video_streams_language_TE</item>
<item>@string/revanced_spoof_video_streams_language_TH</item>
<item>@string/revanced_spoof_video_streams_language_TL</item>
<item>@string/revanced_spoof_video_streams_language_TR</item>
<item>@string/revanced_spoof_video_streams_language_UK</item>
<item>@string/revanced_spoof_video_streams_language_UR</item>
<item>@string/revanced_spoof_video_streams_language_UZ</item>
<item>@string/revanced_spoof_video_streams_language_VI</item>
<item>@string/revanced_spoof_video_streams_language_ZH_CN</item>
<item>@string/revanced_spoof_video_streams_language_ZH_TW</item>
<item>@string/revanced_spoof_video_streams_language_ZU</item>
</string-array>
<string-array name="revanced_spoof_video_streams_language_entry_values">
<item>DEFAULT</item>
<item>AF</item>
<item>AM</item>
<item>AR</item>
<item>AS</item>
<item>AZ</item>
<item>BE</item>
<item>BG</item>
<item>BN</item>
<item>BS</item>
<item>CA</item>
<item>CS</item>
<item>DA</item>
Expand All @@ -110,67 +82,48 @@
<item>EN</item>
<item>ES</item>
<item>ET</item>
<item>EU</item>
<item>FA</item>
<item>FI</item>
<item>FR</item>
<item>GL</item>
<item>GU</item>
<item>HE</item>
<item>HI</item>
<item>HR</item>
<item>HU</item>
<item>HY</item>
<item>ID</item>
<item>IS</item>
<item>IT</item>
<item>JA</item>
<item>KA</item>
<item>KK</item>
<item>KM</item>
<item>KN</item>
<item>KO</item>
<item>KY</item>
<item>LO</item>
<item>LT</item>
<item>LV</item>
<item>MK</item>
<item>ML</item>
<item>MN</item>
<item>MR</item>
<item>MS</item>
<item>MY</item>
<item>NE</item>
<item>NL</item>
<item>NB</item>
<item>OR</item>
<item>PA</item>
<item>PL</item>
<item>PT_BR</item>
<item>PT_PT</item>
<item>RO</item>
<item>RU</item>
<item>SI</item>
<item>SK</item>
<item>SL</item>
<item>SQ</item>
<item>SR</item>
<item>SR_LATN</item>
<item>SV</item>
<item>SW</item>
<item>TA</item>
<item>TE</item>
<item>TH</item>
<item>TL</item>
<item>TR</item>
<item>UK</item>
<item>UR</item>
<item>UZ</item>
<item>VI</item>
<item>ZH_CN</item>
<item>ZH_HK</item>
<item>ZH_TW</item>
<item>ZU</item>
</string-array>
</patch>
<patch id="layout.spoofappversion.spoofAppVersionPatch">
Expand Down
23 changes: 0 additions & 23 deletions patches/src/main/resources/addresources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1231,15 +1231,10 @@ This is because Crowdin requires temporarily flattening this file and removing t
<string name="revanced_spoof_video_streams_language_">Video streams are spoofed</string>
<string name="revanced_spoof_video_streams_language_title">Preferred audio stream language</string>
<string name="revanced_spoof_video_streams_language_DEFAULT">App language</string>
<string name="revanced_spoof_video_streams_language_AF">Afrikaans</string>
<string name="revanced_spoof_video_streams_language_AM">Amharic</string>
<string name="revanced_spoof_video_streams_language_AR">Arabic</string>
<string name="revanced_spoof_video_streams_language_AS">Assamese</string>
<string name="revanced_spoof_video_streams_language_AZ">Azerbaijani</string>
<string name="revanced_spoof_video_streams_language_BE">Belarusian</string>
<string name="revanced_spoof_video_streams_language_BG">Bulgarian</string>
<string name="revanced_spoof_video_streams_language_BN">Bengali</string>
<string name="revanced_spoof_video_streams_language_BS">Bosnian</string>
<string name="revanced_spoof_video_streams_language_CA">Catalan</string>
<string name="revanced_spoof_video_streams_language_CS">Czech</string>
<string name="revanced_spoof_video_streams_language_DA">Danish</string>
Expand All @@ -1248,66 +1243,48 @@ This is because Crowdin requires temporarily flattening this file and removing t
<string name="revanced_spoof_video_streams_language_EN">English</string>
<string name="revanced_spoof_video_streams_language_ES">Spanish</string>
<string name="revanced_spoof_video_streams_language_ET">Estonian</string>
<string name="revanced_spoof_video_streams_language_EU">Basque</string>
<string name="revanced_spoof_video_streams_language_FA">Persian</string>
<string name="revanced_spoof_video_streams_language_FI">Finnish</string>
<string name="revanced_spoof_video_streams_language_FR">French</string>
<string name="revanced_spoof_video_streams_language_GL">Galician</string>
<string name="revanced_spoof_video_streams_language_GU">Gujarati</string>
<string name="revanced_spoof_video_streams_language_HE">Hebrew</string>
<string name="revanced_spoof_video_streams_language_HI">Hindi</string>
<string name="revanced_spoof_video_streams_language_HR">Croatian</string>
<string name="revanced_spoof_video_streams_language_HU">Hungarian</string>
<string name="revanced_spoof_video_streams_language_HY">Armenian</string>
<string name="revanced_spoof_video_streams_language_ID">Indonesian</string>
<string name="revanced_spoof_video_streams_language_IS">Icelandic</string>
<string name="revanced_spoof_video_streams_language_IT">Italian</string>
<string name="revanced_spoof_video_streams_language_JA">Japanese</string>
<string name="revanced_spoof_video_streams_language_KA">Georgian</string>
<string name="revanced_spoof_video_streams_language_KK">Kazakh</string>
<string name="revanced_spoof_video_streams_language_KM">Khmer</string>
<string name="revanced_spoof_video_streams_language_KN">Kannada</string>
<string name="revanced_spoof_video_streams_language_KO">Korean</string>
<string name="revanced_spoof_video_streams_language_KY">Kyrgyz</string>
<string name="revanced_spoof_video_streams_language_LO">Lao</string>
<string name="revanced_spoof_video_streams_language_LT">Lithuanian</string>
<string name="revanced_spoof_video_streams_language_LV">Latvian</string>
<string name="revanced_spoof_video_streams_language_MK">Macedonian</string>
<string name="revanced_spoof_video_streams_language_ML">Malayalam</string>
<string name="revanced_spoof_video_streams_language_MN">Mongolian</string>
<string name="revanced_spoof_video_streams_language_MR">Marathi</string>
<string name="revanced_spoof_video_streams_language_MS">Malay</string>
<string name="revanced_spoof_video_streams_language_MY">Burmese</string>
<string name="revanced_spoof_video_streams_language_NE">Nepali</string>
<string name="revanced_spoof_video_streams_language_NL">Dutch</string>
<string name="revanced_spoof_video_streams_language_NB">Norwegian Bokmål</string>
<string name="revanced_spoof_video_streams_language_OR">Odia</string>
<string name="revanced_spoof_video_streams_language_PA">Punjabi</string>
<string name="revanced_spoof_video_streams_language_PL">Polish</string>
<string name="revanced_spoof_video_streams_language_PT_BR">Portuguese (Brazil)</string>
<string name="revanced_spoof_video_streams_language_PT_PT">Portuguese (Portugal)</string>
<string name="revanced_spoof_video_streams_language_RO">Romanian</string>
<string name="revanced_spoof_video_streams_language_RU">Russian</string>
<string name="revanced_spoof_video_streams_language_SI">Sinhala</string>
<string name="revanced_spoof_video_streams_language_SK">Slovak</string>
<string name="revanced_spoof_video_streams_language_SL">Slovene</string>
<string name="revanced_spoof_video_streams_language_SQ">Albanian</string>
<string name="revanced_spoof_video_streams_language_SR">Serbian</string>
<string name="revanced_spoof_video_streams_language_SR_LATN">Serbian (Latin)</string>
<string name="revanced_spoof_video_streams_language_SV">Swedish</string>
<string name="revanced_spoof_video_streams_language_SW">Swahili</string>
<string name="revanced_spoof_video_streams_language_TA">Tamil</string>
<string name="revanced_spoof_video_streams_language_TE">Telugu</string>
<string name="revanced_spoof_video_streams_language_TH">Thai</string>
<string name="revanced_spoof_video_streams_language_TL">Tagalog</string>
<string name="revanced_spoof_video_streams_language_TR">Turkish</string>
<string name="revanced_spoof_video_streams_language_UK">Ukrainian</string>
<string name="revanced_spoof_video_streams_language_UR">Urdu</string>
<string name="revanced_spoof_video_streams_language_UZ">Uzbek</string>
<string name="revanced_spoof_video_streams_language_VI">Vietnamese</string>
<string name="revanced_spoof_video_streams_language_ZH_CN">Chinese (Simplified)</string>
<string name="revanced_spoof_video_streams_language_ZH_TW">Chinese (Traditional)</string>
<string name="revanced_spoof_video_streams_language_ZU">Zulu</string>
</patch>
</app>
<app id="twitch">
Expand Down

0 comments on commit ff0c03c

Please sign in to comment.