Skip to content

Commit

Permalink
Add content description for buttons in ReaderScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Jul 26, 2024
1 parent a795154 commit ff4f218
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@ val DeTwineStrings =
noPinnedSources = "No pinned feeds/groups",
databaseMaintainenceTitle = "Please wait...",
databaseMaintainenceSubtitle = "Performing database maintainence, don't close the app",
cdLoadFullArticle = "Load full article",
)
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,5 @@ val EnTwineStrings =
noPinnedSources = "No pinned feeds/groups",
databaseMaintainenceTitle = "Please wait...",
databaseMaintainenceSubtitle = "Performing database maintainence, don't close the app",
cdLoadFullArticle = "Load full article",
)
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,5 @@ val TrTwineStrings =
noPinnedSources = "Sabitlenmiş yayın/grup yok",
databaseMaintainenceTitle = "Lütfen bekleyin...",
databaseMaintainenceSubtitle = "Veritabanı bakımı gerçekleştiriliyor, uygulamayı kapatmayın",
cdLoadFullArticle = "Load full article",
)
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ data class TwineStrings(
val noPinnedSources: String,
val databaseMaintainenceTitle: String,
val databaseMaintainenceSubtitle: String,
val cdLoadFullArticle: String,
)

object Locales {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@ val ZhTwineStrings =
noPinnedSources = "没有置顶的订阅/分组",
databaseMaintainenceTitle = "请稍候...",
databaseMaintainenceSubtitle = "正在进行数据库维护,请勿关闭应用",
cdLoadFullArticle = "Load full article",
)
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import dev.sasikanth.rss.reader.resources.icons.Bookmarked
import dev.sasikanth.rss.reader.resources.icons.Share
import dev.sasikanth.rss.reader.resources.icons.TwineIcons
import dev.sasikanth.rss.reader.resources.icons.Website
import dev.sasikanth.rss.reader.resources.strings.LocalStrings
import dev.sasikanth.rss.reader.share.LocalShareHandler
import dev.sasikanth.rss.reader.ui.AppTheme
import dev.sasikanth.rss.reader.util.DispatchersProvider
Expand All @@ -92,7 +93,7 @@ internal fun ReaderScreen(
title = {},
navigationIcon = {
IconButton(onClick = { presenter.dispatch(ReaderEvent.BackClicked) }) {
Icon(TwineIcons.ArrowBack, contentDescription = null)
Icon(TwineIcons.ArrowBack, contentDescription = LocalStrings.current.buttonGoBack)
}
},
colors =
Expand Down Expand Up @@ -130,7 +131,7 @@ internal fun ReaderScreen(
TwineIcons.Bookmark
}
IconButton(onClick = { presenter.dispatch(ReaderEvent.TogglePostBookmark) }) {
Icon(bookmarkIcon, contentDescription = null)
Icon(bookmarkIcon, contentDescription = LocalStrings.current.bookmark)
}
}

Expand Down Expand Up @@ -159,7 +160,11 @@ internal fun ReaderScreen(
coroutineScope.launch { presenter.dispatch(ReaderEvent.ArticleShortcutClicked) }
}
) {
Icon(TwineIcons.ArticleShortcut, contentDescription = null, tint = iconTint)
Icon(
TwineIcons.ArticleShortcut,
contentDescription = LocalStrings.current.cdLoadFullArticle,
tint = iconTint
)
}
}
InProgress -> {
Expand All @@ -176,14 +181,14 @@ internal fun ReaderScreen(
Icon(
modifier = Modifier.requiredSize(24.dp),
imageVector = TwineIcons.Website,
contentDescription = null
contentDescription = LocalStrings.current.openWebsite
)
}
}

Box(Modifier.weight(1f), contentAlignment = Alignment.Center) {
IconButton(onClick = { coroutineScope.launch { sharedHandler.share(state.link!!) } }) {
Icon(TwineIcons.Share, contentDescription = null)
Icon(TwineIcons.Share, contentDescription = LocalStrings.current.share)
}
}
}
Expand Down

0 comments on commit ff4f218

Please sign in to comment.