From 9ea4f73187835fe465f9c1db5d409e192d7aa65e Mon Sep 17 00:00:00 2001 From: brreynie Date: Mon, 15 May 2023 20:54:47 +0200 Subject: [PATCH] i18n improvement --- .../screens/session_recap/SessionRecapScreen.kt | 11 ++++++++--- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/be/ugent/sel/studeez/screens/session_recap/SessionRecapScreen.kt b/app/src/main/java/be/ugent/sel/studeez/screens/session_recap/SessionRecapScreen.kt index f3a5739..73f4100 100644 --- a/app/src/main/java/be/ugent/sel/studeez/screens/session_recap/SessionRecapScreen.kt +++ b/app/src/main/java/be/ugent/sel/studeez/screens/session_recap/SessionRecapScreen.kt @@ -16,7 +16,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.hilt.navigation.compose.hiltViewModel import be.ugent.sel.studeez.R import be.ugent.sel.studeez.common.composable.BasicButton import be.ugent.sel.studeez.common.composable.ImageBackgroundButton @@ -70,7 +69,7 @@ fun SessionRecapScreen(modifier: Modifier, sessionRecapActions: SessionRecapActi verticalArrangement = Arrangement.SpaceBetween ) { Text( - text = stringResource(R.string.congrats) + hms, + text = stringResource(R.string.congrats, hms), modifier = Modifier .fillMaxWidth(), textAlign = TextAlign.Center, @@ -135,6 +134,12 @@ fun SessionRecapScreen(modifier: Modifier, sessionRecapActions: SessionRecapActi fun SessionRecapScreenPreview() { SessionRecapScreen( modifier = Modifier, - sessionRecapActions = SessionRecapActions(hiltViewModel(), {}, {}) + sessionRecapActions = SessionRecapActions( + { SessionReport( + studyTime = 100, + ) }, + {}, + {}, + ) ) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be6b7ef..58e952d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -150,7 +150,7 @@ Number of Repeats - "Congratulations! You studied: " + "Congratulations! You studied: %s" How did it go? Good Bad