mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
refactor: localized
Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
14bc550a24
commit
90cceeb040
@ -4,9 +4,11 @@ import android.net.Uri
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import eu.kanade.tachiyomi.data.sync.service.GoogleDriveService
|
||||
import tachiyomi.core.i18n.stringResource
|
||||
import tachiyomi.core.util.lang.launchIO
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import tachiyomi.i18n.MR
|
||||
|
||||
class GoogleDriveLoginActivity : BaseOAuthLoginActivity() {
|
||||
private val googleDriveService = Injekt.get<GoogleDriveService>()
|
||||
@ -21,7 +23,7 @@ class GoogleDriveLoginActivity : BaseOAuthLoginActivity() {
|
||||
onSuccess = {
|
||||
Toast.makeText(
|
||||
this@GoogleDriveLoginActivity,
|
||||
"Authorization successful.",
|
||||
stringResource(MR.strings.google_drive_login_success),
|
||||
Toast.LENGTH_LONG,
|
||||
).show()
|
||||
|
||||
@ -30,7 +32,7 @@ class GoogleDriveLoginActivity : BaseOAuthLoginActivity() {
|
||||
onFailure = { error ->
|
||||
Toast.makeText(
|
||||
this@GoogleDriveLoginActivity,
|
||||
"Authorization failed: $error",
|
||||
stringResource(MR.strings.google_drive_login_failed, error),
|
||||
Toast.LENGTH_LONG,
|
||||
).show()
|
||||
returnToSettings()
|
||||
@ -40,7 +42,7 @@ class GoogleDriveLoginActivity : BaseOAuthLoginActivity() {
|
||||
} else if (error != null) {
|
||||
Toast.makeText(
|
||||
this@GoogleDriveLoginActivity,
|
||||
"Authorization failed: $error",
|
||||
stringResource(MR.strings.google_drive_login_failed, error),
|
||||
Toast.LENGTH_LONG,
|
||||
).show()
|
||||
|
||||
|
@ -540,6 +540,8 @@
|
||||
<string name="pref_google_drive_purge_sync_data">Clear Sync Data from Google Drive</string>
|
||||
<string name="google_drive_sync_data_purged">Sync data purged from Google Drive</string>
|
||||
<string name="google_drive_sync_data_not_found">No sync data found in Google Drive</string>
|
||||
<string name="google_drive_login_success">Logged in to Google Drive</string>
|
||||
<string name="google_drive_login_failed">Failed to log in to Google Drive: %s</string>
|
||||
<string name="google_drive_not_signed_in">Not signed in to Google Drive</string>
|
||||
<string name="pref_purge_confirmation_title">Purge confirmation</string>
|
||||
<string name="pref_purge_confirmation_message">Purging sync data will delete all your sync data from Google Drive. Are you sure you want to continue?</string>
|
||||
|
Loading…
Reference in New Issue
Block a user