Skip to content

Commit 5237794

Browse files
ovitrifclaude
andcommitted
feat: localize currency rates error toast
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 358ee16 commit 5237794

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/to/bitkit/repositories/CurrencyRepo.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import kotlinx.coroutines.flow.update
1818
import kotlinx.coroutines.isActive
1919
import kotlinx.coroutines.launch
2020
import kotlinx.coroutines.withContext
21+
import to.bitkit.R
2122
import to.bitkit.data.CacheStore
2223
import to.bitkit.data.SettingsStore
2324
import to.bitkit.di.BgDispatcher
@@ -94,8 +95,8 @@ class CurrencyRepo @Inject constructor(
9495
.collect { isStale ->
9596
if (isStale) {
9697
toaster.error(
97-
title = ToastText("Rates currently unavailable"),
98-
body = ToastText("An error has occurred. Please try again later.")
98+
title = ToastText(R.string.currency__rates_error_title),
99+
body = ToastText(R.string.currency__rates_error_body),
99100
)
100101
}
101102
}

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
<string name="common__usable">Usable</string>
8585
<string name="common__yes">Yes</string>
8686
<string name="common__yes_proceed">Yes, Proceed</string>
87+
<string name="currency__rates_error_body">An error has occurred. Please try again later.</string>
88+
<string name="currency__rates_error_title">Rates currently unavailable</string>
8789
<string name="fee__custom__description">Depends on the fee</string>
8890
<string name="fee__custom__shortDescription">Depends on the fee</string>
8991
<string name="fee__custom__shortRange">Depends on the fee</string>

0 commit comments

Comments
 (0)