Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:globe_with_meridians: Adds en translations for Home and Search components

Alicia Sykese02d33b0dfdd
diff --git a/src/assets/locales/en-GB.json b/src/assets/locales/en-GB.json
index 0288acea..35e86637 100644
--- a/src/assets/locales/en-GB.json
+++ b/src/assets/locales/en-GB.json
@@ -1,4 +1,11 @@
{
- "test": "Hello World!",
- "test2": "Im a fallback"
+ "home": {
+ "no-results": "No Search Results",
+ "no-data": "No Data Configured"
+ },
+ "search": {
+ "search-label": "Search",
+ "search-placeholder": "Start typing to filter",
+ "clear-search-tooltip": "Clear Search"
+ }
}
\ No newline at end of file
diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vue
index 160edbc3..a78976c6 100644
--- a/src/components/Settings/SearchBar.vue
+++ b/src/components/Settings/SearchBar.vue
@@ -1,16 +1,16 @@
<template>
<form>
- <label for="filter-tiles">Search</label>
+ <label for="filter-tiles">{{ $t('search.search-label') }}</label>
<input
id="filter-tiles"
v-model="input"
ref="filter"
- placeholder="Start typing to filter..."
+ :placeholder="$t('search.search-placeholder')"
v-on:input="userIsTypingSomething"
@keydown.esc="clearFilterInput" />
<i v-if="input.length > 0"
class="clear-search"
- title="Clear search"
+ :title="$t('search.clear-search-tooltip')"
@click="clearFilterInput">x</i>
</form>
</template>
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 4bd0494b..53425eed 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -34,7 +34,7 @@
</div>
<!-- Show message when there's no data to show -->
<div v-if="checkIfResults()" class="no-data">
- {{searchValue ? 'No Search Results' : 'No Data Configured'}}
+ {{searchValue ? $t('home.no-results') : $t('home.no-data')}}
</div>
</div>
</template>