feat(app/ui): translations

This commit is contained in:
rhunk
2024-04-09 23:46:44 +02:00
parent ca6e3832a0
commit fee1caf643
2 changed files with 7 additions and 2 deletions

View File

@@ -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) }

View File

@@ -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": {