Skip to content

Commit

Permalink
Clarify what we filter by
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Mar 7, 2024
1 parent 65056ac commit 567b8a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Catalogs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ViewButtons class="mr-2" v-model="view" />
<SortButtons v-if="isComplete && catalogs.length > 1" v-model="sort" />
</header>
<SearchBox v-if="isComplete && catalogs.length > 1" class="mt-1 mb-1" v-model="searchTerm" :placeholder="$t('catalogs.filterByTitle')" />
<SearchBox v-if="isComplete && catalogs.length > 1" class="mt-1 mb-1" v-model="searchTerm" :placeholder="filterPlaceholder" />
<Pagination ref="topPagination" v-if="showPagination" :pagination="pagination" placement="top" @paginate="paginate" />
<b-alert v-if="searchTerm && catalogView.length === 0" variant="warning" show>{{ $t('catalogs.noMatches') }}</b-alert>
<section class="list">
Expand Down Expand Up @@ -102,6 +102,9 @@ export default {
isComplete() {
return !this.hasMore && !this.showPagination;
},
filterPlaceholder() {
return this.isComplete ? this.$t('catalogs.filterByTitle') : this.$t('catalogs.filterByTitleAndMore');
},
showPagination() {
// Check whether any pagination links are available
return Object.values(this.pagination).some(link => !!link);
Expand Down
1 change: 1 addition & 0 deletions src/locales/de/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"catalogs": {
"filterByTitle": "Kataloge anhand des Titels filtern",
"filterByTitleAndMore": "Kataloge anhand von Titel, Beschreibung und Schlüsselwörtern filtern",
"loadMore": "Lade mehr...",
"noMatches": "Keiner der Kataloge entspricht den Suchkriterien."
},
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"catalogs": {
"filterByTitle": "Filter catalogs by title",
"filterByTitleAndMore": "Filter catalogs by title, description and keywords",
"loadMore": "Load more...",
"noMatches": "No catalogs match the given search criteria."
},
Expand Down

0 comments on commit 567b8a7

Please sign in to comment.