Skip to content

Commit

Permalink
Update filter's aria-label within translations
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound committed May 28, 2024
1 parent 3265d2a commit 958a8aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/VHeader/VFilterButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/locales/scripts/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/plugins/vue-i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 958a8aa

Please sign in to comment.