refactor: localized

Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
KaiserBh 2023-11-20 07:31:54 +11:00
parent 14bc550a24
commit 90cceeb040
No known key found for this signature in database
GPG Key ID: 14D73B142042BBA9
2 changed files with 7 additions and 3 deletions

View File

@ -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()

View File

@ -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>