mirror of
https://github.com/nextcloud/server.git
synced 2026-06-07 15:53:04 -04:00
fix(files): Fix translation of "Delete file"
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
0e290ca9a2
commit
e08d77d778
1 changed files with 16 additions and 4 deletions
|
|
@ -80,7 +80,10 @@ export const action = new FileAction({
|
|||
* 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')
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,21 +91,30 @@ export const action = new FileAction({
|
|||
* 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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue