Made almost all the strings SY uses translatable! If people would like to help translate, feel free to join the Tachiyomi discord server (https://discord.gg/tachiyomi), and jump in the tachiyomi-az-sy channel and I can give you a rundown on how to do it
This commit is contained in:
@@ -4,6 +4,7 @@ import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||
import eu.kanade.tachiyomi.util.lang.launchUI
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
@@ -17,16 +18,16 @@ class ConfiguringDialogController : DialogController() {
|
||||
if (savedViewState == null) {
|
||||
thread {
|
||||
try {
|
||||
EHConfigurator().configureAll()
|
||||
EHConfigurator(activity!!).configureAll()
|
||||
launchUI {
|
||||
activity?.toast("Settings successfully uploaded!")
|
||||
activity?.toast(activity?.getString(R.string.eh_settings_successfully_uploaded))
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
activity?.let {
|
||||
it.runOnUiThread {
|
||||
MaterialDialog(it)
|
||||
.title(text = "Configuration failed!")
|
||||
.message(text = "An error occurred during the configuration process: " + e.message)
|
||||
.title(R.string.eh_settings_configuration_failed)
|
||||
.message(text = it.getString(R.string.eh_settings_configuration_failed_message, e.message))
|
||||
.positiveButton(android.R.string.ok)
|
||||
.show()
|
||||
}
|
||||
@@ -40,8 +41,8 @@ class ConfiguringDialogController : DialogController() {
|
||||
}
|
||||
|
||||
return MaterialDialog(activity!!)
|
||||
.title(text = "Uploading settings to server")
|
||||
.message(text = "Please wait, this may take some time...")
|
||||
.title(R.string.eh_settings_uploading_to_server)
|
||||
.message(R.string.eh_settings_uploading_to_server_message)
|
||||
.cancelable(false)
|
||||
.also {
|
||||
materialDialog = it
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package exh.uconfig
|
||||
|
||||
import android.content.Context
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
import eu.kanade.tachiyomi.source.online.all.EHentai
|
||||
@@ -13,7 +15,7 @@ import okhttp3.Request
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class EHConfigurator {
|
||||
class EHConfigurator(val context: Context) {
|
||||
private val prefs: PreferencesHelper by injectLazy()
|
||||
private val sources: SourceManager by injectLazy()
|
||||
|
||||
@@ -104,7 +106,7 @@ class EHConfigurator {
|
||||
|
||||
// No profile slots left :(
|
||||
if (availableProfiles.isEmpty()) {
|
||||
throw IllegalStateException("You are out of profile slots on ${source.name}, please delete a profile!")
|
||||
throw IllegalStateException(context.getString(R.string.eh_settings_out_of_slots_error, source.name))
|
||||
}
|
||||
// Create profile in available slot
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.bluelinelabs.conductor.Router
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||
import uy.kohesive.injekt.Injekt
|
||||
@@ -14,15 +15,8 @@ class WarnConfigureDialogController : DialogController() {
|
||||
private val prefs: PreferencesHelper by injectLazy()
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(text = "Settings profile note")
|
||||
.message(
|
||||
text =
|
||||
"""
|
||||
The app will now add a new settings profile on E-Hentai and ExHentai to optimize app performance. Please ensure that you have less than three profiles on both sites.
|
||||
|
||||
If you have no idea what settings profiles are, then it probably doesn't matter, just hit 'OK'.
|
||||
""".trimIndent()
|
||||
)
|
||||
.title(R.string.settings_profile_note)
|
||||
.message(R.string.settings_profile_note_message)
|
||||
.positiveButton(android.R.string.ok) {
|
||||
prefs.eh_showSettingsUploadWarning().set(false)
|
||||
ConfiguringDialogController().showDialog(router)
|
||||
|
||||
Reference in New Issue
Block a user