From 6dccdd0ae10f044fa069fd591a19998b2f408cce Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 6 Oct 2023 14:55:13 -0400 Subject: [PATCH 1/2] Show results counts for mobile preprint/registry discover page --- lib/osf-components/addon/components/search-page/component.ts | 2 +- lib/osf-components/addon/components/search-page/styles.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/search-page/component.ts b/lib/osf-components/addon/components/search-page/component.ts index 59e37fa09ed..599ad7be219 100644 --- a/lib/osf-components/addon/components/search-page/component.ts +++ b/lib/osf-components/addon/components/search-page/component.ts @@ -149,7 +149,7 @@ export default class SearchPage extends Component { } get showResultCountLeft() { - return this.totalResultCount && this.args.showResourceTypeFilter; + return this.totalResultCount && (this.args.showResourceTypeFilter || this.showSidePanelToggle); } get selectedSortOption() { diff --git a/lib/osf-components/addon/components/search-page/styles.scss b/lib/osf-components/addon/components/search-page/styles.scss index 3bf1fbb862b..5cdee65cfc4 100644 --- a/lib/osf-components/addon/components/search-page/styles.scss +++ b/lib/osf-components/addon/components/search-page/styles.scss @@ -67,6 +67,11 @@ width: 195px; } } + + .search-count { + // override RegistriesStyle + font-size: 1.5em; + } } .search-main-mobile { From df96fdebcc29c77db13ce8e6dffed3d14842874f Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Fri, 6 Oct 2023 14:55:44 -0400 Subject: [PATCH 2/2] Grammar for result counts --- translations/en-us.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.yml b/translations/en-us.yml index 43e0a9ede47..99c02c3ec78 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -233,7 +233,7 @@ search: textbox-placeholder: 'Enter search term(s) here' search-button-label: 'Search' search-help-label: 'Help tutorial' - total-results: '{count} results' + total-results: '{count} {count, plural, one {result} other {results} }' no-results: 'No results found' resource-type: search-by: 'Search by object type'