aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
authorZero~Informatique2020-02-27 19:20:51 +0100
committerZero~Informatique2020-02-27 19:20:51 +0100
commit27a7bebc32a527cc86857008b491b9571e807183 (patch)
treef1fe3ccefe2b49bbb80e4351aede83b834503b58 /viewer
parent5c88a08ee28ea37054144c336b14e55ab957f844 (diff)
downloadldgallery-27a7bebc32a527cc86857008b491b9571e807183.tar.gz
viewer: added a count of results found in other folders when no-results are found
Using list formatting for the no-result translation, instead of string concatenation
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/locales/en.json6
-rw-r--r--viewer/src/views/GallerySearch.vue3
2 files changed, 5 insertions, 4 deletions
diff --git a/viewer/src/locales/en.json b/viewer/src/locales/en.json
index 81ddd1e..58adcd2 100644
--- a/viewer/src/locales/en.json
+++ b/viewer/src/locales/en.json
@@ -2,6 +2,7 @@
2 "tagInput.placeholder": "Filters", 2 "tagInput.placeholder": "Filters",
3 "tagInput.nomatch": "No match", 3 "tagInput.nomatch": "No match",
4 "search.no-results": "No results", 4 "search.no-results": "No results",
5 "search.no-results.otherfolders": "No results • {0} result{1} in other folders",
5 "panelLeft.propositions": "Related filters", 6 "panelLeft.propositions": "Related filters",
6 "tag-propositions.substraction": "Exclude items with this tag", 7 "tag-propositions.substraction": "Exclude items with this tag",
7 "tag-propositions.addition": "Include all items with this tag", 8 "tag-propositions.addition": "Include all items with this tag",
@@ -13,6 +14,5 @@
13 "command.search.search": "Search", 14 "command.search.search": "Search",
14 "command.back": "Go back", 15 "command.back": "Go back",
15 "command.parent": "Go to parent directory", 16 "command.parent": "Go to parent directory",
16 "directory.no-results": "Empty directory", 17 "directory.no-results": "Empty directory"
17 "search.no-results.otherfolders": "result(s) in other folders" 18}
18} \ No newline at end of file
diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue
index 9f2ac17..d638df2 100644
--- a/viewer/src/views/GallerySearch.vue
+++ b/viewer/src/views/GallerySearch.vue
@@ -49,7 +49,8 @@ export default class GalleryPicture extends Vue {
49 } 49 }
50 50
51 noResult() { 51 noResult() {
52 return `${this.$t("search.no-results")} • ${this.otherCount} ${this.$t("search.no-results.otherfolders")}`; 52 const params = [this.otherCount, this.otherCount > 1 ? "s" : ""];
53 return this.$t("search.no-results.otherfolders", params);
53 } 54 }
54} 55}
55</script> 56</script>