From 3aefd1c438e7d7e1765aca5becd6529e72c25ea2 Mon Sep 17 00:00:00 2001 From: Ankit Suda Date: Wed, 30 Nov 2022 14:47:51 +0530 Subject: [PATCH] i18nize exercise category --- .../about/ExerciseDetailAboutTab.kt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/ui-exercise-details-tab-about/src/main/java/com/ankitsuda/rebound/ui/exercise_details/about/ExerciseDetailAboutTab.kt b/modules/ui-exercise-details-tab-about/src/main/java/com/ankitsuda/rebound/ui/exercise_details/about/ExerciseDetailAboutTab.kt index 8841f5c1..c0b929e6 100644 --- a/modules/ui-exercise-details-tab-about/src/main/java/com/ankitsuda/rebound/ui/exercise_details/about/ExerciseDetailAboutTab.kt +++ b/modules/ui-exercise-details-tab-about/src/main/java/com/ankitsuda/rebound/ui/exercise_details/about/ExerciseDetailAboutTab.kt @@ -25,6 +25,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp +import com.ankitsuda.common.compose.toI18NString import com.ankitsuda.rebound.domain.entities.Exercise import com.ankitsuda.rebound.ui.components.RSpacer import com.ankitsuda.rebound.ui.theme.ReboundTheme @@ -39,16 +40,24 @@ fun ExerciseDetailAboutTab(exercise: Exercise) { .padding(16.dp) ) { if (!exercise.notes.isNullOrBlank()) { - Section(title = stringResource(id = R.string.instructions), text = exercise.notes.toString()) + Section( + title = stringResource(id = R.string.instructions), + text = exercise.notes.toString() + ) } if (!exercise.primaryMuscleTag.isNullOrBlank()) { - Section(title = stringResource(id = R.string.primary_muscle), text = exercise.primaryMuscleTag.toString()) + Section( + title = stringResource(id = R.string.primary_muscle), + text = exercise.primaryMuscleTag.toString() + ) } - // TODO fix category name - Section(title = stringResource(id = R.string.category), text = exercise.category?.tag ?: "") + Section( + title = stringResource(id = R.string.category), + text = exercise.category?.toI18NString() ?: "" + ) } }