From 1f88ba03332ae948af5e02f55d79ebadf2e83cb6 Mon Sep 17 00:00:00 2001
From: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Date: Thu, 26 Sep 2024 09:02:07 +0200
Subject: [PATCH] Add new data storage location dialogue
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
---
app/src/main/AndroidManifest.xml | 5 +
.../nextcloud/client/di/ComponentsModule.java | 6 +-
.../preferences/AppPreferencesImpl.java | 1 +
.../ui/ChooseStorageLocationDialogFragment.kt | 164 ++++++++++++++++++
.../activity/ChooseStorageLocationActivity.kt | 38 ++++
.../android/ui/activity/SettingsActivity.java | 20 +++
.../layout/dialog_data_storage_location.xml | 47 +++++
app/src/main/res/values-ar/strings.xml | 2 +-
app/src/main/res/values-b+en+001/strings.xml | 2 +-
app/src/main/res/values-bg-rBG/strings.xml | 2 +-
app/src/main/res/values-ca/strings.xml | 2 +-
app/src/main/res/values-cs-rCZ/strings.xml | 2 +-
app/src/main/res/values-da/strings.xml | 2 +-
app/src/main/res/values-de/strings.xml | 2 +-
app/src/main/res/values-el/strings.xml | 2 +-
app/src/main/res/values-es-rAR/strings.xml | 2 +-
app/src/main/res/values-es-rEC/strings.xml | 2 +-
app/src/main/res/values-es-rMX/strings.xml | 2 +-
app/src/main/res/values-es/strings.xml | 2 +-
app/src/main/res/values-eu/strings.xml | 2 +-
app/src/main/res/values-fa/strings.xml | 2 +-
app/src/main/res/values-fi-rFI/strings.xml | 2 +-
app/src/main/res/values-fr/strings.xml | 2 +-
app/src/main/res/values-ga/strings.xml | 2 +-
app/src/main/res/values-gd/strings.xml | 2 +-
app/src/main/res/values-gl/strings.xml | 2 +-
app/src/main/res/values-hr/strings.xml | 2 +-
app/src/main/res/values-hu-rHU/strings.xml | 2 +-
app/src/main/res/values-in/strings.xml | 2 +-
app/src/main/res/values-is/strings.xml | 2 +-
app/src/main/res/values-it/strings.xml | 2 +-
app/src/main/res/values-ja-rJP/strings.xml | 2 +-
app/src/main/res/values-ka/strings.xml | 2 +-
app/src/main/res/values-ko/strings.xml | 2 +-
app/src/main/res/values-lo/strings.xml | 2 +-
app/src/main/res/values-lt-rLT/strings.xml | 2 +-
app/src/main/res/values-mk/strings.xml | 2 +-
app/src/main/res/values-nb-rNO/strings.xml | 2 +-
app/src/main/res/values-nl/strings.xml | 2 +-
app/src/main/res/values-pl/strings.xml | 2 +-
app/src/main/res/values-pt-rBR/strings.xml | 2 +-
app/src/main/res/values-pt-rPT/strings.xml | 2 +-
app/src/main/res/values-ro/strings.xml | 2 +-
app/src/main/res/values-ru/strings.xml | 2 +-
app/src/main/res/values-sc/strings.xml | 2 +-
app/src/main/res/values-sk-rSK/strings.xml | 2 +-
app/src/main/res/values-sl/strings.xml | 2 +-
app/src/main/res/values-sr/strings.xml | 2 +-
app/src/main/res/values-sv/strings.xml | 2 +-
app/src/main/res/values-tk/strings.xml | 2 +-
app/src/main/res/values-tr/strings.xml | 2 +-
app/src/main/res/values-ug/strings.xml | 2 +-
app/src/main/res/values-uk/strings.xml | 2 +-
app/src/main/res/values-vi/strings.xml | 2 +-
app/src/main/res/values-zh-rCN/strings.xml | 2 +-
app/src/main/res/values-zh-rHK/strings.xml | 2 +-
app/src/main/res/values-zh-rTW/strings.xml | 2 +-
app/src/main/res/values/strings.xml | 5 +-
app/src/main/res/xml/preferences.xml | 5 +-
59 files changed, 338 insertions(+), 53 deletions(-)
create mode 100644 app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt
create mode 100644 app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt
create mode 100644 app/src/main/res/layout/dialog_data_storage_location.xml
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7114b8d9b7..2d3bfe327d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -313,6 +313,11 @@
android:name=".ui.activity.ContactsPreferenceActivity"
android:exported="false"
android:launchMode="singleInstance" />
+
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+package com.nextcloud.ui
+
+import android.app.Dialog
+import android.content.DialogInterface
+import android.os.Bundle
+import android.preference.PreferenceManager
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+import com.nextcloud.client.di.Injectable
+import com.nextcloud.client.preferences.AppPreferencesImpl
+import com.owncloud.android.MainApp
+import com.owncloud.android.R
+import com.owncloud.android.databinding.DialogDataStorageLocationBinding
+import com.owncloud.android.datastorage.DataStorageProvider
+import com.owncloud.android.datastorage.StoragePoint
+import com.owncloud.android.datastorage.StoragePoint.PrivacyType
+import com.owncloud.android.datastorage.StoragePoint.StorageType
+import com.owncloud.android.utils.DisplayUtils
+import com.owncloud.android.utils.theme.ViewThemeUtils
+import java.io.File
+import javax.inject.Inject
+
+class ChooseStorageLocationDialogFragment : DialogFragment(), Injectable {
+
+ private lateinit var binding: DialogDataStorageLocationBinding
+
+ @Inject
+ lateinit var viewThemeUtils: ViewThemeUtils
+
+ private val storagePoints = DataStorageProvider.getInstance().availableStoragePoints
+
+ private val selectedStorageType
+ get() = if (!binding.storageExternalRadio.isChecked) StorageType.INTERNAL else StorageType.EXTERNAL
+ private val selectedPrivacyType
+ get() = if (binding.allowMediaIndexSwitch.isChecked) PrivacyType.PUBLIC else PrivacyType.PRIVATE
+
+ override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+ binding = DialogDataStorageLocationBinding.inflate(layoutInflater)
+
+ viewThemeUtils.material.colorMaterialSwitch(binding.allowMediaIndexSwitch)
+ viewThemeUtils.platform.themeRadioButton(binding.storageInternalRadio)
+ viewThemeUtils.platform.themeRadioButton(binding.storageExternalRadio)
+
+ val builder = MaterialAlertDialogBuilder(requireContext()).setTitle(R.string.storage_choose_location)
+ .setPositiveButton(R.string.common_ok) { dialog: DialogInterface, _ ->
+ notifyResult()
+ dialog.dismiss()
+ }.setView(binding.root)
+
+ viewThemeUtils.dialog.colorMaterialAlertDialogBackground(requireContext(), builder)
+
+ binding.storageRadioGroup.setOnCheckedChangeListener { _, _ ->
+ updateMediaIndexSwitch()
+ }
+
+ binding.allowMediaIndexSwitch.setOnCheckedChangeListener { _, _ ->
+ updateStorageTypeSelection()
+ }
+
+ return builder.create()
+ }
+
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
+ return binding.root
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ setupLocationSelection()
+ super.onViewCreated(view, savedInstanceState)
+ }
+
+ override fun onDismiss(dialog: DialogInterface) {
+ super.onDismiss(dialog)
+ activity?.finish()
+ }
+
+ private fun setupLocationSelection() {
+ updateStorageTypeSelection()
+
+ val radioButton = when (getCurrentStorageLocation().storageType) {
+ StorageType.EXTERNAL -> binding.storageExternalRadio
+ else -> binding.storageInternalRadio
+ }
+
+ radioButton.isChecked = true
+ updateMediaIndexSwitch()
+ }
+
+ private fun formatFreeSpaceString(storageType: StorageType, privacyType: PrivacyType): String {
+ val typeString = when (storageType) {
+ StorageType.INTERNAL -> getString(R.string.storage_internal_storage)
+ StorageType.EXTERNAL -> getString(R.string.storage_external_storage)
+ }
+
+ val storagePath = storagePoints.firstOrNull { it.storageType == storageType && it.privacyType == privacyType }?.path
+
+ return storagePath?.let {
+ val file = File(it)
+ val totalSpace = file.totalSpace
+ val usedSpace = totalSpace - file.freeSpace
+ return String.format(
+ getString(R.string.file_migration_free_space),
+ typeString,
+ DisplayUtils.bytesToHumanReadable(usedSpace),
+ DisplayUtils.bytesToHumanReadable(totalSpace)
+ )
+ } ?: typeString
+ }
+
+ private fun updateMediaIndexSwitch() {
+ val privacyTypes = storagePoints.filter { it.storageType == selectedStorageType }.map { it.privacyType }.distinct()
+ binding.allowMediaIndexSwitch.isEnabled = privacyTypes.size > 1
+ binding.allowMediaIndexSwitch.isChecked = privacyTypes.contains(PrivacyType.PUBLIC)
+ }
+
+ private fun updateStorageTypeSelection() {
+ val hasInternalStorage = storagePoints.any { it.storageType == StorageType.INTERNAL }
+ val hasExternalStorage = storagePoints.any { it.storageType == StorageType.EXTERNAL }
+
+ binding.storageInternalRadio.isEnabled = hasInternalStorage
+ binding.storageInternalRadio.text = formatFreeSpaceString(StorageType.INTERNAL, selectedPrivacyType)
+
+ binding.storageExternalRadio.isEnabled = hasExternalStorage
+ binding.storageExternalRadio.text = formatFreeSpaceString(StorageType.EXTERNAL, selectedPrivacyType)
+ }
+
+ private fun getCurrentStorageLocation(): StoragePoint {
+ val appContext = MainApp.getAppContext()
+ val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext)
+ val storagePath = sharedPreferences.getString(AppPreferencesImpl.STORAGE_PATH, appContext.filesDir.absolutePath)
+ return storagePoints.first { it.path == storagePath }
+ }
+
+ private fun notifyResult() {
+ val newPath = storagePoints.first { it.storageType == selectedStorageType && it.privacyType == selectedPrivacyType }
+
+ val resultBundle = Bundle().apply {
+ putString(KEY_RESULT_STORAGE_LOCATION, newPath.path)
+ }
+
+ parentFragmentManager.setFragmentResult(KEY_RESULT_STORAGE_LOCATION, resultBundle)
+ }
+
+ companion object {
+ const val KEY_RESULT_STORAGE_LOCATION = "KEY_RESULT_STORAGE_LOCATION"
+ const val STORAGE_LOCATION_RESULT_CODE = 100
+
+ @JvmStatic
+ fun newInstance() = ChooseStorageLocationDialogFragment()
+
+ @JvmStatic
+ val TAG: String = Companion::class.java.simpleName
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt
new file mode 100644
index 0000000000..10180e5247
--- /dev/null
+++ b/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt
@@ -0,0 +1,38 @@
+/*
+ * Nextcloud - Android Client
+ *
+ * SPDX-FileCopyrightText: 2024 ZetaTom <70907959+ZetaTom@users.noreply.github.com>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+package com.owncloud.android.ui.activity
+
+import android.content.Intent
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
+import com.nextcloud.ui.ChooseStorageLocationDialogFragment
+
+class ChooseStorageLocationActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ val chooseStorageLocationDialogFragment = ChooseStorageLocationDialogFragment.newInstance()
+ supportFragmentManager.setFragmentResultListener(
+ KEY_RESULT_STORAGE_LOCATION,
+ this
+ ) { _, result ->
+ setResult(
+ ChooseStorageLocationDialogFragment.STORAGE_LOCATION_RESULT_CODE,
+ Intent().putExtra(
+ KEY_RESULT_STORAGE_LOCATION,
+ result.getString(KEY_RESULT_STORAGE_LOCATION)
+ )
+ )
+ }
+ chooseStorageLocationDialogFragment.show(supportFragmentManager, "choose_storage_location")
+ }
+
+ companion object {
+ const val KEY_RESULT_STORAGE_LOCATION = ChooseStorageLocationDialogFragment.KEY_RESULT_STORAGE_LOCATION
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
index b17f814b57..c811c34ce0 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
+++ b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
@@ -115,6 +115,7 @@ public class SettingsActivity extends PreferenceActivity
private static final int ACTION_REQUEST_CODE_DAVDROID_SETUP = 10;
private static final int ACTION_SHOW_MNEMONIC = 11;
private static final int ACTION_E2E = 12;
+ private static final int ACTION_SET_STORAGE_LOCATION = 13;
private static final int TRUE_VALUE = 1;
private static final String DAV_PATH = "/remote.php/dav";
@@ -129,6 +130,7 @@ public class SettingsActivity extends PreferenceActivity
private AppCompatDelegate delegate;
private ListPreference prefStoragePath;
+ private Preference prefDataLoc;
private String storagePath;
private String pendingLock;
@@ -830,6 +832,16 @@ public class SettingsActivity extends PreferenceActivity
loadStoragePath();
+ prefDataLoc = findPreference(AppPreferencesImpl.DATA_STORAGE_LOCATION);
+ if (prefDataLoc != null) {
+ prefDataLoc.setOnPreferenceClickListener(p -> {
+ Intent intent = new Intent(MainApp.getAppContext(), ChooseStorageLocationActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ startActivityForResult(intent, ACTION_SET_STORAGE_LOCATION);
+ return true;
+ });
+ }
+
ListPreference themePref = (ListPreference) findPreference("darkMode");
List themeEntries = new ArrayList<>(3);
@@ -996,6 +1008,14 @@ public class SettingsActivity extends PreferenceActivity
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(i);
+ } else if (requestCode == ACTION_SET_STORAGE_LOCATION && data != null) {
+ String newPath = data.getStringExtra(ChooseStorageLocationActivity.KEY_RESULT_STORAGE_LOCATION);
+
+ if (!storagePath.equals(newPath)) {
+ StorageMigration storageMigration = new StorageMigration(this, user, storagePath, newPath, viewThemeUtils);
+ storageMigration.setStorageMigrationProgressListener(this);
+ storageMigration.migrate();
+ }
}
}
diff --git a/app/src/main/res/layout/dialog_data_storage_location.xml b/app/src/main/res/layout/dialog_data_storage_location.xml
new file mode 100644
index 0000000000..9c1e447932
--- /dev/null
+++ b/app/src/main/res/layout/dialog_data_storage_location.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index 76907857e5..8893425c8e 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -691,7 +691,7 @@
مقترحات بتطبيقات من نكست كلاود في شريط التصفح navigation heading
عرض الملفات المخفية
الحصول على الشفرة المصدرية
- مجلد تخزين البيانات
+ مجلد تخزين البيانات
إدارة الملفات للتحميل التلقائي
مجلد محلي
مجلد عن بعد
diff --git a/app/src/main/res/values-b+en+001/strings.xml b/app/src/main/res/values-b+en+001/strings.xml
index dfdd5f8f6e..08c1cabbba 100644
--- a/app/src/main/res/values-b+en+001/strings.xml
+++ b/app/src/main/res/values-b+en+001/strings.xml
@@ -687,7 +687,7 @@
Nextcloud app suggestions in navigation heading
Show hidden files
Get source code
- Data storage folder
+ Data storage folder
Manage folders for auto upload
Local folder
Remote folder
diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml
index 696d0c7263..b2637aa37d 100644
--- a/app/src/main/res/values-bg-rBG/strings.xml
+++ b/app/src/main/res/values-bg-rBG/strings.xml
@@ -581,7 +581,7 @@
Настройка на цялостно криптиране
Показване и на скрити файлове
Получаване на изходния код
- Папка за съхранение на данни
+ Папка за съхранение на данни
Управление на папки за автоматично качване
Локална папка
Отдалечена папка
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index c18eb6240e..ad044bf89c 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -600,7 +600,7 @@
Configureu el xifratge d\'extrem a extrem
Mostra els fitxers ocults
Aconseguiu el codi font
- Carpeta de dades
+ Carpeta de dades
Gestiona les carpetes per a la pujada automàtica
Carpeta local
Carpeta remota
diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml
index b592d93a63..e4b2a2887f 100644
--- a/app/src/main/res/values-cs-rCZ/strings.xml
+++ b/app/src/main/res/values-cs-rCZ/strings.xml
@@ -687,7 +687,7 @@
Doporučování Nextcloud aplikací v záhlaví navigace
Zobrazit skryté soubory
Získat zdrojové kódy
- Složka pro ukládání dat
+ Složka pro ukládání dat
Spravovat složky pro automatické nahrávání
Místní složka
Vzdálená složka
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index 88c3100832..201c8f688b 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -632,7 +632,7 @@ Enheds legitimationsoplysninger er sat op
Nextcloud app anbefalinger i navigationspanelet
Vis skjulte filer
Hent kildetekst
- Lagringsmappe for data
+ Lagringsmappe for data
Administrér mapper til auto upload
Lokal mappe
Ekstern mappe
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index ed43b3832c..4f40b560d0 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -687,7 +687,7 @@
Nextcloud-App-Vorschläge in der Navigationsüberschrift
Versteckte Dateien anzeigen
Zum Programmcode
- Speicherordner
+ Speicherordner
Ordner für \"Automatisches Hochladen\" verwalten
Lokaler Ordner
Remote-Ordner
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 4677ea312b..e512169da9 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -587,7 +587,7 @@
Ρύθμιση κρυπτογράφησης από άκρο σε άκρο
Εμφάνιση κρυφών αρχείων
Λήψη πηγαίου κώδικα
- Φάκελος αποθήκευσης δεδομένων
+ Φάκελος αποθήκευσης δεδομένων
Διαχείριση φακέλων για αυτόματη μεταφόρτωση
Τοπικός φάκελος
Απομακρυσμένος φάκελος
diff --git a/app/src/main/res/values-es-rAR/strings.xml b/app/src/main/res/values-es-rAR/strings.xml
index 303df3c328..bbea774837 100644
--- a/app/src/main/res/values-es-rAR/strings.xml
+++ b/app/src/main/res/values-es-rAR/strings.xml
@@ -655,7 +655,7 @@
Sugerencias de aplicaciones de Nextcloud en el encabezado de navegación
Mostrar archivos ocultos
Obtener el código fuente
- Carpeta de almacenamiento de datos
+ Carpeta de almacenamiento de datos
Administrar carpetas para carga automática
Carpeta local
Carpeta remota
diff --git a/app/src/main/res/values-es-rEC/strings.xml b/app/src/main/res/values-es-rEC/strings.xml
index 03317462ae..8889b12d9c 100644
--- a/app/src/main/res/values-es-rEC/strings.xml
+++ b/app/src/main/res/values-es-rEC/strings.xml
@@ -589,7 +589,7 @@
Configurar encriptación de extremo a extremo
Mostrar archivos ocultos
Obtener el código fuente
- Carpeta de almacenamiento de datos
+ Carpeta de almacenamiento de datos
Administrar carpetas para carga automática
Carpeta local
Carpeta remota
diff --git a/app/src/main/res/values-es-rMX/strings.xml b/app/src/main/res/values-es-rMX/strings.xml
index f2b9c35f00..a693af5e38 100644
--- a/app/src/main/res/values-es-rMX/strings.xml
+++ b/app/src/main/res/values-es-rMX/strings.xml
@@ -655,7 +655,7 @@
Sugerencias de aplicaciones de Nextcloud en el encabezado de navegación
Mostrar archivos ocultos
Obtener el código fuente
- Carpeta de almacenamiento de datos
+ Carpeta de almacenamiento de datos
Administrar carpetas para carga automática
Carpeta local
Carpeta remota
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index dd20ceecb0..7dcc7d3392 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -687,7 +687,7 @@
Sugerencias de Nextcloud app en encabezado de navegación
Mostrar archivos ocultos
Obtener el código fuente
- Carpeta de almacenamiento de datos
+ Carpeta de almacenamiento de datos
Administrar carpetas para auto-subida
Carpeta local
Carpeta remota
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index 559dd02616..69f5a8c7a1 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -687,7 +687,7 @@
Nextcloud aplikazioaren iradokizunak nabigazio goiburuan
Erakutsi ezkutuko fitxategiak
Eskuratu iturburu-kodea
- Datu-biltegiratze karpeta
+ Datu-biltegiratze karpeta
Kudeatu karpeten igotze automatikoa
Karpeta lokala
Urruneko karpeta
diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml
index e01de3da13..8fb24f80f5 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -628,7 +628,7 @@
Nextcloud app suggestions in navigation heading
فایل های مخفی را نشان بده
دریافت کد منبع
- مسیر ذخیرهسازی
+ مسیر ذخیرهسازی
مدیریت پوشهها جهت آپلود خودکار
پوشه محلی
پوشه از راه دور
diff --git a/app/src/main/res/values-fi-rFI/strings.xml b/app/src/main/res/values-fi-rFI/strings.xml
index 0c01fab402..ee4f3bc958 100644
--- a/app/src/main/res/values-fi-rFI/strings.xml
+++ b/app/src/main/res/values-fi-rFI/strings.xml
@@ -643,7 +643,7 @@ GNU yleinen lisenssi, versio 2
Nextcloud-sovellusehdotukset navigointipalkissa
Näytä piilotetut tiedostot
Hanki lähdekoodi
- Tiedostojen tallennuskansio
+ Tiedostojen tallennuskansio
Hallinnoi kansioita automaattista latausta varten
Paikallinen kansio
Etäkansio
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index b17c260304..b272b18916 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -687,7 +687,7 @@
Suggestions d\'applications Nextcloud dans l\'en-tête de navigation
Afficher les fichiers masqués
Obtenir le code source
- Dossier de stockage des données
+ Dossier de stockage des données
Gérer les dossiers pour le téléversement automatique
Dossier local
Dossier distant
diff --git a/app/src/main/res/values-ga/strings.xml b/app/src/main/res/values-ga/strings.xml
index 38180e8174..f97d990486 100644
--- a/app/src/main/res/values-ga/strings.xml
+++ b/app/src/main/res/values-ga/strings.xml
@@ -687,7 +687,7 @@
Moltaí aip Nextcloud sa cheannteideal nascleanúna
Taispeáin comhaid i bhfolach
Faigh cód foinse
- Fillteán stórála sonraí
+ Fillteán stórála sonraí
Bainistigh fillteáin le haghaidh uaslódáil uathoibríoch
Fillteán áitiúil
Fillteán cianda
diff --git a/app/src/main/res/values-gd/strings.xml b/app/src/main/res/values-gd/strings.xml
index b50dee945c..06fa03c612 100644
--- a/app/src/main/res/values-gd/strings.xml
+++ b/app/src/main/res/values-gd/strings.xml
@@ -495,7 +495,7 @@
Stiùirich cunntasan
Seall faidhlichean falaichte
Faigh am bun-tùs
- Pasgan stòradh dàta
+ Pasgan stòradh dàta
Stiùirich pasganan an luchdaidh suas fhèin-obrachail
Pasgan ionadail
Pasgan cèin
diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml
index 024d3a57fe..10ab72531c 100644
--- a/app/src/main/res/values-gl/strings.xml
+++ b/app/src/main/res/values-gl/strings.xml
@@ -688,7 +688,7 @@
Suxestións da aplicación Nextcloud no título de navegación
Amosar ficheiros agochados
Obter o código fonte
- Cartafol de almacenamento de datos
+ Cartafol de almacenamento de datos
Xestionar os cartafoles para a envío automático
Cartafol local
Cartafol remoto
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index d8b2ca106e..b2cdcdc225 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -550,7 +550,7 @@
Preporuči prijatelju
Prikaz skrivenih datoteka
Preuzmi izvorni kod
- Mapa za pohranu podataka
+ Mapa za pohranu podataka
Upravljanje mapama za automatsko otpremanje
Lokalna mapa
Udaljena mapa
diff --git a/app/src/main/res/values-hu-rHU/strings.xml b/app/src/main/res/values-hu-rHU/strings.xml
index f61309baa5..f410fbeb53 100644
--- a/app/src/main/res/values-hu-rHU/strings.xml
+++ b/app/src/main/res/values-hu-rHU/strings.xml
@@ -612,7 +612,7 @@
Nextcloud alkalmazásjavaslatok a navigációs fejlécben
Rejtett fájlok megjelenítése
Forráskód beszerzése
- Adattároló mappa
+ Adattároló mappa
Mappák kezelése az automatikus feltöltéshez
Helyi mappa
Távoli mappa
diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml
index 987458d8c0..5ece1de013 100644
--- a/app/src/main/res/values-in/strings.xml
+++ b/app/src/main/res/values-in/strings.xml
@@ -608,7 +608,7 @@ Otomatis unggah hanya bekerja dengan baik apabila Anda mengeluarkan aplikasi ini
Saran aplikasi Nextcloud dalam judul navigasi
Lihat berkas tersembunyi
Dapatkan kode sumber
- Folder penyimpanan data
+ Folder penyimpanan data
Kelola folder untuk pengunggahan otomatis
Berkas lokal
Folder remot
diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml
index 22619d88f7..fd0aad2c60 100644
--- a/app/src/main/res/values-is/strings.xml
+++ b/app/src/main/res/values-is/strings.xml
@@ -591,7 +591,7 @@
Tillögur Nextcloud-forrita í flakkfyrirsögn
Sýna faldar skrár
Náðu í grunnkóðann
- Mappa fyrir geymslu gagna
+ Mappa fyrir geymslu gagna
Sýsla með möppur vegna sjálfvirkra innsendinga
Staðvær mappa
Fjartengd mappa
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 08a969a545..e93535c197 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -632,7 +632,7 @@
Consigli delle applicazioni di Nextcloud nell\'intestazione di navigazione
Mostra i file nascosti
Ottieni codice sorgente
- Cartella di archiviazione dei dati
+ Cartella di archiviazione dei dati
Gestisci le cartelle per il caricamento automatico
Cartella locale
Cartella remota
diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml
index c55deb3277..29710fa936 100644
--- a/app/src/main/res/values-ja-rJP/strings.xml
+++ b/app/src/main/res/values-ja-rJP/strings.xml
@@ -651,7 +651,7 @@
アップスイッチャーを表示
隠しファイルを表示
ソースコードを入手
- データ保存フォルダー
+ データ保存フォルダー
自動アップロードするフォルダーを管理する
ローカルフォルダー
リモートフォルダー
diff --git a/app/src/main/res/values-ka/strings.xml b/app/src/main/res/values-ka/strings.xml
index b41599382c..8bd6ed52bc 100644
--- a/app/src/main/res/values-ka/strings.xml
+++ b/app/src/main/res/values-ka/strings.xml
@@ -607,7 +607,7 @@
Nextcloud app suggestions in navigation heading
Show hidden files
Get source code
- Data storage folder
+ Data storage folder
Manage folders for auto upload
Local folder
Remote folder
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index f993c5afa9..99ce4fd44b 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -660,7 +660,7 @@
탐색창 상단에 표시되는 Nextcloud 앱 제안
숨겨진 파일 보기
소스 코드 보기
- 데이터 저장 폴더
+ 데이터 저장 폴더
자동 업로드를 위한 폴더 관리
로컬 폴더
원격 폴더
diff --git a/app/src/main/res/values-lo/strings.xml b/app/src/main/res/values-lo/strings.xml
index 6c63a9645c..b5f7090087 100644
--- a/app/src/main/res/values-lo/strings.xml
+++ b/app/src/main/res/values-lo/strings.xml
@@ -495,7 +495,7 @@
ຈັດການບັນຊີ
ສະແດງຟາຍທີ່ເຊື່ອງໄວ້
ຮັບລະຫັດແຫຼ່ງຂໍ້ມູນ
- ໂຟນເດີການເກັບຂໍ້ມູນ
+ ໂຟນເດີການເກັບຂໍ້ມູນ
ຈັດການໂຟນເດີສໍາລັບການອັບໂຫລດອັດຕະໂນມັດ
ໂຟນເດີ
ໂຟນໄລຍະໄກ
diff --git a/app/src/main/res/values-lt-rLT/strings.xml b/app/src/main/res/values-lt-rLT/strings.xml
index 8647b90089..e74aab6d3b 100644
--- a/app/src/main/res/values-lt-rLT/strings.xml
+++ b/app/src/main/res/values-lt-rLT/strings.xml
@@ -588,7 +588,7 @@
Rekomenduoti draugui
Rodyti paslėptus failus
Gauti pirminį kodą
- Duomenų aplankas
+ Duomenų aplankas
Tvarkykite automatinio įkėlimo aplankus
Aplankas vietinis
Nuotolinis aplankas
diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml
index fd33d58eab..8503383c0f 100644
--- a/app/src/main/res/values-mk/strings.xml
+++ b/app/src/main/res/values-mk/strings.xml
@@ -510,7 +510,7 @@
Управување со сметки
Прикажи сокриени датотеки
Превземи го изворниот код
- Папка за складиште на податоци
+ Папка за складиште на податоци
Уреди папки за автоматско прикачување
Папка на уредот
Папка на серверот
diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml
index 8f016b7903..9b08cfcdfc 100644
--- a/app/src/main/res/values-nb-rNO/strings.xml
+++ b/app/src/main/res/values-nb-rNO/strings.xml
@@ -665,7 +665,7 @@
Vis Nextcloud app-forslag i navigasjonen
Vis skjulte filer
Hent kildekode
- Datalagringsmappe
+ Datalagringsmappe
Styr mapper for automatisk opplastning
Lokal mappe
Mappe på server
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index a63a979403..80b1be83a3 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -656,7 +656,7 @@
Nextcloud app suggesties in navigatiekopregel
Verborgen bestanden weergeven
Krijg broncode
- Gegevensopslagmap
+ Gegevensopslagmap
Mappen beheren voor automatisch uploaden
Lokale map
Externe map
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 12bebb2c80..fb99411b76 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -687,7 +687,7 @@
Sugestie aplikacji Nextcloud w nagłówku nawigacji
Pokaż ukryte pliki
Pobierz kod źródłowy
- Katalog przechowywania danych
+ Katalog przechowywania danych
Zarządzaj katalogami do automatycznego wysyłania
Katalog lokalny
Katalog zdalny
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 5e6037cdc6..95a48478fd 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -687,7 +687,7 @@
Sugestões de aplicativos Nextcloud no título de navegação
Mostrar arquivos ocultos
Obter código-fonte
- Pasta de armazenamento de dados
+ Pasta de armazenamento de dados
Gerenciar pastas para envio automático
Pasta local
Pasta remota
diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml
index 7165479282..032dc0364b 100644
--- a/app/src/main/res/values-pt-rPT/strings.xml
+++ b/app/src/main/res/values-pt-rPT/strings.xml
@@ -588,7 +588,7 @@
Sugestões de aplicações Nextcloud no cabeçalho da navegação
Mostrar ficheiros ocultados
Obter código fonte
- Pasta de armazenamento de dados
+ Pasta de armazenamento de dados
Gerir as pastas para o envio automático
Pasta Local
Pasta Remota
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index 43bd8ef235..b3904c4e96 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -610,7 +610,7 @@
Configurează encripție end-to-end
Arată fișierele ascunse
Obține codul sursă
- Dosarul de stocare a datelor
+ Dosarul de stocare a datelor
Administrează dosare pentru încărcare automată
Dosar local
Dosar la distanță
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 754ade0e14..42c8d7ff7f 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -688,7 +688,7 @@
Рекомендации по приложению Nextcloud в заголовке навигации
Показывать скрытые файлы
Исходный код
- Папка хранения данных
+ Папка хранения данных
Управление папками для автозагрузки
Папка на устройстве
Папка на сервере
diff --git a/app/src/main/res/values-sc/strings.xml b/app/src/main/res/values-sc/strings.xml
index d3a7805858..c0212311cf 100644
--- a/app/src/main/res/values-sc/strings.xml
+++ b/app/src/main/res/values-sc/strings.xml
@@ -522,7 +522,7 @@
Gesti is contos
Mustra documentos cuados
Otene su còdighe sorgente
- Cartella de archiviatzione de is datos
+ Cartella de archiviatzione de is datos
Gesti cartellas pro carrigamentu automàticu
Cartella locale
Cartella remota
diff --git a/app/src/main/res/values-sk-rSK/strings.xml b/app/src/main/res/values-sk-rSK/strings.xml
index ed07836dc4..6eca3c22ae 100644
--- a/app/src/main/res/values-sk-rSK/strings.xml
+++ b/app/src/main/res/values-sk-rSK/strings.xml
@@ -651,7 +651,7 @@
Návrhy Nextcloud aplikácií v navigačnom záhlaví
Zobraziť skryté súbory
Získajte zdrojový kód
- Priečinok dátového úložiska
+ Priečinok dátového úložiska
Spravovať priečinky pre automatické nahrávanie
Lokálny priečinok
Vzdialený priečinok
diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml
index b44ff524a5..5dbf0e6c4f 100644
--- a/app/src/main/res/values-sl/strings.xml
+++ b/app/src/main/res/values-sl/strings.xml
@@ -610,7 +610,7 @@
Predlogi programov Nextcloud v naslovu
Pokaži skrite datoteke
Pridobi izvorno kodo
- Mapa podatkovne shrambe
+ Mapa podatkovne shrambe
Upravljanje map za samodejno pošiljanje
Krajevna mapa
Mapa na strežniku
diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml
index aba240092f..9d17e8c71b 100644
--- a/app/src/main/res/values-sr/strings.xml
+++ b/app/src/main/res/values-sr/strings.xml
@@ -687,7 +687,7 @@
Предлози Nextcloud апликација у заглављу навигације
Прикажи скривене фајлове
Узми изворни кôд
- Фасцикла за податке
+ Фасцикла за податке
Управљање фолдерима за аутоматско отпремање
Локална фасцикла
Удаљена фасцикла
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index f5f561923d..a594c543e6 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -688,7 +688,7 @@
Nextcloud-appförslag i navigeringsrubriken
Visa dolda filer
Hämta källkod
- Datalagringsmapp
+ Datalagringsmapp
Hantera mappar för automatiskt uppladdning
Lokal mapp
Extern mapp
diff --git a/app/src/main/res/values-tk/strings.xml b/app/src/main/res/values-tk/strings.xml
index 5cff2f37bd..8ff88f3041 100644
--- a/app/src/main/res/values-tk/strings.xml
+++ b/app/src/main/res/values-tk/strings.xml
@@ -485,7 +485,7 @@
Hasabyňyzy dolandyrmak
Gizlin faýllary görkez
Çeşme koduny alyň
- Maglumat saklaýyş bukjasy
+ Maglumat saklaýyş bukjasy
Awtomatik ýüklemek üçin bukjalary dolandyrmak
ýerli bukjasy
Uzakdaky bukja
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 65d5bba5bc..1d03398554 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -687,7 +687,7 @@
Gezinme başlığında Nextcloud uygulama önerileri
Gizli dosyaları görüntüle
Kaynak kodunu alın
- Veri depolama klasörü
+ Veri depolama klasörü
Otomatik yükleme klasörleri yönetimi
Yerel klasör
Uzak klasör
diff --git a/app/src/main/res/values-ug/strings.xml b/app/src/main/res/values-ug/strings.xml
index 71e27debe9..54ccf9fb4c 100644
--- a/app/src/main/res/values-ug/strings.xml
+++ b/app/src/main/res/values-ug/strings.xml
@@ -687,7 +687,7 @@
يول باشلاش ماۋزۇسىدىكى Nextcloud ئەپ تەكلىپلىرى
يوشۇرۇن ھۆججەتلەرنى كۆرسەت
ئەسلى كودقا ئېرىشىش
- سانلىق مەلۇمات ساقلاش قىسقۇچى
+ سانلىق مەلۇمات ساقلاش قىسقۇچى
ئاپتوماتىك يوللاش ئۈچۈن ھۆججەت قىسقۇچلارنى باشقۇرۇڭ
يەرلىك ھۆججەت قىسقۇچ
يىراقتىن قىسقۇچ
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index eed9023e68..e9e44faaef 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -680,7 +680,7 @@
Пропозиції застосунків Nextcloud у заголовку навігації
Показувати приховані файли
Отримати вихідний код
- Місце збереження файлів
+ Місце збереження файлів
Налаштуйте каталоги, які будуть автоматично завантажуватися
Каталог на пристрої
Віддалений каталог
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index f0dbee4a17..d961efbc95 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -556,7 +556,7 @@
Thiết lập mã hoá đầu cuối
Hiển thị các tệp ẩn
Lấy mã nguồn
- Thư mục lưu trữ dữ liệu
+ Thư mục lưu trữ dữ liệu
Quản lý các thư mục để tự động tải lên
Thư mục cục bộ
Thư mục từ xa
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index e585545f04..ca1abf9513 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -687,7 +687,7 @@
导航栏中的 Nextcloud 应用推荐
显示隐藏文件
获取源代码
- 数据存储文件夹
+ 数据存储文件夹
管理自动上传文件夹
本地文件夹
远端文件夹
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index f0d3d34c67..c8731b7654 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -687,7 +687,7 @@
導覽列中的 Nextcloud 應用程式建議
顯示隱藏檔案
取得原始碼
- 資料儲存資料夾
+ 資料儲存資料夾
管理資料夾以便自動上傳
近端資料夾
遠端資料夾
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 92637511b7..4de4cf5df7 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -687,7 +687,7 @@
導覽標頭中的 Nextcloud 應用程式建議
顯示隱藏檔案
取得原始碼
- 資料儲存資料夾
+ 資料儲存資料夾
管理自動上傳使用的資料夾
本機資料夾
遠端資料夾
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index df0aa8fc00..f26655d139 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -510,6 +510,8 @@
Nextcloud folder already exists
Failed during migration
Failed to update index
+ %1$s\n(%2$s / %3$s)
+ Allow media indexing
Data folder already exists. Choose one of the following:
Replace
@@ -578,7 +580,7 @@
kept in original folder
moved to app folder
deleted
- Data storage folder
+ Data storage location
What to do if the file already exists?
What to do if the file already exists?
@@ -957,6 +959,7 @@
New Notification
Choose storage location
Internal storage
+ External storage
Camera
Pictures
Movies
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index aa1e05dc55..542303aa61 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -14,8 +14,11 @@
android:title="@string/prefs_category_general"
android:key="general">
+