mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix strings missing from translations (#959)
## Description Weblate's Android string parser (aka https://translate.codeberg.org/projects/wholphin/) doesn't support direct translations of string arrays. Many of Wholphin's preference options are defined in string arrays and therefore could not be translated. So this PR implements the [suggested workaround](https://docs.weblate.org/en/latest/formats/android.html) to move the string into individual entries and reference them in arrays. Also moves some hardcoded strings into `strings.xml` so they can be translated. Note: virtually all error messages are still hardcoded, but they are only for exceptional cases, so it's probably not a huge problem. A minor bug where the backdrop would show briefly after switching users is fixed. ### Related issues Fixes #957 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
a44fad890f
commit
2a371e7d6b
9 changed files with 156 additions and 93 deletions
|
|
@ -123,6 +123,9 @@ class MainActivity : AppCompatActivity() {
|
|||
@Inject
|
||||
lateinit var suggestionsSchedulerService: SuggestionsSchedulerService
|
||||
|
||||
@Inject
|
||||
lateinit var backdropService: BackdropService
|
||||
|
||||
// Note: unused but injected to ensure it is created
|
||||
@Inject
|
||||
lateinit var serverEventListener: ServerEventListener
|
||||
|
|
@ -247,6 +250,9 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
is SetupDestination.AppContent -> {
|
||||
LaunchedEffect(Unit) {
|
||||
backdropService.clearBackdrop()
|
||||
}
|
||||
val current = key.current
|
||||
ProvideLocalClock {
|
||||
if (UpdateChecker.ACTIVE && appPreferences.autoCheckForUpdates) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue