General improvements (#316)

* Added support for right text alignment in epub reader

* Added tabs management to PDF navigation drawer

* Implemented unified selection menu placement logic

* Added reset functionality for toolbar customization

* Improved highlight filtering in epub pagination

* Migrated hardcoded UI strings to string resources

* Extracted desktop application logic from Main.kt into modular files

* Refactored Main.kt by extracting PDF and EPUB logic into specialized files

* Added Spanish language support

* Added system default option to app language selection
This commit is contained in:
Aryan 2026-05-16 16:19:31 +05:30 committed by GitHub
parent 759d4b73a0
commit 056485a140
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 9184 additions and 5947 deletions

View file

@ -1,6 +1,7 @@
@file:Suppress("UnstableApiUsage")
import java.util.Properties
import javax.xml.parsers.DocumentBuilderFactory
plugins {
alias(libs.plugins.android.application)
@ -18,6 +19,27 @@ if (localPropertiesFile.exists()) {
localPropertiesFile.inputStream().use { localProperties.load(it) }
}
fun configuredAppLocaleTags(): Set<String> {
val localesConfig = file("src/main/res/xml/locales_config.xml")
val androidNamespace = "http://schemas.android.com/apk/res/android"
val document = DocumentBuilderFactory.newInstance()
.apply { isNamespaceAware = true }
.newDocumentBuilder()
.parse(localesConfig)
val localeNodes = document.getElementsByTagName("locale")
return buildSet {
for (index in 0 until localeNodes.length) {
val name = localeNodes.item(index)
.attributes
?.getNamedItemNS(androidNamespace, "name")
?.nodeValue
?.takeIf { it.isNotBlank() }
if (name != null) add(name)
}
}
}
kotlin {
jvmToolchain(21)
}
@ -33,7 +55,7 @@ android {
versionCode = 51
versionName = "1.0.47"
resourceConfigurations += setOf("en", "ar", "de", "tr", "fr", "ru")
resourceConfigurations += configuredAppLocaleTags()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {