From 39ed595d608efd852a0239f6cf74f1168981cfc2 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 16 May 2024 07:01:35 +0200 Subject: android: No longer manually set UI language Drop the possibility to manually set a UI language introduced in commit f2e35a695671028b32139df1824ff536e7610d35 Author: Mert Tumer Date: Tue Sep 18 23:29:57 2018 +0300 Added language support on Android Viewer Since commit 5bf2ec9ed8728a2042e110122ea2b0e4ff55104a Author: Michael Weghorn Date: Fri Dec 20 10:40:34 2019 +0100 android: Use system locale by default , Android Viewer defaulted to the system language for its UI language as well. In addition, current Android versions allow to set a specific language for apps: [1] The previous approach of manually setting a language in Android Viewer shouldn't really be necessary any more. With the app now being available for translation on Weblate and having been translated to more languages, the list of available languages had become out of sync. Additionally, the manually selected language wasn't consistently applied everywhere: * On the start activity where a document can be selected, it was only applied after closing the app, then opening it again. * in the Settings, the language was not applied at all, that was always using the system locale anyway Changes to the system locale are applied immediately and consistently, so stick to the default Android mechanism and reduce the overall complexity and maintenance burden. [1] https://support.google.com/android/answer/12395118?hl=en Change-Id: Ida61650b888a563f2346ea94a14b260802b1d24d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167718 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- android/source/res/values/arrays.xml | 15 ------ android/source/res/values/strings.xml | 2 - android/source/res/xml/libreoffice_preferences.xml | 9 ---- .../org/libreoffice/LibreOfficeApplication.java | 5 -- .../src/java/org/libreoffice/LocaleHelper.java | 56 ---------------------- .../src/java/org/libreoffice/SettingsActivity.java | 3 -- .../org/libreoffice/ui/LibreOfficeUIActivity.java | 24 +--------- 7 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 android/source/res/values/arrays.xml delete mode 100644 android/source/src/java/org/libreoffice/LocaleHelper.java (limited to 'android') diff --git a/android/source/res/values/arrays.xml b/android/source/res/values/arrays.xml deleted file mode 100644 index 832bca781572..000000000000 --- a/android/source/res/values/arrays.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - SYSTEM_DEFAULT_LANGUAGE - de - en - tr - - - (System Default) - Deutsch - English - Turkçe - - diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 3766db146098..36b3cef75a25 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -140,8 +140,6 @@ OK Cancel Current UNO command - Display Language - Set the default display language PDF export finished Unable to export to pdf Unable to save file diff --git a/android/source/res/xml/libreoffice_preferences.xml b/android/source/res/xml/libreoffice_preferences.xml index 052efacb2e3e..d8ca4dc8c7a7 100644 --- a/android/source/res/xml/libreoffice_preferences.xml +++ b/android/source/res/xml/libreoffice_preferences.xml @@ -4,15 +4,6 @@ android:title="@string/pref_category_general" android:key="PREF_CATEGORY_GENERAL"> - -