use translations in SearchResults component

This commit is contained in:
Alina Beck 2020-03-23 17:14:41 +01:00
parent a796efb54e
commit 150442db01
3 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<section :class="['results', activeTab === 'User' && '--user', !activeResources.length && '--empty']">
<hc-empty v-if="!activeResources.length"
icon="tasks"
:message="`No results found for '${search}'. Try a different search term!`"
:message="$t('search.no-results', { search })"
/>
<masonry-grid v-else-if="activeTab === 'Post'">
<masonry-grid-item v-for="resource in activeResources" :key="resource.key">
@ -62,12 +62,12 @@ export default {
return [
{
type: 'Post',
title: `${this.posts.length} Posts`,
title: `${this.posts.length} ${this.$t('search.heading.Post')}`,
disabled: !this.posts.length,
},
{
type: 'User',
title: `${this.users.length} Users`,
title: `${this.users.length} ${this.$t('search.heading.User')}`,
disabled: !this.users.length,
},
]
@ -120,7 +120,7 @@ export default {
width: 100%;
max-width: 600px;
background-color: transparent;
border: 1px solid $color-neutral-80;
border: $border-size-base solid $color-neutral-80;
}
}

View File

@ -602,6 +602,7 @@
"User": "Benutzer"
},
"hint": "Wonach suchst Du?",
"no-results": "Keine Ergebnisse für \"{search}\" gefunden. Versuch' es mit einem anderen Begriff!",
"placeholder": "Suchen"
},
"settings": {

View File

@ -602,6 +602,7 @@
"User": "Users"
},
"hint": "What are you searching for?",
"no-results": "No results found for \"{search}\". Try a different search term!",
"placeholder": "Search"
},
"settings": {