From dcbf1190da26cc80310824661b04972f66bce478 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Mon, 31 May 2021 17:05:09 +0100 Subject: [PATCH] Change breadcrum hint pluralization & change span to p tag --- .../web-app-files/src/mixins/accessibleBreadcrumb.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/web-app-files/src/mixins/accessibleBreadcrumb.js b/packages/web-app-files/src/mixins/accessibleBreadcrumb.js index 3241ed0d7ab..9ea2d82e124 100644 --- a/packages/web-app-files/src/mixins/accessibleBreadcrumb.js +++ b/packages/web-app-files/src/mixins/accessibleBreadcrumb.js @@ -12,19 +12,21 @@ export default { ) const activeBreadcrumbItem = activeBreadcrumb.lastChild - const announcement = this.$gettextInterpolate( - 'containing %{filesCount} files and %{folderCount} folders', - { filesCount: this.activeFilesCount.files, folderCount: this.activeFilesCount.folders } + const itemCount = this.activeFilesCount.files + this.activeFilesCount.folders + const announcement = this.$ngettext( + 'This folder contains %{ itemCount } item.', + 'This folder contains %{ itemCount } items.', + itemCount ) const translatedHint = this.activeFilesCount.folders > 0 || this.activeFilesCount.files > 0 ? announcement - : this.$gettext('This folder has no content') + : this.$gettext('This folder has no content.') document.querySelectorAll('.oc-breadcrumb-sr').forEach(el => el.remove()) - const invisibleHint = document.createElement('span') + const invisibleHint = document.createElement('p') invisibleHint.className = 'oc-invisible-sr oc-breadcrumb-sr' invisibleHint.innerHTML = translatedHint