commit 0e5c48062acdffc66510368922a43874f18b9e9a
parent a1e7f234f96494eb38f3cc5b80a1b4e1617f3178
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Mon, 7 Aug 2023 17:57:15 +0200
fix(ui/features): translation
- fix missing parameter
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/HomeSection.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/HomeSection.kt
@@ -120,7 +120,7 @@ class HomeSection : Section() {
override fun onResumed() {
if (!context.mappings.isMappingsLoaded()) {
- context.mappings.init()
+ context.mappings.init(context.androidContext)
}
installationSummary.value = context.getInstallationSummary()
userLocale.value = context.translation.loadedLocale.getDisplayName(Locale.getDefault())
diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/features/FeaturesSection.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/features/FeaturesSection.kt
@@ -184,7 +184,9 @@ class FeaturesSection : Section() {
maxLines = 1,
modifier = Modifier.widthIn(0.dp, 120.dp),
text = (propertyValue.getNullable() as? String)?.let{
- context.translation["features.options.${property.name}.$it"]
+ if (property.key.params.shouldTranslate) {
+ context.translation["features.options.${property.name}.$it"]
+ } else it
} ?: context.translation["manager.features.disabled"],
)
}