From 958a8aa4d44aaa72c368a3d652c5a20381d3c06b Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Mon, 27 May 2024 17:17:50 -0700 Subject: [PATCH] Update filter's aria-label within translations --- frontend/src/components/VHeader/VFilterButton.vue | 4 ++-- frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue | 2 +- frontend/src/locales/scripts/en.json5 | 4 ++-- frontend/src/plugins/vue-i18n.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/VHeader/VFilterButton.vue b/frontend/src/components/VHeader/VFilterButton.vue index e2fce675cfe..e40a5c100e4 100644 --- a/frontend/src/components/VHeader/VFilterButton.vue +++ b/frontend/src/components/VHeader/VFilterButton.vue @@ -53,9 +53,9 @@ export default defineComponent({ const filterCount = computed(() => searchStore.appliedFilterCount) const filtersAreApplied = computed(() => filterCount.value > 0) - const textLabel = computed(() => i18n.t("header.filterButton.simple")) + const textLabel = computed(() => i18n.t("header.filters.simple")) const ariaLabel = computed(() => - i18n.tc("header.filterButton.withCount", filterCount.value) + i18n.tc("header.filters.withCount", filterCount.value) ) return { diff --git a/frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue b/frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue index 99abc7d3e8e..eb9bda1d719 100644 --- a/frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue +++ b/frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue @@ -24,7 +24,7 @@ export default defineComponent({ setup(props) { const i18n = useI18n() const ariaLabel = computed(() => - i18n.tc("header.filterButton.withCount", props.appliedFilterCount) + i18n.tc("header.filters.withCount", props.appliedFilterCount) ) return { ariaLabel } }, diff --git a/frontend/src/locales/scripts/en.json5 b/frontend/src/locales/scripts/en.json5 index 7722656bb80..4ac0698a1a1 100644 --- a/frontend/src/locales/scripts/en.json5 +++ b/frontend/src/locales/scripts/en.json5 @@ -50,9 +50,9 @@ aboutTab: "About", resourcesTab: "Resources", loading: "Loading...", - filterButton: { + filters: { simple: "Filters", - withCount: "{count} Filter|{count} Filters", + withCount: "Filter ({count})|Filters ({count})", }, seeResults: "See results", backButton: "Go back", diff --git a/frontend/src/plugins/vue-i18n.ts b/frontend/src/plugins/vue-i18n.ts index 0506e927ef4..d13d6506acf 100644 --- a/frontend/src/plugins/vue-i18n.ts +++ b/frontend/src/plugins/vue-i18n.ts @@ -6,7 +6,7 @@ export default () => { silentFallbackWarn: true, pluralizationRules: { /** - * @param choice - a choice index given by the input to $tc: $tc('header.filterButton.withCount', choiceIndex) + * @param choice - a choice index given by the input to $tc: $tc('header.filters.withCount', choiceIndex) * @param choicesLength - an overall amount of available choices * @returns a final choice index to select plural word by */