Skip to content

Commit

Permalink
Use string res
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkeppeler committed Jan 23, 2023
1 parent 61e9f66 commit 4054735
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ fun ClockView(
onGroupClick = clockState::onValueGroupClick,
onAm = clockState::onChange12HourFormatValue,
)

KeyboardComponent(
modifier = Modifier.weight(1f, false),
config = config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ internal fun LandscapeTimeValueComponent(
verticalArrangement = verticalArrangement,
) {

val labels = listOf("Hours", "Minutes", "Seconds")
val labelRes = listOf(
R.string.scd_clock_dialog_hours,
R.string.scd_clock_dialog_minutes,
R.string.scd_clock_dialog_seconds,
)

Column(
modifier = Modifier
Expand Down Expand Up @@ -188,11 +192,10 @@ internal fun LandscapeTimeValueComponent(
Spacer(modifier = Modifier.width(dimensionResource(RC.dimen.scd_small_150)))

Text(
text = labels[currentGroupIndex],
text = stringResource(labelRes[currentGroupIndex]),
style = MaterialTheme.typography.labelSmall,
)


}
}
}
Expand Down
4 changes: 4 additions & 0 deletions clock/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<string name="scd_clock_dialog_next_value" translatable="true">Nächster Wert</string>
<string name="scd_clock_dialog_previous_value" translatable="true">Letzter Wert</string>

<string name="scd_clock_dialog_hours">Stunden</string>
<string name="scd_clock_dialog_minutes">Minuten</string>
<string name="scd_clock_dialog_seconds">Sekunden</string>

</resources>
4 changes: 3 additions & 1 deletion clock/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
<string name="scd_clock_dialog_pm" translatable="true">PM</string>
<string name="scd_clock_dialog_next_value" translatable="true">Next value</string>
<string name="scd_clock_dialog_previous_value" translatable="true">Previous value</string>

<string name="scd_clock_dialog_hours">Hours</string>
<string name="scd_clock_dialog_minutes">Minutes</string>
<string name="scd_clock_dialog_seconds">Seconds</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ fun FrameBase(
val layoutDirection = LocalLayoutDirection.current
val configuration = LocalConfiguration.current



Column(
modifier = Modifier.wrapContentHeight()
) {
Expand Down

0 comments on commit 4054735

Please sign in to comment.