From: Joas Schilling Date: Thu, 28 Mar 2024 08:56:39 +0000 (+0100) Subject: fix(files): Fix translation of "Delete file" X-Git-Tag: v29.0.0rc2~12^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0b4a3b681e2cd54911f4825786df5db775f681a0;p=nextcloud-server.git fix(files): Fix translation of "Delete file" Signed-off-by: Joas Schilling --- 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')