Merge branch 'develop' of https://github.com/kiwix/kiwix-android into feature/one-activity

This commit is contained in:
HissPirat 2020-08-25 13:35:24 +02:00
commit c80cdd4810
42 changed files with 337 additions and 197 deletions

View File

@ -23,7 +23,7 @@ import android.os.Environment
import androidx.preference.Preference
import org.kiwix.kiwixmobile.core.settings.CorePrefsFragment
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_STORAGE
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.PREF_STORAGE
class KiwixPrefsFragment : CorePrefsFragment() {

View File

@ -0,0 +1,225 @@
/*
* Kiwix Android
* Copyright (c) 2019 Kiwix <android.kiwix.org>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.kiwix.kiwixmobile.core.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.content.ContextCompat;
import io.reactivex.Flowable;
import io.reactivex.processors.PublishProcessor;
import java.io.File;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.kiwix.kiwixmobile.core.CoreApp;
import org.kiwix.kiwixmobile.core.NightModeConfig;
/**
* Manager for the Default Shared Preferences of the application.
*/
@Singleton
public class SharedPreferenceUtil {
// Prefs
public static final String PREF_LANG = "pref_language_chooser";
public static final String PREF_STORAGE = "pref_select_folder";
public static final String PREF_WIFI_ONLY = "pref_wifi_only";
public static final String PREF_KIWIX_MOBILE = "kiwix-mobile";
public static final String PREF_SHOW_INTRO = "showIntro";
private static final String PREF_BACK_TO_TOP = "pref_backtotop";
private static final String PREF_FULLSCREEN = "pref_fullscreen";
private static final String PREF_NEW_TAB_BACKGROUND = "pref_newtab_background";
private static final String PREF_STORAGE_TITLE = "pref_selected_title";
private static final String PREF_EXTERNAL_LINK_POPUP = "pref_external_link_popup";
private static final String PREF_IS_FIRST_RUN = "isFirstRun";
private static final String PREF_SHOW_BOOKMARKS_ALL_BOOKS = "show_bookmarks_current_book";
private static final String PREF_SHOW_HISTORY_ALL_BOOKS = "show_history_current_book";
private static final String PREF_HOSTED_BOOKS = "hosted_books";
public static final String PREF_NIGHT_MODE = "pref_night_mode";
private static final String TEXT_ZOOM = "true_text_zoom";
private SharedPreferences sharedPreferences;
private final PublishProcessor<String> prefStorages = PublishProcessor.create();
private final PublishProcessor<Integer> textZooms = PublishProcessor.create();
private final PublishProcessor<NightModeConfig.Mode> nightModes = PublishProcessor.create();
@Inject
public SharedPreferenceUtil(Context context) {
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
}
public boolean getPrefWifiOnly() {
return sharedPreferences.getBoolean(PREF_WIFI_ONLY, true);
}
public boolean getPrefIsFirstRun() {
return sharedPreferences.getBoolean(PREF_IS_FIRST_RUN, true);
}
public boolean getPrefFullScreen() {
return sharedPreferences.getBoolean(PREF_FULLSCREEN, false);
}
public boolean getPrefBackToTop() {
return sharedPreferences.getBoolean(PREF_BACK_TO_TOP, false);
}
public boolean getPrefNewTabBackground() {
return sharedPreferences.getBoolean(PREF_NEW_TAB_BACKGROUND, false);
}
public boolean getPrefExternalLinkPopup() {
return sharedPreferences.getBoolean(PREF_EXTERNAL_LINK_POPUP, true);
}
public String getPrefLanguage() {
return sharedPreferences.getString(PREF_LANG, Locale.ROOT.toString());
}
public String getPrefStorage() {
final String storage = sharedPreferences.getString(PREF_STORAGE, null);
if (storage == null) {
final String defaultStorage = defaultStorage();
putPrefStorage(defaultStorage);
return defaultStorage;
} else if (!new File(storage).exists()) {
return defaultStorage();
}
return storage;
}
private String defaultStorage() {
final File externalFilesDir =
ContextCompat.getExternalFilesDirs(CoreApp.getInstance(), null)[0];
return externalFilesDir != null ? externalFilesDir.getPath()
: CoreApp.getInstance().getFilesDir().getPath(); // workaround for emulators
}
public String getPrefStorageTitle(String defaultTitle) {
return sharedPreferences.getString(PREF_STORAGE_TITLE, defaultTitle);
}
public void putPrefLanguage(String language) {
sharedPreferences.edit().putString(PREF_LANG, language).apply();
}
public void putPrefIsFirstRun(boolean isFirstRun) {
sharedPreferences.edit().putBoolean(PREF_IS_FIRST_RUN, isFirstRun).apply();
}
public void putPrefWifiOnly(boolean wifiOnly) {
sharedPreferences.edit().putBoolean(PREF_WIFI_ONLY, wifiOnly).apply();
}
public void putPrefStorageTitle(String storageTitle) {
sharedPreferences.edit().putString(PREF_STORAGE_TITLE, storageTitle).apply();
}
public void putPrefStorage(String storage) {
sharedPreferences.edit().putString(PREF_STORAGE, storage).apply();
prefStorages.onNext(storage);
}
public Flowable<String> getPrefStorages() {
return prefStorages.startWith(getPrefStorage());
}
public void putPrefFullScreen(boolean fullScreen) {
sharedPreferences.edit().putBoolean(PREF_FULLSCREEN, fullScreen).apply();
}
public void putPrefExternalLinkPopup(boolean externalLinkPopup) {
sharedPreferences.edit().putBoolean(PREF_EXTERNAL_LINK_POPUP, externalLinkPopup).apply();
}
public boolean showIntro() {
return sharedPreferences.getBoolean(PREF_SHOW_INTRO, true);
}
public void setIntroShown() {
sharedPreferences.edit().putBoolean(PREF_SHOW_INTRO, false).apply();
}
public boolean getShowHistoryAllBooks() {
return sharedPreferences.getBoolean(PREF_SHOW_HISTORY_ALL_BOOKS, true);
}
public void setShowHistoryAllBooks(boolean prefShowHistoryAllBooks) {
sharedPreferences.edit()
.putBoolean(PREF_SHOW_HISTORY_ALL_BOOKS, prefShowHistoryAllBooks)
.apply();
}
public boolean getShowBookmarksAllBooks() {
return sharedPreferences.getBoolean(PREF_SHOW_BOOKMARKS_ALL_BOOKS, true);
}
public void setShowBookmarksAllBooks(boolean prefShowBookmarksFromCurrentBook) {
sharedPreferences.edit()
.putBoolean(PREF_SHOW_BOOKMARKS_ALL_BOOKS, prefShowBookmarksFromCurrentBook)
.apply();
}
@NonNull
public NightModeConfig.Mode getNightMode() {
return NightModeConfig.Mode.from(
Integer.parseInt(
sharedPreferences.getString(
PREF_NIGHT_MODE,
"" + AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
)
)
);
}
public Flowable<NightModeConfig.Mode> nightModes() {
return nightModes.startWith(getNightMode());
}
public void updateNightMode() {
nightModes.offer(getNightMode());
}
public Set<String> getHostedBooks() {
return sharedPreferences.getStringSet(PREF_HOSTED_BOOKS, new HashSet<>());
}
public void setHostedBooks(Set<String> hostedBooks) {
sharedPreferences.edit()
.putStringSet(PREF_HOSTED_BOOKS, hostedBooks)
.apply();
}
public void setTextZoom(int textZoom) {
sharedPreferences.edit().putInt(TEXT_ZOOM, textZoom).apply();
textZooms.offer(textZoom);
}
public int getTextZoom() {
return sharedPreferences.getInt(TEXT_ZOOM, 100);
}
public Flowable<Integer> getTextZooms() {
return textZooms.startWith(getTextZoom());
}
}

View File

@ -1,170 +0,0 @@
/*
* Kiwix Android
* Copyright (c) 2019 Kiwix <android.kiwix.org>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.kiwix.kiwixmobile.core.utils
import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.content.ContextCompat.getExternalFilesDirs
import androidx.core.content.edit
import io.reactivex.Flowable
import io.reactivex.processors.PublishProcessor
import org.kiwix.kiwixmobile.core.NightModeConfig
import org.kiwix.kiwixmobile.core.NightModeConfig.Mode.Companion.from
import java.io.File
import java.util.Locale
import javax.inject.Inject
import javax.inject.Singleton
/**
* Manager for the Default Shared Preferences of the application.
*/
@Singleton
class SharedPreferenceUtil @Inject constructor(val context: Context) {
private val sharedPreferences: SharedPreferences =
PreferenceManager.getDefaultSharedPreferences(context)
private val _prefStorages = PublishProcessor.create<String>()
val prefStorages
get() = _prefStorages.startWith { prefStorage }
private val _textZooms = PublishProcessor.create<Int>()
val textZooms
get() = _textZooms.startWith { textZoom }
private val nightModes = PublishProcessor.create<NightModeConfig.Mode>()
val prefWifiOnly: Boolean
get() = sharedPreferences.getBoolean(PREF_WIFI_ONLY, true)
val prefIsFirstRun: Boolean
get() = sharedPreferences.getBoolean(PREF_IS_FIRST_RUN, true)
val prefFullScreen: Boolean
get() = sharedPreferences.getBoolean(PREF_FULLSCREEN, false)
val prefBackToTop: Boolean
get() = sharedPreferences.getBoolean(PREF_BACK_TO_TOP, false)
val prefNewTabBackground: Boolean
get() = sharedPreferences.getBoolean(PREF_NEW_TAB_BACKGROUND, false)
val prefExternalLinkPopup: Boolean
get() = sharedPreferences.getBoolean(PREF_EXTERNAL_LINK_POPUP, true)
val prefLanguage: String
get() = sharedPreferences.getString(PREF_LANG, "") ?: Locale.ROOT.toString()
val prefStorage: String
get() {
val storage = sharedPreferences.getString(PREF_STORAGE, null)
return when {
storage == null -> defaultStorage().also(::putPrefStorage)
!File(storage).exists() -> defaultStorage()
else -> storage
}
}
private fun defaultStorage(): String =
getExternalFilesDirs(context, null)[0]?.path
?: context.filesDir.path // a workaround for emulators
fun getPrefStorageTitle(defaultTitle: String): String =
sharedPreferences.getString(PREF_STORAGE_TITLE, defaultTitle) ?: defaultTitle
fun putPrefLanguage(language: String) =
sharedPreferences.edit { putString(PREF_LANG, language) }
fun putPrefIsFirstRun(isFirstRun: Boolean) =
sharedPreferences.edit { putBoolean(PREF_IS_FIRST_RUN, isFirstRun) }
fun putPrefWifiOnly(wifiOnly: Boolean) =
sharedPreferences.edit { putBoolean(PREF_WIFI_ONLY, wifiOnly) }
fun putPrefStorageTitle(storageTitle: String) =
sharedPreferences.edit { putString(PREF_STORAGE_TITLE, storageTitle) }
fun putPrefStorage(storage: String) {
sharedPreferences.edit { putString(PREF_STORAGE, storage) }
_prefStorages.onNext(storage)
}
fun putPrefFullScreen(fullScreen: Boolean) =
sharedPreferences.edit { putBoolean(PREF_FULLSCREEN, fullScreen) }
fun putPrefExternalLinkPopup(externalLinkPopup: Boolean) =
sharedPreferences.edit { putBoolean(PREF_EXTERNAL_LINK_POPUP, externalLinkPopup) }
fun showIntro(): Boolean = sharedPreferences.getBoolean(PREF_SHOW_INTRO, true)
fun setIntroShown() = sharedPreferences.edit { putBoolean(PREF_SHOW_INTRO, false) }
var showHistoryAllBooks: Boolean
get() = sharedPreferences.getBoolean(PREF_SHOW_HISTORY_ALL_BOOKS, true)
set(prefShowHistoryAllBooks) {
sharedPreferences.edit { putBoolean(PREF_SHOW_HISTORY_ALL_BOOKS, prefShowHistoryAllBooks) }
}
var showBookmarksAllBooks: Boolean
get() = sharedPreferences.getBoolean(PREF_SHOW_BOOKMARKS_ALL_BOOKS, true)
set(prefShowBookmarksFromCurrentBook) = sharedPreferences.edit {
putBoolean(PREF_SHOW_BOOKMARKS_ALL_BOOKS, prefShowBookmarksFromCurrentBook)
}
val nightMode: NightModeConfig.Mode
get() = from(
sharedPreferences.getString(PREF_NIGHT_MODE, null)?.toInt()
?: AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
)
fun nightModes(): Flowable<NightModeConfig.Mode> = nightModes.startWith(nightMode)
fun updateNightMode() = nightModes.offer(nightMode)
var hostedBooks: Set<String>
get() = sharedPreferences.getStringSet(PREF_HOSTED_BOOKS, null)?.toHashSet() ?: HashSet()
set(hostedBooks) {
sharedPreferences.edit { putStringSet(PREF_HOSTED_BOOKS, hostedBooks) }
}
var textZoom: Int
get() = sharedPreferences.getInt(TEXT_ZOOM, DEFAULT_ZOOM)
set(textZoom) {
sharedPreferences.edit { putInt(TEXT_ZOOM, textZoom) }
_textZooms.offer(textZoom)
}
companion object {
// Prefs
const val PREF_LANG = "pref_language_chooser"
const val PREF_STORAGE = "pref_select_folder"
const val PREF_WIFI_ONLY = "pref_wifi_only"
const val PREF_KIWIX_MOBILE = "kiwix-mobile"
const val PREF_SHOW_INTRO = "showIntro"
private const val PREF_BACK_TO_TOP = "pref_backtotop"
private const val PREF_FULLSCREEN = "pref_fullscreen"
private const val PREF_NEW_TAB_BACKGROUND = "pref_newtab_background"
private const val PREF_STORAGE_TITLE = "pref_selected_title"
private const val PREF_EXTERNAL_LINK_POPUP = "pref_external_link_popup"
private const val PREF_IS_FIRST_RUN = "isFirstRun"
private const val PREF_SHOW_BOOKMARKS_ALL_BOOKS = "show_bookmarks_current_book"
private const val PREF_SHOW_HISTORY_ALL_BOOKS = "show_history_current_book"
private const val PREF_HOSTED_BOOKS = "hosted_books"
const val PREF_NIGHT_MODE = "pref_night_mode"
private const val TEXT_ZOOM = "true_text_zoom"
private const val DEFAULT_ZOOM = 100
}
}

View File

@ -44,8 +44,8 @@ data class MountInfo(val device: String, val mountPoint: String, val fileSystem:
val doesNotSupport4GBFiles = DOES_NOT_SUPPORT_4GB_FILE_SYSTEMS.contains(fileSystem)
companion object {
private val VIRTUAL_FILE_SYSTEMS = listOf("fuse", "sdcardfs")
private val VIRTUAL_FILE_SYSTEMS = listOf("fuse", "sdcardfs", "sdfat")
private val SUPPORTS_4GB_FILE_SYSTEMS = listOf("ext4", "exfat")
private val DOES_NOT_SUPPORT_4GB_FILE_SYSTEMS = listOf("fat32", "vfat", "sdfat")
private val DOES_NOT_SUPPORT_4GB_FILE_SYSTEMS = listOf("fat32", "vfat")
}
}

View File

@ -7,6 +7,8 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:padding="8dp"
app:fabAlignmentMode="end"
app:fabCradleVerticalOffset="@dimen/fab_vertical_offset"
app:hideOnScroll="true"
tools:ignore="BottomAppBar">

View File

@ -29,7 +29,6 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<FrameLayout
android:id="@+id/activity_main_content_frame"
android:layout_width="match_parent"
@ -62,6 +61,16 @@
<include layout="@layout/bottom_toolbar" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/activity_main_back_to_top_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/action_find_previous"
android:visibility="gone"
app:fabSize="mini"
app:layout_anchor="@id/bottom_toolbar"
app:layout_dodgeInsetEdges="bottom"
tools:visibility="visible" />
</org.kiwix.kiwixmobile.core.utils.NestedCoordinatorLayout>
<ImageButton
@ -78,19 +87,6 @@
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/activity_main_back_to_top_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_horizontal_margin"
android:layout_marginBottom="?attr/actionBarSize"
android:src="@drawable/action_find_previous"
android:visibility="gone"
app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />
<Button
android:id="@+id/activity_main_button_pause_tts"
android:layout_width="0dp"

View File

@ -110,6 +110,7 @@
<string name="delete_zims_toast">حُذف الملف</string>
<string name="no_files_here">لا توجد ملفات هنا</string>
<string name="download_no_space">لا توجد مساحة كافية للتنزيل.</string>
<string name="download">تنزيل</string>
<string name="space_available">المساحة المتاحة:</string>
<string name="zim_simple">بسيط</string>
<string name="zim_no_pic">لا توجد صور</string>
@ -264,4 +265,5 @@
<string name="off">تعطيل</string>
<string name="auto">تلقائي</string>
<string name="crash_checkbox_file_system">تفاصيل نظام الملفات</string>
<string name="open_library">افتح المكتبة</string>
</resources>

View File

@ -103,6 +103,7 @@
<string name="delete_zims_toast">Los ficheros desaniciáronse correutamente</string>
<string name="no_files_here">Nun hai nengún ficheru equí</string>
<string name="download_no_space">Nun hai espaciu abondo pa descargar.</string>
<string name="download">Descargar</string>
<string name="space_available">Espaciu disponible:</string>
<string name="zim_simple">Simple</string>
<string name="zim_no_pic">Nun hai imáxenes</string>

View File

@ -76,6 +76,7 @@
<string name="delete_zim_body" fuzzy="true">لابردنی %s</string>
<string name="delete_zims_toast">پەڕگە سڕدرایەوە</string>
<string name="no_files_here">ھیچ پەڕگەیەک لێرە نییە</string>
<string name="download">داگرتن</string>
<string name="space_available">بۆشایی بەردەستە:</string>
<string name="zim_simple">سادە</string>
<string name="zim_no_pic">بەبێ وێنە</string>

View File

@ -6,6 +6,7 @@
* Dvorapa
* Juandev
* Klaras
* Luklos
* Matěj Suchánek
* Meliganai
* Mininis11
@ -114,6 +115,7 @@
<string name="delete_zims_toast">Soubor byl smazán</string>
<string name="no_files_here">Zde nejsou žádné soubory</string>
<string name="download_no_space">Nedostatečný prostor ke stažení.</string>
<string name="download">Stáhnout</string>
<string name="space_available">Dostupné místo:</string>
<string name="zim_simple">Jednoduché</string>
<string name="zim_no_pic">Žádné Obrázky</string>
@ -273,4 +275,10 @@
<string name="diagnostic_report_message">Zašlete prosím všechny následující podrobnosti, abychom mohli problém diagnostikovat</string>
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Zvětšit text</string>
<string name="reader">Čtenář</string>
<string name="no_open_book">Žádná otevřená kniha</string>
<string name="open_library">Otevři knihovnu</string>
<string name="tab_restored">Karta byla obnovena</string>
<string name="open_drawer">Otevři náčrtník</string>
<string name="close_drawer">Zavřít náčtník</string>
</resources>

View File

@ -154,4 +154,5 @@
<string name="tag_short_text">kort tekst</string>
<string name="go_to_settings" fuzzy="true">Gå til indstillinger</string>
<string name="no_bookmarks">Ingen bogmærker</string>
<string name="reader">Læser</string>
</resources>

View File

@ -109,6 +109,7 @@
<string name="delete_zims_toast">Dateien erfolgreich gelöscht</string>
<string name="no_files_here">Hier gibt es keine Dateien</string>
<string name="download_no_space">Unzureichender Speicherplatz für einen Download.</string>
<string name="download">Herunterladen</string>
<string name="space_available">Verfügbarer Speicher:</string>
<string name="zim_simple">Einfach</string>
<string name="zim_no_pic">Keine Bilder</string>

View File

@ -101,6 +101,7 @@
<string name="delete_zims_toast">Dosyay hewl esteriyayê</string>
<string name="no_files_here">Tiya dosyeyi çıniyê</string>
<string name="download_no_space">Serba ronayışi rê ca bes niyo.</string>
<string name="download">Biya war</string>
<string name="space_available">Karnıyayiye erd:</string>
<string name="zim_simple">Besit</string>
<string name="zim_no_pic">Resımi çıniyê</string>

View File

@ -111,6 +111,7 @@
<string name="delete_zims_toast">Archivo eliminado</string>
<string name="no_files_here">Ningún archivo aquí</string>
<string name="download_no_space">No queda espacio suficiente para la descarga.</string>
<string name="download">Descargar</string>
<string name="space_available">Espacio disponible:</string>
<string name="zim_simple">Simple</string>
<string name="zim_no_pic">Ninguna imagen</string>

View File

@ -70,6 +70,7 @@
<string name="delete_zims_toast">پرونده‌ها با موفقیت حذف شدند</string>
<string name="no_files_here">هیچ پرونده‌ای در این‌جا نیست</string>
<string name="download_no_space" fuzzy="true">فضای ناکافی برای بارگیری پرونده</string>
<string name="download">بارگیری</string>
<string name="space_available">فضای موجود:</string>
<string name="zim_simple">ساده</string>
<string name="zim_no_pic">هیچ عکسی نیست</string>

View File

@ -94,6 +94,7 @@
<string name="delete_zim_body">Seuraava(t) zim-tiedosto(t) tullaan poistamaan:\n\n%s</string>
<string name="delete_zims_toast">Tiedosto poistettu</string>
<string name="no_files_here">Ei tiedostoja täällä</string>
<string name="download">Lataa</string>
<string name="space_available">Tilaa käytettävissä:</string>
<string name="zim_simple">Yksinkertainen</string>
<string name="zim_no_pic">Ei kuvia</string>

View File

@ -118,6 +118,7 @@
<string name="delete_zims_toast">Les fichiers ont bien été supprimés</string>
<string name="no_files_here">Aucun fichier ici</string>
<string name="download_no_space">Espace insuffisant pour le téléchargement.</string>
<string name="download">Télécharger</string>
<string name="space_available">Espace disponible:</string>
<string name="zim_simple">Simple</string>
<string name="zim_no_pic">Aucune image</string>
@ -281,4 +282,10 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Zoomer le texte</string>
<string name="search_open_in_new_tab">Ouvrir dans un nouvel onglet</string>
<string name="reader">Lecteur</string>
<string name="no_open_book">Pas de livre ouvert</string>
<string name="open_library">Ouvrir la bibliothèque</string>
<string name="tab_restored">Onglet restauré</string>
<string name="open_drawer">Ouvrir le tiroir</string>
<string name="close_drawer">Fermer le tiroir</string>
</resources>

View File

@ -96,6 +96,7 @@
<string name="delete_zims_toast">Dateiä erfolgriich glöscht</string>
<string name="no_files_here">Hie hets ke Dateiä</string>
<string name="download_no_space">Nid gnüegend Spiicherplatz um abezladä.</string>
<string name="download">Abelade</string>
<string name="space_available">Verfüegbaare Spiicherplatz:</string>
<string name="zim_simple">Eifach</string>
<string name="zim_no_pic">Ke Bilder</string>

View File

@ -100,6 +100,7 @@
<string name="delete_zims_toast">Berkas telah dihapus</string>
<string name="no_files_here">Tidak ada berkas disini</string>
<string name="download_no_space">Tidak tersedia cukup ruang data untuk mengunduh.</string>
<string name="download">Unduh</string>
<string name="space_available">Ruang yang Tersedia:</string>
<string name="zim_simple">Sederhana</string>
<string name="zim_no_pic">Tanpa Gambar</string>

View File

@ -72,6 +72,7 @@
<string name="delete_zims_toast">File cancellato</string>
<string name="no_files_here">Nessun file qui</string>
<string name="download_no_space">Lo spazio è insufficiente per scaricare.</string>
<string name="download">Scarica</string>
<string name="space_available">Spazio disponibile:</string>
<string name="help_10">Puoi sia scaricare i tuoi file ZIM in-app selezionati o selezionare attentamente quello/i che desideri e scaricarli attraverso il Desktop di un computer prima di trasferire i file ZIM sulla tua memoria SD.</string>
<string name="help_11">I file ZIM scaricati nell\'applicazione sono localizzati nella directory di archiviazione esterna in una cartella chiamata Kiwix.</string>

View File

@ -111,6 +111,7 @@
<string name="delete_zims_toast">הקבצים נמחקו בהצלחה</string>
<string name="no_files_here">אין כאן קבצים</string>
<string name="download_no_space">אין מספיק מקום להורדה.</string>
<string name="download">הורדה</string>
<string name="space_available">נפח זמין:</string>
<string name="zim_simple">פשוט</string>
<string name="zim_no_pic">אין תמונות</string>

View File

@ -114,6 +114,7 @@
<string name="delete_zims_toast">파일이 삭제되었습니다</string>
<string name="no_files_here">여기에 파일이 없습니다</string>
<string name="download_no_space">다운로드할 공간이 충분하지 않습니다.</string>
<string name="download">다운로드</string>
<string name="space_available">사용 가능한 공간:</string>
<string name="zim_simple">간단히</string>
<string name="zim_no_pic">그림 없음</string>

View File

@ -61,6 +61,7 @@
<string name="delete_zims_toast">Fichier geläscht</string>
<string name="no_files_here">Keng Fichieren hei?</string>
<string name="download_no_space">Net genuch Plaz fir erofzelueden.</string>
<string name="download">Eroflueden</string>
<string name="space_available">Plaz disponibel:</string>
<string name="zim_simple">Einfach</string>
<string name="zim_no_pic">Keng Biller</string>
@ -119,4 +120,7 @@
<string name="on">Un</string>
<string name="off">Aus</string>
<string name="auto">Automatesch</string>
<string name="reader">Lieser</string>
<string name="open_drawer">Tirang opmaachen</string>
<string name="close_drawer">Tirang zoumaachen</string>
</resources>

View File

@ -105,6 +105,7 @@
<string name="delete_zims_toast">Податотеката е успешно избришана</string>
<string name="no_files_here">Нема податотеки</string>
<string name="download_no_space">Нема доволно место за преземање.</string>
<string name="download">Преземи</string>
<string name="space_available">Достапен простор:</string>
<string name="zim_simple">Просто</string>
<string name="zim_no_pic">Без слики</string>
@ -268,4 +269,10 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Приближување на текст</string>
<string name="search_open_in_new_tab">Отвори во ново јазиче</string>
<string name="reader">Читач</string>
<string name="no_open_book">Нема отворена книга</string>
<string name="open_library">Отворена библиотека</string>
<string name="tab_restored">Јазичето е повратено</string>
<string name="open_drawer">Отвори фиока</string>
<string name="close_drawer">Затвори фиока</string>
</resources>

View File

@ -71,6 +71,7 @@
<string name="library">ഗ്രന്ഥപ്പുര</string>
<string name="delete_zim_body" fuzzy="true">%s മായ്ക്കണോ?</string>
<string name="no_files_here">ഇവിടെ പ്രമാണങ്ങളൊന്നുമില്ല</string>
<string name="download">ഡൗൺലോഡ് ചെയ്യുക</string>
<string name="zim_no_pic">ചിത്രങ്ങളില്ല</string>
<string name="help_2">കിവിക്സ് എന്താണ് ചെയ്യുന്നത്?</string>
<string name="tts_pause">താത്കാലികമായി നിർത്തുക</string>

View File

@ -64,6 +64,7 @@
<string name="delete_zims_toast">फाइल मेटियो</string>
<string name="no_files_here">यहाँ कुनै फाइलहरू छैनन्</string>
<string name="download_no_space" fuzzy="true">यो फाइल डाउनलोड गर्न पर्याप्त स्थान छैन।</string>
<string name="download">डाउनलोड गरिएकाे</string>
<string name="zim_simple">साधारण</string>
<string name="zim_no_pic">तस्विर छैन</string>
<string name="zim_no_vid">भिडियो छैन</string>

View File

@ -58,6 +58,7 @@
<string name="pref_newtab_background_summary">Nieuwe tabbladen worden niet actief gemaakt</string>
<string name="local_zims">Apparaat</string>
<string name="library">Bibliotheek</string>
<string name="download">Downloaden</string>
<string name="zim_simple">Eenvoudig</string>
<string name="zim_no_pic">Geen afbeeldingen</string>
<string name="zim_no_vid">Geen video\'s</string>

View File

@ -115,6 +115,7 @@
<string name="delete_zims_toast">Plik został usunięty</string>
<string name="no_files_here">Tu nie ma plików</string>
<string name="download_no_space">Za mało miejsca, aby pobrać ten plik.</string>
<string name="download">Pobierz</string>
<string name="space_available">Dostępne miejsce:</string>
<string name="zim_simple">Prosty</string>
<string name="zim_no_pic">Brak obrazka</string>
@ -274,4 +275,7 @@
<string name="diagnostic_report_message">Prześlij wszystkie poniższe informacje, abyśmy mogli zdiagnozować problem</string>
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Powiększ tekst</string>
<string name="no_open_book">Brak otwartych książek</string>
<string name="open_library">Otwórz bibliotekę</string>
<string name="tab_restored">Odtworzono zakładkę</string>
</resources>

View File

@ -111,6 +111,7 @@
<string name="delete_zims_toast">Arquivo apagado</string>
<string name="no_files_here">Nenhum arquivo aqui</string>
<string name="download_no_space">Espaço insuficiente para baixar o download.</string>
<string name="download">Baixar</string>
<string name="space_available">Espaço disponível:</string>
<string name="zim_simple">Simple</string>
<string name="zim_no_pic">Sem Imagens</string>
@ -274,4 +275,6 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Zoom de texto</string>
<string name="search_open_in_new_tab">Abrir em uma nova guia</string>
<string name="open_library">Biblioteca aberta</string>
<string name="open_drawer">Abrir gaveta</string>
</resources>

View File

@ -84,6 +84,7 @@
<string name="delete_zims_toast">Ficheiros apagados</string>
<string name="no_files_here">Não há ficheiros aqui</string>
<string name="download_no_space" fuzzy="true">Espaço insuficiente para o download deste ficheiro.</string>
<string name="download">Transferir</string>
<string name="space_available">Espaço disponível:</string>
<string name="zim_simple">Simples</string>
<string name="zim_no_pic">Sem imagens</string>

View File

@ -37,6 +37,7 @@
<string name="rate_dialog_neutral">{{Identical|Later}}</string>
<string name="open">{{Identical|Open}}</string>
<string name="library">Displayed in application menu</string>
<string name="download">The title of the fragment/place where books are downloaded.</string>
<string name="stop">{{Identical|Stop}}</string>
<string name="external_storage">{{Identical|External}}</string>
<string name="yes">{{Identical|Yes}}</string>
@ -44,21 +45,20 @@
<string name="previous">{{Identical|Previous}}</string>
<string name="time_left">This is the past participle of the verb “to leave” (meaning “quitted” or “exited”). This is used in a context of “X minutes left” to finish a download.</string>
<string name="time_yesterday">{{Identical|Yesterday}}</string>
<string name="tab_restored">Tell the user that a tab has been restored.</string>
<string name="search_history">TODO: Unclear, must be documented. See https://github.com/kiwix/overview/issues/31</string>
<string name="save">{{Identical|Save}}</string>
<string name="pref_text_zoom_summary">Tell the user that this preference changes the text size in 25% increments.</string>
<string name="go_to_settings">This is used in the start server dialog and leads the user to mobile hotspot settings when pressed</string>
<string name="no_bookmarks">This means \"there are no bookmarks\"</string>
<string name="no_open_book">Tell the user that they have not opened a book.</string>
<string name="open_library">The action of opening the library destination, used on a button.</string>
<string name="download">The title of the fragment/place where books are downloaded.</string>
<string name="reader">The title of the fragment/place where books are read.</string>
<string name="delete_history">Ask if the user wants to delete all history items.</string>
<string name="delete_history">Ask if the user wants to delete all history items.</string>
<string name="delete_selected_history">Ask if the user wants to delete a number of selected history items.</string>
<string name="delete_bookmarks">Ask if the user wants to delete all bookmarks.</string>
<string name="delete_selected_bookmarks">Ask if the user wants to delete a number of selected bookmarks.</string>
<string name="on">This is used in the settings screen to turn on the night mode.</string>
<string name="off">This is used in the settings screen to turn off the night mode.</string>
<string name="auto">This is used in the settings screen to turn the night mode on or off automatically depending upon the system settings of the phone.</string>
<string name="reader">The title of the fragment/place where books are read.</string>
<string name="no_open_book">Tell the user that they have not opened a book.</string>
<string name="open_library">The action of opening the library destination, used on a button.</string>
<string name="tab_restored">Tell the user that a tab has been restored.</string>
</resources>

View File

@ -108,6 +108,7 @@
<string name="delete_zims_toast">Filă ștearsă cu succes</string>
<string name="no_files_here">Nu sunt fișiere aici</string>
<string name="download_no_space">Spațiu insuficient pentru a descarca.</string>
<string name="download">Descarcă</string>
<string name="space_available">Spațiu disponibil:</string>
<string name="zim_simple">Simplu</string>
<string name="zim_no_pic">Fără imagini</string>

View File

@ -120,6 +120,7 @@
<string name="delete_zims_toast">Файл успешно удалён</string>
<string name="no_files_here">Файлы отсутствуют</string>
<string name="download_no_space">Недостаточно места для загрузки.</string>
<string name="download">Скачать</string>
<string name="space_available">Доступно Места:</string>
<string name="zim_simple">Простой</string>
<string name="zim_no_pic">Без картинок</string>
@ -283,4 +284,10 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Масштаб Текста</string>
<string name="search_open_in_new_tab">Открыть в новой вкладке</string>
<string name="reader">Просмотрщик</string>
<string name="no_open_book">Нет открытых книг</string>
<string name="open_library">Открыть библиотеку</string>
<string name="tab_restored">Вкладка восстановлена</string>
<string name="open_drawer">Открыть редактор</string>
<string name="close_drawer">Закрыть редактор</string>
</resources>

View File

@ -106,6 +106,7 @@
<string name="delete_zims_toast">Documentu iscantzelladu chene problemas</string>
<string name="no_files_here">Perunu documentu inoghe</string>
<string name="download_no_space">Sa memòria non bastat pro l\'iscarrigare.</string>
<string name="download">Iscàrriga</string>
<string name="space_available">Ispàtziu disponìbile:</string>
<string name="zim_simple">Sèmplitze</string>
<string name="zim_no_pic">Peruna immàgine</string>

View File

@ -110,6 +110,7 @@
<string name="delete_zims_toast">Fil raderades</string>
<string name="no_files_here">Inga filer här</string>
<string name="download_no_space">Otillräckligt utrymme för att ladda ned.</string>
<string name="download">Ladda ned</string>
<string name="space_available">Tillgängligt utrymme:</string>
<string name="zim_simple">Enkelt</string>
<string name="zim_no_pic">Inga bilder</string>

View File

@ -10,6 +10,7 @@
* Joseph
* Kumkumuk
* McAang
* MuratTheTurkish
* Rapsar
* Sayginer
* Trockya
@ -116,6 +117,7 @@
<string name="delete_zims_toast">Dosyalar başarıyla silindi</string>
<string name="no_files_here">Dosya yok</string>
<string name="download_no_space">İndirmek için yetersiz alan.</string>
<string name="download">İndir</string>
<string name="space_available">Kullanılabilir Alan:</string>
<string name="zim_simple">Basit</string>
<string name="zim_no_pic">Resim Yok</string>
@ -279,4 +281,10 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">Metin Yakınlığı</string>
<string name="search_open_in_new_tab">Yeni sekmede aç</string>
<string name="reader">Okuyucu</string>
<string name="no_open_book">ık kitap yok</string>
<string name="open_library">Kütüphaneyi aç</string>
<string name="tab_restored">Sekme geri getirildi</string>
<string name="open_drawer">Çekmeceyi Aç</string>
<string name="close_drawer">Çekmeceyi Kapat</string>
</resources>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- Authors:
<?xml version="1.0" encoding="utf-8"?>
<!-- Authors:
* Andriykopanytsia
* Asokolov
* Base
@ -110,6 +111,7 @@
<string name="delete_zims_toast">Файл вилучено</string>
<string name="no_files_here">Тут немає файлів</string>
<string name="download_no_space">Недостатньо простору для завантаження.</string>
<string name="download">Завантажити</string>
<string name="space_available">Доступний простір:</string>
<string name="zim_simple">Простий</string>
<string name="zim_no_pic">Без зображень</string>

View File

@ -6,6 +6,7 @@
* Fitoschido
* Leducthn
* Minh Nguyen
* Nguyễn Mạnh An
-->
<resources>
<string name="menu_help">Trợ giúp</string>
@ -124,4 +125,9 @@
<string name="your_languages">Ngôn ngữ được chọn:</string>
<string name="other_languages">Ngôn ngữ khác:</string>
<string name="no_bookmarks">Không có Dấu trang</string>
<string name="reader">Tiêu đề</string>
<string name="no_open_book">Không có sách nào đang mở</string>
<string name="open_library">Văn thư lưu trữ mở</string>
<string name="tab_restored">Đã khôi phục tab</string>
<string name="open_drawer">Ngăn lưu trữ mở</string>
</resources>

View File

@ -110,6 +110,7 @@
<string name="delete_zims_toast">檔案刪除成功</string>
<string name="no_files_here">沒有檔案在此</string>
<string name="download_no_space">沒有足夠的空間來下載。</string>
<string name="download">下載</string>
<string name="space_available">可用空間:</string>
<string name="zim_simple">簡易</string>
<string name="zim_no_pic">沒有圖片</string>
@ -273,4 +274,10 @@
<string name="percentage">%d%%</string>
<string name="pref_text_zoom_title">文字縮放</string>
<string name="search_open_in_new_tab">在新分頁開啟</string>
<string name="reader">讀者</string>
<string name="no_open_book">沒有開啟的書籍</string>
<string name="open_library">開啟圖書館</string>
<string name="tab_restored">分頁已恢復</string>
<string name="open_drawer">開啟抽屜</string>
<string name="close_drawer">關閉抽屜</string>
</resources>

View File

@ -17,4 +17,6 @@
<dimen name="kiwix_search_widget_padding">0dp</dimen>
<dimen name="section_list_height">56dp</dimen>
<dimen name="card_margin">5dp</dimen>
<dimen name="fab_vertical_offset">25dp</dimen>
</resources>

View File

@ -20,8 +20,8 @@ package org.kiwix.kiwixmobile.custom.settings
import android.os.Bundle
import org.kiwix.kiwixmobile.core.settings.CorePrefsFragment
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_LANG
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_WIFI_ONLY
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.PREF_LANG
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.PREF_WIFI_ONLY
import org.kiwix.kiwixmobile.custom.BuildConfig
class CustomPrefsFragment : CorePrefsFragment() {

View File

@ -3,5 +3,5 @@
* Robby
-->
<resources>
<string name="download">{{Identical|Download}}</string>
<string name="download">The title of the fragment/place where books are downloaded.</string>
</resources>