Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
i18nize exercise category
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 30, 2022
1 parent 81cc936 commit 3aefd1c
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() ?: ""
)
}
}

Expand Down

0 comments on commit 3aefd1c

Please sign in to comment.