aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-03-28 15:28:49 +0100
committerGitHub <noreply@github.com>2024-03-28 15:28:49 +0100
commite317ebdbad52467d8a23841cf35bf555af516ebd (patch)
tree36a6708a30c1700407eca3f98776d039ae9034e6 /apps
parent9503ec4949fd4c290a642d0e5a625d488b33d4f0 (diff)
parent83088aa3a0c2b4b13229486d51faa65dc4d1cfe5 (diff)
downloadnextcloud-server-e317ebdbad52467d8a23841cf35bf555af516ebd.tar.gz
nextcloud-server-e317ebdbad52467d8a23841cf35bf555af516ebd.zip
Merge pull request #44526 from nextcloud/bugfix/43947/delete-file-not-translated
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/actions/deleteAction.ts20
1 files changed, 16 insertions, 4 deletions
diff --git a/apps/files/src/actions/deleteAction.ts b/apps/files/src/actions/deleteAction.ts
index 2c368a7e001..c46de9c652e 100644
--- a/apps/files/src/actions/deleteAction.ts
+++ b/apps/files/src/actions/deleteAction.ts
@@ -79,7 +79,10 @@ const displayName = (nodes: Node[], view: View) => {
* share, we can only unshare them.
*/
if (canUnshareOnly(nodes)) {
- return n('files', 'Leave this share', 'Leave these shares', nodes.length)
+ if (nodes.length === 1) {
+ return t('files', 'Leave this share')
+ }
+ return t('files', 'Leave these shares')
}
/**
@@ -87,21 +90,30 @@ const displayName = (nodes: Node[], view: View) => {
* external storage, we can only disconnect it.
*/
if (canDisconnectOnly(nodes)) {
- return n('files', 'Disconnect storage', 'Disconnect storages', nodes.length)
+ if (nodes.length === 1) {
+ return t('files', 'Disconnect storage')
+ }
+ return t('files', 'Disconnect storages')
}
/**
* If we're only selecting files, use proper wording
*/
if (isAllFiles(nodes)) {
- return n('files', 'Delete file', 'Delete files', nodes.length)
+ if (nodes.length === 1) {
+ return t('files', 'Delete file')
+ }
+ return t('files', 'Delete files')
}
/**
* If we're only selecting folders, use proper wording
*/
if (isAllFolders(nodes)) {
- return n('files', 'Delete folder', 'Delete folders', nodes.length)
+ if (nodes.length === 1) {
+ return t('files', 'Delete folder')
+ }
+ return t('files', 'Delete folders')
}
return t('files', 'Delete')