commit fee1caf64315c39a21a582c1ec190031f52d3fa6
parent ca6e3832a0b6db754ea47ba20b1ce43ef264e0e8
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Tue, 9 Apr 2024 23:46:44 +0200
feat(app/ui): translations
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/pages/social/SocialRoot.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/pages/social/SocialRoot.kt
@@ -69,7 +69,7 @@ class SocialRoot : Routes.Route() {
if (listSize == 0) {
item {
Text(
- text = "(empty)", modifier = Modifier
+ text = translation["empty_hint"], modifier = Modifier
.fillMaxWidth()
.padding(10.dp), textAlign = TextAlign.Center
)
@@ -193,7 +193,9 @@ class SocialRoot : Routes.Route() {
@OptIn(ExperimentalFoundationApi::class)
override val content: @Composable (NavBackStackEntry) -> Unit = {
- val titles = listOf("Friends", "Groups")
+ val titles = remember {
+ listOf(translation["friends_tab"], translation["groups_tab"])
+ }
val coroutineScope = rememberCoroutineScope()
val pagerState = rememberPagerState { titles.size }
var showAddFriendDialog by remember { mutableStateOf(false) }
diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json
@@ -84,6 +84,9 @@
"saved_config_snackbar": "Config saved"
},
"social": {
+ "friends_tab": "Friends",
+ "groups_tab": "Groups",
+ "empty_hint": "(empty)",
"streaks_expiration_short": "{hours}h"
},
"manage_scope": {