Skip to content

Commit

Permalink
Fix #6022
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Mar 30, 2022
1 parent 1e7933c commit 96686c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-accessible-breadcrumb-itemcount
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Accessible breadcrumb itemcount

Our breadcrumbs announce the amount of resources inside a folder. Due to a bug the calculated number wasn't announced correctly, which we have resolved.

https://github.com/owncloud/web/pull/6351
https://github.com/owncloud/web/issues/6022
12 changes: 8 additions & 4 deletions packages/web-app-files/src/mixins/accessibleBreadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ export default {
}

const itemCount = this.totalFilesCount.files + this.totalFilesCount.folders
const announcement = this.$ngettext(
'This folder contains %{ itemCount } item.',
'This folder contains %{ itemCount } items.',
itemCount

const announcement = this.$gettextInterpolate(
this.$ngettext(
'This folder contains %{ amount } item.',
'This folder contains %{ amount } items.',
itemCount
),
{ amount: itemCount }
)

const translatedHint =
Expand Down

0 comments on commit 96686c9

Please sign in to comment.