diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index a7b5d3a1386..82d99ce6bfb 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -778,13 +778,12 @@ "search": { "label": "Search", "placeholder": { - "default": "Search our tutorials", - "numbered": "Search {{ roundedTotalRecords }}+ tutorials" + "default": "Search our news articles, tutorials, and books", + "numbered": "Search {{ roundedTotalRecords }}+ news articles, tutorials, and books" }, "see-results": "See all results for {{searchQuery}}", - "no-tutorials": "No tutorials found", "try": "Looking for something? Try the search bar on this page.", - "no-results": "We could not find anything relating to <0>{{query}}", + "no-results": "No results found", "result-list": "Search results" }, "misc": { diff --git a/client/src/components/search/searchBar/search-bar-footer.tsx b/client/src/components/search/searchBar/search-bar-footer.tsx index 190c663564a..be6d08b09d5 100644 --- a/client/src/components/search/searchBar/search-bar-footer.tsx +++ b/client/src/components/search/searchBar/search-bar-footer.tsx @@ -19,7 +19,7 @@ const SearchBarFooter = ({ onMouseLeave }: SearchBarFooterProps) => { const { t } = useTranslation(); - const title = t('search.no-tutorials'); + const title = t('search.no-results'); if (!query) { return null; diff --git a/client/tools/generate-search-placeholder.test.ts b/client/tools/generate-search-placeholder.test.ts index 527bd879a14..d5a6b9da4fd 100644 --- a/client/tools/generate-search-placeholder.test.ts +++ b/client/tools/generate-search-placeholder.test.ts @@ -142,7 +142,7 @@ describe('Search bar placeholder tests:', () => { if (clientLocale === 'english') { describe('Placeholder strings', () => { test('When the total number of hits is less than 100 the expected placeholder is generated', async () => { - const expected = 'Search our tutorials'; + const expected = 'Search our news articles, tutorials, and books'; const placeholderText = await generateSearchPlaceholder({ mockRecordsNum: 99, locale: 'english' @@ -156,7 +156,7 @@ describe('Search bar placeholder tests:', () => { mockRecordsNum: 100, locale: 'english' }); - const expected = 'Search 100+ tutorials'; + const expected = 'Search 100+ news articles, tutorials, and books'; expect(placeholderText).toEqual(expected); }); @@ -166,7 +166,7 @@ describe('Search bar placeholder tests:', () => { mockRecordsNum: 11000, locale: 'english' }); - const expected = 'Search 11,000+ tutorials'; + const expected = 'Search 11,000+ news articles, tutorials, and books'; expect(placeholderText).toEqual(expected); }); diff --git a/e2e/search-bar.spec.ts b/e2e/search-bar.spec.ts index 59b07590525..4a07826bf6c 100644 --- a/e2e/search-bar.spec.ts +++ b/e2e/search-bar.spec.ts @@ -139,7 +139,7 @@ test.describe('Search bar', () => { const resultList = page.getByRole('list', { name: 'Search results' }); await expect(resultList.getByRole('listitem')).toHaveCount(1); await expect(resultList.getByRole('listitem')).toHaveText( - 'No tutorials found' + 'No results found' ); });