fix(files_sharing): Add one string for every share type to not assume any language

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/42185/head
Ferdinand Thiessen 2 years ago
parent d6ac1b9531
commit e35f6d89a2
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 34
      apps/files_sharing/src/views/SharingDetailsTab.vue

@ -305,24 +305,24 @@ export default {
computed: { computed: {
title() { title() {
let title = t('files_sharing', 'Share with ') switch (this.share.type) {
if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_USER) { case this.SHARE_TYPES.SHARE_TYPE_USER:
title = title + this.share.shareWithDisplayName return t('files_sharing', 'Share with {userName}', { userName: this.share.shareWithDisplayName })
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_LINK) { case this.SHARE_TYPES.SHARE_TYPE_LINK:
title = t('files_sharing', 'Share link') return t('files_sharing', 'Share link')
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_GROUP) { case this.SHARE_TYPES.SHARE_TYPE_GROUP:
title += ` (${t('files_sharing', 'group')})` return t('files_sharing', 'Share with group')
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_ROOM) { case this.SHARE_TYPES.SHARE_TYPE_ROOM:
title += ` (${t('files_sharing', 'conversation')})` return t('files_sharing', 'Share in conversation')
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE) { case this.SHARE_TYPES.SHARE_TYPE_REMOTE:
title += ` (${t('files_sharing', 'remote')})` return t('files_sharing', 'Share with remote')
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP) { case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:
title += ` (${t('files_sharing', 'remote group')})` return t('files_sharing', 'Share with remote group')
} else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_GUEST) { case this.SHARE_TYPES.SHARE_TYPE_GUEST:
title += ` (${t('files_sharing', 'guest')})` return t('files_sharing', 'Share with guest')
default:
return t('files_sharing', 'Share with')
} }
return title
}, },
/** /**
* Can the sharee edit the shared file ? * Can the sharee edit the shared file ?

Loading…
Cancel
Save