@@ -14,9 +14,9 @@ import { FilePickerClosed, getFilePickerBuilder, openConflictPicker, showError,
1414import { emit } from '@nextcloud/event-bus'
1515import { FileType , getUniqueName , NodeStatus , Permission } from '@nextcloud/files'
1616import { defaultRootPath , getClient , getDefaultPropfind , resultToNode } from '@nextcloud/files/dav'
17- import { t } from '@nextcloud/l10n'
17+ import { n , t } from '@nextcloud/l10n'
18+ import { basename , join } from '@nextcloud/paths'
1819import { getConflicts } from '@nextcloud/upload'
19- import { basename , join } from 'path'
2020import Vue from 'vue'
2121import { getContents } from '../services/Files.ts'
2222import { logger } from '../utils/logger.ts'
@@ -156,7 +156,11 @@ export async function* handleCopyMoveNodesTo(nodes: INode[], destination: IFolde
156156 }
157157 }
158158
159- const actionFinished = createLoadingNotification ( method , nodes . map ( ( node ) => node . basename ) , destination . path )
159+ const actionFinished = createLoadingNotification (
160+ method ,
161+ nodes . map ( ( node ) => node . displayname ) ,
162+ join ( destination . dirname , destination . displayname ) ,
163+ )
160164 const queue = getQueue ( )
161165 try {
162166 for ( const node of nodes ) {
@@ -246,11 +250,11 @@ function createLoadingNotification(mode: MoveCopyAction, sources: string[], dest
246250 const text = mode === MoveCopyAction . MOVE
247251 ? ( sources . length === 1
248252 ? t ( 'files' , 'Moving "{source}" to "{destination}" …' , { source : sources [ 0 ] ! , destination } )
249- : t ( 'files' , 'Moving {count} files to "{destination}" …' , { count : sources . length , destination } )
253+ : n ( 'files' , 'Moving %n file to "{destination}" …' , 'Moving %n files to "{destination}" …', sources . length , { destination } )
250254 )
251255 : ( sources . length === 1
252256 ? t ( 'files' , 'Copying "{source}" to "{destination}" …' , { source : sources [ 0 ] ! , destination } )
253- : t ( 'files' , 'Copying {count} files to "{destination}" …' , { count : sources . length , destination } )
257+ : n ( 'files' , 'Copying %n file to "{destination}" …' , 'Copying %n files to "{destination}" …', sources . length , { destination } )
254258 )
255259
256260 const toast = showLoading ( text )
@@ -324,7 +328,7 @@ async function openFilePickerForAction(
324328
325329 if ( action === MoveCopyAction . MOVE || action === MoveCopyAction . MOVE_OR_COPY ) {
326330 buttons . push ( {
327- label : target ? t ( 'files' , 'Move to {target}' , { target } , undefined , { escape : false , sanitize : false } ) : t ( 'files' , 'Move' ) ,
331+ label : target ? t ( 'files' , 'Move to {target}' , { target } , { escape : false , sanitize : false } ) : t ( 'files' , 'Move' ) ,
328332 variant : action === MoveCopyAction . MOVE ? 'primary' : 'secondary' ,
329333 icon : FolderMoveSvg ,
330334 async callback ( destination ) {
0 commit comments