Skip to content

Commit

Permalink
Merge pull request #7675 from opencrvs/fix-hardcoded-copy
Browse files Browse the repository at this point in the history
fix: hardcoded copy in advanced search input
  • Loading branch information
makelicious authored Sep 27, 2024
2 parents eff2fef + e541389 commit d367354
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
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

0 comments on commit d367354

Please sign in to comment.