aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-16 18:01:55 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-07-18 19:47:11 +0200
commit018e4c001de391484d7c0433cc092b0fbd8866c2 (patch)
treed9f341704807612f973d85962a131cc13150463b /apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue
parent365b647b60d9380bbbd88fb00984b294db9062c2 (diff)
downloadnextcloud-server-018e4c001de391484d7c0433cc092b0fbd8866c2.tar.gz
nextcloud-server-018e4c001de391484d7c0433cc092b0fbd8866c2.zip
fix(files_sharing): file request use l10n `t` and `n` aliases
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue')
-rw-r--r--apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue19
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue b/apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue
index 19753b8e6e2..243ae9a584c 100644
--- a/apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue
+++ b/apps/files_sharing/src/components/NewFileRequestDialog/NewFileRequestDialogFinish.vue
@@ -61,7 +61,7 @@ import Share from '../../models/Share'
import { defineComponent } from 'vue'
import { generateUrl, getBaseUrl } from '@nextcloud/router'
import { showError, showSuccess } from '@nextcloud/dialogs'
-import { translate, translatePlural } from '@nextcloud/l10n'
+import { n, t } from '@nextcloud/l10n'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
@@ -104,8 +104,7 @@ export default defineComponent({
setup() {
return {
- n: translatePlural,
- t: translate,
+ n, t,
}
},
@@ -131,13 +130,13 @@ export default defineComponent({
if (!navigator.clipboard) {
// Clipboard API not available
- window.prompt(this.t('files_sharing', 'Automatically copying failed, please copy the share link manually'), this.shareLink)
+ window.prompt(t('files_sharing', 'Automatically copying failed, please copy the share link manually'), this.shareLink)
return
}
await navigator.clipboard.writeText(this.shareLink)
- showSuccess(this.t('files_sharing', 'Link copied to clipboard'))
+ showSuccess(t('files_sharing', 'Link copied to clipboard'))
this.isCopied = true
event.target?.select?.()
@@ -155,13 +154,13 @@ export default defineComponent({
// The email is already in the list
if (this.emails.includes(this.email.trim())) {
- e.target.setCustomValidity(this.t('files_sharing', 'Email already added'))
+ e.target.setCustomValidity(t('files_sharing', 'Email already added'))
e.target.reportValidity()
return
}
if (!this.isValidEmail(this.email.trim())) {
- e.target.setCustomValidity(this.t('files_sharing', 'Invalid email address'))
+ e.target.setCustomValidity(t('files_sharing', 'Invalid email address'))
e.target.reportValidity()
return
}
@@ -188,16 +187,16 @@ export default defineComponent({
// Warn about invalid emails
if (invalidEmails.length > 0) {
- showError(this.n('files_sharing', 'The following email address is not valid: {emails}', 'The following email addresses are not valid: {emails}', invalidEmails.length, { emails: invalidEmails.join(', ') }))
+ showError(n('files_sharing', 'The following email address is not valid: {emails}', 'The following email addresses are not valid: {emails}', invalidEmails.length, { emails: invalidEmails.join(', ') }))
}
// Warn about duplicate emails
if (duplicateEmails.length > 0) {
- showError(this.n('files_sharing', '1 email address already added', '{count} email addresses already added', duplicateEmails.length, { count: duplicateEmails.length }))
+ showError(n('files_sharing', '1 email address already added', '{count} email addresses already added', duplicateEmails.length, { count: duplicateEmails.length }))
}
if (validEmails.length > 0) {
- showSuccess(this.n('files_sharing', '1 email address added', '{count} email addresses added', validEmails.length, { count: validEmails.length }))
+ showSuccess(n('files_sharing', '1 email address added', '{count} email addresses added', validEmails.length, { count: validEmails.length }))
}
this.email = ''