mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 06:51:55 +03:00
add translations
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
8d870934a7
commit
45c372cd09
2 changed files with 22 additions and 4 deletions
|
@ -14,6 +14,7 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import androidx.core.app.NotificationCompat
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.ui.notifications.NotificationUtils
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
|
@ -37,7 +38,7 @@ class SyncWorkerNotificationManager(private val context: Context) {
|
|||
|
||||
addAction(
|
||||
android.R.drawable.ic_menu_close_clear_cancel,
|
||||
"Cancel",
|
||||
context.getString(R.string.common_cancel),
|
||||
getCancelPendingIntent()
|
||||
)
|
||||
}
|
||||
|
@ -64,7 +65,8 @@ class SyncWorkerNotificationManager(private val context: Context) {
|
|||
}
|
||||
|
||||
fun showStartNotification() {
|
||||
val notification = getNotification("Sync Operation Started", progress = 0)
|
||||
val notification =
|
||||
getNotification(context.getString(R.string.sync_worker_start_notification_title), progress = 0)
|
||||
notificationManager.notify(notificationId, notification)
|
||||
}
|
||||
|
||||
|
@ -88,12 +90,20 @@ class SyncWorkerNotificationManager(private val context: Context) {
|
|||
}
|
||||
|
||||
private fun showSuccessNotification() {
|
||||
val notification = getNotification("Download Complete", "File downloaded successfully")
|
||||
val notification = getNotification(
|
||||
context.getString(R.string.sync_worker_success_notification_title),
|
||||
context.getString(R.string.sync_worker_success_notification_description)
|
||||
)
|
||||
|
||||
notificationManager.notify(notificationId, notification)
|
||||
}
|
||||
|
||||
private fun showErrorNotification() {
|
||||
val notification = getNotification("Download Failed", "Error downloading file")
|
||||
val notification = getNotification(
|
||||
context.getString(R.string.sync_worker_error_notification_title),
|
||||
context.getString(R.string.sync_worker_error_notification_description)
|
||||
)
|
||||
|
||||
notificationManager.notify(notificationId, notification)
|
||||
}
|
||||
|
||||
|
|
|
@ -226,6 +226,14 @@
|
|||
<string name="upload_notification_manager_start_text">%1$d / %2$d - %3$s</string>
|
||||
<string name="upload_notification_manager_upload_in_progress_text" translatable="false">%1$d%%</string>
|
||||
|
||||
<string name="sync_worker_start_notification_title">Sync Operation Started</string>
|
||||
|
||||
<string name="sync_worker_success_notification_title">Download Complete</string>
|
||||
<string name="sync_worker_success_notification_description">Folder successfully synchronized</string>
|
||||
|
||||
<string name="sync_worker_error_notification_title">Download Failed</string>
|
||||
<string name="sync_worker_error_notification_description">An error occurred during folder synchronization</string>
|
||||
|
||||
<string name="uploader_upload_in_progress_ticker">Uploading…</string>
|
||||
<string name="uploader_upload_in_progress_content">%1$d%% Uploading %2$s</string>
|
||||
<string name="uploader_upload_succeeded_content_single">%1$s uploaded</string>
|
||||
|
|
Loading…
Reference in a new issue