Skip to content

Commit

Permalink
added strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed May 17, 2024
1 parent c778162 commit c8ba195
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun HidingNavigationBar(
)
},
label = {
Text(text = "Discover")
Text(text = stringResource(SharedRes.strings.discover))
}
)
NavigationBarItem(
Expand Down Expand Up @@ -137,7 +137,7 @@ fun HidingNavigationBar(
)
},
label = {
Text(text = "List")
Text(text = stringResource(SharedRes.strings.list))
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.maxkeppeker.sheets.core.models.base.Header
import com.maxkeppeker.sheets.core.models.base.IconSource
Expand Down Expand Up @@ -61,9 +62,14 @@ fun BSDialog(
value = value,
onValueChange = { value = it },
placeholder = {
Text(text = "Search")
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(SharedRes.strings.search),
textAlign = TextAlign.Center
)
},
shape = MaterialTheme.shapes.medium
shape = MaterialTheme.shapes.medium,
textStyle = LocalTextStyle.current.copy(textAlign = TextAlign.Center)
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fun FABContent(
),
FABItem(
icon = Icons.Rounded.Star,
label = "Rating",
label = stringResource(SharedRes.strings.rating),
onClick = {
speedDialFABState.collapse()
ratingState.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import com.maxkeppeler.sheets.calendar.CalendarDialog
import com.maxkeppeler.sheets.calendar.models.CalendarConfig
import com.maxkeppeler.sheets.calendar.models.CalendarSelection
import dev.datlag.aniflow.LocalEdgeToEdge
import dev.datlag.aniflow.SharedRes
import dev.datlag.aniflow.anilist.type.MediaListStatus
import dev.datlag.aniflow.common.icon
import dev.datlag.aniflow.common.merge
import dev.datlag.aniflow.ui.navigation.screen.medium.dialog.edit.component.TopSection
import dev.datlag.tooling.decompose.lifecycle.collectAsStateWithLifecycle
import dev.icerock.moko.resources.compose.stringResource
import io.github.aakira.napier.Napier
import kotlinx.datetime.*
import kotlin.math.max
Expand Down Expand Up @@ -127,7 +129,7 @@ fun EditDialog(component: EditComponent) {
},
enabled = editState.canRemoveEpisode
) {
Text(text = "-1")
Text(text = stringResource(SharedRes.strings.minus_one))
}
OutlinedTextField(
modifier = Modifier.weight(1F),
Expand All @@ -138,7 +140,7 @@ fun EditDialog(component: EditComponent) {
placeholder = {
Text(
modifier = Modifier.fillMaxWidth(),
text = "Episode",
text = stringResource(SharedRes.strings.episode),
textAlign = TextAlign.Center,
style = LocalTextStyle.current.copy(textAlign = TextAlign.Center)
)
Expand All @@ -155,7 +157,7 @@ fun EditDialog(component: EditComponent) {
},
enabled = editState.canAddEpisode
) {
Text(text = "+1")
Text(text = stringResource(SharedRes.strings.plus_one))
}
}
}
Expand All @@ -174,7 +176,7 @@ fun EditDialog(component: EditComponent) {
},
enabled = editState.canRemoveRepeat
) {
Text(text = "-1")
Text(text = stringResource(SharedRes.strings.minus_one))
}
OutlinedTextField(
modifier = Modifier.weight(1F),
Expand All @@ -185,7 +187,7 @@ fun EditDialog(component: EditComponent) {
placeholder = {
Text(
modifier = Modifier.fillMaxWidth(),
text = "Repeat",
text = stringResource(SharedRes.strings.repeat),
textAlign = TextAlign.Center,
style = LocalTextStyle.current.copy(textAlign = TextAlign.Center)
)
Expand All @@ -202,7 +204,7 @@ fun EditDialog(component: EditComponent) {
},
enabled = editState.canAddRepeat
) {
Text(text = "+1")
Text(text = stringResource(SharedRes.strings.plus_one))
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions composeApp/src/commonMain/moko-resources/base/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@
<string name="trending">Trending</string>
<string name="popular">Popular</string>
<string name="upcoming">Upcoming</string>
<string name="discover">Discover</string>
<string name="search">Search</string>
<string name="list">List</string>
<string name="episode">Episode</string>
<string name="repeat">Repeat</string>
</resources>

0 comments on commit c8ba195

Please sign in to comment.