String resources. Remove unneeded Todo.

This commit is contained in:
KotlinGeekDev
2025-11-26 22:44:16 +01:00
parent a0bff70dc2
commit 07f82d3a22
6 changed files with 20 additions and 11 deletions
@@ -92,7 +92,6 @@ fun ArticleList(
state = listState, state = listState,
) { ) {
itemsIndexed(articles, key = { _, item -> item.toNAddr() }) { _, item -> itemsIndexed(articles, key = { _, item -> item.toNAddr() }) { _, item ->
// TODO: Find a way to integrate bookmark group callbacks into the note below
NoteCompose( NoteCompose(
baseNote = item, baseNote = item,
modifier = Modifier.animateContentSize(), modifier = Modifier.animateContentSize(),
@@ -150,7 +150,7 @@ fun BookmarkGroupItemOptionsMenu(
val scope = rememberCoroutineScope() val scope = rememberCoroutineScope()
DropdownMenuItem( DropdownMenuItem(
text = { Text("Remove from Bookmark List") }, text = { Text(stringRes(R.string.bookmark_remove_action_label)) },
onClick = { onClick = {
onDeleteBookmarkItem() onDeleteBookmarkItem()
onDismiss() onDismiss()
@@ -80,7 +80,7 @@ private fun ListManagementView(
Scaffold( Scaffold(
modifier = modifier, modifier = modifier,
topBar = { topBar = {
TopBarWithBackButton(caption = "Bookmark this article", nav::popBack) TopBarWithBackButton(caption = stringRes(R.string.article_bookmark_management_title), nav::popBack)
}, },
floatingActionButton = { floatingActionButton = {
NewListButton { } NewListButton { }
@@ -110,11 +110,11 @@ fun BookmarkStatusInList(
) { ) {
val text = val text =
if (isPublicMemberBookmark) { if (isPublicMemberBookmark) {
"is a public bookmark here" stringRes(R.string.public_bookmark_presence_indicator)
} else if (isPrivateMemberBookmark) { } else if (isPrivateMemberBookmark) {
"is a private bookmark here" stringRes(R.string.private_bookmark_presence_indicator)
} else { } else {
"is not a bookmark here" stringRes(R.string.bookmark_absence_indicator)
} }
val icon = val icon =
@@ -175,13 +175,13 @@ fun BookmarkManagementOptions(
if (isBookmarkInList) { if (isBookmarkInList) {
Icon( Icon(
imageVector = Icons.Filled.BookmarkRemove, imageVector = Icons.Filled.BookmarkRemove,
contentDescription = "Remove bookmark from list", contentDescription = stringRes(R.string.bookmark_remove_action_desc),
tint = MaterialTheme.colorScheme.onErrorContainer, tint = MaterialTheme.colorScheme.onErrorContainer,
) )
} else { } else {
Icon( Icon(
imageVector = Icons.Filled.BookmarkAdd, imageVector = Icons.Filled.BookmarkAdd,
contentDescription = "Add bookmark to list", contentDescription = stringRes(R.string.bookmark_add_action_desc),
tint = MaterialTheme.colorScheme.onPrimary, tint = MaterialTheme.colorScheme.onPrimary,
) )
} }
@@ -193,7 +193,7 @@ fun BookmarkManagementOptions(
) { ) {
DropdownMenuItem( DropdownMenuItem(
text = { text = {
Text(text = "Add as public bookmark") Text(text = stringRes(R.string.public_bookmark_add_action_label))
}, },
onClick = { onClick = {
onAddBookmark(false) onAddBookmark(false)
@@ -202,7 +202,7 @@ fun BookmarkManagementOptions(
) )
DropdownMenuItem( DropdownMenuItem(
text = { text = {
Text(text = "Add as private bookmark") Text(text = stringRes(R.string.private_bookmark_add_action_label))
}, },
onClick = { onClick = {
onAddBookmark(true) onAddBookmark(true)
@@ -79,7 +79,7 @@ private fun ListManagementView(
Scaffold( Scaffold(
modifier = modifier, modifier = modifier,
topBar = { topBar = {
TopBarWithBackButton(caption = "Bookmark this post", nav::popBack) TopBarWithBackButton(caption = stringRes(R.string.post_bookmark_management_title), nav::popBack)
}, },
floatingActionButton = { floatingActionButton = {
NewListButton { } NewListButton { }
+10
View File
@@ -408,6 +408,16 @@
<string name="public_articles_label">Public Articles</string> <string name="public_articles_label">Public Articles</string>
<string name="public_articles_count">Public Articles(%1$s)</string> <string name="public_articles_count">Public Articles(%1$s)</string>
<string name="manage_bookmark_label">Manage %1$s in Bookmark Lists</string> <string name="manage_bookmark_label">Manage %1$s in Bookmark Lists</string>
<string name="post_bookmark_management_title">Bookmark this post</string>
<string name="article_bookmark_management_title">Bookmark this article</string>
<string name="public_bookmark_presence_indicator">is a public bookmark here</string>
<string name="private_bookmark_presence_indicator">is a private bookmark here</string>
<string name="bookmark_absence_indicator">is not a bookmark here</string>
<string name="bookmark_remove_action_desc">Remove bookmark from list</string>
<string name="bookmark_add_action_desc">Add bookmark to list</string>
<string name="public_bookmark_add_action_label">Add as public bookmark</string>
<string name="private_bookmark_add_action_label">Add as private bookmark</string>
<string name="bookmark_remove_action_label">Remove from Bookmark List</string>
<string name="wallet_connect_service">Wallet Connect Service</string> <string name="wallet_connect_service">Wallet Connect Service</string>
<string name="wallet_connect_service_explainer">Authorizes a Nostr Secret to pay zaps without leaving the app. Keep the secret safe and use a private relay if possible</string> <string name="wallet_connect_service_explainer">Authorizes a Nostr Secret to pay zaps without leaving the app. Keep the secret safe and use a private relay if possible</string>