fix: ui text changes

This commit is contained in:
Mehak Nasir
2022-10-04 16:52:04 +05:00
committed by Mehak Nasir
parent f43832187c
commit 315da6ba5d
5 changed files with 7 additions and 15 deletions

View File

@@ -42,7 +42,6 @@ function PostsView() {
const {
topicId,
category,
page,
} = useContext(DiscussionContext);
const dispatch = useDispatch();
const searchString = useSelector(({ threads }) => threads.filters.search);
@@ -50,7 +49,6 @@ function PostsView() {
const loadingStatus = useSelector(({ threads }) => threads.status);
let postsListComponent;
const showOwnPosts = page === 'my-posts';
if (topicId) {
postsListComponent = <TopicPostsList topicId={topicId} />;
@@ -79,7 +77,7 @@ function PostsView() {
{
searchString && <SearchInfo count={resultsFound} text={searchString} loadingStatus={loadingStatus} onClear={() => dispatch(setSearchQuery(''))} />
}
<PostFilterBar filterSelfPosts={showOwnPosts} />
<PostFilterBar />
<div className="border-bottom border-light-400" />
<div className="list-group list-group-flush flex-fill" role="list" onKeyDown={e => handleKeyDown(e)}>
{postsListComponent}

View File

@@ -13,9 +13,9 @@ const messages = defineMessages({
search: {
id: 'discussions.posts.actionBar.search',
defaultMessage: `{page, select,
topics {Find a topic}
topics {Search topics}
posts {Search all posts}
learners {Search learner}
learners {Search learners}
myPosts {Search all posts}
other {{page}}
}`,

View File

@@ -56,7 +56,6 @@ ActionItem.propTypes = {
};
function PostFilterBar({
filterSelfPosts,
intl,
}) {
const dispatch = useDispatch();
@@ -120,7 +119,7 @@ function PostFilterBar({
<Collapsible.Trigger className="collapsible-trigger border-0">
<span className="text-primary-700 pr-4">
{intl.formatMessage(messages.sortFilterStatus, {
own: filterSelfPosts,
own: false,
type: currentFilters.postType,
sort: currentSorting,
status: currentFilters.status,
@@ -270,12 +269,7 @@ function PostFilterBar({
}
PostFilterBar.propTypes = {
filterSelfPosts: PropTypes.bool,
intl: intlShape.isRequired,
};
PostFilterBar.defaultProps = {
filterSelfPosts: false,
};
export default injectIntl(PostFilterBar);

View File

@@ -21,9 +21,9 @@ const messages = defineMessages({
defaultMessage: 'Course Structure',
description: 'Option in dropdown to sort topics by course structure',
},
findATopic: {
searchTopics: {
id: 'discussions.topics.find.label',
defaultMessage: 'Find a topic',
defaultMessage: 'Search topics',
description: 'Placeholder text in search bar',
},
archivedTopics: {

View File

@@ -14,7 +14,7 @@ function TopicSearchBar({ intl }) {
<div className="d-flex flex-row p-1 align-items-center">
<SearchField
className="flex-fill m-1 border-0"
placeholder={intl.formatMessage(messages.findATopic)}
placeholder={intl.formatMessage(messages.searchTopics)}
onSubmit={(query) => dispatch(setFilter(query))}
onChange={(query) => dispatch(setFilter(query))}
/>