Skip to content

Commit

Permalink
refactor: replace string literal of result not found message
Browse files Browse the repository at this point in the history
  • Loading branch information
keigomichi committed Jul 13, 2023
1 parent d1c2e2e commit 2864a41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.github.droidkaigi.confsched2023.sessions.strings.SessionsStrings

@Composable
fun EmptySearchResultBody(
Expand All @@ -37,8 +38,7 @@ fun EmptySearchResultBody(
)
Spacer(modifier = Modifier.height(28.dp))
Text(
// TODO: Use string resource
text = "この検索条件に一致する結果はありません",
text = SessionsStrings.SearchResultNotFound.asString(),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onBackground,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sealed class SessionsStrings : Strings<SessionsStrings>(Bindings) {
object UserIcon : SessionsStrings()
object EventDay : SessionsStrings()
object Category : SessionsStrings()
object SearchResultNotFound : SessionsStrings()

private object Bindings : StringsBindings<SessionsStrings>(
Lang.Japanese to { item, _ ->
Expand All @@ -25,6 +26,7 @@ sealed class SessionsStrings : Strings<SessionsStrings>(Bindings) {
UserIcon -> "ユーザーアイコン"
EventDay -> "開催日"
Category -> "カテゴリー"
SearchResultNotFound -> "この検索条件に一致する結果はありません"
}
},
Lang.English to { item, bindings ->
Expand All @@ -37,6 +39,7 @@ sealed class SessionsStrings : Strings<SessionsStrings>(Bindings) {
UserIcon -> "User icon"
EventDay -> "Day"
Category -> "Category"
SearchResultNotFound -> "Nothing matched your search criteria"
}
},
default = Lang.Japanese,
Expand Down

0 comments on commit 2864a41

Please sign in to comment.