Skip to content

Commit

Permalink
🎨 Add en search placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Nov 27, 2024
1 parent 8171451 commit 6820f5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/components/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,14 @@ export default {
200
),
getRandomPlaceholder() {
const shuffled = [...SEARCH_SUGGESTIONS].sort(() => Math.random() - 0.5);
const randomTerms = shuffled.slice(0, 3);
return randomTerms.join('');
if (this.$i18n.locale === 'zh-Hant') {
const shuffled = [...SEARCH_SUGGESTIONS].sort(
() => Math.random() - 0.5
);
const randomTerms = shuffled.slice(0, 3);
return randomTerms.join('');
}
return this.$t('gutenberg_search_placeholder');
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
"listing_page_QA_label": "What is the difference between ebooks and paperbacks?",
"listing_page_QA_title": "FAQ",
"listing_page_search": "Search",
"listing_page_search_label": "book title or author",
"listing_page_search_label": "Book title or Author",
"listing_page_search_not_found": "Please try different keywords.",
"listing_page_search_recommend": "Or explore our recommended books:",
"listing_page_search_result": "The search results for '{query}':",
Expand Down

0 comments on commit 6820f5e

Please sign in to comment.