From 09624c0089f0e29ffb1abc578525b6a07fd95e81 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 3 May 2020 23:05:38 +0200 Subject: viewer/GallerySearch: use proper i18n pluralisation --- viewer/src/locales/en.json | 3 +-- viewer/src/views/GallerySearch.vue | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'viewer/src') diff --git a/viewer/src/locales/en.json b/viewer/src/locales/en.json index 9e0fd4b..e6c1df2 100644 --- a/viewer/src/locales/en.json +++ b/viewer/src/locales/en.json @@ -1,8 +1,7 @@ { "tagInput.placeholder": "Filters", "tagInput.nomatch": "No match", - "search.no-results": "No results", - "search.no-results.otherfolders": "No results • {0} result{1} in other folders", + "search.no-result-fmt": "No result
({0} match in other folders) | No result
({0} matches in other folders)", "panelLeft.propositions": "Related filters", "tag-propositions.substraction": "Exclude items with this tag", "tag-propositions.addition": "Include all items with this tag", diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue index e75a37e..dfaa5d3 100644 --- a/viewer/src/views/GallerySearch.vue +++ b/viewer/src/views/GallerySearch.vue @@ -29,8 +29,7 @@ import IndexSearch from "@/services/indexsearch"; @Component export default class GalleryPicture extends Vue { @Prop(String) readonly path!: string; - - otherCount: Number = 0; + otherCount: number = 0; mounted() { this.$uiStore.toggleFullscreen(false); @@ -50,8 +49,7 @@ export default class GalleryPicture extends Vue { } noResult() { - const params = [this.otherCount, this.otherCount > 1 ? "s" : ""]; - return this.$t("search.no-results.otherfolders", params); + return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]); } } -- cgit v1.2.3