Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hardcoded copy in advanced search input #7675

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 8 additions & 25 deletions packages/client/src/i18n/messages/views/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,9 @@
*
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
import { defineMessages, MessageDescriptor } from 'react-intl'
import { defineMessages } from 'react-intl'

interface ISearchMessages
extends Record<string | number | symbol, MessageDescriptor> {
dataTableResults: MessageDescriptor
dataTableNoResults: MessageDescriptor
listItemEventRegistrationNumber: MessageDescriptor
informantContact: MessageDescriptor
searchingFor: MessageDescriptor
searchResultFor: MessageDescriptor
noResultFor: MessageDescriptor
totalResultText: MessageDescriptor
locationNotFound: MessageDescriptor
bookmarkAdvancedSearchModalTitle: MessageDescriptor
bookmarkAdvancedSearchModalBody: MessageDescriptor
removeBookmarkAdvancedSearchModalTitle: MessageDescriptor
removeBookmarkAdvancedSearchModalBody: MessageDescriptor
advancedSearchBookmarkSuccessNotification: MessageDescriptor
removedAdvancedSearchBookmarkSuccessNotification: MessageDescriptor
advancedSearchBookmarkErrorNotification: MessageDescriptor
advancedSearchBookmarkLoadingNotification: MessageDescriptor
removeAdvancedSearchBookmarkLoadingNotification: MessageDescriptor
}

const messagesToDefine: ISearchMessages = {
const messagesToDefine = {
dataTableResults: {
id: 'search.results',
defaultMessage: 'Results',
Expand Down Expand Up @@ -61,6 +39,11 @@ const messagesToDefine: ISearchMessages = {
defaultMessage: 'Searching for “{param}”',
description: 'The searching for text'
},
placeholder: {
id: 'search.placeholder',
defaultMessage: 'Name of query',
description: 'Placeholder text of search input'
},
searchResultFor: {
id: 'search.searchResultFor',
defaultMessage: 'Search results for ”{param}”',
Expand Down Expand Up @@ -138,4 +121,4 @@ const messagesToDefine: ISearchMessages = {
}
}

export const messages: ISearchMessages = defineMessages(messagesToDefine)
export const messages = defineMessages(messagesToDefine)
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function BookmarkAdvancedSearchModal({
<TextInput
id="queryName"
type="text"
placeholder="Name of query"
placeholder={intl.formatMessage(messagesSearch.placeholder)}
touched={true}
error={false}
value={queryName}
Expand Down
Loading