From 90cceeb040b34b9c0ac7581762dbf7c5302aef63 Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Mon, 20 Nov 2023 07:31:54 +1100 Subject: [PATCH] refactor: localized Signed-off-by: KaiserBh --- .../ui/setting/track/GoogleDriveLoginActivity.kt | 8 +++++--- i18n/src/commonMain/resources/MR/base/strings.xml | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/GoogleDriveLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/GoogleDriveLoginActivity.kt index ae95b919b..370f70276 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/GoogleDriveLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/GoogleDriveLoginActivity.kt @@ -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() @@ -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() diff --git a/i18n/src/commonMain/resources/MR/base/strings.xml b/i18n/src/commonMain/resources/MR/base/strings.xml index a5f9090d1..6cf924121 100644 --- a/i18n/src/commonMain/resources/MR/base/strings.xml +++ b/i18n/src/commonMain/resources/MR/base/strings.xml @@ -540,6 +540,8 @@ Clear Sync Data from Google Drive Sync data purged from Google Drive No sync data found in Google Drive + Logged in to Google Drive + Failed to log in to Google Drive: %s Not signed in to Google Drive Purge confirmation Purging sync data will delete all your sync data from Google Drive. Are you sure you want to continue?