diff --git a/extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java b/extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java index 6412df333c..037744c7e3 100644 --- a/extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java +++ b/extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java @@ -777,8 +777,8 @@ public static void setPreferenceTitlesToMultiLineIfNeeded(PreferenceGroup group) return; } - String deviceLanguage = Utils.getContext().getResources().getConfiguration().locale.getLanguage(); - if (deviceLanguage.equals("en")) { + String revancedLocale = Utils.getContext().getResources().getConfiguration().locale.getLanguage(); + if (revancedLocale.equals(Locale.ENGLISH.getLanguage())) { return; } @@ -786,8 +786,8 @@ public static void setPreferenceTitlesToMultiLineIfNeeded(PreferenceGroup group) Preference pref = group.getPreference(i); pref.setSingleLineTitle(false); - if (pref instanceof PreferenceGroup) { - setPreferenceTitlesToMultiLineIfNeeded((PreferenceGroup) pref); + if (pref instanceof PreferenceGroup subGroup) { + setPreferenceTitlesToMultiLineIfNeeded(subGroup); } } } diff --git a/extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/AppLanguage.java b/extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/AppLanguage.java index 7f8d3783a8..e6d029a2e4 100644 --- a/extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/AppLanguage.java +++ b/extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/AppLanguage.java @@ -109,6 +109,6 @@ public Locale getLocale() { return Locale.getDefault(); } - return Locale.forLanguageTag(getLanguage()); + return Locale.forLanguageTag(language); } }