diff options
Diffstat (limited to 'plugins/CopyEngine/Ultracopier-Spec')
117 files changed, 42315 insertions, 0 deletions
diff --git a/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h b/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h new file mode 100755 index 0000000..811bf86 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CallBackEventLoop.h @@ -0,0 +1,15 @@ +#ifndef CALLBACKEVENTLOOP_H +#define CALLBACKEVENTLOOP_H + +#include <QObject> +#include "Variable.h" + +#ifdef POSIXFILEMANIP +class CallBackEventLoop +{ +public: + virtual void callBack() = 0; +}; +#endif + +#endif // CALLBACKEVENTLOOP_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h b/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h new file mode 100755 index 0000000..84625b9 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CompilerInfo.h @@ -0,0 +1 @@ +#include "../../../CompilerInfo.h" diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp new file mode 100755 index 0000000..fcf43ff --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine-collision-and-error.cpp @@ -0,0 +1,719 @@ +/** \file copyEngine.cpp +\brief Define the copy engine +\author alpha_one_x86 */ + +#include "CopyEngine.h" +#include "FolderExistsDialog.h" +#include "DiskSpace.h" + +//dialog message +/// \note Can be call without queue because all call will be serialized +void CopyEngine::fileAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,TransferThreadAsync * thread) +{ + fileAlreadyExists(source,destination,isSame,thread); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFileSlot(INTERNALTYPEPATH fileInfo,std::string errorString,TransferThreadAsync * thread,const ErrorType &errorType) +{ + errorOnFile(fileInfo,errorString,thread,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::folderAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread) +{ + folderAlreadyExists(source,destination,isSame,thread); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFolderSlot(INTERNALTYPEPATH fileInfo,std::string errorString,ScanFileOrFolder * thread,ErrorType errorType) +{ + errorOnFolder(fileInfo,errorString,thread,errorType); +} + +//mkpath event +void CopyEngine::mkPathErrorOnFolderSlot(INTERNALTYPEPATH folder,std::string error,ErrorType errorType) +{ + mkPathErrorOnFolder(folder,error,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::fileAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,TransferThreadAsync * thread,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the action + if(isSame) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file is same: "+TransferThread::internalStringTostring(source)); + FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; + if(tempFileExistsAction==FileExists_Overwrite || tempFileExistsAction==FileExists_OverwriteIfNewer || tempFileExistsAction==FileExists_OverwriteIfNotSameMdate || tempFileExistsAction==FileExists_OverwriteIfOlder) + tempFileExistsAction=FileExists_NotSet; + switch(tempFileExistsAction) + { + case FileExists_Skip: + case FileExists_Rename: + thread->setFileExistsAction(tempFileExistsAction); + break; + default: + if(dialogIsOpen) + { + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=thread; + newItem.scan=NULL; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FileIsSameDialog dialog(uiinterface,source,firstRenamingRule,otherRenamingRule,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileExistsAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) + { + alwaysDoThisActionForFileExists=newAction; + listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + if(uiIsInstalled) + switch(newAction) + { + default: + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + } + } + if(dialog.getAlways() || newAction!=FileExists_Rename) + thread->setFileExistsAction(newAction); + else + thread->setFileRename(dialog.getNewName()); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file already exists: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + FileExistsAction tempFileExistsAction=alwaysDoThisActionForFileExists; + switch(tempFileExistsAction) + { + case FileExists_Skip: + case FileExists_Rename: + case FileExists_Overwrite: + case FileExists_OverwriteIfNewer: + case FileExists_OverwriteIfOlder: + case FileExists_OverwriteIfNotSameMdate: + case FileExists_OverwriteIfNotSameSize: + case FileExists_OverwriteIfNotSameSizeAndDate: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"always do this action: "+std::to_string(tempFileExistsAction)); + thread->setFileExistsAction(tempFileExistsAction); + break; + default: + if(dialogIsOpen) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"dialog open, put in queue: "+ + TransferThread::internalStringTostring(source)+" "+ + TransferThread::internalStringTostring(destination) + ); + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=thread; + newItem.scan=NULL; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FileExistsDialog dialog(uiinterface,source,destination,firstRenamingRule,otherRenamingRule,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileExistsAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileExists) + { + alwaysDoThisActionForFileExists=newAction; + listThread->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + if(uiIsInstalled) + switch(newAction) + { + default: + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_Overwrite: + ui->comboBoxFileCollision->setCurrentIndex(2); + break; + case FileExists_OverwriteIfNotSameMdate: + ui->comboBoxFileCollision->setCurrentIndex(3); + break; + case FileExists_OverwriteIfNewer: + ui->comboBoxFileCollision->setCurrentIndex(4); + break; + case FileExists_OverwriteIfOlder: + ui->comboBoxFileCollision->setCurrentIndex(5); + break; + case FileExists_OverwriteIfNotSameSize: + ui->comboBoxFileCollision->setCurrentIndex(7); + break; + case FileExists_OverwriteIfNotSameSizeAndDate: + ui->comboBoxFileCollision->setCurrentIndex(8); + break; + } + } + if(dialog.getAlways() || newAction!=FileExists_Rename) + thread->setFileExistsAction(newAction); + else + thread->setFileRename(dialog.getNewName()); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +void CopyEngine::haveNeedPutAtBottom(bool needPutAtBottom, const INTERNALTYPEPATH &fileInfo, const std::string &errorString,TransferThreadAsync *thread,const ErrorType &errorType) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!needPutAtBottom) + { + alwaysDoThisActionForFileError=FileError_NotSet; + if(uiIsInstalled) + ui->comboBoxFileError->setCurrentIndex(0); + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=thread; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + showOneNewDialog(); + } +} + +void CopyEngine::missingDiskSpace(std::vector<Diskspace> list) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + DiskSpace dialog(facilityEngine,list,uiinterface); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + bool ok=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"cancel: "+std::to_string(ok)); + if(!ok) + emit cancelAll(); + else + listThread->autoStartIfNeeded(); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::errorOnFile(INTERNALTYPEPATH fileInfo,std::string errorString,TransferThreadAsync * thread,const ErrorType &errorType,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(fileInfo)+ + ", error: "+errorString); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFileError; + switch(tempFileErrorAction) + { + case FileError_Skip: + thread->skip(); + return; + case FileError_Retry: + thread->retryAfterError(); + return; + case FileError_PutToEndOfTheList: + errorPutAtEnd++; + emit getNeedPutAtBottom(fileInfo,errorString,thread,errorType); + if(errorPutAtEnd>listThread->actionToDoListInode.size() || listThread->actionToDoListInode.size()==0) + { + alwaysDoThisActionForFileError=FileError_NotSet; + errorPutAtEnd=0; + } + return; + case FileError_Cancel: + return; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=thread; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + emit error(TransferThread::internalStringTostring(fileInfo),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,fileInfo,errorString,errorType,facilityEngine); + emit isInPause(true); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + emit isInPause(false); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + alwaysDoThisActionForFileError=newAction; + if(uiIsInstalled) + switch(newAction) + { + default: + case FileError_Skip: + ui->comboBoxFileError->setCurrentIndex(1); + break; + case FileError_PutToEndOfTheList: + ui->comboBoxFileError->setCurrentIndex(2); + break; + } + } + switch(newAction) + { + case FileError_Skip: + thread->skip(); + break; + case FileError_Retry: + thread->retryAfterError(); + break; + case FileError_PutToEndOfTheList: + errorPutAtEnd++; + thread->putAtBottom(); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"file error action wrong"); + break; + } + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"isCalledByShowOneNewDialog==true then not show other dial"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +/// \note Can be call without queue because all call will be serialized +void CopyEngine::folderAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"folder already exists: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the always action + FolderExistsAction tempFolderExistsAction=alwaysDoThisActionForFolderExists; + switch(tempFolderExistsAction) + { + case FolderExists_Skip: + case FolderExists_Rename: + case FolderExists_Merge: + thread->setFolderExistsAction(tempFolderExistsAction); + break; + default: + if(dialogIsOpen) + { + alreadyExistsQueueItem newItem; + newItem.source=source; + newItem.destination=destination; + newItem.isSame=isSame; + newItem.transfer=NULL; + newItem.scan=thread; + alreadyExistsQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + FolderExistsDialog dialog(uiinterface,source,isSame,destination,firstRenamingRule,otherRenamingRule); + dialog.exec();/// \bug crash when external close + FolderExistsAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FolderExists_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFolderExists) + setComboBoxFolderCollision(newAction); + if(!dialog.getAlways() && newAction==FolderExists_Rename) + thread->setFolderExistsAction(newAction,dialog.getNewName()); + else + thread->setFolderExistsAction(newAction); + dialogIsOpen=false; + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } +} + +/// \note Can be call without queue because all call will be serialized +/// \todo all this part +void CopyEngine::errorOnFolder(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(fileInfo)+", error: "+errorString); + if(thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to locate the thread"); + return; + } + //load the always action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; + switch(tempFileErrorAction) + { + case FileError_Skip: + case FileError_Retry: + case FileError_PutToEndOfTheList: + thread->setFolderErrorAction(tempFileErrorAction); + break; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=fileInfo; + newItem.mkPath=false; + newItem.rmPath=false; + newItem.scan=thread; + newItem.transfer=NULL; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + emit error(TransferThread::internalStringTostring(fileInfo),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,fileInfo,errorString,errorType,facilityEngine); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + setComboBoxFolderError(newAction); + alwaysDoThisActionForFolderError=newAction; + } + dialogIsOpen=false; + thread->setFolderErrorAction(newAction); + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +// ----------------------------------------------------- + +//mkpath event +void CopyEngine::mkPathErrorOnFolder(INTERNALTYPEPATH folder, std::string errorString, const ErrorType &errorType, bool isCalledByShowOneNewDialog) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"file have error: "+TransferThread::internalStringTostring(folder)+", error: "+errorString); + //load the always action + FileErrorAction tempFileErrorAction=alwaysDoThisActionForFolderError; + switch(tempFileErrorAction) + { + case FileError_Skip: + listThread->mkPathQueue.skip(); + return; + case FileError_Retry: + listThread->mkPathQueue.retry(); + return; + default: + if(dialogIsOpen) + { + errorQueueItem newItem; + newItem.errorString=errorString; + newItem.inode=folder; + newItem.mkPath=true; + newItem.rmPath=false; + newItem.scan=NULL; + newItem.transfer=NULL; + newItem.errorType=errorType; + errorQueue.push_back(newItem); + return; + } + dialogIsOpen=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"show dialog"); + + uint64_t size=0; + uint64_t mdate=0; + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(folder.c_str(),GetFileExInfoStandard,&sourceW)) + { + mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + } + #else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(folder).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(folder).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + mdate=source_statbuf.st_mtimespec.tv_sec; + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif + size=source_statbuf.st_size; + } + #endif + + emit error(TransferThread::internalStringTostring(folder),size,mdate,errorString); + FileErrorDialog dialog(uiinterface,folder,errorString,errorType,facilityEngine); + dialog.exec();/// \bug crash when external close + FileErrorAction newAction=dialog.getAction(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"close dialog: "+std::to_string(newAction)); + if(newAction==FileError_Cancel) + { + emit cancelAll(); + return; + } + if(dialog.getAlways() && newAction!=alwaysDoThisActionForFileError) + { + setComboBoxFolderError(newAction); + alwaysDoThisActionForFolderError=newAction; + } + dialogIsOpen=false; + switch(newAction) + { + case FileError_Skip: + listThread->mkPathQueue.skip(); + break; + case FileError_Retry: + listThread->mkPathQueue.retry(); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unknow switch case: "+std::to_string(newAction)); + break; + } + if(!isCalledByShowOneNewDialog) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit queryOneNewDialog()"); + emit queryOneNewDialog(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"NOT emit queryOneNewDialog(), !isCalledByShowOneNewDialog"); + return; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//show one new dialog if needed +void CopyEngine::showOneNewDialog() +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"alreadyExistsQueue.size(): "+std::to_string(alreadyExistsQueue.size())); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"errorQueue.size(): "+std::to_string(errorQueue.size())); + //reset to always show the dialog + dialogIsOpen=false; + int loop_size=alreadyExistsQueue.size(); + while(loop_size>0) + { + if(alreadyExistsQueue.front().transfer!=NULL) + { + fileAlreadyExists(alreadyExistsQueue.front().source, + alreadyExistsQueue.front().destination, + alreadyExistsQueue.front().isSame, + alreadyExistsQueue.front().transfer, + true); + } + else if(alreadyExistsQueue.front().scan!=NULL) + folderAlreadyExists(alreadyExistsQueue.front().source, + alreadyExistsQueue.front().destination, + alreadyExistsQueue.front().isSame, + alreadyExistsQueue.front().scan, + true); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); + alreadyExistsQueue.erase(alreadyExistsQueue.cbegin()); + loop_size--; + } + loop_size=errorQueue.size(); + while(errorQueue.size()>0 && loop_size>0) + { + if(errorQueue.front().transfer!=NULL) + errorOnFile(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().transfer,errorQueue.front().errorType,true); + else if(errorQueue.front().scan!=NULL) + errorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().scan,errorQueue.front().errorType,true); + else if(errorQueue.front().mkPath) + mkPathErrorOnFolder(errorQueue.front().inode,errorQueue.front().errorString,errorQueue.front().errorType,true); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"bug, no thread actived"); + errorQueue.erase(errorQueue.cbegin()); + loop_size--; + } + //no more to show then reset + dialogIsOpen=false; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp new file mode 100755 index 0000000..8ec21e1 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.cpp @@ -0,0 +1,1129 @@ +/** \file copyEngine.cpp +\brief Define the copy engine +\author alpha_one_x86 */ + +#include <QFileDialog> +#include <QMessageBox> +#include <cmath> + +#include "CopyEngine.h" +#include "FolderExistsDialog.h" +#include "../../../interface/PluginInterface_CopyEngine.h" + +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +CopyEngine::CopyEngine(FacilityInterface * facilityEngine) : + listThread(NULL), + tempWidget(NULL), + ui(new Ui::copyEngineOptions()), + uiIsInstalled(false), + uiinterface(NULL), + filters(NULL), + renamingRules(NULL), + facilityEngine(NULL), + doRightTransfer(false), + keepDate(false), + followTheStrictOrder(false), + deletePartiallyTransferredFiles(false), + inodeThreads(0), + renameTheOriginalDestination(false), + moveTheWholeFolder(false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + checkDestinationFolderExists(false), + mkFullPath(false), + checksum(false), + alwaysDoThisActionForFileExists(FileExistsAction::FileExists_NotSet), + alwaysDoThisActionForFileError(FileErrorAction::FileError_NotSet), + alwaysDoThisActionForFolderError(FileErrorAction::FileError_NotSet), + alwaysDoThisActionForFolderExists(FolderExistsAction::FolderExists_NotSet), + dialogIsOpen(false), + stopIt(false), + size_for_speed(0), + mode(Ultracopier::CopyMode::Copy), + forcedMode(false), + checkDiskSpace(false), + osBufferLimit(0), + errorPutAtEnd(0), + putAtBottom(0) +{ + listThread=new ListThread(facilityEngine); + this->facilityEngine = facilityEngine; + filters = NULL; + renamingRules = NULL; + + uiinterface = NULL; + tempWidget = NULL; + uiIsInstalled = false; + dialogIsOpen = false; + renameTheOriginalDestination = false; + alwaysDoThisActionForFileExists = FileExists_NotSet; + alwaysDoThisActionForFileError = FileError_NotSet; + checkDestinationFolderExists = false; + stopIt = false; + size_for_speed = 0; + putAtBottom = 0; + forcedMode = false; + followTheStrictOrder = false; + deletePartiallyTransferredFiles = true; + inodeThreads = 16; + moveTheWholeFolder = true; + + //implement the SingleShot in this class + //timerActionDone.setSingleShot(true); + timerActionDone.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST); + //timerProgression.setSingleShot(true); + timerProgression.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION); + + timerUpdateMount.setInterval(ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS); +} + +CopyEngine::~CopyEngine() +{ + /*if(filters!=NULL) + delete filters; + if(renamingRules!=NULL) + delete renamingRules; + destroyed by the widget parent, here the interface + */ + stopIt=true; + delete listThread; + delete ui; +} + +void CopyEngine::connectTheSignalsSlots() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + debugDialogWindow.show(); + debugDialogWindow.copyEngine=this; + #endif + if(!connect(listThread,&ListThread::isInPause, this,&CopyEngine::isInPause, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect isInPause()"); + if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::actionInProgess, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess()"); + if(!connect(listThread,&ListThread::actionInProgess, this,&CopyEngine::newActionInProgess, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect actionInProgess() to slot"); + if(!connect(listThread,&ListThread::newFolderListing, this,&CopyEngine::newFolderListing, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newFolderListing()"); + if(!connect(listThread,&ListThread::error, this,&CopyEngine::error, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect error()"); + if(!connect(listThread,&ListThread::rmPath, this,&CopyEngine::rmPath, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect rmPath()"); + if(!connect(listThread,&ListThread::mkPath, this,&CopyEngine::mkPath, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPath()"); + if(!connect(listThread,&ListThread::newActionOnList, this,&CopyEngine::newActionOnList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect newActionOnList()"); + if(!connect(listThread,&ListThread::doneTime, this,&CopyEngine::doneTime, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect doneTime()"); + if(!connect(listThread,&ListThread::pushFileProgression, this,&CopyEngine::pushFileProgression, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushFileProgression()"); + if(!connect(listThread,&ListThread::pushGeneralProgression, this,&CopyEngine::pushGeneralProgression, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect pushGeneralProgression()"); + if(!connect(listThread,&ListThread::syncReady, this,&CopyEngine::syncReady, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect syncReady()"); + if(!connect(listThread,&ListThread::canBeDeleted, this,&CopyEngine::canBeDeleted, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect canBeDeleted()"); + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(listThread,&ListThread::debugInformation, this,&CopyEngine::debugInformation, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect debugInformation()"); + #endif + + if(!connect(listThread,&ListThread::send_fileAlreadyExists, this,&CopyEngine::fileAlreadyExistsSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_fileAlreadyExists()"); + if(!connect(listThread,&ListThread::send_errorOnFile, this,&CopyEngine::errorOnFileSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFile()"); + if(!connect(listThread,&ListThread::send_folderAlreadyExists, this,&CopyEngine::folderAlreadyExistsSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_folderAlreadyExists()"); + if(!connect(listThread,&ListThread::send_errorOnFolder, this,&CopyEngine::errorOnFolderSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_errorOnFolder()"); + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(listThread,&ListThread::updateTheDebugInfo, this,&CopyEngine::updateTheDebugInfo, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect updateTheDebugInfo()"); + #endif + if(!connect(listThread,&ListThread::errorTransferList, this,&CopyEngine::errorTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorTransferList()"); + if(!connect(listThread,&ListThread::warningTransferList, this,&CopyEngine::warningTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect warningTransferList()"); + if(!connect(listThread,&ListThread::mkPathErrorOnFolder, this,&CopyEngine::mkPathErrorOnFolderSlot, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect mkPathErrorOnFolder()"); + if(!connect(listThread,&ListThread::send_realBytesTransfered, this,&CopyEngine::get_realBytesTransfered, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_realBytesTransfered()"); + + if(!connect(this,&CopyEngine::tryCancel, listThread,&ListThread::cancel, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect tryCancel()"); + if(!connect(this,&CopyEngine::getNeedPutAtBottom, listThread,&ListThread::getNeedPutAtBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect getNeedPutAtBottom()"); + if(!connect(listThread,&ListThread::haveNeedPutAtBottom, this,&CopyEngine::haveNeedPutAtBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect haveNeedPutAtBottom()"); + + + if(!connect(this,&CopyEngine::signal_pause, listThread,&ListThread::pause, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_pause()"); + if(!connect(this,&CopyEngine::signal_setSpeedLimitation, listThread,&ListThread::setSpeedLimitation, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setSpeedLimitation()"); + if(!connect(this,&CopyEngine::signal_exportErrorIntoTransferList,listThread,&ListThread::exportErrorIntoTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportErrorIntoTransferList()"); + if(!connect(this,&CopyEngine::signal_resume, listThread,&ListThread::resume, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_resume()"); + if(!connect(this,&CopyEngine::signal_skip, listThread,&ListThread::skip, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_skip()"); + if(!connect(this,&CopyEngine::signal_setCollisionAction, listThread,&ListThread::setAlwaysFileExistsAction, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setCollisionAction()"); + if(!connect(this,&CopyEngine::signal_setFolderCollision, listThread,&ListThread::setFolderCollision, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_setFolderCollision()"); + if(!connect(this,&CopyEngine::signal_removeItems, listThread,&ListThread::removeItems, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_removeItems()"); + if(!connect(this,&CopyEngine::signal_moveItemsOnTop, listThread,&ListThread::moveItemsOnTop, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnTop()"); + if(!connect(this,&CopyEngine::signal_moveItemsUp, listThread,&ListThread::moveItemsUp, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsUp()"); + if(!connect(this,&CopyEngine::signal_moveItemsDown, listThread,&ListThread::moveItemsDown, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsDown()"); + if(!connect(this,&CopyEngine::signal_moveItemsOnBottom, listThread,&ListThread::moveItemsOnBottom, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_moveItemsOnBottom()"); + if(!connect(this,&CopyEngine::signal_exportTransferList, listThread,&ListThread::exportTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_exportTransferList()"); + if(!connect(this,&CopyEngine::signal_importTransferList, listThread,&ListThread::importTransferList, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_importTransferList()"); + if(!connect(this,&CopyEngine::signal_forceMode, listThread,&ListThread::forceMode, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect signal_forceMode()"); + if(!connect(this,&CopyEngine::send_moveTheWholeFolder, listThread,&ListThread::setMoveTheWholeFolder, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect moveTheWholeFolder()"); + if(!connect(this,&CopyEngine::send_deletePartiallyTransferredFiles, listThread,&ListThread::setDeletePartiallyTransferredFiles, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect deletePartiallyTransferredFiles()"); + if(!connect(this,&CopyEngine::send_setRenameTheOriginalDestination, listThread,&ListThread::setRenameTheOriginalDestination, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setRenameTheOriginalDestination()"); + if(!connect(this,&CopyEngine::send_setInodeThreads, listThread,&ListThread::setInodeThreads, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect setInodeThreads()"); + if(!connect(this,&CopyEngine::send_followTheStrictOrder, listThread,&ListThread::setFollowTheStrictOrder, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect followTheStrictOrder()"); + if(!connect(this,&CopyEngine::send_setFilters,listThread,&ListThread::set_setFilters, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_setFilters()"); + if(!connect(this,&CopyEngine::send_sendNewRenamingRules,listThread,&ListThread::set_sendNewRenamingRules, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect send_sendNewRenamingRules()"); + if(!connect(&timerActionDone,&QTimer::timeout, listThread,&ListThread::sendActionDone)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerActionDone"); + if(!connect(&timerProgression,&QTimer::timeout, listThread,&ListThread::sendProgression)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); + if(!connect(listThread,&ListThread::missingDiskSpace, this,&CopyEngine::missingDiskSpace,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect timerProgression"); + + if(!connect(this,&CopyEngine::queryOneNewDialog,this,&CopyEngine::showOneNewDialog,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect queryOneNewDialog()"); + if(!connect(listThread,&ListThread::errorToRetry,this,&CopyEngine::errorToRetry,Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect errorToRetry()"); + + if(!connect(&timerUpdateMount,&QTimer::timeout,listThread,&ListThread::set_updateMount, Qt::QueuedConnection)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect set_updateMount()"); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +void CopyEngine::updateTheDebugInfo(const std::vector<std::string> &newList, const std::vector<std::string> &newList2, const int &numberOfInodeOperation) +{ + debugDialogWindow.setTransferThreadList(newList); + debugDialogWindow.setTransferList(newList2); + debugDialogWindow.setInodeUsage(numberOfInodeOperation); +} +#endif + +//to send the options panel +bool CopyEngine::getOptionsEngine(QWidget * tempWidget) +{ + this->tempWidget=tempWidget; + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + connect(tempWidget, &QWidget::destroyed, this, &CopyEngine::resetTempWidget); + + //here else, the default settings can't be loaded + uiIsInstalled=true; + + #ifdef ULTRACOPIER_PLUGIN_RSYNC + setRsync(rsync); + #else + ui->label_rsync->setVisible(false); + ui->rsync->setVisible(false); + #endif + setAutoStart(autoStart); + setCheckDestinationFolderExists(checkDestinationFolderExists); + setMkFullPath(mkFullPath); + setChecksum(checksum); + setRightTransfer(doRightTransfer); + setKeepDate(keepDate); + setOsSpecFlags(os_spec_flags); + setNativeCopy(native_copy); + setFollowTheStrictOrder(followTheStrictOrder); + setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + setInodeThreads(inodeThreads); + setRenameTheOriginalDestination(renameTheOriginalDestination); + setMoveTheWholeFolder(moveTheWholeFolder); + setCheckDiskSpace(checkDiskSpace); + setDefaultDestinationFolder(defaultDestinationFolder); + + switch(alwaysDoThisActionForFileExists) + { + case FileExists_NotSet: + ui->comboBoxFileCollision->setCurrentIndex(0); + break; + case FileExists_Skip: + ui->comboBoxFileCollision->setCurrentIndex(1); + break; + case FileExists_Overwrite: + ui->comboBoxFileCollision->setCurrentIndex(2); + break; + case FileExists_OverwriteIfNotSameMdate: + ui->comboBoxFileCollision->setCurrentIndex(3); + break; + case FileExists_OverwriteIfNewer: + ui->comboBoxFileCollision->setCurrentIndex(4); + break; + case FileExists_OverwriteIfOlder: + ui->comboBoxFileCollision->setCurrentIndex(5); + break; + case FileExists_Rename: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_OverwriteIfNotSameSize: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + case FileExists_OverwriteIfNotSameSizeAndDate: + ui->comboBoxFileCollision->setCurrentIndex(6); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFileCollision->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFileError) + { + case FileError_NotSet: + ui->comboBoxFileError->setCurrentIndex(0); + break; + case FileError_Skip: + ui->comboBoxFileError->setCurrentIndex(1); + break; + case FileError_PutToEndOfTheList: + ui->comboBoxFileError->setCurrentIndex(2); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFileError->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFolderExists) + { + case FolderExists_NotSet: + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + case FolderExists_Merge: + ui->comboBoxFolderCollision->setCurrentIndex(1); + break; + case FolderExists_Skip: + ui->comboBoxFolderCollision->setCurrentIndex(2); + break; + case FolderExists_Rename: + ui->comboBoxFolderCollision->setCurrentIndex(3); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + } + switch(alwaysDoThisActionForFolderError) + { + case FileError_NotSet: + ui->comboBoxFolderError->setCurrentIndex(0); + break; + case FileError_Skip: + ui->comboBoxFolderError->setCurrentIndex(1); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored: "+std::to_string(alwaysDoThisActionForFolderError)); + ui->comboBoxFolderError->setCurrentIndex(0); + break; + } + return true; +} + +//to have interface widget to do modal dialog +void CopyEngine::setInterfacePointer(QWidget * uiinterface) +{ + this->uiinterface=uiinterface; + if(filters==NULL) + filters=new Filters(tempWidget); + if(renamingRules==NULL) + renamingRules=new RenamingRules(tempWidget); + + if(uiIsInstalled) + { + connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngine::setAutoStart); + connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngine::setRightTransfer); + connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngine::setKeepDate); + connect(ui->os_spec_flags, &QCheckBox::toggled, this,&CopyEngine::setOsSpecFlags); + connect(ui->native_copy, &QCheckBox::toggled, this,&CopyEngine::setNativeCopy); + connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngine::setMoveTheWholeFolder); + connect(ui->deletePartiallyTransferredFiles, &QCheckBox::toggled, this,&CopyEngine::setDeletePartiallyTransferredFiles); + connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngine::setFollowTheStrictOrder); + connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngine::setCheckDestinationFolderExists); + connect(ui->mkpath, &QCheckBox::toggled, this,&CopyEngine::setMkFullPath); + connect(ui->checksum, &QCheckBox::toggled, this,&CopyEngine::setChecksum); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngine::setRsync); + #endif + connect(ui->renameTheOriginalDestination, &QCheckBox::toggled, this,&CopyEngine::setRenameTheOriginalDestination); + connect(filters, &Filters::haveNewFilters, this,&CopyEngine::sendNewFilters); + connect(ui->filters, &QPushButton::clicked, this,&CopyEngine::showFilterDialog); + connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngine::inodeThreadsFinished); + connect(ui->inodeThreads, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,&CopyEngine::setInodeThreads); + connect(ui->defaultDestinationFolderBrowse, &QPushButton::clicked, this,&CopyEngine::defaultDestinationFolderBrowse); + + connect(ui->comboBoxFolderError, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderError); + connect(ui->comboBoxFolderCollision, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngine::setFolderCollision); + connect(ui->comboBoxFileError, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileError); + connect(ui->comboBoxFileCollision, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngine::setFileCollision); + + if(!connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngine::sendNewRenamingRules)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect sendNewRenamingRules()"); + if(!connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngine::showRenamingRules)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to connect renamingRules.clicked()"); + } + + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + } + + renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +bool CopyEngine::haveSameSource(const std::vector<std::string> &sources) +{ + return listThread->haveSameSource(sources); +} + +bool CopyEngine::haveSameDestination(const std::string &destination) +{ + return listThread->haveSameDestination(destination); +} + +std::string CopyEngine::stringimplode(const std::vector<std::string>& elems, const std::string &delim) +{ + std::string newString; + for (std::vector<std::string>::const_iterator ii = elems.begin(); ii != elems.cend(); ++ii) + { + newString += (*ii); + if ( ii + 1 != elems.end() ) { + newString += delim; + } + } + return newString; +} + +bool CopyEngine::newCopy(const std::vector<std::string> &sources) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")); + if(forcedMode && mode!=Ultracopier::Copy) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + std::string destination; + if(!defaultDestinationFolder.empty() && QDir(QString::fromStdString(defaultDestinationFolder)).exists()) + destination = defaultDestinationFolder; + else + destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return false; + } + return listThread->newCopy(sources,destination); +} + +bool CopyEngine::newCopy(const std::vector<std::string> &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")+" "+destination); + if(forcedMode && mode!=Ultracopier::Copy) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to move, you can't copy with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to move, you can't copy with it")); + return false; + } + return listThread->newCopy(sources,destination); +} + +bool CopyEngine::newMove(const std::vector<std::string> &sources) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")); + if(forcedMode && mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + std::string destination; + if(!ui->defaultDestinationFolder->text().isEmpty() && QDir(ui->defaultDestinationFolder->text()).exists()) + destination = ui->defaultDestinationFolder->text().toStdString(); + else + destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return false; + } + return listThread->newMove(sources,destination); +} + +bool CopyEngine::newMove(const std::vector<std::string> &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,stringimplode(sources,", ")+" "+destination); + if(forcedMode && mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The engine is forced to copy, you can't move with it"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The engine is forced to copy, you can't move with it")); + return false; + } + return listThread->newMove(sources,destination); +} + +void CopyEngine::defaultDestinationFolderBrowse() +{ + std::string destination = askDestination(); + if(destination.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(uiIsInstalled) + ui->defaultDestinationFolder->setText(QString::fromStdString(destination)); +} + +std::string CopyEngine::askDestination() +{ + std::string destination = listThread->getUniqueDestinationFolder(); + if(!destination.empty()) + { + QMessageBox::StandardButton button=QMessageBox::question(uiinterface,tr("Destination"),tr("Use the actual destination \"%1\"?") + .arg(QString::fromStdString(destination)), + QMessageBox::Yes | QMessageBox::No,QMessageBox::Yes); + if(button==QMessageBox::Yes) + return destination; + } + destination=QFileDialog::getExistingDirectory(uiinterface,QString::fromStdString(facilityEngine->translateText("Select destination directory")),QStringLiteral(""),QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); + return destination; +} + +void CopyEngine::newTransferList(const std::string &file) +{ + emit signal_importTransferList(file); +} + +//because direct access to list thread into the main thread can't be do +uint64_t CopyEngine::realByteTransfered() +{ + return size_for_speed; +} + +//speed limitation +bool CopyEngine::supportSpeedLimitation() const +{ + return true; +} + +/** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ +void CopyEngine::syncTransferList() +{ + listThread->syncTransferList(); +} + +void CopyEngine::set_setFilters(std::vector<std::string> includeStrings,std::vector<std::string> includeOptions,std::vector<std::string> excludeStrings,std::vector<std::string> excludeOptions) +{ + if(filters==NULL) + filters=new Filters(); + if(filters!=NULL) + { + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + } + emit send_setFilters(filters->getInclude(),filters->getExclude()); + listThread->set_setFilters(filters->getInclude(),filters->getExclude()); + } + this->includeStrings=includeStrings; + this->includeOptions=includeOptions; + this->excludeStrings=excludeStrings; + this->excludeOptions=excludeOptions; +} + +void CopyEngine::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +bool CopyEngine::userAddFolder(const Ultracopier::CopyMode &mode) +{ + std::string source = QFileDialog::getExistingDirectory(uiinterface,QString::fromStdString(facilityEngine->translateText("Select source directory")), + QStringLiteral(""), + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString(); + if(source.empty() || source=="") + return false; + std::vector<std::string> sources; + sources.push_back(source); + if(mode==Ultracopier::Copy) + return newCopy(sources); + else + return newMove(sources); +} + +bool CopyEngine::userAddFile(const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QStringList sources = QFileDialog::getOpenFileNames( + uiinterface, + QString::fromStdString(facilityEngine->translateText("Select one or more files to open")), + QStringLiteral(""), + QString::fromStdString(facilityEngine->translateText("All files"))+QStringLiteral(" (*)")); + + std::vector<std::string> sourcesstd; + unsigned int index=0; + while(index<(unsigned int)sources.size()) + { + sourcesstd.push_back(sources.at(index).toStdString()); + index++; + } + + if(sourcesstd.empty()) + return false; + if(mode==Ultracopier::Copy) + return newCopy(sourcesstd); + else + return newMove(sourcesstd); +} + +void CopyEngine::pause() +{ + emit signal_pause(); +} + +void CopyEngine::resume() +{ + emit signal_resume(); +} + +void CopyEngine::skip(const uint64_t &id) +{ + emit signal_skip(id); +} + +void CopyEngine::cancel() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + stopIt=true; + timerProgression.stop(); + timerActionDone.stop(); + emit tryCancel(); +} + +void CopyEngine::removeItems(const std::vector<uint64_t> &ids) +{ + emit signal_removeItems(ids); +} + +void CopyEngine::moveItemsOnTop(const std::vector<uint64_t> &ids) +{ + emit signal_moveItemsOnTop(ids); +} + +void CopyEngine::moveItemsUp(const std::vector<uint64_t> &ids) +{ + emit signal_moveItemsUp(ids); +} + +void CopyEngine::moveItemsDown(const std::vector<uint64_t> &ids) +{ + emit signal_moveItemsDown(ids); +} + +void CopyEngine::moveItemsOnBottom(const std::vector<uint64_t> &ids) +{ + emit signal_moveItemsOnBottom(ids); +} + +/** \brief give the forced mode, to export/import transfer list */ +void CopyEngine::forceMode(const Ultracopier::CopyMode &mode) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + { + listThread->setRsync(false); + rsync=false; + } + if(uiIsInstalled) + ui->rsync->setEnabled(mode==Ultracopier::Copy); + #endif + if(forcedMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Mode forced previously"); + QMessageBox::critical(NULL,QString::fromStdString(facilityEngine->translateText("Internal error")),tr("The mode has been forced previously. This is an internal error, please report it")); + return; + } + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + rsync=false; + #endif + if(mode==Ultracopier::Copy) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(uiIsInstalled) + ui->rsync->setEnabled(mode==Ultracopier::Copy); + #endif + this->mode=mode; + forcedMode=true; + emit signal_forceMode(mode); +} + +void CopyEngine::exportTransferList() +{ + std::string fileName = QFileDialog::getSaveFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_exportTransferList(fileName); +} + +void CopyEngine::importTransferList() +{ + std::string fileName = QFileDialog::getOpenFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Open transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_importTransferList(fileName); +} + +void CopyEngine::warningTransferList(const std::string &warning) +{ + QMessageBox::warning(uiinterface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(warning)); +} + +void CopyEngine::errorTransferList(const std::string &error) +{ + QMessageBox::critical(uiinterface,QString::fromStdString(facilityEngine->translateText("Error")),QString::fromStdString(error)); +} + +bool CopyEngine::setSpeedLimitation(const int64_t &speedLimitation) +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed: "+std::to_string(speedLimitation)); + emit signal_setSpeedLimitation(speedLimitation); + return false; +} + +void CopyEngine::setFileCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFileCollision->currentIndex()) + ui->comboBoxFileCollision->setCurrentIndex(index); + switch(index) + { + case 0: + alwaysDoThisActionForFileExists=FileExists_NotSet; + break; + case 1: + alwaysDoThisActionForFileExists=FileExists_Skip; + break; + case 2: + alwaysDoThisActionForFileExists=FileExists_Overwrite; + break; + case 3: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfNotSameMdate; + break; + case 4: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfNewer; + break; + case 5: + alwaysDoThisActionForFileExists=FileExists_OverwriteIfOlder; + break; + case 6: + alwaysDoThisActionForFileExists=FileExists_Rename; + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + alwaysDoThisActionForFileExists=FileExists_NotSet; + break; + } + emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +void CopyEngine::setFileError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFileError->currentIndex()) + ui->comboBoxFileError->setCurrentIndex(index); + switch(index) + { + case 0: + alwaysDoThisActionForFileError=FileError_NotSet; + break; + case 1: + alwaysDoThisActionForFileError=FileError_Skip; + break; + case 2: + alwaysDoThisActionForFileError=FileError_PutToEndOfTheList; + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + alwaysDoThisActionForFileError=FileError_NotSet; + break; + } + //emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +void CopyEngine::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; + if(uiIsInstalled) + ui->doRightTransfer->setChecked(doRightTransfer); + listThread->setRightTransfer(doRightTransfer); +} + +//set keep date +void CopyEngine::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; + if(uiIsInstalled) + ui->keepDate->setChecked(keepDate); + listThread->setKeepDate(keepDate); +} + +void CopyEngine::setOsSpecFlags(const bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; + if(uiIsInstalled) + ui->os_spec_flags->setChecked(os_spec_flags); + listThread->setOsSpecFlags(os_spec_flags); +} + +void CopyEngine::setNativeCopy(const bool native_copy) +{ + this->native_copy=native_copy; + if(uiIsInstalled) + ui->native_copy->setChecked(native_copy); + listThread->setNativeCopy(native_copy); +} + +void CopyEngine::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + this->moveTheWholeFolder=moveTheWholeFolder; + if(uiIsInstalled) + ui->moveTheWholeFolder->setChecked(moveTheWholeFolder); + emit send_moveTheWholeFolder(moveTheWholeFolder); +} + +void CopyEngine::setFollowTheStrictOrder(const bool &followTheStrictOrder) +{ + this->followTheStrictOrder=followTheStrictOrder; + if(uiIsInstalled) + ui->followTheStrictOrder->setChecked(followTheStrictOrder); + listThread->setFollowTheStrictOrder(followTheStrictOrder); + emit send_followTheStrictOrder(followTheStrictOrder); +} + +void CopyEngine::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; + if(uiIsInstalled) + ui->deletePartiallyTransferredFiles->setChecked(deletePartiallyTransferredFiles); + emit send_deletePartiallyTransferredFiles(deletePartiallyTransferredFiles); +} + +void CopyEngine::setInodeThreads(const int &inodeThreads) +{ + this->inodeThreads=inodeThreads; + if(uiIsInstalled) + ui->inodeThreads->setValue(inodeThreads); + emit send_setInodeThreads(inodeThreads); +} + +void CopyEngine::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + this->renameTheOriginalDestination=renameTheOriginalDestination; + if(uiIsInstalled) + ui->renameTheOriginalDestination->setChecked(renameTheOriginalDestination); + emit send_setRenameTheOriginalDestination(renameTheOriginalDestination); +} + +void CopyEngine::inodeThreadsFinished() +{ + this->inodeThreads=ui->inodeThreads->value(); + emit send_setInodeThreads(inodeThreads); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void CopyEngine::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; + if(uiIsInstalled) + { + ui->rsync->setChecked(rsync); + ui->rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); + ui->label_rsync->setEnabled(forcedMode && mode==Ultracopier::Copy); + } + listThread->setRsync(rsync); +} +#endif + +//set check destination folder +void CopyEngine::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) +{ + this->checkDestinationFolderExists=checkDestinationFolderExists; + if(uiIsInstalled) + ui->checkBoxDestinationFolderExists->setChecked(checkDestinationFolderExists); + listThread->setCheckDestinationFolderExists(checkDestinationFolderExists); +} + +void CopyEngine::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; + if(uiIsInstalled) + ui->mkpath->setChecked(mkFullPath); + listThread->setMkFullPath(mkFullPath); +} + +void CopyEngine::setChecksum(const bool checksum) +{ + this->checksum=checksum; + if(uiIsInstalled) + ui->checksum->setChecked(checksum); +} + +//reset widget +void CopyEngine::resetTempWidget() +{ + uiIsInstalled=false; + tempWidget=NULL; +} + +void CopyEngine::setFolderCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFolderCollision->currentIndex()) + ui->comboBoxFolderCollision->setCurrentIndex(index); + switch(index) + { + case 0: + setComboBoxFolderCollision(FolderExists_NotSet,false); + break; + case 1: + setComboBoxFolderCollision(FolderExists_Merge,false); + break; + case 2: + setComboBoxFolderCollision(FolderExists_Skip,false); + break; + case 3: + setComboBoxFolderCollision(FolderExists_Rename,false); + break; + } + emit signal_setFolderCollision(alwaysDoThisActionForFolderExists); +} + +void CopyEngine::setFolderError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(uiIsInstalled) + if(index!=ui->comboBoxFolderError->currentIndex()) + ui->comboBoxFolderError->setCurrentIndex(index); + switch(index) + { + case 0: + setComboBoxFolderError(FileError_NotSet,false); + break; + case 1: + setComboBoxFolderError(FileError_Skip,false); + break; + } + emit signal_setCollisionAction(alwaysDoThisActionForFileExists); +} + +//set the translate +void CopyEngine::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); + if(tempWidget!=NULL) + { + ui->retranslateUi(tempWidget); + ui->comboBoxFolderError->setItemText(0,tr("Ask")); + ui->comboBoxFolderError->setItemText(1,tr("Skip")); + + ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); + ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); + ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); + ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); + + ui->comboBoxFileError->setItemText(0,tr("Ask")); + ui->comboBoxFileError->setItemText(1,tr("Skip")); + ui->comboBoxFileError->setItemText(2,tr("Put at the end")); + + ui->comboBoxFileCollision->setItemText(0,tr("Ask")); + ui->comboBoxFileCollision->setItemText(1,tr("Skip")); + ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); + ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); + ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); + ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); + ui->comboBoxFileCollision->setItemText(6,tr("Rename")); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"ui not loaded!"); +} + +void CopyEngine::setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox) +{ + alwaysDoThisActionForFolderExists=action; + emit signal_setFolderCollision(alwaysDoThisActionForFolderExists); + if(!changeComboBox || !uiIsInstalled) + return; + switch(action) + { + case FolderExists_Merge: + ui->comboBoxFolderCollision->setCurrentIndex(1); + break; + case FolderExists_Skip: + ui->comboBoxFolderCollision->setCurrentIndex(2); + break; + case FolderExists_Rename: + ui->comboBoxFolderCollision->setCurrentIndex(3); + break; + default: + ui->comboBoxFolderCollision->setCurrentIndex(0); + break; + } +} + +void CopyEngine::setComboBoxFolderError(FileErrorAction action,bool changeComboBox) +{ + alwaysDoThisActionForFolderError=action; + if(!changeComboBox || !uiIsInstalled) + return; + switch(action) + { + case FileError_Skip: + ui->comboBoxFolderError->setCurrentIndex(1); + break; + default: + ui->comboBoxFolderError->setCurrentIndex(0); + break; + } +} + + +void CopyEngine::showFilterDialog() +{ + if(filters!=NULL) + filters->exec(); +} + +void CopyEngine::sendNewFilters() +{ + if(filters!=NULL) + emit send_setFilters(filters->getInclude(),filters->getExclude()); +} + +void CopyEngine::sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void CopyEngine::showRenamingRules() +{ + if(renamingRules==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + renamingRules->exec(); +} + +void CopyEngine::get_realBytesTransfered(quint64 realBytesTransfered) +{ + size_for_speed=realBytesTransfered; +} + +void CopyEngine::newActionInProgess(Ultracopier::EngineActionInProgress action) +{ + if(action==Ultracopier::Idle) + { + timerProgression.stop(); + timerActionDone.stop(); + } + else + { + timerProgression.start(); + timerActionDone.start(); + } +} + +void CopyEngine::setCheckDiskSpace(const bool &checkDiskSpace) +{ + this->checkDiskSpace=checkDiskSpace; + if(uiIsInstalled) + ui->checkDiskSpace->setChecked(checkDiskSpace); + listThread->setCheckDiskSpace(checkDiskSpace); +} + +void CopyEngine::setBuffer(const bool &buffer) +{ + this->buffer=buffer; + if(uiIsInstalled) + ui->buffer->setChecked(buffer); + listThread->setBuffer(buffer); +} + +void CopyEngine::setDefaultDestinationFolder(const std::string &defaultDestinationFolder) +{ + this->defaultDestinationFolder=defaultDestinationFolder; + if(uiIsInstalled) + ui->defaultDestinationFolder->setText(QString::fromStdString(defaultDestinationFolder)); +} + +void CopyEngine::exportErrorIntoTransferList() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"exportErrorIntoTransferList"); + std::string fileName = QFileDialog::getSaveFileName(uiinterface,QString::fromStdString(facilityEngine->translateText("Save transfer list")),QStringLiteral("transfer-list.lst"),QString::fromStdString(facilityEngine->translateText("Transfer list"))+QStringLiteral(" (*.lst)")).toStdString(); + if(fileName.empty()) + return; + emit signal_exportErrorIntoTransferList(fileName); +} + +//set auto start +void CopyEngine::setAutoStart(const bool autoStart) +{ + this->autoStart=autoStart; + if(uiIsInstalled) + ui->autoStart->setChecked(autoStart); + listThread->setAutoStart(autoStart); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h new file mode 100755 index 0000000..caba5b5 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.h @@ -0,0 +1,356 @@ +/** \file copyEngine.h +\brief Define the copy engine +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QWidget> +#include <QObject> +#include <QList> +#include <vector> +#include <string> +#include <QFile> +#include <QFileDialog> +#include <QMessageBox> + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "FileErrorDialog.h" +#include "FileExistsDialog.h" +#include "FolderExistsDialog.h" +#include "FileIsSameDialog.h" +#include "ui_copyEngineOptions.h" +#include "Environment.h" +#include "ListThread.h" +#include "Filters.h" +#include "RenamingRules.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +#include "DebugDialog.h" +#include <QTimer> +#endif + +#ifndef COPY_ENGINE_H +#define COPY_ENGINE_H + +namespace Ui { + class copyEngineOptions; +} + +/// \brief the implementation of copy engine plugin, manage directly few stuff, else pass to ListThread class. +class CopyEngine : public PluginInterface_CopyEngine +{ + Q_OBJECT +public: + CopyEngine(FacilityInterface * facilityEngine); + ~CopyEngine(); + void connectTheSignalsSlots(); +private: + ListThread * listThread; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + DebugDialog debugDialogWindow; + #endif + QWidget * tempWidget; + Ui::copyEngineOptions * ui; + bool uiIsInstalled; + QWidget * uiinterface; + Filters * filters; + RenamingRules * renamingRules; + FacilityInterface * facilityEngine; + bool doRightTransfer; + bool keepDate; + bool os_spec_flags; + bool native_copy; + bool followTheStrictOrder; + bool deletePartiallyTransferredFiles; + int inodeThreads; + bool renameTheOriginalDestination; + bool moveTheWholeFolder; + bool autoStart; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + bool checkDestinationFolderExists; + bool mkFullPath; + bool checksum; + FileExistsAction alwaysDoThisActionForFileExists; + FileErrorAction alwaysDoThisActionForFileError; + FileErrorAction alwaysDoThisActionForFolderError; + FolderExistsAction alwaysDoThisActionForFolderExists; + bool dialogIsOpen; + volatile bool stopIt; + std::string defaultDestinationFolder; + /// \brief error queue + struct errorQueueItem + { + TransferThreadAsync * transfer; ///< NULL if send by scan thread + ScanFileOrFolder * scan; ///< NULL if send by transfer thread + bool mkPath; + bool rmPath; + INTERNALTYPEPATH inode; + std::string errorString; + ErrorType errorType; + }; + std::vector<errorQueueItem> errorQueue; + /// \brief already exists queue + struct alreadyExistsQueueItem + { + TransferThreadAsync * transfer; ///< NULL if send by scan thread + ScanFileOrFolder * scan; ///< NULL if send by transfer thread + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + bool isSame; + }; + std::vector<alreadyExistsQueueItem> alreadyExistsQueue; + uint64_t size_for_speed;//because direct access to list thread into the main thread can't be do + Ultracopier::CopyMode mode; + bool forcedMode; + + bool checkDiskSpace; + bool buffer; + unsigned int osBufferLimit; + std::vector<std::string> includeStrings,includeOptions,excludeStrings,excludeOptions; + std::string firstRenamingRule; + std::string otherRenamingRule; + uint64_t errorPutAtEnd; + + //send action done timer + QTimer timerActionDone; + //send progression timer + QTimer timerProgression; + + QTimer timerUpdateMount; + int putAtBottom;//to keep how many automatic put at bottom have been used +private slots: + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void updateTheDebugInfo(const std::vector<std::string> &newList, const std::vector<std::string> &newList2, const int &numberOfInodeOperation); + friend class DebugDialog; + #endif + + /************* External call ********************/ + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExistsSlot(INTERNALTYPEPATH source, INTERNALTYPEPATH destination, bool isSame, TransferThreadAsync * thread); + /// \note Can be call without queue because all call will be serialized + void errorOnFileSlot(INTERNALTYPEPATH fileInfo, std::string errorString, TransferThreadAsync * thread, const ErrorType &errorType); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExistsSlot(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread); + /// \note Can be call without queue because all call will be serialized + void errorOnFolderSlot(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType); + //mkpath event + void mkPathErrorOnFolderSlot(INTERNALTYPEPATH, std::string, ErrorType errorType); + + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExists(INTERNALTYPEPATH source, INTERNALTYPEPATH destination, bool isSame, TransferThreadAsync * thread, bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void errorOnFile(INTERNALTYPEPATH fileInfo, std::string errorString, TransferThreadAsync * thread, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExists(INTERNALTYPEPATH source,INTERNALTYPEPATH destination,bool isSame,ScanFileOrFolder * thread,bool isCalledByShowOneNewDialog=false); + /// \note Can be call without queue because all call will be serialized + void errorOnFolder(INTERNALTYPEPATH fileInfo, std::string errorString, ScanFileOrFolder * thread, ErrorType errorType, bool isCalledByShowOneNewDialog=false); + //mkpath event + void mkPathErrorOnFolder(INTERNALTYPEPATH, std::string, const ErrorType &errorType, bool isCalledByShowOneNewDialog=false); + + //show one new dialog if needed + void showOneNewDialog(); + void sendNewFilters(); + + void showFilterDialog(); + void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); + void showRenamingRules(); + void get_realBytesTransfered(quint64 realBytesTransfered); + void newActionInProgess(Ultracopier::EngineActionInProgress); + void haveNeedPutAtBottom(bool needPutAtBottom, const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, const ErrorType &errorType); + void missingDiskSpace(std::vector<Diskspace> list); + void exportErrorIntoTransferList() override; +public: + /** \brief to send the options panel + * \return return false if have not the options + * \param tempWidget the widget to generate on it the options */ + bool getOptionsEngine(QWidget * tempWidget) override; + /** \brief to have interface widget to do modal dialog + * \param interface to have the widget of the interface, useful for modal dialog */ + void setInterfacePointer(QWidget * uiinterface) override; + //return empty if multiple + /** \brief compare the current sources of the copy, with the passed arguments + * \param sources the sources list to compares with the current sources list + * \return true if have same sources, else false (or empty) */ + bool haveSameSource(const std::vector<std::string> &sources) override; + /** \brief compare the current destination of the copy, with the passed arguments + * \param destination the destination to compares with the current destination + * \return true if have same destination, else false (or empty) */ + bool haveSameDestination(const std::string &destination) override; + //external soft like file browser have send copy/move list to do + /** \brief send copy without destination, ask the destination + * \param sources the sources list to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector<std::string> &sources) override; + /** \brief send copy with destination + * \param sources the sources list to copy + * \param destination the destination to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector<std::string> &sources,const std::string &destination) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \return true if the move have been accepted */ + bool newMove(const std::vector<std::string> &sources) override; + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \param destination the destination to move + * \return true if the move have been accepted */ + bool newMove(const std::vector<std::string> &sources,const std::string &destination) override; + /** \brief send the new transfer list + * \param file the transfer list */ + void newTransferList(const std::string &file) override; + + /** \brief to get byte read, use by Ultracopier for the speed calculation + * real size transfered to right speed calculation */ + uint64_t realByteTransfered() override; + /** \brief support speed limitation */ + bool supportSpeedLimitation() const override; + + /** \brief to set drives detected + * specific to this copy engine */ + + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + void syncTransferList() override; + + void set_setFilters(std::vector<std::string> includeStrings,std::vector<std::string> includeOptions,std::vector<std::string> excludeStrings,std::vector<std::string> excludeOptions); + void setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif + void setCheckDiskSpace(const bool &checkDiskSpace); + void setDefaultDestinationFolder(const std::string &defaultDestinationFolder); + void defaultDestinationFolderBrowse(); + std::string askDestination(); + static std::string stringimplode(const std::vector<std::string>& elems, const std::string &delim); + void setBuffer(const bool &buffer); +public slots: + //user ask ask to add folder (add it with interface ask source/destination) + /** \brief add folder called on the interface + * Used by manual adding */ + bool userAddFolder(const Ultracopier::CopyMode &mode) override; + /** \brief add file called on the interface + * Used by manual adding */ + bool userAddFile(const Ultracopier::CopyMode &mode) override; + //action on the copy + /// \brief put the transfer in pause + void pause() override; + /// \brief resume the transfer + void resume() override; + /** \brief skip one transfer entry + * \param id id of the file to remove */ + void skip(const uint64_t &id) override; + /// \brief cancel all the transfer + void cancel() override; + //edit the transfer list + /** \brief remove the selected item + * \param ids ids is the id list of the selected items */ + void removeItems(const std::vector<uint64_t> &ids) override; + /** \brief move on top of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnTop(const std::vector<uint64_t> &ids) override; + /** \brief move up the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsUp(const std::vector<uint64_t> &ids) override; + /** \brief move down the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsDown(const std::vector<uint64_t> &ids) override; + /** \brief move on bottom of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnBottom(const std::vector<uint64_t> &ids) override; + + /** \brief give the forced mode, to export/import transfer list */ + void forceMode(const Ultracopier::CopyMode &mode) override; + /// \brief export the transfer list into a file + void exportTransferList() override; + /// \brief import the transfer list into a file + void importTransferList() override; + + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const int64_t &speedLimitation) override; + + // specific to this copy engine + + /// \brief set if the rights shoul be keep + void setRightTransfer(const bool doRightTransfer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + void setFollowTheStrictOrder(const bool &followTheStrictOrder); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setInodeThreads(const int &inodeThreads); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void inodeThreadsFinished(); + + /// \brief set auto start + void setAutoStart(const bool autoStart); + /// \brief set if need check if the destination folder exists + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + void setMkFullPath(const bool mkFullPath); + void setChecksum(const bool checksum); + /// \brief reset widget + void resetTempWidget(); + //autoconnect + void setFolderCollision(int index); + void setFolderError(int index); + void setFileCollision(int index); + void setFileError(int index); + /// \brief need retranslate the insterface + void newLanguageLoaded(); +private slots: + void setComboBoxFolderCollision(FolderExistsAction action,bool changeComboBox=true); + void setComboBoxFolderError(FileErrorAction action,bool changeComboBox=true); + void warningTransferList(const std::string &warning); + void errorTransferList(const std::string &error); +signals: + //action on the copy + void signal_pause() const; + void signal_resume() const; + void signal_skip(const uint64_t &id) const; + void signal_setSpeedLimitation(const int64_t &speedLimitation); + + //edit the transfer list + void signal_removeItems(const std::vector<uint64_t> &ids) const; + void signal_moveItemsOnTop(const std::vector<uint64_t> &ids) const; + void signal_moveItemsUp(const std::vector<uint64_t> &ids) const; + void signal_moveItemsDown(const std::vector<uint64_t> &ids) const; + void signal_moveItemsOnBottom(const std::vector<uint64_t> &ids) const; + + void signal_forceMode(const Ultracopier::CopyMode &mode) const; + void signal_exportTransferList(const std::string &fileName) const; + void signal_importTransferList(const std::string &fileName) const; + void signal_exportErrorIntoTransferList(const std::string &fileName) const; + + //action + void signal_setCollisionAction(FileExistsAction alwaysDoThisActionForFileExists) const; + //void signal_setComboBoxFolderCollision(FolderExistsAction action) const;// -> duplicate with signal_setFolderCollision ? + void signal_setFolderCollision(FolderExistsAction action) const; + + //internal cancel + void tryCancel() const; + void getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread,const ErrorType &errorType) const; + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + #endif + + //other signals + void queryOneNewDialog() const; + + void send_setFilters(const std::vector<Filters_rules> &include,const std::vector<Filters_rules> &exclude) const; + void send_sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; + void send_followTheStrictOrder(const bool &followTheStrictOrder) const; + void send_deletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) const; + void send_setInodeThreads(const int &inodeThreads) const; + void send_moveTheWholeFolder(const bool &moveTheWholeFolder) const; + void send_setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) const; +}; + +#endif // COPY_ENGINE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro new file mode 100755 index 0000000..c7b7651 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngine.pro @@ -0,0 +1,115 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets xml +DEFINES += _FILE_OFFSET_BITS=64 UNICODE _UNICODE WIDESTRING _LARGE_FILE_SOURCE=1 +TEMPLATE = lib +CONFIG += plugin + +HEADERS += \ + $$PWD/StructEnumDefinition.h \ + $$PWD/StructEnumDefinition_CopyEngine.h \ + $$PWD/DebugEngineMacro.h \ + $$PWD/CopyEngineUltracopier-SpecVariable.h \ + $$PWD/TransferThread.h \ + $$PWD/MkPath.h \ + $$PWD/ListThread.h \ + $$PWD/../../../interface/PluginInterface_CopyEngine.h \ + $$PWD/../../../interface/OptionInterface.h \ + $$PWD/../../../interface/FacilityInterface.h \ + $$PWD/../../../cpp11addition.h \ + $$PWD/Filters.h \ + $$PWD/FilterRules.h \ + $$PWD/RenamingRules.h \ + $$PWD/DriveManagement.h \ + $$PWD/CopyEngine.h \ + $$PWD/DebugDialog.h \ + $$PWD/CopyEngineFactory.h \ + $$PWD/FileErrorDialog.h \ + $$PWD/FileExistsDialog.h \ + $$PWD/FileIsSameDialog.h \ + $$PWD/FolderExistsDialog.h \ + $$PWD/ScanFileOrFolder.h \ + $$PWD/DiskSpace.h \ + async/ReadThread.h \ + async/WriteThread.h +SOURCES += \ + $$PWD/TransferThread.cpp \ + $$PWD/MkPath.cpp \ + $$PWD/ListThread.cpp \ + $$PWD/../../../cpp11addition.cpp \ + $$PWD/../../../cpp11additionstringtointcpp.cpp \ + $$PWD/Filters.cpp \ + $$PWD/FilterRules.cpp \ + $$PWD/RenamingRules.cpp \ + $$PWD/ListThread_InodeAction.cpp \ + $$PWD/DriveManagement.cpp \ + $$PWD/CopyEngine-collision-and-error.cpp \ + $$PWD/CopyEngine.cpp \ + $$PWD/DebugDialog.cpp \ + $$PWD/CopyEngineFactory.cpp \ + $$PWD/FileErrorDialog.cpp \ + $$PWD/FileExistsDialog.cpp \ + $$PWD/FileIsSameDialog.cpp \ + $$PWD/FolderExistsDialog.cpp \ + $$PWD/ScanFileOrFolder.cpp \ + $$PWD/DiskSpace.cpp \ + ListThreadActions.cpp \ + ListThreadListChange.cpp \ + ListThreadMedia.cpp \ + ListThreadNew.cpp \ + ListThreadOptions.cpp \ + ListThreadScan.cpp \ + ListThreadStat.cpp \ + async/ReadThread.cpp \ + async/WriteThread.cpp +TARGET = $$qtLibraryTarget(copyEngine) +TRANSLATIONS += \ + $$PWD/Languages/ar/translation.ts \ + $$PWD/Languages/de/translation.ts \ + $$PWD/Languages/el/translation.ts \ + $$PWD/Languages/en/translation.ts \ + $$PWD/Languages/es/translation.ts \ + $$PWD/Languages/fr/translation.ts \ + $$PWD/Languages/hi/translation.ts \ + $$PWD/Languages/hu/translation.ts \ + $$PWD/Languages/id/translation.ts \ + $$PWD/Languages/it/translation.ts \ + $$PWD/Languages/ja/translation.ts \ + $$PWD/Languages/ko/translation.ts \ + $$PWD/Languages/nl/translation.ts \ + $$PWD/Languages/no/translation.ts \ + $$PWD/Languages/pl/translation.ts \ + $$PWD/Languages/pt/translation.ts \ + $$PWD/Languages/ru/translation.ts \ + $$PWD/Languages/th/translation.ts \ + $$PWD/Languages/tr/translation.ts \ + $$PWD/Languages/zh/translation.ts + +FORMS += \ + $$PWD/fileErrorDialog.ui \ + $$PWD/fileExistsDialog.ui \ + $$PWD/fileIsSameDialog.ui \ + $$PWD/debugDialog.ui \ + $$PWD/folderExistsDialog.ui \ + $$PWD/Filters.ui \ + $$PWD/FilterRules.ui \ + $$PWD/RenamingRules.ui \ + $$PWD/copyEngineOptions.ui \ + $$PWD/DiskSpace.ui + +OTHER_FILES += \ + $$PWD/informations.xml + +!CONFIG(static) { +RESOURCES += \ + $$PWD/copyEngineResources.qrc +} + +win32 { + LIBS += -ladvapi32 + DEFINES += WIDESTRING +} +HEADERS += $$PWD/async/TransferThreadAsync.h +SOURCES += $$PWD/async/TransferThreadAsync.cpp diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp new file mode 100755 index 0000000..9dc9bc2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.cpp @@ -0,0 +1,654 @@ +/** \file factory.cpp +\brief Define the factory to create new instance +\author alpha_one_x86 */ + +#include <QFileDialog> +#include <QList> +#include <QDebug> +#include <cmath> +#include <QStorageInfo> + +#include "../../../cpp11addition.h" +#include "CopyEngineFactory.h" +#include "TransferThread.h" +#ifdef Q_OS_LINUX +#include <sys/sysinfo.h> +#endif +#ifdef Q_OS_WIN32 +#include <sysinfoapi.h> +#endif + +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +CopyEngineFactory::CopyEngineFactory() : + ui(new Ui::copyEngineOptions()) +{ + qRegisterMetaType<FolderExistsAction>("FolderExistsAction"); + qRegisterMetaType<FileExistsAction>("FileExistsAction"); + qRegisterMetaType<std::vector<Filters_rules> >("std::vector<Filters_rules>"); + qRegisterMetaType<TransferStat>("TransferStat"); + qRegisterMetaType<ActionType>("ActionType"); + qRegisterMetaType<ErrorType>("ErrorType"); + qRegisterMetaType<Diskspace>("Diskspace"); + qRegisterMetaType<std::vector<Diskspace> >("std::vector<Diskspace>"); + qRegisterMetaType<Ultracopier::CopyMode>("Ultracopier::CopyMode"); + qRegisterMetaType<TransferThread::dirent_uc>("TransferThread::dirent_uc"); + #ifdef WIDESTRING + qRegisterMetaType<std::wstring>("std::wstring"); + qRegisterMetaType<wchar_t *>("wchar_t *"); + #endif + + tempWidget=new QWidget(); + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + errorFound=false; + optionsEngine=NULL; + filters=new Filters(tempWidget); + renamingRules=new RenamingRules(tempWidget); + + connect(ui->doRightTransfer, &QCheckBox::toggled, this,&CopyEngineFactory::setDoRightTransfer); + connect(ui->keepDate, &QCheckBox::toggled, this,&CopyEngineFactory::setKeepDate); + connect(ui->native_copy, &QCheckBox::toggled, this,&CopyEngineFactory::setNativeCopy); + connect(ui->os_spec_flags, &QCheckBox::toggled, this,&CopyEngineFactory::setOsSpecFlags); + connect(ui->inodeThreads, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,&CopyEngineFactory::on_inodeThreads_editingFinished); + connect(ui->autoStart, &QCheckBox::toggled, this,&CopyEngineFactory::setAutoStart); + connect(ui->comboBoxFolderError, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderError); + connect(ui->comboBoxFolderCollision, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFolderCollision); + connect(ui->comboBoxFileError, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileError); + connect(ui->comboBoxFileCollision, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,&CopyEngineFactory::setFileCollision); + connect(ui->checkBoxDestinationFolderExists, &QCheckBox::toggled, this,&CopyEngineFactory::setCheckDestinationFolder); + connect(ui->mkpath, &QCheckBox::toggled, this,&CopyEngineFactory::setMkFullPath); + connect(ui->checksum, &QCheckBox::toggled, this,&CopyEngineFactory::setChecksum); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + connect(ui->rsync, &QCheckBox::toggled, this,&CopyEngineFactory::setRsync); + #endif + connect(ui->inodeThreads, &QSpinBox::editingFinished, this,&CopyEngineFactory::on_inodeThreads_editingFinished); + connect(ui->moveTheWholeFolder, &QCheckBox::toggled, this,&CopyEngineFactory::moveTheWholeFolder); + connect(ui->followTheStrictOrder, &QCheckBox::toggled, this,&CopyEngineFactory::followTheStrictOrder); + connect(ui->deletePartiallyTransferredFiles,&QCheckBox::toggled, this,&CopyEngineFactory::deletePartiallyTransferredFiles); + connect(ui->renameTheOriginalDestination,&QCheckBox::toggled, this,&CopyEngineFactory::renameTheOriginalDestination); + connect(ui->checkDiskSpace, &QCheckBox::toggled, this,&CopyEngineFactory::checkDiskSpace); + connect(ui->buffer, &QCheckBox::toggled, this,&CopyEngineFactory::setBuffer); + connect(ui->defaultDestinationFolderBrowse,&QPushButton::clicked, this,&CopyEngineFactory::defaultDestinationFolderBrowse); + connect(ui->defaultDestinationFolder,&QLineEdit::editingFinished, this,&CopyEngineFactory::defaultDestinationFolder); + + connect(filters,&Filters::sendNewFilters,this,&CopyEngineFactory::sendNewFilters); + connect(ui->filters,&QPushButton::clicked,this,&CopyEngineFactory::showFilterDialog); + connect(renamingRules,&RenamingRules::sendNewRenamingRules,this,&CopyEngineFactory::sendNewRenamingRules); + connect(ui->renamingRules,&QPushButton::clicked,this,&CopyEngineFactory::showRenamingRules); + + lunchInitFunction.setInterval(0); + lunchInitFunction.setSingleShot(true); + connect(&lunchInitFunction,&QTimer::timeout,this,&CopyEngineFactory::init,Qt::QueuedConnection); + lunchInitFunction.start(); +} + +CopyEngineFactory::~CopyEngineFactory() +{ + delete renamingRules; + delete filters; + delete ui; +} + +void CopyEngineFactory::init() +{ +} + +PluginInterface_CopyEngine * CopyEngineFactory::getInstance() +{ + CopyEngine *realObject=new CopyEngine(facilityEngine); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(realObject,&CopyEngine::debugInformation,this,&CopyEngineFactory::debugInformation); + #endif + realObject->connectTheSignalsSlots(); + PluginInterface_CopyEngine * newTransferEngine=realObject; + connect(this,&CopyEngineFactory::reloadLanguage,realObject,&CopyEngine::newLanguageLoaded); + realObject->setRightTransfer(ui->doRightTransfer->isChecked()); + realObject->setKeepDate(ui->keepDate->isChecked()); + realObject->setOsSpecFlags(ui->os_spec_flags->isChecked()); + realObject->setNativeCopy(ui->native_copy->isChecked()); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + realObject->setRsync(ui->rsync->isChecked()); + #endif + realObject->setAutoStart(ui->autoStart->isChecked()); + realObject->setFolderCollision(ui->comboBoxFolderCollision->currentIndex()); + realObject->setFolderError(ui->comboBoxFolderError->currentIndex()); + realObject->setFileCollision(ui->comboBoxFileCollision->currentIndex()); + realObject->setFileError(ui->comboBoxFileError->currentIndex()); + realObject->setCheckDestinationFolderExists(ui->checkBoxDestinationFolderExists->isChecked()); + realObject->setMkFullPath(ui->mkpath->isChecked()); + realObject->setChecksum(ui->checksum->isChecked()); + realObject->set_setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + realObject->setRenamingRules(firstRenamingRule,otherRenamingRule); + realObject->setMoveTheWholeFolder(ui->moveTheWholeFolder->isChecked()); + realObject->setFollowTheStrictOrder(ui->followTheStrictOrder->isChecked()); + realObject->setDeletePartiallyTransferredFiles(ui->deletePartiallyTransferredFiles->isChecked()); + realObject->setInodeThreads(ui->inodeThreads->value()); + realObject->setRenameTheOriginalDestination(ui->renameTheOriginalDestination->isChecked()); + realObject->setCheckDiskSpace(ui->checkDiskSpace->isChecked()); + realObject->setDefaultDestinationFolder(ui->defaultDestinationFolder->text().toStdString()); + realObject->setBuffer(ui->buffer->isChecked()); + return newTransferEngine; +} + +void CopyEngineFactory::setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, + FacilityInterface * facilityInterface,const bool &portableVersion) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath:"+pluginPath); + this->facilityEngine=facilityInterface; + Q_UNUSED(portableVersion); + #ifndef ULTRACOPIER_PLUGIN_DEBUG + Q_UNUSED(writePath); + Q_UNUSED(pluginPath); + #endif + #if ! defined (Q_CC_GNU) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("Unable to change date time of files, only gcc is supported")); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,COMPILERINFO); + #if defined (UNICODE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"UNICODE set"); + #endif + #if defined (_FILE_OFFSET_BITS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"_FILE_OFFSET_BITS set to "+std::to_string(_FILE_OFFSET_BITS)); + #endif + #if defined (WIDESTRING) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"WIDESTRING set"); + #endif + #if defined (_LARGE_FILE_SOURCE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"_LARGE_FILE_SOURCE set to "+std::to_string(_LARGE_FILE_SOURCE)); + #endif + #if defined (ULTRACOPIER_PLUGIN_CHECKLISTTYPE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE set"); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"CHECK LIST TYPE not set"); + #endif + #ifdef Q_OS_WIN32 + MEMORYSTATUSEX memoryStatus; + if(GlobalMemoryStatusEx(&memoryStatus)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Detected Memory MB Windows: "+std::to_string(memoryStatus.ullTotalPhys/1024)); + #endif + #ifdef Q_OS_LINUX + struct sysinfo info; + if(sysinfo(&info)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Detected Memory MB Linux: "+std::to_string(info.totalhigh*info.mem_unit/1024/1024)); + #endif + if(options!=NULL) + { + //load the options + std::vector<std::pair<std::string, std::string> > KeysList; + KeysList.push_back(std::pair<std::string, std::string>("doRightTransfer","true")); + #ifndef Q_OS_LINUX + KeysList.push_back(std::pair<std::string, std::string>("keepDate","false")); + #else + KeysList.push_back(std::pair<std::string, std::string>("keepDate","true")); + #endif + KeysList.push_back(std::pair<std::string, std::string>("native_copy","false")); + KeysList.push_back(std::pair<std::string, std::string>("os_spec_flags","true")); + KeysList.push_back(std::pair<std::string, std::string>("blockSize",std::to_string(ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE))); + //to prevent swap and other bad effect, only under windows and unix for now + #if defined(Q_OS_WIN32) or (defined(Q_OS_LINUX) and defined(_SC_PHYS_PAGES)) + size_t max_memory=getTotalSystemMemory()/1024; + if(max_memory>2147483648) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("detected memory: %1MB").arg(max_memory/1024).toStdString()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("detected memory: %1GB").arg(max_memory/(1024*1024)).toStdString()); + #endif + KeysList.push_back(std::pair<std::string, std::string>("parallelizeIfSmallerThan",std::to_string(128)));//128KB, better for modern hardware: Multiple queue en linux, SSD, ... + KeysList.push_back(std::pair<std::string, std::string>("autoStart","true")); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + KeysList.push_back(std::pair<std::string, std::string>("rsync","true")); + #endif + KeysList.push_back(std::pair<std::string, std::string>("folderError",std::to_string(0))); + KeysList.push_back(std::pair<std::string, std::string>("folderCollision",std::to_string(0))); + KeysList.push_back(std::pair<std::string, std::string>("fileError",std::to_string(2))); + KeysList.push_back(std::pair<std::string, std::string>("fileCollision",std::to_string(0))); + KeysList.push_back(std::pair<std::string, std::string>("transferAlgorithm",std::to_string(0))); + KeysList.push_back(std::pair<std::string, std::string>("checkDestinationFolder","true")); + KeysList.push_back(std::pair<std::string, std::string>("mkpath","true")); + KeysList.push_back(std::pair<std::string, std::string>("checksum","false")); + KeysList.push_back(std::pair<std::string, std::string>("includeStrings","")); + KeysList.push_back(std::pair<std::string, std::string>("includeOptions","")); + KeysList.push_back(std::pair<std::string, std::string>("excludeStrings","")); + KeysList.push_back(std::pair<std::string, std::string>("excludeOptions","")); + KeysList.push_back(std::pair<std::string, std::string>("checksumIgnoreIfImpossible","true")); + KeysList.push_back(std::pair<std::string, std::string>("checksumOnlyOnError","true")); + KeysList.push_back(std::pair<std::string, std::string>("firstRenamingRule","")); + KeysList.push_back(std::pair<std::string, std::string>("otherRenamingRule","")); + KeysList.push_back(std::pair<std::string, std::string>("osBufferLimited","false")); + KeysList.push_back(std::pair<std::string, std::string>("osBufferLimit",std::to_string(512))); + KeysList.push_back(std::pair<std::string, std::string>("deletePartiallyTransferredFiles","true")); + KeysList.push_back(std::pair<std::string, std::string>("moveTheWholeFolder","true")); + KeysList.push_back(std::pair<std::string, std::string>("followTheStrictOrder","true")); + KeysList.push_back(std::pair<std::string, std::string>("renameTheOriginalDestination","false")); + KeysList.push_back(std::pair<std::string, std::string>("checkDiskSpace","true")); + KeysList.push_back(std::pair<std::string, std::string>("defaultDestinationFolder","")); + KeysList.push_back(std::pair<std::string, std::string>("inodeThreads",std::to_string(16))); + #ifdef Q_OS_WIN32 + //un Windows, without buffer the write seam should be aligned and full block, Ultracopier not support this + KeysList.push_back(std::pair<std::string, std::string>("osBuffer","true")); + KeysList.push_back(std::pair<std::string, std::string>("buffer","true")); + #else + KeysList.push_back(std::pair<std::string, std::string>("osBuffer","false")); + KeysList.push_back(std::pair<std::string, std::string>("buffer","false")); + #endif + options->addOptionGroup(KeysList); + + optionsEngine=options; + resetOptions(); + + std::string firstRenamingRule=options->getOptionValue("firstRenamingRule"); + if(firstRenamingRule.find("%name%")==std::string::npos || firstRenamingRule.find("%suffix%")==std::string::npos) + options->setOptionValue("firstRenamingRule",""); + std::string otherRenamingRule=options->getOptionValue("otherRenamingRule"); + if(otherRenamingRule.find("%name%")==std::string::npos || otherRenamingRule.find("%suffix%")==std::string::npos + || otherRenamingRule.find("%number%")==std::string::npos) + options->setOptionValue("otherRenamingRule",""); + } +} + +std::vector<std::string> CopyEngineFactory::supportedProtocolsForTheSource() const +{ + std::vector<std::string> l; + l.push_back("file"); + return l; +} + +std::vector<std::string> CopyEngineFactory::supportedProtocolsForTheDestination() const +{ + std::vector<std::string> l; + l.push_back("file"); + return l; +} + +Ultracopier::CopyType CopyEngineFactory::getCopyType() +{ + return Ultracopier::FileAndFolder; +} + +Ultracopier::TransferListOperation CopyEngineFactory::getTransferListOperation() +{ + return Ultracopier::TransferListOperation_ImportExport; +} + +bool CopyEngineFactory::canDoOnlyCopy() const +{ + return false; +} + +/// \brief to get if have pause +bool CopyEngineFactory::havePause() +{ + return true; +} + +void CopyEngineFactory::resetOptions() +{ + auto options=optionsEngine; + optionsEngine=NULL; + #if ! defined (Q_CC_GNU) + ui->keepDate->setEnabled(false); + ui->keepDate->setToolTip(QStringLiteral("Not supported with this compiler")); + #endif + ui->doRightTransfer->setChecked(stringtobool(options->getOptionValue("doRightTransfer"))); + ui->keepDate->setChecked(stringtobool(options->getOptionValue("keepDate"))); + ui->os_spec_flags->setChecked(stringtobool(options->getOptionValue("os_spec_flags"))); + ui->native_copy->setChecked(stringtobool(options->getOptionValue("native_copy"))); + #ifdef Q_OS_WIN32 + ui->native_copy->setEnabled(false); + ui->native_copy->setToolTip(tr("Supported only on Windows")); + #endif + ui->autoStart->setChecked(stringtobool(options->getOptionValue("autoStart"))); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ui->rsync->setChecked(stringtobool(options->getOptionValue("rsync"))); + #else + ui->label_rsync->setVisible(false); + ui->rsync->setVisible(false); + #endif + ui->comboBoxFolderError->setCurrentIndex(stringtouint32(options->getOptionValue("folderError"))); + ui->comboBoxFolderCollision->setCurrentIndex(stringtouint32(options->getOptionValue("folderCollision"))); + ui->comboBoxFileError->setCurrentIndex(stringtouint32(options->getOptionValue("fileError"))); + ui->comboBoxFileCollision->setCurrentIndex(stringtouint32(options->getOptionValue("fileCollision"))); + ui->checkBoxDestinationFolderExists->setChecked(stringtobool(options->getOptionValue("checkDestinationFolder"))); + ui->mkpath->setChecked(stringtobool(options->getOptionValue("mkpath"))); + ui->checksum->setChecked(stringtobool(options->getOptionValue("checksum"))); + ui->deletePartiallyTransferredFiles->setChecked(stringtobool(options->getOptionValue("deletePartiallyTransferredFiles"))); + ui->moveTheWholeFolder->setChecked(stringtobool(options->getOptionValue("moveTheWholeFolder"))); + ui->followTheStrictOrder->setChecked(stringtobool(options->getOptionValue("followTheStrictOrder"))); + ui->inodeThreads->setValue(stringtouint32(options->getOptionValue("inodeThreads"))); + ui->renameTheOriginalDestination->setChecked(stringtobool(options->getOptionValue("renameTheOriginalDestination"))); + ui->checkDiskSpace->setChecked(stringtobool(options->getOptionValue("checkDiskSpace"))); + ui->defaultDestinationFolder->setText(QString::fromStdString(options->getOptionValue("defaultDestinationFolder"))); + ui->buffer->setChecked(stringtobool(options->getOptionValue("buffer"))); + + //ui->autoStart->setChecked(options->getOptionValue("autoStart").toBool());//moved from options(), wrong previous place + std::string s; + s=options->getOptionValue("includeStrings"); + includeStrings=stringtostringlist(s); + s=options->getOptionValue("includeOptions"); + includeOptions=stringtostringlist(s); + s=options->getOptionValue("excludeStrings"); + excludeStrings=stringtostringlist(s); + s=options->getOptionValue("excludeOptions"); + excludeOptions=stringtostringlist(s); + if(!filters->setFilters(includeStrings,includeOptions,excludeStrings,excludeOptions)) + { + includeStrings.clear(); + includeOptions.clear(); + excludeStrings.clear(); + excludeOptions.clear(); + options->setOptionValue("includeStrings",""); + options->setOptionValue("includeOptions",""); + options->setOptionValue("excludeStrings",""); + options->setOptionValue("excludeOptions",""); + } + firstRenamingRule=options->getOptionValue("firstRenamingRule"); + otherRenamingRule=options->getOptionValue("otherRenamingRule"); + renamingRules->setRenamingRules(firstRenamingRule,otherRenamingRule); + + optionsEngine=options; +} + +QWidget * CopyEngineFactory::options() +{ + return tempWidget; +} + +void CopyEngineFactory::setDoRightTransfer(bool doRightTransfer) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("doRightTransfer",booltostring(doRightTransfer)); +} + +void CopyEngineFactory::setKeepDate(bool keepDate) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("keepDate",booltostring(keepDate)); +} + +void CopyEngineFactory::setOsSpecFlags(bool os_spec_flags) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("os_spec_flags",booltostring(os_spec_flags)); +} + +void CopyEngineFactory::setNativeCopy(bool native_copy) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("native_copy",booltostring(native_copy)); +} + +void CopyEngineFactory::setFolderCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("folderCollision",std::to_string(index)); +} + +void CopyEngineFactory::setFolderError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("folderError",std::to_string(index)); +} + +void CopyEngineFactory::setCheckDestinationFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checkDestinationFolder",booltostring(ui->checkBoxDestinationFolderExists->isChecked())); +} + +void CopyEngineFactory::setMkFullPath() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("mkpath",booltostring(ui->mkpath->isChecked())); +} + +void CopyEngineFactory::setChecksum() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checksum",booltostring(ui->checksum->isChecked())); +} + +void CopyEngineFactory::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, retranslate the widget options"); + OptionInterface * optionsEngine=this->optionsEngine; + this->optionsEngine=NULL; + ui->retranslateUi(tempWidget); + ui->comboBoxFolderError->setItemText(0,tr("Ask")); + ui->comboBoxFolderError->setItemText(1,tr("Skip")); + + ui->comboBoxFolderCollision->setItemText(0,tr("Ask")); + ui->comboBoxFolderCollision->setItemText(1,tr("Merge")); + ui->comboBoxFolderCollision->setItemText(2,tr("Skip")); + ui->comboBoxFolderCollision->setItemText(3,tr("Rename")); + + ui->comboBoxFileError->setItemText(0,tr("Ask")); + ui->comboBoxFileError->setItemText(1,tr("Skip")); + ui->comboBoxFileError->setItemText(2,tr("Put at the end")); + + ui->comboBoxFileCollision->setItemText(0,tr("Ask")); + ui->comboBoxFileCollision->setItemText(1,tr("Skip")); + ui->comboBoxFileCollision->setItemText(2,tr("Overwrite")); + ui->comboBoxFileCollision->setItemText(3,tr("Overwrite if different")); + ui->comboBoxFileCollision->setItemText(4,tr("Overwrite if newer")); + ui->comboBoxFileCollision->setItemText(5,tr("Overwrite if older")); + ui->comboBoxFileCollision->setItemText(6,tr("Rename")); + + if(optionsEngine!=NULL) + { + filters->newLanguageLoaded(); + renamingRules->newLanguageLoaded(); + } + emit reloadLanguage(); + this->optionsEngine=optionsEngine; +} + +void CopyEngineFactory::showFilterDialog() +{ + if(optionsEngine==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded. Unable to access the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + filters->exec(); +} + +void CopyEngineFactory::sendNewFilters(const std::vector<std::string> &includeStrings,const std::vector<std::string> &includeOptions,const std::vector<std::string> &excludeStrings,const std::vector<std::string> &excludeOptions) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->includeStrings=includeStrings; + this->includeOptions=includeOptions; + this->excludeStrings=excludeStrings; + this->excludeOptions=excludeOptions; + if(optionsEngine!=NULL) + { + optionsEngine->setOptionValue("includeStrings",stringlisttostring(includeStrings)); + optionsEngine->setOptionValue("includeOptions",stringlisttostring(includeOptions)); + optionsEngine->setOptionValue("excludeStrings",stringlisttostring(excludeStrings)); + optionsEngine->setOptionValue("excludeOptions",stringlisttostring(excludeOptions)); + } +} + +void CopyEngineFactory::sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"new filter"); + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + if(optionsEngine!=NULL) + { + optionsEngine->setOptionValue("firstRenamingRule",firstRenamingRule); + optionsEngine->setOptionValue("otherRenamingRule",otherRenamingRule); + } +} + +void CopyEngineFactory::showRenamingRules() +{ + if(optionsEngine==NULL) + { + QMessageBox::critical(NULL,tr("Options error"),tr("Options engine is not loaded, can't access to the filters")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"options not loaded"); + return; + } + renamingRules->exec(); +} + +void CopyEngineFactory::setFileCollision(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(optionsEngine==NULL) + return; + switch(index) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + optionsEngine->setOptionValue("fileCollision",std::to_string(index)); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + break; + } +} + +void CopyEngineFactory::setFileError(int index) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"action index: "+std::to_string(index)); + if(optionsEngine==NULL) + return; + switch(index) + { + case 0: + case 1: + case 2: + optionsEngine->setOptionValue("fileError",std::to_string(index)); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error, unknow index, ignored"); + break; + } +} + +void CopyEngineFactory::deletePartiallyTransferredFiles(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("deletePartiallyTransferredFiles",booltostring(checked)); +} + +void CopyEngineFactory::renameTheOriginalDestination(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("renameTheOriginalDestination",booltostring(checked)); +} + +void CopyEngineFactory::checkDiskSpace(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("checkDiskSpace",booltostring(checked)); +} + +void CopyEngineFactory::defaultDestinationFolderBrowse() +{ + QString destination = QFileDialog::getExistingDirectory(ui->defaultDestinationFolder, + QString::fromStdString(facilityEngine->translateText("Select destination directory")), + "",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + if(destination.isEmpty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Canceled by the user"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + ui->defaultDestinationFolder->setText(destination); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("defaultDestinationFolder",destination.toStdString()); +} + +void CopyEngineFactory::defaultDestinationFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("defaultDestinationFolder",ui->defaultDestinationFolder->text().toStdString()); +} + +void CopyEngineFactory::followTheStrictOrder(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("followTheStrictOrder",booltostring(checked)); +} + +void CopyEngineFactory::moveTheWholeFolder(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("moveTheWholeFolder",booltostring(checked)); +} + +void CopyEngineFactory::on_inodeThreads_editingFinished() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the spinbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("inodeThreads",std::to_string(ui->inodeThreads->value())); +} + +#ifdef Q_OS_WIN32 +size_t CopyEngineFactory::getTotalSystemMemory() +{ + MEMORYSTATUSEX status; + status.dwLength = sizeof(status); + GlobalMemoryStatusEx(&status); + return status.ullTotalPhys; +} +#endif + +#ifdef Q_OS_LINUX +size_t CopyEngineFactory::getTotalSystemMemory() +{ + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); + return pages * page_size; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +void CopyEngineFactory::setRsync(bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("rsync",std::to_string(rsync)); +} +#endif + +void CopyEngineFactory::setBuffer(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("buffer",booltostring(checked)); +} + +void CopyEngineFactory::setAutoStart(bool autoStart) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"the value have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue("autoStart",booltostring(autoStart)); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h new file mode 100755 index 0000000..810af80 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h @@ -0,0 +1,127 @@ +/** \file factory.h +\brief Define the factory to create new instance +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "StructEnumDefinition_CopyEngine.h" + +#include <QObject> +#include <QList> +#include <QStringList> +#include <QFileInfo> +#include <QProcess> +#include <QTimer> + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "qstorageinfo.h" +#include "StructEnumDefinition.h" +#include "ui_copyEngineOptions.h" +#include "CopyEngine.h" +#include "Environment.h" +#include "Filters.h" +#include "RenamingRules.h" + +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include <windows.h> +#endif +#ifdef Q_OS_LINUX + #include <unistd.h> +#endif + +#ifndef FACTORY_H +#define FACTORY_H + +namespace Ui { + class copyEngineOptions; +} + +/** \brief to generate copy engine instance */ +class CopyEngineFactory : public PluginInterface_CopyEngineFactory +{ + Q_OBJECT + #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.0.0.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_CopyEngineFactory) + #endif +public: + CopyEngineFactory(); + ~CopyEngineFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_CopyEngine * getInstance() override; + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath, + FacilityInterface * facilityInterface,const bool &portableVersion) override; + //get mode allowed + /// \brief define if can copy file, folder or both + Ultracopier::CopyType getCopyType() override; + /// \brief to return which kind of transfer list operation is supported + Ultracopier::TransferListOperation getTransferListOperation() override; + /// \brief define if can only copy, or copy and move + bool canDoOnlyCopy() const override; + /// \brief to get the supported protocols for the source + std::vector<std::string> supportedProtocolsForTheSource() const override; + /// \brief to get the supported protocols for the destination + std::vector<std::string> supportedProtocolsForTheDestination() const override; + /// \brief to get the options of the copy engine + QWidget * options() override; + /// \brief to get if have pause + bool havePause() override; + +private: + Ui::copyEngineOptions *ui; + QWidget* tempWidget; + OptionInterface * optionsEngine; + bool errorFound; + FacilityInterface * facilityEngine; + Filters *filters; + RenamingRules *renamingRules; + QStorageInfo storageInfo; + QTimer lunchInitFunction; + std::vector<std::string> includeStrings,includeOptions,excludeStrings,excludeOptions; + std::string firstRenamingRule,otherRenamingRule; + +#if defined(Q_OS_WIN32) || (defined(Q_OS_LINUX) && defined(_SC_PHYS_PAGES)) + static size_t getTotalSystemMemory(); +#endif +private slots: + void init(); + void setDoRightTransfer(bool doRightTransfer); + void setKeepDate(bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(bool rsync); + #endif + void setFolderCollision(int index); + void setFolderError(int index); + void setCheckDestinationFolder(); + void setMkFullPath(); + void setChecksum(); + void showFilterDialog(); + void sendNewFilters(const std::vector<std::string> &includeStrings,const std::vector<std::string> &includeOptions, + const std::vector<std::string> &excludeStrings,const std::vector<std::string> &excludeOptions); + void sendNewRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule); + void showRenamingRules(); + void setFileCollision(int index); + void setFileError(int index); + void deletePartiallyTransferredFiles(bool checked); + void renameTheOriginalDestination(bool checked); + void checkDiskSpace(bool checked); + void defaultDestinationFolderBrowse(); + void defaultDestinationFolder(); + void followTheStrictOrder(bool checked); + void moveTheWholeFolder(bool checked); + void on_inodeThreads_editingFinished(); + void setBuffer(bool checked); + void setAutoStart(bool autoStart); +public slots: + void resetOptions() override; + void newLanguageLoaded() override; +signals: + void reloadLanguage() const; +}; + +#endif // FACTORY_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h new file mode 100755 index 0000000..247680c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/CopyEngineUltracopier-SpecVariable.h @@ -0,0 +1,43 @@ +/** \file Variable.h
+\brief Define the environment variable
+\author alpha_one_x86
+\licence GPL3, see the file COPYING */
+
+#ifndef VARIABLE_H
+#define VARIABLE_H
+
+//Un-comment this next line to put ultracopier plugin in debug mode
+#ifndef ULTRACOPIER_NODEBUG
+//#define ULTRACOPIER_PLUGIN_DEBUG
+//#define ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER
+//#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW
+#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER 150
+#endif
+
+#define ULTRACOPIER_PLUGIN_MINTIMERINTERVAL 50
+#define ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL 100
+#define ULTRACOPIER_PLUGIN_NUMSEMSPEEDMANAGEMENT 2
+#define ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER 1
+#define ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS 788965200//1995
+#define ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE 256 //in KB
+#define ULTRACOPIER_PLUGIN_DEFAULT_SEQUENTIAL_NUMBER_OF_BLOCK 512
+#define ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK 128
+#define ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE 16*1024 //in KB
+#define ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK 2048
+#define ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK 128 //in KB
+
+//if set, check the inode type at scanFileOrFolder, deprecated into the new algorithm and not used
+#define ULTRACOPIER_PLUGIN_CHECKLISTTYPE
+#define ULTRACOPIER_PLUGIN_SPEED_SUPPORT
+
+//#define ULTRACOPIER_PLUGIN_RIGHTS
+
+/** \brief Need be greater than 2, but greater than 20 to be efficient */
+#define ULTRACOPIER_PLUGIN_TIME_UPDATE_TRASNFER_LIST 40
+#define ULTRACOPIER_PLUGIN_TIME_UPDATE_PROGRESSION 200
+#define ULTRACOPIER_PLUGIN_TIME_UPDATE_MOUNT_MS 60*1000
+
+#endif // VARIABLE_H
+
+
+
diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp new file mode 100755 index 0000000..79e1088 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.cpp @@ -0,0 +1,63 @@ +/** \file debugDialog.cpp +\brief Define the dialog to have debug information +\author alpha_one_x86 */ + +#include "DebugDialog.h" +#include "ui_debugDialog.h" +#include "CopyEngine.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + +DebugDialog::DebugDialog(QWidget *parent) : + QWidget(parent), + ui(new Ui::debugDialog) +{ + ui->setupUi(this); + connect(&timer,&QTimer::timeout,this,&DebugDialog::updateOnTimer); + timer.start(200); +} + +DebugDialog::~DebugDialog() +{ + delete ui; +} + +void DebugDialog::setTransferList(const std::vector<std::string> &list) +{ + ui->tranferList->clear(); + unsigned int index=0; + while(index<list.size()) + { + ui->tranferList->addItem(QString::fromStdString(list.at(index))); + index++; + } +} + +void DebugDialog::setActiveTransfer(const int &activeTransfer) +{ + ui->spinBoxActiveTransfer->setValue(activeTransfer); +} + +void DebugDialog::setInodeUsage(const int &inodeUsage) +{ + ui->spinBoxNumberOfInode->setValue(inodeUsage); +} + +void DebugDialog::setTransferThreadList(const std::vector<std::string> &list) +{ + ui->transferThreadList->clear(); + unsigned int index=0; + while(index<list.size()) + { + ui->transferThreadList->addItem(QString::fromStdString(list.at(index))); + index++; + } +} + +void DebugDialog::updateOnTimer() +{ + ui->alreadyExistsQueue->setValue(copyEngine->alreadyExistsQueue.size()); + ui->errorQueue->setValue(copyEngine->errorQueue.size()); +} + +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h new file mode 100755 index 0000000..0da388e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugDialog.h @@ -0,0 +1,48 @@ +/** \file debugDialog.h +\brief Define the dialog to have debug information +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGDAILOG_H +#define DEBUGDAILOG_H + +#include "Environment.h" + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +#include <QWidget> +#include <QTimer> + +namespace Ui { + class debugDialog; +} + +class CopyEngine; + +/// \brief class to the dialog to have debug information +class DebugDialog : public QWidget +{ + Q_OBJECT +public: + explicit DebugDialog(QWidget *parent = 0); + ~DebugDialog(); + /// \brief to set the transfer list, limited in result to not slow down the application + void setTransferList(const std::vector<std::string> &list); + /// \brief show the transfer thread, it show be a thread pool in normal time + void setTransferThreadList(const std::vector<std::string> &list); + /// \brief show how many transfer is active + void setActiveTransfer(const int &activeTransfer); + /// \brief show many many inode is manipulated + void setInodeUsage(const int &inodeUsage); + + CopyEngine *copyEngine; +private: + Ui::debugDialog *ui; + QTimer timer; + +private slots: + void updateOnTimer(); +}; + +#endif // ULTRACOPIER_PLUGIN_DEBUG_WINDOW + +#endif // DEBUGDAILOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h b/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h new file mode 100755 index 0000000..f9b5349 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_PLUGIN_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_PLUGIN_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp new file mode 100755 index 0000000..e9b996d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.cpp @@ -0,0 +1,53 @@ +#include "DiskSpace.h" +#include "ui_DiskSpace.h" +#include "StructEnumDefinition_CopyEngine.h" + +DiskSpace::DiskSpace(FacilityInterface * facilityEngine,std::vector<Diskspace> list,QWidget *parent) : + QDialog(parent), + ui(new Ui::DiskSpace) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + ok=false; + int index=0; + int size=list.size(); + QString drives; + while(index<size) + { + drives+=tr("Drives %1 have %2 available but need %3") + .arg(QString::fromStdString(list.at(index).drive)) + .arg(QString::fromStdString(facilityEngine->sizeToString(list.at(index).freeSpace))) + .arg(QString::fromStdString(facilityEngine->sizeToString(list.at(index).requiredSpace))); + drives+=QStringLiteral("<br />"); + index++; + } + ui->drives->setText(drives); +} + +DiskSpace::~DiskSpace() +{ + delete ui; +} + +void DiskSpace::on_ok_clicked() +{ + ok=true; + close(); +} + +void DiskSpace::on_cancel_clicked() +{ + ok=false; + close(); +} + +bool DiskSpace::getAction() const +{ + return ok; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h new file mode 100755 index 0000000..5a923ab --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.h @@ -0,0 +1,29 @@ +#ifndef DISKSPACE_H +#define DISKSPACE_H + +#include <QDialog> +#include <vector> +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class DiskSpace; +} + +class DiskSpace : public QDialog +{ + Q_OBJECT + +public: + explicit DiskSpace(FacilityInterface * facilityEngine,std::vector<Diskspace> list,QWidget *parent = 0); + ~DiskSpace(); + bool getAction() const; +private slots: + void on_ok_clicked(); + void on_cancel_clicked(); +private: + Ui::DiskSpace *ui; + bool ok; +}; + +#endif // DISKSPACE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui new file mode 100755 index 0000000..ebf380f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DiskSpace.ui @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DiskSpace</class> + <widget class="QDialog" name="DiskSpace"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>367</width> + <height>146</height> + </rect> + </property> + <property name="windowTitle"> + <string>Disk space</string> + </property> + <property name="windowIcon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</iconset> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>You need more space on this drive to finish this transfer</string> + </property> + </widget> + </item> + <item> + <widget class="QTextBrowser" name="drives"/> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="ok"> + <property name="text"> + <string>Continue</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancel"> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources> + <include location="copyEngineResources.qrc"/> + </resources> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp new file mode 100755 index 0000000..148eabb --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.cpp @@ -0,0 +1,180 @@ +#include "DriveManagement.h" + +#include <QDir> +#include <QFileInfoList> +#include <QStorageInfo> + +#include "../../../cpp11addition.h" + +DriveManagement::DriveManagement() +{ + tryUpdate(); + #ifdef Q_OS_WIN32 + reg3=std::regex("^[a-zA-Z]:[\\\\/].*"); + reg4=std::regex("^([a-zA-Z]:[\\\\/]).*$"); + #endif + /// \warn ULTRACOPIER_DEBUGCONSOLE() don't work here because the sinal slot is not connected! +} + +//get drive of an file or folder +/// \todo do network drive support for windows +std::string DriveManagement::getDrive(const std::string &fileOrFolder) const +{ + const std::string &inode=fileOrFolder; + Q_UNUSED(inode); + #ifdef Q_OS_WIN32 + //optimized to windows version: + if(fileOrFolder.size()>=3) + { + if(fileOrFolder.at(1)==L':' && (fileOrFolder.at(2)==L'\\' || fileOrFolder.at(2)==L'/')) + { + char driveLetter=toupper(fileOrFolder.at(0)); + return driveLetter+std::string(":/"); + } + } + + if(fileOrFolder.size()>=5) + { + char f1=fileOrFolder.at(0); + char f2=fileOrFolder.at(1); + if(f1=='/' || f1=='\\') + if(f2=='/' || f2=='\\') + { + bool postSeparador=false; + std::string post; + unsigned int index=2; + unsigned int s=2; + while(index<fileOrFolder.size()) + { + const char c=fileOrFolder.at(index); + if(c=='/' || c=='\\') + { + if(postSeparador==false) + { + post="//"+fileOrFolder.substr(2,index-2); + postSeparador=true; + char c; + do + { + index++; + c=fileOrFolder.at(index); + } while((c=='/' || c=='\\') && index<fileOrFolder.size()); + s=index; + } + else + return post+"/"+fileOrFolder.substr(s,index-s); + } + index++; + } + return post; + } + /*std::string returnString=fileOrFolder; + std::regex_replace(returnString,reg2,"$1"); + return returnString;*/ + } + //due to lack of WMI support into mingw, the new drive event is never called, this is a workaround + if(std::regex_match(fileOrFolder,reg3)) + { + std::string returnString=fileOrFolder; + std::regex_replace(returnString,reg4,"$1"); + return QDir::toNativeSeparators(QString::fromStdString(returnString)).toUpper().toStdString(); + } + #else + int size=mountSysPoint.size(); + for (int i = 0; i < size; ++i) { + if(stringStartWith(inode,mountSysPoint.at(i))) + return mountSysPoint.at(i); + } + #endif + //if unable to locate the right mount point + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"unable to locate the right mount point for: "+inode+", mount point: "+stringimplode(mountSysPoint,";")); + return std::string(); +} + +std::string DriveManagement::getDriveType(const std::string &drive) const +{ + int index=vectorindexOf(mountSysPoint,drive); + if(index!=-1) + return driveType.at(index); + return std::string(); +} + +bool DriveManagement::isSameDrive(const std::string &file1,const std::string &file2) const +{ + if(file1.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"file1 is empty"); + return false; + } + if(file2.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"file2 is empty"); + return false; + } + if(mountSysPoint.size()==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"no mount point found"); + return false; + } + const std::string &drive1=getDrive(file1); + if(drive1.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"drive for the file1 not found: "+file1); + return false; + } + const std::string &drive2=getDrive(file2); + if(drive2.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"drive for the file2 not found: "+file2); + return false; + } + if(drive1==drive2) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,drive1+" is egal to "+drive2); + return true; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,drive1+" is NOT egal to "+drive2); + return false; + } +} + +void DriveManagement::tryUpdate() +{ + mountSysPoint.clear(); + driveType.clear(); + std::vector<std::pair<std::string/*mountSysPoint*/,std::string/*driveType*/> > temp; + const QList<QStorageInfo> mountedVolumesList=QStorageInfo::mountedVolumes(); + int index=0; + while(index<mountedVolumesList.size()) + { + std::string mountSysPoint=QDir::toNativeSeparators(mountedVolumesList.at(index).rootPath()).toStdString(); + #ifdef Q_OS_WIN32 + std::string driveType; + if(mountSysPoint!="A:\\" && mountSysPoint!="A:/" && mountSysPoint!="A:" && mountSysPoint!="A" && + mountSysPoint!="a:\\" && mountSysPoint!="a:/" && mountSysPoint!="a:" && mountSysPoint!="a") + { + const QByteArray &data=mountedVolumesList.at(index).fileSystemType(); + driveType=std::string(data.constData(),data.size()); + } + #else + const QByteArray &data=mountedVolumesList.at(index).fileSystemType(); + std::string driveType=std::string(data.constData(),data.size()); + #endif + temp.push_back(std::pair<std::string/*mountSysPoint*/,std::string/*driveType*/>(mountSysPoint,driveType)); + index++; + } + /*sort larger to small mount point, to correctly detect it: /mnt, / + then /mnt/folder/file will be detected as /mnt + then /folder/file will be detected as / */ + std::sort(temp.begin(), temp.end(), []( + std::pair<std::string/*mountSysPoint*/,std::string/*driveType*/> a, + std::pair<std::string/*mountSysPoint*/,std::string/*driveType*/> b) { + return a.first.size() > b.first.size(); + }); + for(const std::pair<std::string/*mountSysPoint*/,std::string/*driveType*/> &a : temp) { + mountSysPoint.push_back(a.first); + driveType.push_back(a.second); + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h new file mode 100755 index 0000000..24c8af6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/DriveManagement.h @@ -0,0 +1,34 @@ +#ifndef DRIVEMANAGEMENT_H +#define DRIVEMANAGEMENT_H + +#include <QObject> +#include <QString> +#include <QStringList> +#include <QRegularExpression> +#include <QStorageInfo> +#include <QTimer> + +#include "Environment.h" + +class DriveManagement : public QObject +{ + Q_OBJECT +public: + explicit DriveManagement(); + bool isSameDrive(const std::string &file1, const std::string &file2) const; + /// \brief get drive of an file or folder + std::string getDrive(const std::string &fileOrFolder) const; + std::string getDriveType(const std::string &drive) const; + void tryUpdate(); +protected: + std::vector<std::string> mountSysPoint; + std::vector<std::string> driveType; + #ifdef Q_OS_WIN32 + std::regex reg3,reg4; + #endif +signals: + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +}; + +#endif // DRIVEMANAGEMENT_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Environment.h b/plugins/CopyEngine/Ultracopier-Spec/Environment.h new file mode 100755 index 0000000..9cb5732 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Environment.h @@ -0,0 +1,11 @@ +/** \file Environment.h
+\brief Define the environment variable and global function
+\author alpha_one_x86
+\licence GPL3, see the file COPYING */
+
+#include "CopyEngineUltracopier-SpecVariable.h"
+/// \brief The global include
+#include "StructEnumDefinition.h"
+#include "StructEnumDefinition_CopyEngine.h"
+#include "DebugEngineMacro.h"
+#include "CompilerInfo.h"
diff --git a/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp new file mode 100755 index 0000000..c2e237a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.cpp @@ -0,0 +1,71 @@ +#include "EventLoop.h" +#include "CallBackEventLoop.h" + +#ifdef ASYNCFILEMANIP + +#ifdef Q_OS_LINUX +#include <sys/epoll.h> +#include <signal.h> +#endif + +EventLoop EventLoop::eventLoop; + +EventLoop::EventLoop() +{ + int efd = epoll_create1(0); + if(efd==-1) + { + fprintf(stderr,"%s, errno %i\n", strerror(errno), errno); + abort(); + } + //start();->put cpu at 100% + stopIt=false; +} + +EventLoop::~EventLoop() +{ + stop(); + QThread::wait(); +} + +void EventLoop::stop() +{ + stopIt=true; +} + +void EventLoop::run() +{ + while(!stopIt) + { + int number_of_events = epoll_wait(efd, events, MAXEVENTS, -1); + if (-1 == number_of_events && EINTR == errno) + return; + for(int i = 0; i < number_of_events; i++) + static_cast<CallBackEventLoop *>(events[i].data.ptr)->callBack(); + } +} + +void EventLoop::watchSource(CallBackEventLoop * const object,const int &fd) +{ + epoll_event event; + event.events = EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLET; + event.data.ptr = object; + if(epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event)!=0) + { + printf("%s, errno %i\n", strerror(errno), errno); + //abort(); + } +} + +void EventLoop::watchDestination(CallBackEventLoop * const object,const int &fd) +{ + epoll_event event; + event.events = EPOLLOUT | EPOLLPRI | EPOLLERR | EPOLLET; + event.data.ptr = object; + if(epoll_ctl(efd, EPOLL_CTL_ADD, fd, &event)!=0) + { + printf("%s, errno %i\n", strerror(errno), errno); + //abort(); + } +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h new file mode 100755 index 0000000..3d68ce2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h @@ -0,0 +1,30 @@ +#ifndef EVENTLOOP_H +#define EVENTLOOP_H + +#include "Variable.h" + +#ifdef ASYNCFILEMANIP +#include <QThread> +#include "CallBackEventLoop.h" +#include <sys/epoll.h> +#define MAXEVENTS 64 + +class EventLoop : public QThread +{ +public: + EventLoop(); + ~EventLoop(); + static EventLoop eventLoop; + void watchSource(CallBackEventLoop * const object,const int &fd); + void watchDestination(CallBackEventLoop * const object,const int &fd); +protected: + void run(); + void stop(); +private: + epoll_event events[MAXEVENTS]; + int efd; + bool stopIt; +}; +#endif + +#endif // EVENTLOOP_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp new file mode 100755 index 0000000..587a889 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.cpp @@ -0,0 +1,209 @@ +#include "FileErrorDialog.h" +#include "ui_fileErrorDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#include <QString> + +bool FileErrorDialog::isInAdmin=false; + +FileErrorDialog::FileErrorDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string errorString, const ErrorType &errorType,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileErrorDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileError_Cancel; + ui->label_error->setText(QString::fromStdString(errorString)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat p_statbuf; + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &p_statbuf)==0) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + uint64_t mdate=p_statbuf.st_mtimespec.tv_sec; + #else + uint64_t mdate=*reinterpret_cast<int64_t*>(&p_statbuf.st_mtim); + #endif + #else + uint64_t mdate=*reinterpret_cast<int64_t*>(&p_statbuf.st_mtime); + #endif + const uint64_t size=p_statbuf.st_size; +#endif + ui->label_content_file_name->setText( + QString::fromStdString( + TransferThread::resolvedName( + TransferThread::internalStringTostring(fileInfo) + ) + ) + ); + if(ui->label_content_file_name->text().isEmpty()) + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::internalStringTostring(fileInfo))); + ui->label_folder->setVisible(false); + ui->label_content_folder->setVisible(false); + } + else + { + std::string folder=TransferThread::internalStringTostring(fileInfo); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_folder->setText(QString::fromStdString(FSabsolutePath(TransferThread::internalStringTostring(fileInfo)))); + } + ui->label_content_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS<mdate) + { + ui->label_modified->setVisible(true); + ui->label_content_modified->setVisible(true); + ui->label_content_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + #ifdef Q_OS_WIN32 + if(fileInfoW.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + #else + if(S_ISDIR(p_statbuf.st_mode)) + #endif + { + this->setWindowTitle(tr("Error on folder")); + ui->label_size->hide(); + ui->label_content_size->hide(); + ui->label_file_name->setText(tr("Folder name")); + } + #ifdef Q_OS_UNIX + ui->label_file_destination->setVisible(p_statbuf.st_mode==S_IFLNK); + ui->label_content_file_destination->setVisible(p_statbuf.st_mode==S_IFLNK); + if(S_ISLNK(p_statbuf.st_mode)) + { + char buf[1024]; + ssize_t len; + if ((len = readlink(TransferThread::internalStringTostring(fileInfo).c_str(), buf, sizeof(buf)-1)) != -1) + { + buf[len] = '\0'; + ui->label_content_file_destination->setText(buf); + } + } + #else + ui->label_file_destination->setVisible(false); + ui->label_content_file_destination->setVisible(false); + #endif + } + else + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)))); + if(ui->label_content_file_name->text().isEmpty()) + { + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::internalStringTostring(fileInfo))); + ui->label_folder->setVisible(false); + ui->label_content_folder->setVisible(false); + } + else + ui->label_content_folder->setText(QString::fromStdString(FSabsolutePath(TransferThread::internalStringTostring(fileInfo)))); + + ui->label_file_destination->hide(); + ui->label_content_file_destination->hide(); + ui->label_size->hide(); + ui->label_content_size->hide(); + ui->label_modified->hide(); + ui->label_content_modified->hide(); + } + if(errorType==ErrorType_Folder || errorType==ErrorType_FolderWithRety) + ui->PutToBottom->hide(); + if(errorType==ErrorType_Folder) + ui->Retry->hide(); + + ui->Rights->hide(); + #ifdef ULTRACOPIER_PLUGIN_RIGHTS + if(isInAdmin) + ui->Rights->hide(); + #ifdef Q_OS_WIN32 + if(errorType!=ErrorType_Rights) + ui->Rights->hide(); + #else + ui->Rights->hide(); + #endif + #else + ui->Rights->hide(); + #endif +} + +FileErrorDialog::~FileErrorDialog() +{ + delete ui; +} + +void FileErrorDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void FileErrorDialog::on_PutToBottom_clicked() +{ + action=FileError_PutToEndOfTheList; + this->close(); +} + +void FileErrorDialog::on_Retry_clicked() +{ + action=FileError_Retry; + this->close(); +} + +void FileErrorDialog::on_Skip_clicked() +{ + action=FileError_Skip; + this->close(); +} + +void FileErrorDialog::on_Cancel_clicked() +{ + action=FileError_Cancel; + this->close(); +} + +bool FileErrorDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +FileErrorAction FileErrorDialog::getAction() +{ + return action; +} + +void FileErrorDialog::on_checkBoxAlways_clicked() +{ + ui->Rights->setEnabled(!ui->checkBoxAlways->isChecked()); +} + +#ifdef ULTRACOPIER_PLUGIN_RIGHTS +void FileErrorDialog::on_Rights_clicked() +{ +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h new file mode 100755 index 0000000..635eebc --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileErrorDialog.h @@ -0,0 +1,56 @@ +/** \file fileErrorDialog.h +\brief Define the dialog error on the file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QDialog> +#include <QWidget> +#include <QString> +#include <QDateTime> +#include <string> +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEERRORDIALOG_H +#define FILEERRORDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileErrorDialog; +} + +/// \brief to show error dialog, and ask what do +class FileErrorDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileErrorDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string errorString, const ErrorType &errorType, FacilityInterface *facilityEngine); + ~FileErrorDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileErrorAction getAction(); +protected: + void changeEvent(QEvent *e); + static bool isInAdmin; +private slots: + void on_PutToBottom_clicked(); + void on_Retry_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_checkBoxAlways_clicked(); + #ifdef ULTRACOPIER_PLUGIN_RIGHTS + void on_Rights_clicked(); + #endif +private: + Ui::fileErrorDialog *ui; + FileErrorAction action; +}; + +#endif // FILEERRORDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp new file mode 100755 index 0000000..e0d841e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp @@ -0,0 +1,313 @@ +#include "FileExistsDialog.h" +#include "ui_fileExistsDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include <QMessageBox> + +FileExistsDialog::FileExistsDialog(QWidget *parent, INTERNALTYPEPATH source, + INTERNALTYPEPATH destination, std::string firstRenamingRule, + std::string otherRenamingRule,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileExistsDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileExists_Cancel; + destinationInfo=TransferThread::internalStringTostring(destination); + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(destination)); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); + + ui->Overwrite->addAction(ui->actionOverwrite_if_newer); + ui->Overwrite->addAction(ui->actionOverwrite_if_older); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_modification_date); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_size); + ui->Overwrite->addAction(ui->actionOverwrite_if_not_same_size_and_date); + + ui->label_content_source_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(source)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(source)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_source_folder->setText(QString::fromStdString(folder)); + ui->label_content_destination_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(destination)))); + folder=TransferThread::internalStringTostring(FSabsolutePath(destination)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_destination_folder->setText(QString::fromStdString(folder)); + //QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(source.c_str(),GetFileExInfoStandard,&sourceW)) + { + uint64_t mdate=sourceW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=sourceW.ftLastWriteTime.dwLowDateTime; + uint64_t size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; +#else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(source).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(source).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif + const uint64_t size=source_statbuf.st_size; +#endif + ui->label_source_modified->setVisible(true); + ui->label_content_source_size->setVisible(true); + ui->label_content_source_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_source_modified->setVisible(true); + ui->label_content_source_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_content_source_size->setVisible(false); + ui->label_source_size->setVisible(false); + ui->label_source_modified->setVisible(false); + ui->label_content_source_modified->setVisible(false); + ui->label_source_modified->setVisible(false); + ui->label_content_source_modified->setVisible(false); + } +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA destinationW; + if(GetFileAttributesExW(destination.c_str(),GetFileExInfoStandard,&destinationW)) + { + uint64_t mdate=destinationW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=destinationW.ftLastWriteTime.dwLowDateTime; + uint64_t size=destinationW.nFileSizeHigh; + size<<=32; + size|=destinationW.nFileSizeLow; +#else + struct stat destination_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(destination).c_str(), &destination_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(destination).c_str(), &destination_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=destination_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&destination_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&destination_statbuf.st_mtime); + #endif + const uint64_t size=destination_statbuf.st_size; +#endif + ui->label_destination_modified->setVisible(true); + ui->label_content_destination_size->setVisible(true); + ui->label_content_destination_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_destination_modified->setVisible(true); + ui->label_content_destination_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_destination_modified->setVisible(false); + ui->label_content_destination_modified->setVisible(false); + ui->label_content_destination_size->setVisible(false); + ui->label_destination_size->setVisible(false); + ui->label_destination_modified->setVisible(false); + ui->label_content_destination_modified->setVisible(false); + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FileExistsDialog::~FileExistsDialog() +{ + delete ui; +} + +void FileExistsDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FileExistsDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return oldName; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FileExistsDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix=""; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + newFileName=QString::fromStdString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FileExistsDialog::on_Rename_clicked() +{ + action=FileExists_Rename; + this->close(); +} + +void FileExistsDialog::on_Overwrite_clicked() +{ + action=FileExists_Overwrite; + this->close(); +} + +void FileExistsDialog::on_Skip_clicked() +{ + action=FileExists_Skip; + this->close(); +} + +void FileExistsDialog::on_Cancel_clicked() +{ + action=FileExists_Cancel; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_newer_triggered() +{ + action=FileExists_OverwriteIfNewer; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_modification_date_triggered() +{ + action=FileExists_OverwriteIfNotSameMdate; + this->close(); +} + +FileExistsAction FileExistsDialog::getAction() +{ + return action; +} + +bool FileExistsDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FileExistsDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} + +void FileExistsDialog::on_checkBoxAlways_toggled(bool checked) +{ + Q_UNUSED(checked); + updateRenameButton(); +} + +void FileExistsDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FileExistsDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FileExistsDialog::on_actionOverwrite_if_older_triggered() +{ + action=FileExists_OverwriteIfOlder; + this->close(); +} + +void FileExistsDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_size_triggered() +{ + action=FileExists_OverwriteIfNotSameSize; + this->close(); +} + +void FileExistsDialog::on_actionOverwrite_if_not_same_size_and_date_triggered() +{ + action=FileExists_OverwriteIfNotSameSizeAndDate; + this->close(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h new file mode 100755 index 0000000..ae3e02b --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.h @@ -0,0 +1,68 @@ +/** \file fileExistsDialog.h +\brief Define the dialog when file already exists +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QDialog> +#include <QWidget> +#include <QString> +#include <QDateTime> +#include <string> +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEEXISTSDIALOG_H +#define FILEEXISTSDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileExistsDialog; +} + +/// \brief to show file exists dialog, and ask what do +class FileExistsDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileExistsDialog(QWidget *parent, INTERNALTYPEPATH source, INTERNALTYPEPATH destination, std::string firstRenamingRule, std::string otherRenamingRule, FacilityInterface *facilityEngine); + ~FileExistsDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Overwrite_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_actionOverwrite_if_newer_triggered(); + void on_actionOverwrite_if_not_same_modification_date_triggered(); + void updateRenameButton(); + void on_checkBoxAlways_toggled(bool checked); + void on_lineEditNewName_textChanged(const QString &arg1); + void on_lineEditNewName_returnPressed(); + void on_actionOverwrite_if_older_triggered(); + void on_lineEditNewName_editingFinished(); + void on_actionOverwrite_if_not_same_size_triggered(); + void on_actionOverwrite_if_not_same_size_and_date_triggered(); +private: + Ui::fileExistsDialog *ui; + FileExistsAction action; + std::string oldName; + std::string destinationInfo; + std::string firstRenamingRule; + std::string otherRenamingRule; +}; + +#endif // FILEEXISTSDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp new file mode 100755 index 0000000..69d63d0 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.cpp @@ -0,0 +1,226 @@ +#include "FileIsSameDialog.h" +#include "ui_fileIsSameDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include <QMessageBox> + +FileIsSameDialog::FileIsSameDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, + std::string firstRenamingRule, std::string otherRenamingRule,FacilityInterface * facilityEngine) : + QDialog(parent), + ui(new Ui::fileIsSameDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FileExists_Cancel; + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)); + destinationInfo=TransferThread::internalStringTostring(fileInfo); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); + ui->label_content_file_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(fileInfo)))); + std::string folder=FSabsolutePath(TransferThread::internalStringTostring(fileInfo)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_folder->setText(QString::fromStdString(folder)); + updateRenameButton(); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(fileInfo.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(fileInfo).c_str(), &source_statbuf)==0) + #endif + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif + const uint64_t size=source_statbuf.st_size; +#endif + ui->label_content_size->setText(QString::fromStdString(facilityEngine->sizeToString(size))); + ui->label_content_size->setVisible(true); + if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS<mdate) + { + ui->label_modified->setVisible(true); + ui->label_content_modified->setVisible(true); + ui->label_content_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + { + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + } + else + { + ui->label_content_size->setVisible(false); + ui->label_size->setVisible(false); + ui->label_modified->setVisible(false); + ui->label_content_modified->setVisible(false); + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FileIsSameDialog::~FileIsSameDialog() +{ + delete ui; +} + +void FileIsSameDialog::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FileIsSameDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return oldName; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FileIsSameDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix=""; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + newFileName=QString::fromStdString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FileIsSameDialog::on_Rename_clicked() +{ + action=FileExists_Rename; + this->close(); +} + +void FileIsSameDialog::on_Skip_clicked() +{ + action=FileExists_Skip; + this->close(); +} + +void FileIsSameDialog::on_Cancel_clicked() +{ + action=FileExists_Cancel; + this->close(); +} + +FileExistsAction FileIsSameDialog::getAction() +{ + return action; +} + +bool FileIsSameDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FileIsSameDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} + +void FileIsSameDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FileIsSameDialog::on_checkBoxAlways_toggled(bool checked) +{ + Q_UNUSED(checked); + updateRenameButton(); +} + +void FileIsSameDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FileIsSameDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h new file mode 100755 index 0000000..25a43b9 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FileIsSameDialog.h @@ -0,0 +1,63 @@ +/** \file fileIsSameDialog.h +\brief Define the dialog when file is same +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QDialog> +#include <QWidget> +#include <QString> +#include <QDateTime> +#include <string> +#include "Environment.h" +#include "../../../interface/FacilityInterface.h" + +#ifndef FILEISSAMEDIALOG_H +#define FILEISSAMEDIALOG_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +namespace Ui { + class fileIsSameDialog; +} + +/// \brief to show file is same dialog, and ask what do +class FileIsSameDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileIsSameDialog(QWidget *parent, INTERNALTYPEPATH fileInfo, std::string firstRenamingRule, std::string otherRenamingRule, FacilityInterface *facilityEngine); + ~FileIsSameDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void updateRenameButton(); + void on_lineEditNewName_textChanged(const QString &arg1); + void on_checkBoxAlways_toggled(bool checked); + void on_lineEditNewName_returnPressed(); + void on_lineEditNewName_editingFinished(); +private: + Ui::fileIsSameDialog *ui; + FileExistsAction action; + std::string oldName; + std::string destinationInfo; + std::string firstRenamingRule; + std::string otherRenamingRule; + +}; + +#endif // FILEISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp new file mode 100755 index 0000000..965f5f3 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.cpp @@ -0,0 +1,199 @@ +#include "FilterRules.h" +#include "ui_FilterRules.h" + +#include <QRegularExpression> + +FilterRules::FilterRules(QWidget *parent) : + QDialog(parent), + ui(new Ui::FilterRules) +{ + ui->setupUi(this); + updateChecking(); + haveBeenValided=false; +} + +FilterRules::~FilterRules() +{ + delete ui; +} + +bool FilterRules::getIsValid() +{ + return isValid && haveBeenValided; +} + +std::string FilterRules::get_search_text() +{ + return ui->search->text().toStdString(); +} + +SearchType FilterRules::get_search_type() +{ + switch(ui->search_type->currentIndex()) + { + case 0: + return SearchType_rawText; + case 1: + return SearchType_simpleRegex; + case 2: + return SearchType_perlRegex; + } + return SearchType_simpleRegex; +} + +ApplyOn FilterRules::get_apply_on() +{ + switch(ui->apply_on->currentIndex()) + { + case 0: + return ApplyOn_file; + case 2: + return ApplyOn_fileAndFolder; + case 1: + return ApplyOn_folder; + } + return ApplyOn_fileAndFolder; +} + +bool FilterRules::get_need_match_all() +{ + return ui->need_match_all->isChecked(); +} + +void FilterRules::set_search_text(std::string search_text) +{ + ui->search->setText(QString::fromStdString(search_text)); +} + +void FilterRules::set_search_type(SearchType search_type) +{ + switch(search_type) + { + case SearchType_rawText: + ui->search_type->setCurrentIndex(0); + break; + case SearchType_simpleRegex: + ui->search_type->setCurrentIndex(1); + break; + case SearchType_perlRegex: + ui->search_type->setCurrentIndex(2); + break; + } +} + +void FilterRules::set_apply_on(ApplyOn apply_on) +{ + switch(apply_on) + { + case ApplyOn_file: + ui->apply_on->setCurrentIndex(0); + break; + case ApplyOn_fileAndFolder: + ui->apply_on->setCurrentIndex(2); + break; + case ApplyOn_folder: + ui->apply_on->setCurrentIndex(1); + break; + } +} + +void FilterRules::set_need_match_all(bool need_match_all) +{ + ui->need_match_all->setChecked(need_match_all); +} + +void FilterRules::on_search_textChanged(const std::string &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} + +void FilterRules::updateChecking() +{ + QRegularExpression regex; + isValid=!ui->search->text().isEmpty(); + if(isValid) + { + QString tempString; + if(ui->search_type->currentIndex()==0) + { + //tempString=QRegularExpression::escape(ui->search->text()); -> generate bug because escape contains slash + if(tempString.contains('/') || tempString.contains('\\')) + isValid=false; + } + else if(ui->search_type->currentIndex()==1) + { + tempString=QRegularExpression::escape(ui->search->text()); + tempString.replace(QStringLiteral("\\*"),QStringLiteral("[^\\\\/]*")); + } + else if(ui->search_type->currentIndex()==2) + { + tempString=ui->search->text(); + if(tempString.startsWith('^') && tempString.endsWith('$')) + { + ui->need_match_all->setChecked(true); + tempString.remove(QRegularExpression(QStringLiteral("^\\^"))); + tempString.remove(QRegularExpression(QStringLiteral("\\$$"))); + ui->search->setText(tempString); + } + } + if(isValid) + { + if(ui->need_match_all->isChecked()) + tempString=QStringLiteral("^")+tempString+QStringLiteral("$"); + regex=QRegularExpression(tempString); + isValid=regex.isValid(); + } + } + + ui->isValid->setChecked(isValid); + ui->testString->setEnabled(isValid); + ui->label_test_string->setEnabled(isValid); + ui->matched->setEnabled(isValid); + ui->matched->setChecked(isValid && ui->testString->text().contains(regex)); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid); +} + +void FilterRules::on_isValid_clicked() +{ + updateChecking(); +} + +void FilterRules::on_testString_textChanged(const std::string &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} + +void FilterRules::on_matched_clicked() +{ + updateChecking(); +} + +void FilterRules::on_search_type_currentIndexChanged(int index) +{ + Q_UNUSED(index); + updateChecking(); +} + +void FilterRules::on_need_match_all_clicked() +{ + updateChecking(); +} + +void FilterRules::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); + else + { + haveBeenValided=true; + accept(); + } +} + +void FilterRules::on_search_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateChecking(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h new file mode 100755 index 0000000..e57ea97 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.h @@ -0,0 +1,47 @@ +#ifndef FILTERRULES_H +#define FILTERRULES_H + +#include <QDialog> +#include <QAbstractButton> +#include <QPushButton> + +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class FilterRules; +} + +/** All the filter rules to include/exclude some file during the listing */ +class FilterRules : public QDialog +{ + Q_OBJECT + +public: + explicit FilterRules(QWidget *parent = 0); + ~FilterRules(); + bool getIsValid(); + std::string get_search_text(); + SearchType get_search_type(); + ApplyOn get_apply_on(); + bool get_need_match_all(); + void set_search_text(std::string search_text); + void set_search_type(SearchType search_type); + void set_apply_on(ApplyOn apply_on); + void set_need_match_all(bool need_match_all); +private slots: + void on_search_textChanged(const std::string &arg1); + void on_isValid_clicked(); + void on_testString_textChanged(const std::string &arg1); + void on_matched_clicked(); + void on_search_type_currentIndexChanged(int index); + void on_need_match_all_clicked(); + void on_buttonBox_clicked(QAbstractButton *button); + void on_search_textChanged(const QString &arg1); +private: + Ui::FilterRules *ui; + void updateChecking(); + bool isValid; + bool haveBeenValided; +}; + +#endif // FILTERRULES_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui new file mode 100755 index 0000000..a4006fe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FilterRules.ui @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>FilterRules</class> + <widget class="QDialog" name="FilterRules"> + <property name="windowModality"> + <enum>Qt::WindowModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>289</width> + <height>231</height> + </rect> + </property> + <property name="windowTitle"> + <string>Filters dialog</string> + </property> + <property name="windowIcon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/resources/resources/filter.png</normaloff>:/CopyEngine/resources/resources/filter.png</iconset> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <property name="margin"> + <number>1</number> + </property> + <property name="spacing"> + <number>1</number> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Search:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLineEdit" name="search"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Search type:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="search_type"> + <item> + <property name="text"> + <string>Raw text</string> + </property> + </item> + <item> + <property name="text"> + <string>Simplified regex</string> + </property> + </item> + <item> + <property name="text"> + <string>Perl's regex</string> + </property> + </item> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Apply on:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QComboBox" name="apply_on"> + <item> + <property name="text"> + <string>File</string> + </property> + </item> + <item> + <property name="text"> + <string>Folder</string> + </property> + </item> + <item> + <property name="text"> + <string>File and folder</string> + </property> + </item> + </widget> + </item> + <item row="3" column="0" colspan="2"> + <widget class="QCheckBox" name="need_match_all"> + <property name="text"> + <string>Whole string must match</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> + <widget class="QGroupBox" name="groupBoxChecking"> + <property name="title"> + <string>Checking</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0" colspan="2"> + <widget class="QCheckBox" name="isValid"> + <property name="text"> + <string>The regex is valid</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_test_string"> + <property name="text"> + <string>Test string:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="testString"/> + </item> + <item row="2" column="0" colspan="2"> + <widget class="QCheckBox" name="matched"> + <property name="text"> + <string>The test string matches with the regex</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="5" column="0" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>68</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources> + <include location="copyEngineResources.qrc"/> + </resources> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp b/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp new file mode 100755 index 0000000..214896c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.cpp @@ -0,0 +1,464 @@ +#include "Filters.h" +#include "ui_Filters.h" +#include "../../../cpp11addition.h" + +#include <QRegularExpression> + +Filters::Filters(QWidget *parent) : + QDialog(parent), + ui(new Ui::Filters) +{ + ui->setupUi(this); +} + +Filters::~Filters() +{ + delete ui; +} + +bool Filters::setFilters(std::vector<std::string> includeStrings,std::vector<std::string> includeOptions,std::vector<std::string> excludeStrings,std::vector<std::string> excludeOptions) +{ + if(includeStrings.size()!=includeOptions.size() || excludeStrings.size()!=excludeOptions.size()) + return false; + Filters_rules new_item; + + include.clear(); + unsigned int index=0; + while(index<(unsigned int)includeStrings.size()) + { + new_item.search_text=includeStrings.at(index); + std::vector<std::string> options=stringsplit(includeOptions.at(index),';'); + new_item.need_match_all=false; + new_item.search_type=SearchType_rawText; + new_item.apply_on=ApplyOn_fileAndFolder; + + if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) + new_item.search_type=SearchType_simpleRegex; + if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) + new_item.search_type=SearchType_perlRegex; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) + new_item.apply_on=ApplyOn_file; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) + new_item.apply_on=ApplyOn_folder; + if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) + new_item.need_match_all=true; + + if(convertToRegex(new_item)) + include.push_back(new_item); + + index++; + } + + exclude.clear(); + index=0; + while(index<excludeStrings.size()) + { + new_item.search_text=excludeStrings.at(index); + std::vector<std::string> options=stringsplit(excludeOptions.at(index),';'); + new_item.need_match_all=false; + new_item.search_type=SearchType_rawText; + new_item.apply_on=ApplyOn_fileAndFolder; + + if(vectorcontainsAtLeastOne(options,std::string("SearchType_simpleRegex"))) + new_item.search_type=SearchType_simpleRegex; + if(vectorcontainsAtLeastOne(options,std::string("SearchType_perlRegex"))) + new_item.search_type=SearchType_perlRegex; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_file"))) + new_item.apply_on=ApplyOn_file; + if(vectorcontainsAtLeastOne(options,std::string("ApplyOn_folder"))) + new_item.apply_on=ApplyOn_folder; + if(vectorcontainsAtLeastOne(options,std::string("need_match_all"))) + new_item.need_match_all=true; + + if(convertToRegex(new_item)) + exclude.push_back(new_item); + + index++; + } + + reShowAll(); + return true; +} + +void Filters::reShowAll() +{ + ui->inclusion->clear(); + unsigned int index=0; + while(index<(unsigned int)include.size()) + { + std::string entryShow=include.at(index).search_text+" ("; + std::vector<std::string> optionsToShow; + switch(include.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back(tr("Raw text").toStdString()); + break; + case SearchType_simpleRegex: + optionsToShow.push_back(tr("Simplified regex").toStdString()); + break; + case SearchType_perlRegex: + optionsToShow.push_back(tr("Perl's regex").toStdString()); + break; + default: + break; + } + switch(include.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back(tr("Only on file").toStdString()); + break; + case ApplyOn_folder: + optionsToShow.push_back(tr("Only on folder").toStdString()); + break; + default: + break; + } + if(include.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + entryShow+=stringimplode(optionsToShow,","); + entryShow+=")"; + ui->inclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); + index++; + } + ui->exclusion->clear(); + index=0; + while(index<(unsigned int)exclude.size()) + { + std::string entryShow=exclude.at(index).search_text+" ("; + std::vector<std::string> optionsToShow; + switch(exclude.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back(tr("Raw text").toStdString()); + break; + case SearchType_simpleRegex: + optionsToShow.push_back(tr("Simplified regex").toStdString()); + break; + case SearchType_perlRegex: + optionsToShow.push_back(tr("Perl's regex").toStdString()); + break; + default: + break; + } + switch(exclude.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back(tr("Only on file").toStdString()); + break; + case ApplyOn_folder: + optionsToShow.push_back(tr("Only on folder").toStdString()); + break; + default: + break; + } + if(exclude.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + entryShow+=stringimplode(optionsToShow,","); + entryShow+=")"; + ui->exclusion->addItem(new QListWidgetItem(QString::fromStdString(entryShow))); + index++; + } +} + +std::vector<Filters_rules> Filters::getInclude() const +{ + return include; +} + +std::vector<Filters_rules> Filters::getExclude() const +{ + return exclude; +} + +void Filters::newLanguageLoaded() +{ + ui->retranslateUi(this); + reShowAll(); +} + +void Filters::updateFilters() +{ + std::vector<std::string> includeStrings,includeOptions,excludeStrings,excludeOptions; + unsigned int index=0; + while(index<(unsigned int)include.size()) + { + includeStrings.push_back(include.at(index).search_text); + std::vector<std::string> optionsToShow; + + switch(include.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back("SearchType_rawText"); + break; + case SearchType_simpleRegex: + optionsToShow.push_back("SearchType_simpleRegex"); + break; + case SearchType_perlRegex: + optionsToShow.push_back("SearchType_perlRegex"); + break; + default: + break; + } + switch(include.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back("ApplyOn_file"); + break; + case ApplyOn_fileAndFolder: + optionsToShow.push_back("ApplyOn_fileAndFolder"); + break; + case ApplyOn_folder: + optionsToShow.push_back("ApplyOn_folder"); + break; + default: + break; + } + if(include.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + includeOptions.push_back(stringimplode(optionsToShow,";")); + index++; + } + index=0; + while(index<(unsigned int)exclude.size()) + { + excludeStrings.push_back(exclude.at(index).search_text); + std::vector<std::string> optionsToShow; + + switch(exclude.at(index).search_type) + { + case SearchType_rawText: + optionsToShow.push_back("SearchType_rawText"); + break; + case SearchType_simpleRegex: + optionsToShow.push_back("SearchType_simpleRegex"); + break; + case SearchType_perlRegex: + optionsToShow.push_back("SearchType_perlRegex"); + break; + default: + break; + } + switch(exclude.at(index).apply_on) + { + case ApplyOn_file: + optionsToShow.push_back("ApplyOn_file"); + break; + case ApplyOn_fileAndFolder: + optionsToShow.push_back("ApplyOn_fileAndFolder"); + break; + case ApplyOn_folder: + optionsToShow.push_back("ApplyOn_folder"); + break; + default: + break; + } + if(exclude.at(index).need_match_all) + optionsToShow.push_back(tr("Full match").toStdString()); + excludeOptions.push_back(stringimplode(optionsToShow,";")); + index++; + } + emit sendNewFilters(includeStrings,includeOptions,excludeStrings,excludeOptions); + emit haveNewFilters(); +} + +bool Filters::convertToRegex(Filters_rules &item) +{ + bool isValid=!item.search_text.empty(); + if(isValid) + { + std::regex regex; + std::string tempString; + if(item.search_type==SearchType_rawText) + { + //here to validate below the regex + tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); + //do search on string only on file or file and folder, QRegularExpression::escape() introduce \ on special char + if(item.apply_on!=ApplyOn::ApplyOn_folder) + if(item.search_text.find('/') != std::string::npos || item.search_text.find('\\') != std::string::npos) + isValid=false; + } + else if(item.search_type==SearchType_simpleRegex) + { + tempString=QRegularExpression::escape(QString::fromStdString(item.search_text)).toStdString(); + stringreplaceAll(tempString,"\\*","[^\\\\/]*"); + } + else if(item.search_type==SearchType_perlRegex) + { + tempString=item.search_text; + if(stringStartWith(tempString,'^') && stringEndsWith(tempString,'$')) + { + item.need_match_all=true; + if(stringStartWith(tempString,'^')) + tempString=tempString.substr(1,tempString.size()-1); + if(stringEndsWith(tempString,'$')) + tempString=tempString.substr(0,tempString.size()-1); + item.search_text=tempString; + } + } + if(isValid) + { + if(item.need_match_all==true) + tempString="^"+tempString+"$"; + regex=std::regex(tempString); + //isValid=regex.isValid(); + item.regex=regex; + return true; + } + else + return false; + } + return false; +} + +void Filters::on_remove_exclusion_clicked() +{ + bool removedEntry=false; + int index=0; + while(index<ui->exclusion->count()) + { + if(ui->exclusion->item(index)->isSelected()) + { + delete ui->exclusion->item(index); + exclude.erase(exclude.cbegin()+index); + removedEntry=true; + } + else + index++; + } + if(removedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_remove_inclusion_clicked() +{ + bool removedEntry=false; + int index=0; + while(index<ui->inclusion->count()) + { + if(ui->inclusion->item(index)->isSelected()) + { + delete ui->inclusion->item(index); + include.erase(include.cbegin()+index); + removedEntry=true; + } + else + index++; + } + if(removedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_add_exclusion_clicked() +{ + FilterRules dialog(this); + dialog.exec(); + if(dialog.getIsValid()) + { + Filters_rules new_item; + new_item.apply_on=dialog.get_apply_on(); + new_item.need_match_all=dialog.get_need_match_all(); + new_item.search_text=dialog.get_search_text(); + new_item.search_type=dialog.get_search_type(); + exclude.push_back(new_item); + reShowAll(); + updateFilters(); + } +} + +void Filters::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); +} + +void Filters::on_add_inclusion_clicked() +{ + FilterRules dialog(this); + dialog.exec(); + if(dialog.getIsValid()) + { + Filters_rules new_item; + new_item.apply_on=dialog.get_apply_on(); + new_item.need_match_all=dialog.get_need_match_all(); + new_item.search_text=dialog.get_search_text(); + new_item.search_type=dialog.get_search_type(); + if(convertToRegex(new_item)) + include.push_back(new_item); + reShowAll(); + updateFilters(); + } +} + +void Filters::on_edit_exclusion_clicked() +{ + bool editedEntry=false; + int index=0; + while(index<ui->exclusion->count()) + { + if(ui->exclusion->item(index)->isSelected()) + { + FilterRules dialog(this); + dialog.set_apply_on(exclude.at(index).apply_on); + dialog.set_need_match_all(exclude.at(index).need_match_all); + dialog.set_search_text(exclude.at(index).search_text); + dialog.set_search_type(exclude.at(index).search_type); + dialog.exec(); + if(dialog.getIsValid()) + { + exclude[index].apply_on=dialog.get_apply_on(); + exclude[index].need_match_all=dialog.get_need_match_all(); + exclude[index].search_text=dialog.get_search_text(); + exclude[index].search_type=dialog.get_search_type(); + if(!convertToRegex(exclude[index])) + exclude.erase(exclude.cbegin()+index); + editedEntry=true; + } + } + index++; + } + if(editedEntry) + { + reShowAll(); + updateFilters(); + } +} + +void Filters::on_edit_inclusion_clicked() +{ + bool editedEntry=false; + int index=0; + while(index<ui->inclusion->count()) + { + if(ui->inclusion->item(index)->isSelected()) + { + FilterRules dialog(this); + dialog.set_apply_on(exclude.at(index).apply_on); + dialog.set_need_match_all(exclude.at(index).need_match_all); + dialog.set_search_text(exclude.at(index).search_text); + dialog.set_search_type(exclude.at(index).search_type); + dialog.exec(); + if(dialog.getIsValid()) + { + exclude[index].apply_on=dialog.get_apply_on(); + exclude[index].need_match_all=dialog.get_need_match_all(); + exclude[index].search_text=dialog.get_search_text(); + exclude[index].search_type=dialog.get_search_type(); + if(!convertToRegex(exclude[index])) + exclude.erase(exclude.cbegin()+index); + editedEntry=true; + } + } + index++; + } + if(editedEntry) + { + reShowAll(); + updateFilters(); + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.h b/plugins/CopyEngine/Ultracopier-Spec/Filters.h new file mode 100755 index 0000000..60e2277 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.h @@ -0,0 +1,45 @@ +#ifndef FILTERS_H +#define FILTERS_H + +#include <QDialog> +#include <QStringList> + +#include "FilterRules.h" +#include "StructEnumDefinition_CopyEngine.h" + +namespace Ui { +class Filters; +} + +/** To add/edit one filter rules */ +class Filters : public QDialog +{ + Q_OBJECT +public: + explicit Filters(QWidget *parent = 0); + ~Filters(); + bool setFilters(std::vector<std::string> includeStrings, std::vector<std::string> includeOptions, std::vector<std::string> excludeStrings, std::vector<std::string> excludeOptions); + void reShowAll(); + std::vector<Filters_rules> getInclude() const; + std::vector<Filters_rules> getExclude() const; + void newLanguageLoaded(); +private: + Ui::Filters *ui; + std::vector<Filters_rules> include; + std::vector<Filters_rules> exclude; + void updateFilters(); + bool convertToRegex(Filters_rules &item); +signals: + void sendNewFilters(const std::vector<std::string> &includeStrings,const std::vector<std::string> &includeOptions,const std::vector<std::string> &excludeStrings,const std::vector<std::string> &excludeOptions) const; + void haveNewFilters() const; +private slots: + void on_remove_exclusion_clicked(); + void on_remove_inclusion_clicked(); + void on_add_exclusion_clicked(); + void on_buttonBox_clicked(QAbstractButton *button); + void on_add_inclusion_clicked(); + void on_edit_exclusion_clicked(); + void on_edit_inclusion_clicked(); +}; + +#endif // FILTERS_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Filters.ui b/plugins/CopyEngine/Ultracopier-Spec/Filters.ui new file mode 100755 index 0000000..ed6a0a2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Filters.ui @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Filters</class> + <widget class="QDialog" name="Filters"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>507</width> + <height>502</height> + </rect> + </property> + <property name="windowTitle"> + <string>Filters</string> + </property> + <property name="windowIcon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/filter.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/filter.png</iconset> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>1</number> + </property> + <property name="leftMargin"> + <number>1</number> + </property> + <property name="topMargin"> + <number>1</number> + </property> + <property name="rightMargin"> + <number>1</number> + </property> + <property name="bottomMargin"> + <number>1</number> + </property> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Exclusion filters</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>1</number> + </property> + <property name="leftMargin"> + <number>2</number> + </property> + <property name="topMargin"> + <number>2</number> + </property> + <property name="rightMargin"> + <number>2</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> + <item> + <widget class="QListWidget" name="exclusion"> + <property name="selectionMode"> + <enum>QAbstractItemView::MultiSelection</enum> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QToolButton" name="add_exclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/add.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/add.png</iconset> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="edit_exclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/edit.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/edit.png</iconset> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="remove_exclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</iconset> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>Inclusion filters</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="spacing"> + <number>1</number> + </property> + <property name="leftMargin"> + <number>2</number> + </property> + <property name="topMargin"> + <number>2</number> + </property> + <property name="rightMargin"> + <number>2</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>None = Include all</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QListWidget" name="inclusion"> + <property name="selectionMode"> + <enum>QAbstractItemView::MultiSelection</enum> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QToolButton" name="add_inclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/add.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/add.png</iconset> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="edit_inclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/edit.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/edit.png</iconset> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="remove_inclusion"> + <property name="icon"> + <iconset resource="copyEngineResources.qrc"> + <normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</normaloff>:/CopyEngine/Ultracopier-Spec/resources/remove.png</iconset> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources> + <include location="copyEngineResources.qrc"/> + </resources> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp new file mode 100755 index 0000000..f37acd1 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.cpp @@ -0,0 +1,252 @@ +#include "FolderExistsDialog.h" +#include "ui_folderExistsDialog.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#define CURRENTSEPARATOR "\\" +#else +#define CURRENTSEPARATOR "/" +#endif + +#include <QMessageBox> + +FolderExistsDialog::FolderExistsDialog(QWidget *parent, INTERNALTYPEPATH source, bool isSame, INTERNALTYPEPATH destination, + std::string firstRenamingRule, std::string otherRenamingRule) : + QDialog(parent), + ui(new Ui::folderExistsDialog) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_LINUX + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + flags=flags | Qt::WindowStaysOnTopHint; + setWindowFlags(flags); + + ui->setupUi(this); + action=FolderExists_Cancel; + oldName=TransferThread::resolvedName(TransferThread::internalStringTostring(destination)); + ui->lineEditNewName->setText(QString::fromStdString(oldName)); + ui->lineEditNewName->setPlaceholderText(QString::fromStdString(oldName)); +#ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfoW; + if(GetFileAttributesExW(source.c_str(),GetFileExInfoStandard,&fileInfoW)) + { + uint64_t mdate=fileInfoW.ftLastWriteTime.dwHighDateTime; + mdate<<=32; + mdate|=fileInfoW.ftLastWriteTime.dwLowDateTime; + uint64_t size=fileInfoW.nFileSizeHigh; + size<<=32; + size|=fileInfoW.nFileSizeLow; +#else + struct stat source_statbuf; + if(TransferThread::exists(source)) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=source_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&source_statbuf.st_mtime); + #endif +#endif + ui->label_content_source_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + ui->label_content_source_modified->hide(); + ui->label_content_source_folder_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(source)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(source)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_source_folder->setText(QString::fromStdString(folder)); + if(ui->label_content_source_folder_name->text().isEmpty()) + { + ui->label_source_folder_name->hide(); + ui->label_content_source_folder_name->hide(); + } + if(isSame) + { + this->destinationInfo=TransferThread::internalStringTostring(source); + ui->label_source->hide(); + ui->label_destination->hide(); + ui->label_destination_modified->hide(); + ui->label_destination_folder_name->hide(); + ui->label_destination_folder->hide(); + ui->label_content_destination_modified->hide(); + ui->label_content_destination_folder_name->hide(); + ui->label_content_destination_folder->hide(); + } + else + { + this->destinationInfo=TransferThread::internalStringTostring(destination); + this->setWindowTitle(tr("Folder already exists")); + struct stat destination_statbuf; + if(TransferThread::exists(destination)) + { + #ifdef Q_OS_UNIX + #ifdef Q_OS_MAC + const uint64_t mdate=destination_statbuf.st_mtimespec.tv_sec; + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&destination_statbuf.st_mtim); + #endif + #else + const uint64_t mdate=*reinterpret_cast<int64_t*>(&destination_statbuf.st_mtime); + #endif + ui->label_content_destination_modified->setText(QDateTime::fromMSecsSinceEpoch(mdate*1000).toString()); + } + else + ui->label_content_destination_modified->hide(); + ui->label_content_destination_folder_name->setText(QString::fromStdString(TransferThread::resolvedName(TransferThread::internalStringTostring(destination)))); + std::string folder=TransferThread::internalStringTostring(FSabsolutePath(destination)); + if(folder.size()>80) + folder=folder.substr(0,38)+"..."+folder.substr(folder.size()-38); + ui->label_content_destination_folder->setText(QString::fromStdString(folder)); + if(ui->label_content_destination_folder_name->text().isEmpty()) + { + ui->label_destination_folder_name->hide(); + ui->label_content_destination_folder_name->hide(); + } + } + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + on_SuggestNewName_clicked(); +} + +FolderExistsDialog::~FolderExistsDialog() +{ + delete ui; +} + +void FolderExistsDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +std::string FolderExistsDialog::getNewName() +{ + if(oldName==ui->lineEditNewName->text().toStdString() || ui->checkBoxAlways->isChecked()) + return ""; + else + return ui->lineEditNewName->text().toStdString(); +} + +void FolderExistsDialog::on_SuggestNewName_clicked() +{ + std::string destinationInfo=this->destinationInfo; + QString absolutePath=QString::fromStdString(FSabsolutePath(destinationInfo)); + QString fileName=QString::fromStdString(TransferThread::resolvedName(destinationInfo)); + QString suffix; + QString destination; + QString newFileName; + //resolv the suffix + if(fileName.contains(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")))) + { + suffix=fileName; + suffix.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\2")); + fileName.replace(QRegularExpression(QStringLiteral("^(.*)(\\.[a-z0-9]+)$")),QStringLiteral("\\1")); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%"); + else + { + newFileName=QString::fromStdString(firstRenamingRule); + } + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%"); + else + newFileName=QString::fromStdString(otherRenamingRule); + newFileName.replace(QStringLiteral("%number%"),QString::number(num)); + } + newFileName.replace(QStringLiteral("%name%"),fileName); + newFileName.replace(QStringLiteral("%suffix%"),suffix); + destination=absolutePath; + if(!destination.endsWith('/') + #ifdef Q_OS_WIN32 + && !destination.endsWith('\\') + #endif + ) + destination+=CURRENTSEPARATOR; + destination+=newFileName; + destinationInfo=destination.toStdString(); + num++; + } + while(TransferThread::exists(destinationInfo.c_str())); + ui->lineEditNewName->setText(newFileName); +} + +void FolderExistsDialog::on_Rename_clicked() +{ + action=FolderExists_Rename; + this->close(); +} + +void FolderExistsDialog::on_Skip_clicked() +{ + action=FolderExists_Skip; + this->close(); +} + +void FolderExistsDialog::on_Cancel_clicked() +{ + action=FolderExists_Cancel; + this->close(); +} + +FolderExistsAction FolderExistsDialog::getAction() +{ + return action; +} + +bool FolderExistsDialog::getAlways() +{ + return ui->checkBoxAlways->isChecked(); +} + +void FolderExistsDialog::on_Merge_clicked() +{ + action=FolderExists_Merge; + this->close(); +} + +void FolderExistsDialog::on_lineEditNewName_editingFinished() +{ + updateRenameButton(); +} + +void FolderExistsDialog::on_lineEditNewName_returnPressed() +{ + updateRenameButton(); + if(ui->Rename->isEnabled()) + on_Rename_clicked(); + else + QMessageBox::warning(this,tr("Error"),tr("Try rename with using special characters")); +} + +void FolderExistsDialog::on_lineEditNewName_textChanged(const QString &arg1) +{ + Q_UNUSED(arg1); + updateRenameButton(); +} + +void FolderExistsDialog::updateRenameButton() +{ + ui->Rename->setEnabled(ui->checkBoxAlways->isChecked() || (!ui->lineEditNewName->text().contains(QRegularExpression("[/\\\\\\*]")) && oldName!=ui->lineEditNewName->text().toStdString() && !ui->lineEditNewName->text().isEmpty())); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h new file mode 100755 index 0000000..8681ba6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/FolderExistsDialog.h @@ -0,0 +1,60 @@ +/** \file folderExistsDialog.h +\brief Define the dialog when file exists +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef FOLDERISSAMEDIALOG_H +#define FOLDERISSAMEDIALOG_H + +#include <QDialog> +#include <string> + +#include "Environment.h" + +namespace Ui { + class folderExistsDialog; +} + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +/// \brief to show file exists dialog, and ask what do +class FolderExistsDialog : public QDialog +{ + Q_OBJECT + +public: + /// \brief create the object and pass all the informations to it + explicit FolderExistsDialog(QWidget *parent,INTERNALTYPEPATH source,bool isSame,INTERNALTYPEPATH destination,std::string firstRenamingRule,std::string otherRenamingRule); + ~FolderExistsDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FolderExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void updateRenameButton(); + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_Merge_clicked(); + void on_lineEditNewName_editingFinished(); + void on_lineEditNewName_returnPressed(); + void on_lineEditNewName_textChanged(const QString &arg1); +private: + Ui::folderExistsDialog *ui; + FolderExistsAction action; + std::string oldName; + std::string firstRenamingRule; + std::string otherRenamingRule; + std::string destinationInfo; +}; + +#endif // FOLDERISSAMEDIALOG_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm Binary files differnew file mode 100755 index 0000000..a48b608 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts new file mode 100755 index 0000000..a94fa18 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ar/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ar_JO"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>تم إجبار المحرك على الحركة ، لا يمكنك نسخه</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>تم إجبار المحرك على النسخ ، لا يمكنك التحرك معه</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>الوجهه</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>استخدام الوجهة الفعلية "%1" ؟</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>تم فرض الوضع مسبقا. هذا خطا داخلي ، الرجاء الإبلاغ عنه</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>اسال</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>تخطي</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>دمج</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>اعاده تسميه</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>وضع في نهاية</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>الكتابة فوق</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>الكتابة فوق إذا كان مختلفا</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>الكتابة فوق إذا كان أحدث</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>الكتابة فوق إذا كان أقدم</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>خطا في الخيارات</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>اسال</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>تخطي</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>دمج</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>اعاده تسميه</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>وضع في نهاية</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>الكتابة فوق</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>الكتابة فوق إذا كان مختلفا</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>الكتابة فوق إذا كان أحدث</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>الكتابة فوق إذا كان أقدم</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>خطا في الخيارات</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>لم يتم تحميل محرك الخيارات. غير قادر علي الوصول إلى الفلاتر</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>مساحة القرص</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>تحتاج مساحة أكبر على محرك الاقراص هذا لإنهاء هذا النقل</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>مواصله</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>إلغاء الأمر</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>تتوفر %2 محركات الاقراص %1 ولكن تحتاج %3</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>خطأ في المجلد</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>اسم المجلد</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation>% اسم%-نسخ% لاحقه%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>(% الاسم%-النسخ (% العدد%% اللاحق +ه%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>الخطا</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>حاول أعاده تسميه باستخدام أحرف خاصه</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation>% اسم%-نسخ% لاحقه%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>(% الاسم%-النسخ (% العدد%% اللاحق +ه%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>الخطا</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>حاول أعاده تسميه باستخدام أحرف خاصه</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>بحث:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>نوع البحث:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>نص خام</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Simplified regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>تنطبق على:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>ملف</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>مجلد</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>ملف ومجلد</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>سلسله اختبار يطابق مع regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>التحقق</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>سلسله الاختبار:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>حوار الفلاتر</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>يجب ان تتطابق السلسلة الكاملة</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>regex صالحة</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>فلاتر</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>فلاتر الاستبعاد</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>فلاتر مدرجة</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>بلا = تضمين الكل</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>نص خام</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>المبسطة regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>فقط في الملف</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>فقط في المجلد</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>تطابق كامل</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>المجلد موجود بالفعل</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation>% اسم%-نسخ% لاحقه%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>(% الاسم%-النسخ (% العدد%% اللاحق +ه%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>الخطا</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>حاول أعاده التسميه باستخدام أحرف خاصه</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>غير قادر علي القيام بنقل المادة أو نسخه إلى وضع إجباري غير صحيح: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>غير قادر على حفظ قائمه النقل: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>مشكلة في قراءة الملف ، أو حجم الملف هو 0</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>العنوان الرأسي الخاطئ: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>قائمة النقل في الوضع المختلط ، ولكن هذا المثيل ليس في هذا الوضع</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>قائمه النقل في وضع النسخ ولكن هذا المثيل غير في هذا الوضع</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>قائمه النقل في وضع النقل ، ولكن هذا المثيل ليس في هذا الوضع</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>عثر على بعض الأخطاء اثناء تحليل الخط</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>غير قادر على فتح قائمه النقل: %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>غير قادر على إنشاء المجلد</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation>مجلد المصدر غير موجود</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation>غير قادر على أعاده تسميه المجلد المؤقت</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation>غير قادر على القيام بالخطوة الحقيقية النهائية المجلد</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation>غير قادر على نقل المجلد</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation>errno: %1 :غير قادر على نقل المجلد</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>غير قادر على أزاله</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation>خطا داخلي ، يرجى الإبلاغ عن ذلك!</translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation>غير قادر على قراءه الملف المصدر:</translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation>تم اقتطاع الملف اثناء القراءة ، وتغيير البيانات المحتملة</translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>أعاده التسمية الاولي</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation>% اسم%-نسخ% لاحقه%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation>% الاسم%-النسخ (% العدد%% اللاحق +ه%)</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation></p></body></html>لاحقه الملف</span>%لاحقه%<span style=" font-weight:600;">للعدد الإضافي ،</span>%عدد%<span style=" font-weight:600;">لاسم الملف الأصلي ،</span>%اسم%<span style=" font-weight:600;">المتغيرات: <html><head/><body><p></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>أعاده تسميه ثانيه</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>أعاده تسميه القواعد</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation>%1 - نسخ (%2)</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation>%1-نسخ (%2) %3</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>%1-نسخ</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>%1 - نسخ (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation>%اسم% - نسخ</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation>% الاسم%-النسخة (% العدد%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation>مشكله في قراءه المجلد</translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation>% اسم%-نسخ% لاحقه%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>(% الاسم%-النسخ (% العدد%% اللاحق +ه%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>الملف غير موجود</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation>غير قادر على تغيير التاريخ</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>حاول أعاده تسميه باستخدام أحرف خاصه</translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation>تاريخ تعديل خاطئ أو غير قادر علي الحصول عليه ، يمكنك تعطيل نقل الوقت للقيام بذلك</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished">غير قادر على إنشاء مجلد الوجهة:</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished">errno: %1 غير قادر علي إنشاء المجلد الوجهة</translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation>(خطأ في دقة المسار (مسار فارغ</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation>غير قادر على إنشاء مجلد الوجهة:</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>errno: %1 غير قادر علي إنشاء المجلد الوجهة</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation>خطا داخلي ، يرجى الإبلاغ عن ذلك!</translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>نقل</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>نقل المجلد بأكمله</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>نقل حقوق الملف</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>الاحتفاظ بتاريخ الملف</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation>إنشاء مسار كامل إذا لم يكن موجودا</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation>اختباري </translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation>البدء التلقائي</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>الخطا والاصطدام</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>عند خطا في المجلد</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>عند خطا في الملف</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>عندما تتضارب الملفات</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished">الكتابة فوق إذا اختلف تاريخ التعديل</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>عندما يتضارب المجلد</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>تحقق مما إذا كان مجلد الوجهة موجودا</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>أعاده تسميه القواعد</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>حذف الملفات المنقولة جزئيا</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>أعاده تسميه الوجهة الاصليه</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>الاداء</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation>Inode threads</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>متفرقات</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>تحقق من مساحة القرص</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation>استخدم هذا المجلد عندما لا يتم تعيين الوجهة</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>استعراض </translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>فلاتر</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>خطا في الملف</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>الخطا</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>معدل</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>اسم الملف</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>الوجهه</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>مجلد</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>& تنفيذ هذا الاجراء دوما</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>جرب مع الامتيازات المرتفعة</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>وضع إلى أسفل</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>اعاده المحاوله</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>&تخطي</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>&الغاء الامر</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>الملف موجود</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>المصدر</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>الوجهه</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>معدل</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>اسم الملف</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>مجلد</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>اقتراح &اسم جديد</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>& تنفيذ هذا الاجراء دوما</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>الكتابة فوق إذا اختلف تاريخ التعديل</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>&اعاده تسميه</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>&الكتابة فوق</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>&تخطي</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>&الغاء الامر</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>الكتابة فوق إذا كان أحدث</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>الكتابة فوق إذا كان أقدم</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>معدل</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>اسم الملف</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>المصدر والوجهة متشابهان</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>مجلد</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>اقتراح &اسم جديد</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>& تنفيذ هذا الاجراء دوما</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>&اعاده تسميه</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>&تخطي</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>&الغاء الامر</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>المصدر</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>الوجهه</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>المصدر والوجهة متطابقان</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>معدل</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>اسم المجلد</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>مجلد</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>اقتراح &اسم جديد</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>& تنفيذ هذا الاجراء دوما</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>&اعاده تسميه</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>دمج</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>تخطي</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>&الغاء الامر</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm Binary files differnew file mode 100755 index 0000000..10475cf --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts new file mode 100755 index 0000000..dc9f497 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/de/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de" sourcelanguage="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>Verschiebemodus - Sie können nicht kopieren</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>Kopiermodus - Sie können nicht verschieben</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>Ziel</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>Aktuelles Ziel: "%1" benutzen?</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>Der Modus wurde vorher erzwungen. Interner Fehler - Bitte bei mir melden</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>Fragen</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>Überspringen</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>Fusionieren</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>Umbenennen</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>Ans Ende verschieben</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>Überschreiben</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>Überschreiben, falls verschieden</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>Überschreiben, falls neuer</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>Überschreiben, falls älter</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>Fehlerhafte Optionen</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Optionen nicht geladen - Kein Zugriff auf Filter</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>Fragen</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>Überspringen</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>Fusionieren</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>Umbenennen</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>Ans Ende verschieben</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>Überschreiben</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>Überschreiben, falls verschieden</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>Überschreiben, falls neuer</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>Überschreiben, falls älter</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>Fehlerhafte Optionen</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Option nicht geladen - Kein Zugriff auf Filter</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>Option nicht geladen - Kann nicht auf Filter zugreifen</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>Speicherplatz</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>Zu wenig Speicherplatz auf diesem Laufwerk</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>Fortsetzen</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>Abbrechen</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>Laufwerk %1: %2 verfügbar %3 benötigt</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>Ordnerfehler</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>Ordnername</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished">%name% - Kopie%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished">%name% - Kopie% (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>Fehler</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>Versuche Umbenennung mit Sonderzeichen</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished">%name% - Kopie%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished">%name% - Kopie% (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>Fehler</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>Versuche Umbenennung mit Sonderzeichen</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Suche:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Suche (Typ):</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>Roh-Text</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Vereinfachte RegEx</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Perls RegEx</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Anwenden auf:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>Datei</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>Ordner</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>Datei und Ordner</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>Die Test-Zeichenfolge stimmt mit RegEx überein</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>Überprüfen</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Test-Zeichenfolge:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Filter-Dialog</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>Ganze Zeichenfolge muss übereinstimmen</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>Die RegEx ist gültig</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Filter</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>Ausschließungs-Filter</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>Einschließungs-Filter</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Keiner = Alle einschließen</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>Roh-Text</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Vereinfachte RegEx</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Perls RegEx</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Nur auf Datei</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Nur auf Ordner</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Volle Übereinstimmung</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>Ordner existiert bereits</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished">%name% - Kopie%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished">%name% - Kopie% (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>Fehler</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>Versuche Umbenennung mit Sonderzeichen</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>Falscher Modus: %1 - Kann Element nicht verschieben oder kopieren</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>Konnte die Transferliste: %1 nicht speichern</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>Lesefehler, oder Dateigröße=0</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Falscher Header: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>Die Transferliste ist im gemischten Modus, aber diese Instanz ist nicht im selben Modus</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>Die Transferliste ist im Kopiermodus, aber diese Instanz ist nicht im selben Modus</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>Die Transferliste ist im Verschiebe-Modus, aber diese Instanz ist nicht im selben Modus</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>Bei der Zeilenanalyse sind Fehler aufgetreten</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>Transferliste: %1 kann nicht geöffnet werden</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>Der Ordner kann nicht erstellt werden</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation>Quell-Ordner existiert nicht</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation>Kann den Ordner nicht temporär umbenennen</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation>Kann den Ordner nicht endgültig verschieben</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation>Kann den Ordner nicht verschieben</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation>Kann Ordner nicht verschieben: Fehler Nummer: %1</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>Kann nicht löschen</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>Erste Umbenennung</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation>%name% - Kopie%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation>%name% - Kopie% (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> für den originalen Dateinamen, <span style=" font-weight:600;">%number%</span> für die extra Nummer, <span style=" font-weight:600;">%suffix%</span> Datei suffix</p></body></html></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>Zweite Umbenennung</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Umbennungsregeln</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation>%1 - Kopie%2</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation>%1 - Kopie (%2) {1 ?} {2)%3?}</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>%1 - Kopie</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>%1 - Kopie (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation>%name% - Kopie</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation>%name% - Kopie (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation>Problem beim Lesen des Ordners</translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished">%name% - Kopie%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished">%name% - Kopie% (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>Datei nicht gefunden</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation>Kann Datum nicht ändern</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>Versuche Umbenennung mit Sonderzeichen</translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation>Falsches Änderungsdatum oder Fehler beim Auslesen, Sie können die Übertragung des Zeitstempels deaktivieren</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished">Zielordner konnte nicht erstellt werden: </translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished">Zielordner konnte nicht erstellt werden, Fehler Nummer: %1</translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished">Zielordner konnte nicht erstellt werden: </translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished">Zielordner konnte nicht erstellt werden, Fehler Nummer: %1</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>Übertragung</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>Verschiebe den ganzen Ordner</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>Übertrage die Dateirechte</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>Datum der Dateien beibehalten</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation>Vollen Pfad erstellen, wenn nicht vorhanden</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>Fehler und Kollision</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>Bei Ordnerfehler</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>Bei Dateifehler</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>Bei Dateikollision</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished">Überschreiben, falls Änderungsdatum verschieden</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>Bei Ordnerkollision</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>Prüfen ob Zielordner vorhanden ist</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>Umbennungsregeln</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>Unvollständig übertragene Dateien löschen</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>Original-Ziel umbenennen</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>Leistung</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>Verschiedenes</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>Auf freien Speicherplatz überprüfen</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation>Diesen Ordner benutzen, wenn kein Ziel definiert wurde</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>Wählen</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>Filter</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>Dateifehler</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>Fehler</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>Größe</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>Geändert</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>Ziel</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>Ordner</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>&Aktion immer ausführen</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>Mit erweiterten Rechten versuchen</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Ans Ende verschieben</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Wiederholen</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>Über&springen</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>Abbrechen (&C)</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>Die Datei existiert</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Quelle</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Ziel</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>Größe</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>Geändert</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>Ordner</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Neuen &Namen vorschlagen</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>&Aktion immer ausführen</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>Überschreiben, falls Änderungsdatum verschieden</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>Umbenennen (&R)</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>Überschreiben (&O)</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>Über&springen</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>Abbrechen (&C)</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Überschreiben, falls neuer</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>Überschreiben, falls älter</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>Größe</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>Geändert</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>Quelle und Ziel sind gleich</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>Ordner</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Neuen &Namen vorschlagen</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>&Aktion immer ausführen</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>Umbenennen (&R)</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>Über&springen</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>Abbrechen (&C)</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Quelle</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Ziel</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>Quelle und Ziel sind identisch</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>Geändert</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>Ordnername</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>Ordner</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Neuen &Namen vorschlagen</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>&Aktion immer ausführen</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>Umbenennen (&R)</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>Fusionieren</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>Überspringen</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>Abbrechen (&C)</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/el/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm Binary files differnew file mode 100755 index 0000000..d925dd6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts new file mode 100755 index 0000000..4a444fe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/en/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm Binary files differnew file mode 100755 index 0000000..feaf1fc --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts new file mode 100755 index 0000000..aad6412 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/es/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="es" sourcelanguage="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>El motor se ve obligado a moverse, no se puede copiar con ella</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>El motor se ve obligado a copiar, no te puedes mover con él</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>Destino</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>Utilice el destino "%1" actual?</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>El modo se ha visto obligado previamente. Este es un error interno, por favor repórtelo</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>Pedir</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>Omitir</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>Unir</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>Cambiar el nombre</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>Ponga al final</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>Sobrescribir</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>Sobrescribir si es diferente</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>Sobrescribir si nuevo</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>Sobrescribir si es mayor</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>error Opciones</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Opciones del motor no está cargado. No es posible acceder a los filtros</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>Pedir</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>Omitir</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>Unir</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>Cambiar el nombre</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>Ponga al final</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>Sobrescribir</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>Sobrescribir si es diferente</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>Sobrescribir si nuevo</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>Sobrescribir si es mayor</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>error Opciones</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Opciones del motor no está cargado. No es posible acceder a los filtros</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>Opciones del motor no está cargado, no se puede acceder a los filtros</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>Espacio en disco</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>Necesita más espacio en esta unidad para terminar esta transferencia</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>Continuar</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>Cancelar</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>Drives %1 tienen %2 disponible, pero necesitan %3</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>Error en la carpeta</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>Nombre de la carpeta</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copia%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copia (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>Error</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>Trate de cambiar el nombre con el uso de caracteres especiales</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copia%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copia (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>Error</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>Trate de cambiar el nombre con el uso de caracteres especiales</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Buscar:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Tipo de búsqueda:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>texto Fuente</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Regex simplificado</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Aplicar sobre:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>Archivos</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>Carpeta</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>Archivos y carpeta</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>La cadena de prueba coincide con la expresión regular</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>Verification</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Prueba de la cuerda:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Filtros de diálogo</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>Todo cadena debe coincidir</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>La expresión regular es válido</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Filtros</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>Filtros de exclusión</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>Filtros de inclusión</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Ninguno = Incluya todos los</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>texto Fuente</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Simplificado regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Sólo en el archivo</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Sólo en la carpeta</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Partido completo</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>Carpeta ya existe</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copia%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copia (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>Error</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>Trate de cambiar el nombre con el uso de caracteres especiales</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>No se puede hacer para mover o copiar elemento en modo incorrecto obligado: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>No se puede guardar la lista de transferencias: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>Problema al leer el archivo o archivos de tamaño es 0</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Encabezado incorrecto: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>La lista de transferencia está en modo mixto, pero este caso no es de este modo</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>La lista de transferencia está en el modo de copia, pero esta instancia no está en este modo</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>La lista de transferencia es el modo de desplazamiento, pero esta instancia no está en este modo</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>Algunos errores han sido encontrados durante el análisis de línea</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>No se puede abrir la lista de transferencias: %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>No se puede crear la carpeta</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation>La carpeta de origen no existe</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation>No es posible cambiar el nombre de la carpeta temporal</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation>No se puede hacer el movimiento final real de la carpeta</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation>No se puede mover la carpeta</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation>No se puede mover la carpeta: errno: %1</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>No se puede eliminar</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation>¡Error interno, por favor repórtelo!</translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation>No se puede leer el archivo fuente: </translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation>Archivo truncado durante la lectura, posible cambio de datos</translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>En primer lugar el cambio de nombre</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation>%name% - copia%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation>%name% - copia (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> para el nombre del archivo original, <span style=" font-weight:600;">%number%</span> para el número extra, <span style=" font-weight:600;">%suffix%</span> sufijo de archivo</p></body></html></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>En segundo lugar el cambio de nombre</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Reglas de Cambio de nombre</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation>%1 - copia%2</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation>%1 - copia (%2)%3</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>%1 - copia</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>%1 - copia (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation>%name% - copia</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation>%name% - copia (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation>Problema con la carpeta leída</translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copia%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copia (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>Archivo no encontrado</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation>No se puede cambiar la fecha</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>Trate de cambiar el nombre con el uso de caracteres especiales</translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation>Fecha de modificación incorrecta o incapaz de obtenerla, puede desactivar la transferencia de tiempo para hacerlo</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation>No se puede crear la carpeta de destino: </translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>No se puede crear la carpeta de destino, errno: %1</translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation>Error de resolución de ruta (ruta vacía)</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation>No se puede crear la carpeta de destino: </translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>No se puede crear la carpeta de destino, errno: %1</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation>¡Error interno, por favor repórtelo!</translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>Transferencia</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>Mueva la carpeta completa</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>Transferencia de los derechos de archivo</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>Mantener la fecha de archivo</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation>Crear ruta completa si no existe</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation>Suma de comprobación</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation>Inicio automático</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>Error y de la colisión</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>Cuando el error carpeta</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>Cuando archivo error</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>Cuando archivo colisión</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation>Sobrescribir si no es del mismo tamaño</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation>Sobrescribir si la fecha de modificación difiere</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>Cuando la colisión carpeta</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>Compruebe si existe la carpeta de destino</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>Reglas de Cambio de nombre</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>Eliminar archivos parcialmente transferidos</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>Cambie el nombre del destino original</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>Rendimiento</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation>Inode threads</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation>Desmarca esto en Windows crear problema</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>Misc</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>Compruebe el espacio en disco</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation>Use esta carpeta cuando el destino no esté configurado</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>Busque</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>Filtros</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>Error con el archivo</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>Error</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>Tamaño</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>Modificado</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>Nombre de archivo</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>Destino</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>Carpeta</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>&Siempre realice esta acción</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>Pruebe con privilegios elevados</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Ponga a abajo</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Reintentar</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>&Omitir</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>Cancelar</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>El archivo ya existe</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Fuente</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destino</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>Tamaño</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>Modificado</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>Nombre de archivo</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>Carpeta</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Sugerir nuevo &nombre</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>&Siempre realice esta acción</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>Sobrescribir si la fecha de modificación difiere</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation>Sobrescribir si no es del mismo tamaño</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation>Sobrescribir si no es del mismo tamaño y fecha</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>&Cambiar el nombre</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>&Sobrescribir</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>&Omitir</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>Ca&ncelar</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Sobrescribir si nuevo</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>Sobrescribir si es mayor</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>Tamaño</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>Modificado</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>Nombre de archivo</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>El origen y el destino son los mismos</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>Carpeta</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Sugerir nuevo nombre</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>&Siempre realice esta acción</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>Cambiar el nombre</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>Omitir</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>Cancelar</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Fuente</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destino</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>La fuente y el destino es idéntica</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>Modificado</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>Nombre de la carpeta</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>Carpeta</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Sugerir nuevo nombre</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>&Siempre realice esta acción</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>Cambiar el nombre</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>Unir</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>Omitir</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>Cancelar</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm Binary files differnew file mode 100755 index 0000000..c538b95 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts new file mode 100755 index 0000000..6bec60f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/fr/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr" sourcelanguage="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>Le moteur est forcé en déplacement, vous ne pouvez pas copier avec</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>Le moteur est forcé en copie, vous ne pouvez pas déplacer avec</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>Destination</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>Utiliser la destination actuelle "%1"?</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>Le mode a été forcé. C'est une erreur interne, merci de la repporter</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>Demander</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>Passer</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>Fusionner</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>Renommer</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>Mettre à la fin</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>Écraser</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>Écraser si différent</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>Écraser si plus récent</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>Écraser si plus vieux</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>Erreur d'options</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>Demander</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>Passer</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>Fusionner</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>Renommer</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>Mettre à la fin</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>Écraser</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>Écraser si différent</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>Écraser si plus récent</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>Écraser si plus vieux</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>Erreur d'options</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Le moteur d'options n'est pas chargé. Impossible d'accédé aux filtres</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>Moteur d'options non chargé, impossible d'accéder aux filtres</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>Espace disque</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>Vous avez besoin de plus d'espace pour finir ce transfert</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>Continuer</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>Annuler</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>Lecteur %1 as %2 disponible mais à besoin de %3</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>Erreur sur un dossier</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>Nom de répertoire</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copie%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copie (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>Erreur</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>Essaie de renommage avec caratéres interdits</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copie%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copie (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>Erreur</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>Essaie de renommage avec caratéres interdits</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Recherche:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Type de recherche:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>Texte brut</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Regex simplifiée</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Regex perl</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Appliquer sur:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>Fichier</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>Dossier</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>Fichier et dossier</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>La chaine de texte corresponds avec la regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>Vérification</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Chaine de test:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Dialogue des filtres</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>Toute la chaine doit correspondre</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>La regex est valid</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Filtres</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>Filtres d'exclusion</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>Filtres d'inclusion</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Aucun = tout inclure</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>Texte brute</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Regex simplifié</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Regex perl</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Appliquer sur fichier</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Appliquer sur dossier</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Correspondance totale</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>Dossier déjà existant</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copie%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copie (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>Erreur</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>Essaie de renommage avec caratéres interdits</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>Impossible de faire un déplacement ou une copie dans le mauvais mode forcé: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>Impossible de sauvegarder la liste de transfert: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>Problem durant la lecture, ou taille de fichier est 0</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Mauvais en-tête: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>La liste de transfert est en mode mixte, mais l'instance n'est pas dans ce mode</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>La liste de transfert est en mode copie, mais l'instance n'est pas dans ce mode</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>La liste de transfert est en mode déplacement, mais l'instance n'est pas dans ce mode</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>Certaine erreur ont été trouvé durant l'analise de la line</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>Impossible d'ouvrir la list de transfert: %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>Impossible de créer le répertoire</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation>Le dossier source n'éxiste pas</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation>Impossible de renommer le dossier</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation>Impossible de faire le déplacement final du dossier</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation>Impossible de déplacer le dossier</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation>Impossible de déplacer le dossier: errno: %1</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>Impossible de supprimer</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation>Erreur interne, veuillez la signaler!</translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation>Impossible de lire le fichier source: </translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation>Fichier tronqué lors de la lecture, modification possible des données</translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>Premier renommage</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation>%name% - copie%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation>%name% - copie (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> pour le nom original, <span style=" font-weight:600;">%number%</span> pour le numero extra, <span style=" font-weight:600;">%suffix%</span> suffix</p></body></html></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>Second renommage</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Règles de renommage</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation>%1 - copie%2</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation>%1 - copie (%2) {1 ?} {2)%3?}</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>%1 - copie</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>%1 - copie (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation>%name% - copie</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation>%name% - copie (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation>Probléme avec la lecture du dossier</translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation>%name% - copie%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>%name% - copie (%number%)%suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>Fichier non trouvé</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>Essaie de renommage avec caratéres interdits</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation>Impossible de changer la date</translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation>Mauvaise date de modification ou impossible de l'avoir, vous pouvez désactiver le transfert de celui-ci</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation>Impossible de créer le dossier de destination: </translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>Impossible de créer le dossier de destination, errno: %1</translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation>Erreur de résolution de chemin (chemin vide)</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation>Impossible de créer le dossier de destination: </translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>Impossible de créer le dossier de destination, errno: %1</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation>Erreur interne, veuillez la signaler!</translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>Transfert</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>Déplacer le dossier complet</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>Transférer les droits des fichiers</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>Garder la date du fichier</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation>Créer le dossier complet si il n'existe pas</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation>Somme de contrôle</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation>Démarrage automatique</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>Erreur et collision</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>En cas d'erreur de répertoire</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>En cas d'erreur de fichier</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>En cas de collision de fichier</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation>Écraser si pas la même taille</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation>Écraser si les dates différes</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>Lors d'une collision de dossier</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>Vérifier si le répertoire de destination existe</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>Règles de renommage</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>Supprimer les transferts partiels</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>Renommer la destination originale</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>Performance</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation>Threads d'inodes</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation>Décochez ceci sous Windows créer un problème</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>Divers</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>Vérifier l'espace disque</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation>Utiliser ce dossier quand la destination n'est pas défini</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>Parcourir</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>Filtres</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>Erreur avec un fichier</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>Erreur</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>Taille</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>Modifié</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>Nom de fichier</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>Destination</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>Dossier</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>&Toujours faire cette action</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>Essayer avec des priviléges suppérieurs</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Mettre à la fin</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Réessayer</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>&Passer</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>&Annuler</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>Le fichier existe</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Source</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destination</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>Taille</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>Modifié</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>Nom de fichier</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>Dossier</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Suggérer un &nouveau nom</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>&Toujours faire cette action</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>Écraser si les dates différes</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation>Écraser si pas la même taille</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation>Remplacer si ce n'est pas la même taille et la même date</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>&Renommer</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>&Écraser</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>&Passer</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>&Annuler</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Écraser si plus récent</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>Écraser si plus vieux</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>Taille</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>Modifié</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>Nom de fichier</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>La source et la destination sont identique</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>Dossier</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Suggérer un &nouveau nom</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>&Toujours faire cette action</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>&Renommer</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>&Passer</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>&Annuler</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Source</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destination</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>La source et la destination sont identique</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>Modifié</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>Nom de répertoire</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>Dossier</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Suggérer un &nouveau nom</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>&Toujours faire cette action</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>&Renommer</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>Fusionner</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>Passer</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>&Annuler</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hi/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm Binary files differnew file mode 100755 index 0000000..6b6a991 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts new file mode 100755 index 0000000..b7dde65 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/hu/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="hu"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>A motort mozgatásra kényszerítik, nem másolhatsz vele</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>A motort másolásra kényszerítik, nem mozgathatsz vele</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>Cél</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>Használja a jelenlegi célt: "%1"?</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>Ezt a módot már korábban kényszerítették. Belső hiba történt, kérlek jelentsd be</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>Kérdezzen rá</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>Kihagy</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>Összeolvaszt</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>Nevezze át</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>Helyezze a végére</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>Felülír</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>Felülír, ha különbözik</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>Felülír, ha újabb</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>Felülír, ha régebbi</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>Beállítási hiba</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>Kérdezzen rá</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>Kihagy</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>Összeolvaszt</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>Nevezze át</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>Helyezze a végére</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>Felülír</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>Felülír, ha különbözik</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>Felülír, ha újabb</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>Felülír, ha régebbi</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>Beállítási hiba</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>A beállítási motor nincs betöltve. A szűrők elérése nem lehetséges</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>A beállítási motor nincs betöltve, a szűrők elérése nem lehetséges</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>Lemezterület</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>Több szabad helyre van szükséged ezen a lemezen az átvitel befejezéséhez</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>Folytatás</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>Mégse</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>%1 meghajtón %2 hely van, de %3 szükséges</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>Hiba a mappával</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>Mappa neve</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>Hiba</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>Átnevezés speciális karakterek használatával</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>Hiba</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>Átnevezés speciális karakterek használatával</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Szűrők üzenet</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Keresés:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Keresés típusa:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>Nyers szöveg</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Egyszerűsített regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Perl regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Alkalmazás ezen:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>Fájl</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>Mappa</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>Fájl és mappa</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>A teljes szövegnek egyeznie kell</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>A tesztszöveg megegyezik a regexszel</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>Ellenőrzés</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>A regex érvényes</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Próbaszöveg:</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Szűrők</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>Kizáró szűrők</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>Használt szűrők</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Nincs = Mindet használ</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>Nyers szöveg</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Egyszerűsített regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Perl regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Csak fájlon</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Csak mappán</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Teljes egyezés</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>Mappa már létezik</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>Hiba</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>Átnevezés speciális karakterek használatával</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>Elem másolása vagy mozgatás nem lehetséges a hibás kényszerített módban: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>Átviteli lista mentése nem lehetséges: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>Hiba a fájl olvasásánál vagy a fálméret 0</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Hibás fejléc: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>Az átviteli lista kevert módban van, de ez a példány nincs</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>Az átviteli lista másolás módban van, de ez a példány nincs</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>Az átviteli lista mozgatás módban van, de ez a példány nincs</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>Néhány hiba történt a sorelemzés során</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>Az átviteli lista megnyitása nem lehetséges: %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>Mappa létrehozása nem lehetséges</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>Eltávolítás nem lehetséges</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Átnevezési szabályok</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>Első átnevezés</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>Második átnevezés</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished">%1 - másolás (%2) {1 ?} {2)%3?}</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>%1 - másolás</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>%1 - másolás (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished">%name% - másolás</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished">%name% - másolás (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>Fájl nem található</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>Átnevezés speciális karakterek használatával</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>Átvitel</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>Mozgassa át az egész mappát</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>Fájljogok átadása</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>Fájl dátumának megtartása</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>Hiba és ütközés</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>Mappa hiba esetén</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>Fájl hiba esetén</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>Fájl ütközés esetén</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished">Felülír, ha a módosítás dátuma különbözik</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>Mappa ütközés esetén</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>Célmappa létezésének ellenőrzése</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>Átnevezési szabályok</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>Részben átvitt fájlok törlése</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>Eredeti cél átnevezése</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>Teljesítmény</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>Egyéb</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>Lemezterület ellenőrzése</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>Tallózás</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>Szűrők</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>Hiba a fájllal</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>Hiba</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>Méret</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>Módosítva</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>Fájlnév</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>Cél</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>Mappa</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>&Mindig hajtsa végre ezt a műveletet</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>Próbálja meg emelt jogosultsággal</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Tegye legalulra</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Újra</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>&Kihagy</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>M&égse</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>A fájl létezik</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Forrás</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Cél</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>Méret</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>Módosítva</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>Fájlnév</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>Mappa</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Új &név ajánlása</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>&Mindig hajtsa végre ezt a műveletet</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>Felülír, ha a módosítás dátuma különbözik</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>Felülír, ha régebbi</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>&Átnevez</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>&Felülír</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>&Kihagy</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>&Mégse</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Felülír, ha újabb</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>Méret</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>Módosítva</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>Fájlnév</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>A forrás és a cél megegyezik</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>Mappa</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Új &név javasolása</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>&Mindig hajtsa végre ezt a műveletet</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>&Átnevez</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>&Kihagy</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>M&égse</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Forrás</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Cél</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>Módosítva</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>Mappa neve</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Új &név javasolása</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>A forrás és a cél megegyezik</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>Mappa</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>&Mindig hajtsa végre ezt a műveletet</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>&Átnevez</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>Összeolvaszt</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>Kihagy</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>M&égse</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/id/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm Binary files differnew file mode 100755 index 0000000..5090866 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts new file mode 100644 index 0000000..bedc49e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/it/translation.ts @@ -0,0 +1,1150 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="it" sourcelanguage="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation>Impossibile copiare, il motore di copia forzerà lo spostamento</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation>Impossibile effettuare lo spostamento, il motore di copia forzerà la copia</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation>Percorso di destinazione</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation>Usare l'attuale destinazione? "%1"</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation>La modalità è stata forzata precedentemente. Questo è un errore interno, si prega di riportatelo</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation>Chiedi</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation>Unisci</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation>Rinomina</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation>Metti in coda</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation>Sovrascrivi</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation>Sovrascrivi se differente</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation>Sovrascrivi se più recente</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation>Sovrascrivi se meno recente</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation>Errore opzioni</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Motore delle opzioni non caricato. Impossibile accedere ai filtri</translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation>Chiedi</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation>Unisci</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation>Rinomina</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation>Metti in coda</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation>Sovrascrivi</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation>Sovrascrivi se differente</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation>Sovrascrivi se più recente</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation>Sovrascrivi se meno recente</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation>Errore opzioni</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation>Motore delle opzioni non caricato. Impossibile accedere ai filtri</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation>Le opzioni del motore di copia non sono state caricate. Impossibile accedere ai filtri</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation>Spazio su disco</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation>Hai bisogno di più spazio su questo disco per finire il trasferimento</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation>Continua</translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation>Annulla</translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation>L'unità %1 ha %2 disponibili, ma necessita di %3</translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation>Errore con la cartella</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation>Nome cartella</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation>Copia di %name% %suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>Copia di %name% (%number%) %suffix%</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation>Errore</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation>Tenta ridenominazione usando caratteri speciali</translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation>Copia di %name% %suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>Copia di %name% (%number%) %suffix%</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation>Errore</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation>Tenta ridenominazione usando caratteri speciali</translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Cerca:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Cerca tipologia:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>Testo nudo</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>Espressione regolare semplificata</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Espressione regolare in Perl</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Applicare a:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>File</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>Cartella</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>File e cartelle</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation>La stringa di prova combacia con l'espressione regolare</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>Verifica</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Stringa di verifica:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Finestra dialogo dei filtri</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation>L'intera stringa deve combaciare</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>L'espressione regolare è valida</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Filtri</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation>Filtri di esclusione</translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation>Filtri di inclusione</translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Nessuno = Includi tutti</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>Testo nudo</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Espressione regolare semplificata</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Espressione regolare in Perl</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Solamente su file</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Solamente su cartella</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Corrispondenza completa</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation>Cartella già presente</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation>Copia di %name% %suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>Copia di %name% (%number%) %suffix%</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation>Errore</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation>Tenta ridenominazione usando caratteri speciali</translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>Impossibile spostare o copiare elementi in modalità forzata anomala: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>Impossibile salvare la lista di trasferimento %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation>Problema durante la lettura del file o dimensione file nulla</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Intestazione errata: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>La lista di trasferimento è in modalità mista ma questa istanza non lo è</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>La lista di trasferimento è in modalità copia ma questa istanza non lo è</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>La lista di trasferimento è in modalità spostamento ma questa istanza non lo è</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation>Alcuni errori rilevati durante l'analisi di linea</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>Impossibile aprire lista di trasferimento %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>Impossibile creare la cartella</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation>La cartella di origine non esiste</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation>Impossibile ridenominare temporaneamente la cartella</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation>Impossibile fare il vero spostamento finale della cartella</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation>Impossibile spostare la cartella</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation>Impossibile spostare la cartella: errore %1</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation>Impossibile eliminare</translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation>Errore interno, si prega di riportarlo!</translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation>Impossibile leggere file di origine: </translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation>File troncato durante la lettura. Possibile cambio dati</translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>Prima ridenominazione</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translatorcomment>%name% non dovrà essere tradotto</translatorcomment> + <translation>Copia di %name% %suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translatorcomment>%name%, %number% non dovranno essere tradotti</translatorcomment> + <translation>Copia di %name% (%number%) %suffix%</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translatorcomment>%name%, %number% non dovranno essere tradotti</translatorcomment> + <translation><html><head/><body><p>Variabili: <span style=" font-weight:600;">%name%</span> per il nome file originale, <span style=" font-weight:600;">%number%</span> per il numero extra, <span style=" font-weight:600;">%suffix%</span> Suffisso file</p></body></html></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>Seconda ridenominazione</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Regole di ridenominazione</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation>Copia di %1 %2</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation>Copia di %1 (%2) %3</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation>Copia di %1</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation>Copia di %1 (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation>Copia di %name%</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation>Copia di %name% (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation>Problema con la lettura della cartella</translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation>Copia di %name% %suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation>Copia di %name% (%number%) %suffix%</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation>File non trovato</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation>Tenta ridenominazione usando caratteri speciali</translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation>Impossibile cambiare data</translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation>Data di modifica sbagliata o impossibile ottenerla, potete disabilitare l'orario di trasferimento per procedere</translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation>Impossibile creare cartella di destinazione: </translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>Impossibile creare cartella di destinazione, error %1</translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation>Errore di risoluzione percorso (vuoto)</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation>Impossibile creare cartella di destinazione: </translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation>Impossibile creare cartella di destinazione, errore %1</translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation>Errore interno, si prega di riportarlo!</translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation>Trasferimento</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation>Spostare intera cartella</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation>Trasferire autorizzazioni dei file</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation>Mantenere date dei file</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation>Creare percorso completo se non esistente</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation>Checksum</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation>Avvio automatico</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation>Errori di coincidenze</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation>Quando si verifica errore nelle cartelle</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation>Quando si verifica errore nei file</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation>Quando i file coincidono</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation>Sovrascrivere se dimensione differisce</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation>Sovrascrivere se data di modifica differisce</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation>Quando le cartelle coincidono</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation>Controllare esistenza cartella di destinazione</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation>Regole di ridenominazione</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation>Eliminare i file parzialmente trasferiti</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation>Ridenominare destinazione all'origine</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation>Prestazioni</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation>Numero thread inode</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation>Deselezionare ciò su Windows causa problemi</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation>Varie</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation>Controllare spazio su disco</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation>Usare questa cartella quando la destinazione non è impostata</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation>Sfoglia</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation>Filtri</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation>Errore con file</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>Errore</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>Dimensione</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>Modificato</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>Nome file</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation>Destinazione</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation>Cartelle</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation>Esegui sempre questa azione</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation>Tenta con privilegi superiori</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Metti in coda</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Riprova</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>Annulla</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>File è già presente</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Origine</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destinazione</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>Dimensione</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>Modificato</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>Nome file</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation>Cartelle</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Suggerisci nuovo nome</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation>Esegui sempre questa azione</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation>Sovrascrivere se data di modifica differisce</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation>Sovrascrivere se dimensione differisce</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation>Sovrascrivere se dimensione e data differiscono</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>Rinomina</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>Sovrascrivi</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>Annulla</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Sovrascrivi se più recente</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation>Sovrascrivi se meno recente</translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>Dimensione</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>Modificato</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>Nome file</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation>Origine e destinazioni sono identiche</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation>Cartelle</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Suggerisci nuovo nome</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation>Esegui sempre questa azione</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>Rinomina</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>Annulla</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>Origine</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>Destinazione</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation>Origine e destinazioni sono identiche</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>Modificato</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>Nome cartella</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation>Cartelle</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Suggerisci nuovo nome</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation>Esegui sempre questa azione</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>Rinomina</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>Unisci</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>Salta</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>Annulla</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts new file mode 100755 index 0000000..a771060 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ja/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm Binary files differnew file mode 100755 index 0000000..5bec6b9 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts new file mode 100755 index 0000000..f8a23f8 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ko/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ko_KR"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished">대상</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished">확인</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished">건너뛰기</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished">합치기</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished">이름 바꾸기</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished">더 최신이면 덮어씌우기</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished">확인</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished">건너뛰기</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished">합치기</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished">이름 바꾸기</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished">더 최신이면 덮어씌우기</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished">폴더 이름</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished">오류</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished">오류</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished">오류</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>폴더를 생성할 수 없습니다</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished">파일 권한 전송</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished">파일 날짜 보존</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished">폴더 오류시</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished">폴더 충돌시</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished">대상 폴드 존재시 확인</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>오류</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>크기</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>수정 날짜</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>파일 이름</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished">대상</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>아래에 놓기</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>재시도</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>&건너뛰기</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>&취소</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>파일이 존재합니다</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>원본</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>대상</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>크기</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>수정 날짜</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>파일 이름</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>새 &이름 제안</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>&이름 바꾸기</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>&덮어씌우기</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>&건너뛰기</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>&취소</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>더 최신이면 덮어씌우기</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>크기</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>수정 날짜</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>파일 이름</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>새 &이름 제안</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>&이름 바꾸기</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>&건너뛰기</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>&취소</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>원본</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>대상</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>수정 날짜</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>폴더 이름</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>새 &이름 제안</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>&이름 바꾸기</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>합치기</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>건너뛰기</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>&취소</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/nl/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/no/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pl/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/pt/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm Binary files differnew file mode 100755 index 0000000..a1f6180 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts new file mode 100755 index 0000000..2115820 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/ru/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ru" sourcelanguage="en"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished">Двигатель вынуждены покинуть свои дома, вы не можете скопировать с ним</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished">Двигатель вынужден копии, вы не можете двигаться вместе с ним</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished">назначение</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished">просить</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished">пропускать</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished">слияние</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished">переименовать</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished">Заменить, если новее</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished">Опции ошибке</translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished">просить</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished">пропускать</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished">слияние</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished">переименовать</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished">Заменить, если новее</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished">Опции ошибке</translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished">Параметры двигателя не загружается, не может получить доступ к фильтрам</translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished">Ошибка в папку</translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished">имя папки</translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished">ошибка</translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished">ошибка</translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation>Поиск по сайту:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation>Тип поиска:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation>Сырой текст</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation>упрощенный regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation>Нанесите на:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation>файл</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation>папка</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation>Файлов и папок</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation>контроль</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation>Испытание строки:</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation>Фильтры диалогового</translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation>Регулярное действует</translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation>Фильтры</translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation>Ни = Включить все</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation>Сырой текст</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation>Упрощенная регулярных выражений</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation>Perl's regex</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation>Только на файл</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation>Только на папку</translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation>Полный матч</translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished">Папка уже существует</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished">ошибка</translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation>Невозможно сделать, чтобы скопировать или переместить элемент в неправильном форсированном режиме: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation>Невозможно сохранить трансфер: %1</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation>Неправильный заголовок: "%1"</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation>Трансфер в смешанном режиме, но этот экземпляр не в этом режиме</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation>Передача списка в режиме копирования, но этот экземпляр не в этом режиме</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation>Трансфер в режим перемещения, но этот экземпляр не в этом режиме</translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation>Не удается открыть трансфер: %1</translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation>Невозможно создать папку</translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation>Первое переименование</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation>Второе переименование</translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation>Переименование правила</translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished">%1 - копия (%2) {1 ?} {2)%3?}</translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished">%1 - копия</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished">%1 - копия (%2)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished">%name% - копия</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished">%name% - копия (%number%)</translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished">Передача файлов прав</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished">Держите дату файла</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished">Когда папка ошибка</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished">Когда папка столкновения</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished">Убедитесь, что папка существует</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished">Переименование правила</translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished">Фильтры</translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation>ошибка</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation>размер</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation>модифицированный</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation>имя файла</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished">назначение</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished">папка</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation>Положить в нижней</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation>Повторить</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation>пропускать</translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation>отменить</translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation>Файл существует</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>источник</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>назначение</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation>размер</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation>модифицированный</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation>имя файла</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished">папка</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation>Предложить новое имя</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation>переименовать</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation>переписывать</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation>пропускать</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation>отменить</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation>Заменить, если новее</translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation>размер</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation>модифицированный</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation>имя файла</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished">папка</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation>Предложить новое имя</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation>переименовать</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation>пропускать</translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation>отменить</translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation>источник</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation>назначение</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation>модифицированный</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation>имя папки</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished">папка</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation>Предложить новое имя</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation>переименовать</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation>слияние</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation>пропускать</translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation>отменить</translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/th/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts new file mode 100755 index 0000000..ef5da14 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/tr/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm Binary files differnew file mode 100755 index 0000000..3738845 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.qm diff --git a/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts new file mode 100755 index 0000000..a771060 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/Languages/zh/translation.ts @@ -0,0 +1,1147 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +<context> + <name>CopyEngine</name> + <message> + <location filename="../../CopyEngine.cpp" line="438"/> + <location filename="../../CopyEngine.cpp" line="461"/> + <source>The engine is forced to move, you can't copy with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="473"/> + <location filename="../../CopyEngine.cpp" line="496"/> + <source>The engine is forced to copy, you can't move with it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="520"/> + <source>Use the actual destination "%1"?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="685"/> + <source>The mode has been forced previously. This is an internal error, please report it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="976"/> + <location filename="../../CopyEngine.cpp" line="979"/> + <location filename="../../CopyEngine.cpp" line="984"/> + <location filename="../../CopyEngine.cpp" line="988"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="977"/> + <location filename="../../CopyEngine.cpp" line="981"/> + <location filename="../../CopyEngine.cpp" line="985"/> + <location filename="../../CopyEngine.cpp" line="989"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="980"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="982"/> + <location filename="../../CopyEngine.cpp" line="994"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="986"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="990"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="991"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="992"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="993"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngine.cpp" line="1064"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>CopyEngineFactory</name> + <message> + <location filename="../../CopyEngineFactory.cpp" line="303"/> + <source>Supported only on Windows</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="430"/> + <location filename="../../CopyEngineFactory.cpp" line="433"/> + <location filename="../../CopyEngineFactory.cpp" line="438"/> + <location filename="../../CopyEngineFactory.cpp" line="442"/> + <source>Ask</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="431"/> + <location filename="../../CopyEngineFactory.cpp" line="435"/> + <location filename="../../CopyEngineFactory.cpp" line="439"/> + <location filename="../../CopyEngineFactory.cpp" line="443"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="434"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="436"/> + <location filename="../../CopyEngineFactory.cpp" line="448"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="440"/> + <source>Put at the end</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="444"/> + <source>Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="445"/> + <source>Overwrite if different</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="446"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="447"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="463"/> + <source>Options engine is not loaded. Unable to access the filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../CopyEngineFactory.cpp" line="502"/> + <source>Options engine is not loaded, can't access to the filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>DiskSpace</name> + <message> + <location filename="../../DiskSpace.ui" line="14"/> + <source>Disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="24"/> + <source>You need more space on this drive to finish this transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="49"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.ui" line="56"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../DiskSpace.cpp" line="23"/> + <source>Drives %1 have %2 available but need %3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileErrorDialog</name> + <message> + <location filename="../../FileErrorDialog.cpp" line="87"/> + <source>Error on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileErrorDialog.cpp" line="90"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileExistsDialog</name> + <message> + <location filename="../../FileExistsDialog.cpp" line="191"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="198"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileExistsDialog.cpp" line="289"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FileIsSameDialog</name> + <message> + <location filename="../../FileIsSameDialog.cpp" line="140"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="147"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FileIsSameDialog.cpp" line="220"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FilterRules</name> + <message> + <location filename="../../FilterRules.ui" line="17"/> + <source>Filters dialog</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="33"/> + <source>Search:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="43"/> + <source>Search type:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="51"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="56"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="61"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="69"/> + <source>Apply on:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="77"/> + <source>File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="82"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="87"/> + <source>File and folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="95"/> + <source>Whole string must match</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="125"/> + <source>The test string matches with the regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="102"/> + <source>Checking</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="108"/> + <source>The regex is valid</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FilterRules.ui" line="115"/> + <source>Test string:</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>Filters</name> + <message> + <location filename="../../Filters.ui" line="14"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="39"/> + <source>Exclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="111"/> + <source>Inclusion filters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.ui" line="132"/> + <source>None = Include all</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="94"/> + <location filename="../../Filters.cpp" line="132"/> + <source>Raw text</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="97"/> + <location filename="../../Filters.cpp" line="135"/> + <source>Simplified regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="100"/> + <location filename="../../Filters.cpp" line="138"/> + <source>Perl's regex</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="108"/> + <location filename="../../Filters.cpp" line="146"/> + <source>Only on file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="111"/> + <location filename="../../Filters.cpp" line="149"/> + <source>Only on folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../Filters.cpp" line="117"/> + <location filename="../../Filters.cpp" line="155"/> + <location filename="../../Filters.cpp" line="217"/> + <location filename="../../Filters.cpp" line="256"/> + <source>Full match</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>FolderExistsDialog</name> + <message> + <location filename="../../FolderExistsDialog.cpp" line="84"/> + <source>Folder already exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="164"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="173"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../FolderExistsDialog.cpp" line="240"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ListThread</name> + <message> + <location filename="../../ListThreadListChange.cpp" line="242"/> + <location filename="../../ListThreadListChange.cpp" line="413"/> + <source>Unable do to move or copy item into wrong forced mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="249"/> + <location filename="../../ListThreadListChange.cpp" line="420"/> + <source>Unable to save the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="270"/> + <source>Problem reading file, or file-size is 0</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="277"/> + <source>Wrong header: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="286"/> + <source>The transfer list is in mixed mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="295"/> + <source>The transfer list is in copy mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="301"/> + <source>The transfer list is in move mode, but this instance is not in this mode</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="365"/> + <source>Some errors have been found during the line parsing</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ListThreadListChange.cpp" line="373"/> + <source>Unable to open the transfer list: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MkPath</name> + <message> + <location filename="../../MkPath.cpp" line="187"/> + <location filename="../../MkPath.cpp" line="210"/> + <source>Unable to create the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="227"/> + <source>The source folder don't exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="255"/> + <source>Unable to temporary rename the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="278"/> + <source>Unable to do the final real move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="309"/> + <source>Unable to move the folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="315"/> + <source>Unable to move the folder: errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../MkPath.cpp" line="124"/> + <location filename="../../MkPath.cpp" line="394"/> + <source>Unable to remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ReadThread</name> + <message> + <location filename="../../async/ReadThread.cpp" line="78"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="541"/> + <source>Unable to read the source file: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/ReadThread.cpp" line="595"/> + <source>File truncated during the read, possible data change</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>RenamingRules</name> + <message> + <location filename="../../RenamingRules.ui" line="14"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="35"/> + <source>First renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="41"/> + <source>%name% - copy%suffix%</source> + <extracomment>%name% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="57"/> + <source>%name% - copy (%number%)%suffix%</source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="67"/> + <source><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></source> + <extracomment>%name%, %number% should not be translated</extracomment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.ui" line="51"/> + <source>Second renaming</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="46"/> + <location filename="../../RenamingRules.cpp" line="71"/> + <source>%1 - copy%2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../RenamingRules.cpp" line="50"/> + <location filename="../../RenamingRules.cpp" line="84"/> + <source>%1 - copy (%2)%3</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ScanFileOrFolder</name> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="442"/> + <location filename="../../ScanFileOrFolder.cpp" line="444"/> + <source>%1 - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="453"/> + <location filename="../../ScanFileOrFolder.cpp" line="455"/> + <source>%1 - copy (%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="566"/> + <location filename="../../ScanFileOrFolder.cpp" line="568"/> + <source>%name% - copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="577"/> + <location filename="../../ScanFileOrFolder.cpp" line="579"/> + <source>%name% - copy (%number%)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../ScanFileOrFolder.cpp" line="663"/> + <location filename="../../ScanFileOrFolder.cpp" line="667"/> + <source>Problem with folder read</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThread</name> + <message> + <location filename="../../TransferThread.cpp" line="613"/> + <source>%name% - copy%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="620"/> + <source>%name% - copy (%number%)%suffix%</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="648"/> + <location filename="../../TransferThread.cpp" line="891"/> + <source>File not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="891"/> + <location filename="../../TransferThread.cpp" line="927"/> + <source>Unable to change the date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../TransferThread.cpp" line="179"/> + <source>Try rename with using special characters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransferThreadAsync</name> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="340"/> + <source>Wrong modification date or unable to get it, you can disable time transfer to do it</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="428"/> + <location filename="../../async/TransferThreadAsync.cpp" line="446"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/TransferThreadAsync.cpp" line="431"/> + <location filename="../../async/TransferThreadAsync.cpp" line="448"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>WriteThread</name> + <message> + <location filename="../../async/WriteThread.cpp" line="135"/> + <source>Path resolution error (Empty path)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="164"/> + <location filename="../../async/WriteThread.cpp" line="197"/> + <source>Unable to create the destination folder: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="175"/> + <location filename="../../async/WriteThread.cpp" line="199"/> + <source>Unable to create the destination folder, errno: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../async/WriteThread.cpp" line="456"/> + <source>Internal error, please report it!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>copyEngineOptions</name> + <message> + <location filename="../../copyEngineOptions.ui" line="44"/> + <source>Transfer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="63"/> + <source>Move the whole folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="97"/> + <source>Transfer the file rights</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="76"/> + <source>Keep the file date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="114"/> + <source>Create full path if not exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="138"/> + <source>Checksum</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="83"/> + <source>Auto start</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="154"/> + <source>Error and collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="160"/> + <source>When folder error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="170"/> + <source>When file error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="196"/> + <source>When file collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="239"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="244"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="266"/> + <source>When folder collision</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="297"/> + <source>Check if destination folder exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="304"/> + <source>Renaming rules</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="324"/> + <source>Delete partially transferred files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="337"/> + <source>Rename the original destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="368"/> + <source>Performance</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="387"/> + <source>Inode threads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="397"/> + <location filename="../../copyEngineOptions.ui" line="413"/> + <source>MB</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="429"/> + <source>Uncheck this under Windows create problem</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="436"/> + <source>OS Buffer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="456"/> + <source>Disable parallel transfer when are different devices</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="463"/> + <source>Buffer for different device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="470"/> + <source>OS FLags</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="477"/> + <source>Buffer for same device</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="484"/> + <source>OS native copy (disable speed limitation)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="514"/> + <source>Misc</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="520"/> + <source>Check the disk space</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="530"/> + <source>Use this folder when destination is not set</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="542"/> + <source>Browse</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../copyEngineOptions.ui" line="564"/> + <source>Filters</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileErrorDialog</name> + <message> + <location filename="../../fileErrorDialog.ui" line="14"/> + <source>Error with file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="20"/> + <source>Error</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="59"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="76"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="93"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="110"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="127"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="173"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="193"/> + <source>Try in with elevated privileges</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="200"/> + <source>Put to bottom</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="207"/> + <source>Retry</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="214"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileErrorDialog.ui" line="221"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileExistsDialog</name> + <message> + <location filename="../../fileExistsDialog.ui" line="14"/> + <source>The file exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="82"/> + <location filename="../../fileExistsDialog.ui" line="170"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="99"/> + <location filename="../../fileExistsDialog.ui" line="187"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="116"/> + <location filename="../../fileExistsDialog.ui" line="204"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="133"/> + <location filename="../../fileExistsDialog.ui" line="221"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="277"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="288"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="346"/> + <location filename="../../fileExistsDialog.ui" line="349"/> + <source>Overwrite if modification date differs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="362"/> + <location filename="../../fileExistsDialog.ui" line="365"/> + <source>Overwrite if not same size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="370"/> + <location filename="../../fileExistsDialog.ui" line="373"/> + <source>Overwrite if not same size and date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="308"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="315"/> + <source>&Overwrite</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="325"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="332"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="341"/> + <source>Overwrite if newer</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileExistsDialog.ui" line="354"/> + <location filename="../../fileExistsDialog.ui" line="357"/> + <source>Overwrite if older</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>fileIsSameDialog</name> + <message> + <location filename="../../fileIsSameDialog.ui" line="40"/> + <source>Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="110"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="70"/> + <source>File name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="14"/> + <source>The source and destination are same</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="90"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="159"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="170"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="190"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="197"/> + <source>&Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../fileIsSameDialog.ui" line="204"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>folderExistsDialog</name> + <message> + <location filename="../../folderExistsDialog.ui" line="34"/> + <source>Source</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="50"/> + <source>Destination</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="14"/> + <source>The source and destination is identical</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="82"/> + <location filename="../../folderExistsDialog.ui" line="150"/> + <source>Modified</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="99"/> + <location filename="../../folderExistsDialog.ui" line="160"/> + <source>Folder name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="116"/> + <location filename="../../folderExistsDialog.ui" line="184"/> + <source>Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="227"/> + <source>Suggest new &name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="238"/> + <source>&Always perform this action</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="245"/> + <source>&Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="252"/> + <source>Merge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="259"/> + <source>Skip</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../folderExistsDialog.ui" line="266"/> + <source>&Cancel</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp new file mode 100755 index 0000000..9c5e8f8 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread.cpp @@ -0,0 +1,1235 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" +#ifdef Q_OS_LINUX +#include <sys/sysinfo.h> +#endif +#ifdef Q_OS_WIN32 +#include <sysinfoapi.h> +#endif + +ListThread::ListThread(FacilityInterface * facilityInterface) : + numberOfInodeOperation(0), + sourceDriveMultiple(false), + destinationDriveMultiple(false), + destinationFolderMultiple(false), + stopIt(false), + numberOfTransferIntoToDoList(0), + bytesToTransfer(0), + bytesTransfered(0), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + idIncrementNumber(1), + actualRealByteTransfered(0), + checkDestinationFolderExists(false), + parallelizeIfSmallerThan(1024), + moveTheWholeFolder(false), + deletePartiallyTransferredFiles(true), + inodeThreads(1), + renameTheOriginalDestination(false), + checkDiskSpace(true), + buffer(false), + followTheStrictOrder(true), + mode(Ultracopier::CopyMode::Copy), + forcedMode(false), + actionToDoListTransfer_count(0), + actionToDoListInode_count(0), + doTransfer(false), + doInode(false), + oversize(0), + currentProgression(0), + copiedSize(0), + totalSize(0), + localOverSize(0), + doRightTransfer(false), + keepDate(false), + os_spec_flags(true), + native_copy(false), + mkFullPath(false), + alwaysDoThisActionForFileExists(FileExists_NotSet), + speedLimitation(0), + returnBoolToCopyEngine(true) +{ + moveToThread(this); + start(HighPriority); + this->facilityInterface=facilityInterface; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + clockForTheCopySpeed = NULL; + multiForBigSpeed = 0; + blockSize = 65536; + blockSizeAfterSpeedLimitation = blockSize; + #endif + putInPause = false; + autoStart=true; + + //can't be static into WriteThread, linked by instance then by ListThread + writeFileList=new QMultiHash<QString,WriteThread *>(); + writeFileListMutex=new QMutex(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + if(!connect(&timerUpdateDebugDialog,&QTimer::timeout,this,&ListThread::timedUpdateDebugDialog)) + abort(); + timerUpdateDebugDialog.start(ULTRACOPIER_PLUGIN_DEBUG_WINDOW_TIMER); + #endif + if(!connect(this, &ListThread::tryCancel, this,&ListThread::cancel, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::askNewTransferThread, this,&ListThread::createTransferThread, Qt::QueuedConnection)) + abort(); + if(!connect(&mkPathQueue, &MkPath::firstFolderFinish, this,&ListThread::mkPathFirstFolderFinish, Qt::QueuedConnection)) + abort(); + if(!connect(&mkPathQueue, &MkPath::errorOnFolder, this,&ListThread::mkPathErrorOnFolder, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::send_syncTransferList, this,&ListThread::syncTransferList_internal, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::exportTransferListSend, this,&ListThread::exportTransferListInternal, Qt::QueuedConnection)) + abort(); + if(!connect(this, &ListThread::importTransferListSend, this,&ListThread::importTransferListInternal, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&mkPathQueue, &MkPath::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&driveManagement,&DriveManagement::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif // ULTRACOPIER_PLUGIN_DEBUG + + emit askNewTransferThread(); + mkpathTransfer.release(); + + int64_t MBMem=100; + #ifdef Q_OS_WIN32 + MEMORYSTATUSEX memoryStatus; + if(GlobalMemoryStatusEx(&memoryStatus)) + MBMem=memoryStatus.ullTotalPhys/1024; + #endif + #ifdef Q_OS_LINUX + struct sysinfo info; + if(sysinfo(&info)==0) + MBMem=info.totalhigh*info.mem_unit/1024/1024; + #endif + if(MBMem<1024) + WriteThread::numberOfBlock=4+MBMem*0.12; + else + WriteThread::numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; +} + +ListThread::~ListThread() +{ + emit tryCancel(); + waitCancel.acquire(); + quit(); + wait(); +} + +//transfer is finished +void ListThread::transferInodeIsClosed() +{ + if(stopIt) + { + checkIfReadyToCancel(); + return; + } + numberOfInodeOperation--; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + TransferThreadAsync *temp_transfer_thread=qobject_cast<TransferThreadAsync *>(QObject::sender()); + if(temp_transfer_thread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + if(overCheckUsedThread.find(temp_transfer_thread)==overCheckUsedThread.cend()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located in overcheck"); + else + overCheckUsedThread.erase(temp_transfer_thread); + if(putAtBottomAfterError.find(temp_transfer_thread)!=putAtBottomAfterError.cend()) + { + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); + return; + } + bool isFound=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + int countLocalParse=0; + #endif + if(temp_transfer_thread->getStat()!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not idle!"); + return; + } + unsigned int int_for_internal_loop=0; + while(int_for_internal_loop<actionToDoListTransfer.size()) + { + if(actionToDoListTransfer.at(int_for_internal_loop).id==temp_transfer_thread->transferId) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] have finish, put at idle; for id: %2").arg(int_for_internal_loop).arg(temp_transfer_thread->transferId).toStdString()); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::RemoveItem; + newAction.userAction.moveAt=0; + newAction.addAction=actionToDoTransferToItemOfCopyList(actionToDoListTransfer.at(int_for_internal_loop)); + newAction.userAction.position=int_for_internal_loop; + actionDone.push_back(newAction); + /// \todo check if item is at the right thread + const int64_t transferTime=temp_transfer_thread->transferTime(); + if(transferTime>=0 && temp_transfer_thread->haveStartTime) + { + timeToTransfer.push_back(std::pair<uint64_t,uint32_t>(temp_transfer_thread->transferSize,transferTime)); + temp_transfer_thread->haveStartTime=false; + } + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+int_for_internal_loop); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); + if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) + updateTheStatus(); + + //add the current size of file, to general size because it's finish + copiedSize=temp_transfer_thread->copiedSize(); + if(copiedSize>(qint64)temp_transfer_thread->transferSize) + { + oversize=copiedSize-temp_transfer_thread->transferSize; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add oversize of: "+std::to_string(oversize)); + bytesToTransfer+=oversize; + bytesTransfered+=oversize; + } + bytesTransfered+=temp_transfer_thread->transferSize; + + temp_transfer_thread->transferId=0; + temp_transfer_thread->transferSize=0; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + countLocalParse++; + #endif + isFound=true; + if(actionToDoListTransfer.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoListTransfer==0"); + actionToDoListInode.insert(actionToDoListInode.cbegin(),actionToDoListInode_afterTheTransfer.cbegin(),actionToDoListInode_afterTheTransfer.cend()); + actionToDoListInode_afterTheTransfer.clear(); + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); + } + break; + } + int_for_internal_loop++; + } + if(isFound) + deleteTransferThread(); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(temp_transfer_thread->transferId).arg(int_for_internal_loop).toStdString()); + temp_transfer_thread->transferId=0; + temp_transfer_thread->transferSize=0; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("countLocalParse: %1, actionToDoList.size(): %2").arg(countLocalParse).arg(actionToDoListTransfer.size()).toStdString()); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(countLocalParse!=1) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); + #endif + doNewActions_inode_manipulation(); + doNewActions_start_transfer(); +} + +/** \brief put the current file at bottom in case of error +\note ONLY IN CASE OF ERROR + +transferInodeIsClosed() will be call after, then will do: + +BUT + +this function call transfer->skip(); +not put at bottom, remove from to do list +*/ +void ListThread::transferPutAtBottom() +{ + TransferThreadAsync *transfer=qobject_cast<TransferThreadAsync *>(QObject::sender()); + if(transfer==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + bool isFound=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + int countLocalParse=0; + #endif + unsigned int indexAction=0; + while(indexAction<actionToDoListTransfer.size()) + { + if(actionToDoListTransfer.at(indexAction).id==transfer->transferId) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Put at the end: "+std::to_string(transfer->transferId)); + //push for interface at the end + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=transfer->transferId; + newAction.userAction.position=0; + newAction.userAction.moveAt=actionToDoListTransfer.size()-1; + actionDone.push_back(newAction); + //do the wait stat + actionToDoListTransfer[indexAction].isRunning=false; + //move at the end + actionToDoListTransfer.push_back(actionToDoListTransfer.at(indexAction)); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+indexAction); + transfer->transferId=0; + transfer->transferSize=0; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + countLocalParse++; + #endif + isFound=true; + putAtBottomAfterError.insert(transfer); + break; + } + indexAction++; + } + if(!isFound) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("unable to found item into the todo list, id: %1, index: %2").arg(transfer->transferId).toStdString()); + transfer->transferId=0; + transfer->transferSize=0; + putAtBottomAfterError.insert(transfer); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"countLocalParse: "+std::to_string(countLocalParse)); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(countLocalParse!=1) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"countLocalParse != 1"); + #endif + transfer->skip(); +} + +void ListThread::fileTransfer(const INTERNALTYPEPATH &sourceFileInfo,const INTERNALTYPEPATH &destinationFileInfo,const Ultracopier::CopyMode &mode) +{ + if(stopIt) + return; + addToTransfer(sourceFileInfo,destinationFileInfo,mode); +} + +void ListThread::fileTransferWithInode(const INTERNALTYPEPATH &sourceFileInfo,const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode,const TransferThread::dirent_uc &inode) +{ + if(stopIt) + return; + #ifdef Q_OS_WIN32 + addToTransfer(sourceFileInfo,destinationFileInfo,mode,inode.size); + #else + (void)inode; + addToTransfer(sourceFileInfo,destinationFileInfo,mode); + #endif +} + +void ListThread::autoStartAndCheckSpace() +{ + if(needMoreSpace()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Need more space"); + return; + } + autoStartIfNeeded(); +} + +void ListThread::autoStartIfNeeded() +{ + if(autoStart) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Auto start the copy"); + startGeneralTransfer(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Put the copy engine in pause"); + putInPause=true; + emit isInPause(true); + } +} + +//set auto start +void ListThread::setAutoStart(const bool autoStart) +{ + this->autoStart=autoStart; +} + +void ListThread::startGeneralTransfer() +{ + doNewActions_inode_manipulation(); +} + +/** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ +void ListThread::syncTransferList() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit send_syncTransferList(); +} + +bool ListThread::getReturnBoolToCopyEngine() const +{ + return returnBoolToCopyEngine; +} + +std::pair<quint64, quint64> ListThread::getReturnPairQuint64ToCopyEngine() const +{ + return returnPairQuint64ToCopyEngine; +} + +Ultracopier::ItemOfCopyList ListThread::getReturnItemOfCopyListToCopyEngine() const +{ + return returnItemOfCopyListToCopyEngine; +} + +void ListThread::realByteTransfered() +{ + quint64 totalRealByteTransfered=0; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(index<loop_sub_size_transfer_thread_search) + { + const TransferThreadAsync * thread=transferThreadList.at(index); + totalRealByteTransfered+=thread->realByteTransfered(); + index++; + } + emit send_realBytesTransfered(totalRealByteTransfered); +} + +void ListThread::checkIfReadyToCancel() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!stopIt) + return; + int index=0; + int loop_size=transferThreadList.size(); + while(index<loop_size) + { + if(transferThreadList.at(index)!=NULL) + { + if(transferThreadList.at(index)->transferId!=0) + return; + //need wait a clean stop (and then destination remove) + if(transferThreadList.at(index)->getStat()!=TransferStat_Idle) + return; + delete transferThreadList.at(index);//->deleteLayer(); + transferThreadList[index]=NULL; + transferThreadList.erase(transferThreadList.cbegin()+index); + loop_size=transferThreadList.size(); + index--; + } + index++; + } + actionToDoListTransfer.clear(); + actionToDoListInode.clear(); + actionToDoListInode_afterTheTransfer.clear(); + actionDone.clear(); + progressionList.clear(); + returnListItemOfCopyListToCopyEngine.clear(); + quit(); + waitCancel.release(); + emit canBeDeleted(); +} + +void ListThread::updateTheStatus() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + sendActionDone(); + bool updateTheStatus_listing=scanFileOrFolderThreadsPool.size()>0; + bool updateTheStatus_copying=actionToDoListTransfer.size()>0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; + Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; + if(updateTheStatus_copying && updateTheStatus_listing) + updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; + else if(updateTheStatus_listing) + updateTheStatus_action_in_progress=Ultracopier::Listing; + else if(updateTheStatus_copying) + updateTheStatus_action_in_progress=Ultracopier::Copying; + else + updateTheStatus_action_in_progress=Ultracopier::Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"emit actionInProgess("+std::to_string(updateTheStatus_action_in_progress)+")"); + emit actionInProgess(updateTheStatus_action_in_progress); +} + +//mk path to do +uint64_t ListThread::addToMkPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inode) +{ + if(stopIt) + return 0; + if(inode!=0 && (!keepDate && !doRightTransfer)) + return 0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + ActionToDoInode temp; + temp.type = ActionType_MkPath; + temp.id = generateIdNumber(); + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); + return temp.id; +} + +//add path to do +void ListThread::addToMovePath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int& inodeToRemove) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", inodeToRemove: "+std::to_string(inodeToRemove)); + ActionToDoInode temp; + temp.type = ActionType_MovePath; + temp.id = generateIdNumber(); + temp.size = inodeToRemove; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +void ListThread::addToKeepAttributePath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int& inodeToRemove) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", inodeToRemove: "+std::to_string(inodeToRemove)); + ActionToDoInode temp; + temp.type = ActionType_SyncDate; + temp.id = generateIdNumber(); + temp.size = inodeToRemove; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +void ListThread::addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination) +{ + if(stopIt) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + ActionToDoInode temp; + temp.type = ActionType_RealMove; + temp.id = generateIdNumber(); + temp.size = 0; + temp.source = source; + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +//rsync rm +void ListThread::addToRmForRsync(const std::string& destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inode: "+destination); + ActionToDoInode temp; + temp.type = ActionType_RmSync; + temp.id = generateIdNumber(); + temp.destination= destination; + temp.isRunning = false; + actionToDoListInode.push_back(temp); +} +#endif + +//send the progression, after full reset of the interface (then all is empty) +void ListThread::syncTransferList_internal() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit syncReady(); + actionDone.clear(); + //do list operation + TransferThreadAsync *transferThread; + const int &loop_size=actionToDoListTransfer.size(); + int loop_sub_size=transferThreadList.size(); + //this loop to have at max inodeThreads*inodeThreads, not inodeThreads*transferThreadList.size() + int int_for_internal_loop; + for(int int_for_loop=0; int_for_loop<loop_size; ++int_for_loop) { + const ActionToDoTransfer &item=actionToDoListTransfer.at(int_for_loop); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::PreOperation; + newAction.addAction.id = item.id; + const size_t sourceIndex=item.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + newAction.addAction.sourceFullPath = '/'; + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(item.source); + } + else + { + newAction.addAction.sourceFullPath = TransferThread::internalStringTostring(item.source); + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(item.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=item.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + newAction.addAction.destinationFullPath = '/'; + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(item.destination); + } + else + { + newAction.addAction.destinationFullPath = TransferThread::internalStringTostring(item.destination); + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(item.destination.substr(destinationIndex+1)); + } + newAction.addAction.size = item.size; + newAction.addAction.mode = item.mode; + actionDone.push_back(newAction); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"id: "+std::to_string(item.id)+", size: "+std::to_string(item.size)+ + ", name: "+TransferThread::internalStringTostring(item.source)+", size2: "+std::to_string(newAction.addAction.size)); + if(item.isRunning) + { + for(int_for_internal_loop=0; int_for_internal_loop<loop_sub_size; ++int_for_internal_loop) { + transferThread=transferThreadList.at(int_for_internal_loop); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::PreOperation; + newAction.addAction.id = item.id; + const size_t sourceIndex=item.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + newAction.addAction.sourceFullPath = TransferThread::internalStringTostring(item.source); + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(item.source); + } + else + { + newAction.addAction.sourceFullPath = TransferThread::internalStringTostring(item.source); + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(item.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=item.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + newAction.addAction.destinationFullPath = TransferThread::internalStringTostring(item.destination); + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(item.destination); + } + else + { + newAction.addAction.destinationFullPath = TransferThread::internalStringTostring(item.destination); + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(item.destination.substr(destinationIndex+1)); + } + newAction.addAction.size = item.size; + newAction.addAction.mode = item.mode; + actionDone.push_back(newAction); + if(transferThread->getStat()!=TransferStat_PreOperation) + { + Ultracopier::ReturnActionOnCopyList newAction; + switch(transferThread->getStat()) + { + case TransferStat_Transfer: + newAction.type=Ultracopier::Transfer; + break; + /*case TransferStat_PostTransfer: + newAction.type=Ultracopier::PostOperation; + break;*/ + case TransferStat_PostOperation: + newAction.type=Ultracopier::PostOperation; + break; + default: + break; + } + newAction.addAction.id = item.id; + actionDone.push_back(newAction); + } + } + } + } +} + +//add file transfer to do +uint64_t ListThread::addToTransfer(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const Ultracopier::CopyMode& mode, const int64_t sendedsize) +{ + if(stopIt) + return 0; + //add to transfer list + numberOfTransferIntoToDoList++; + uint64_t size=0; + if(sendedsize>=0) + size=sendedsize; + else + { + const int64_t tempSize=TransferThread::file_stat_size(source); + if(tempSize>=0) + size=tempSize; + } + const std::string &drive=driveManagement.getDrive(TransferThread::internalStringTostring(destination)); + if(!drive.empty())//can be a network drive + if(mode!=Ultracopier::Move || drive!=driveManagement.getDrive(TransferThread::internalStringTostring(source))) + { + if(requiredSpace.find(drive)!=requiredSpace.cend()) + { + requiredSpace[drive]+=size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed add: %1, space needed: %2, on: %3").arg(size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); + } + else + { + requiredSpace[drive]=size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set space %1 needed, on: %2").arg(size).arg(QString::fromStdString(drive)).toStdString()); + } + } + bytesToTransfer+= size; + ActionToDoTransfer temp; + temp.id = generateIdNumber(); + temp.size = size; + temp.source = source; + temp.destination= destination; + temp.mode = mode; + temp.isRunning = false; + actionToDoListTransfer.push_back(temp); + //push the new transfer to interface + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::AddingItem; + newAction.addAction=actionToDoTransferToItemOfCopyList(temp); + actionDone.push_back(newAction); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)+", add entry: "+std::to_string(temp.id)+", size: "+ + std::to_string(temp.size)+", size2: "+std::to_string(size)+", isSymLink: "+std::to_string(TransferThread::is_symlink(source))); + return temp.id; +} + +Ultracopier::ItemOfCopyList ListThread::actionToDoTransferToItemOfCopyList(const ListThread::ActionToDoTransfer &actionToDoTransfer) +{ + Ultracopier::ItemOfCopyList itemOfCopyList; + itemOfCopyList.id = actionToDoTransfer.id; + const size_t sourceIndex=actionToDoTransfer.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + itemOfCopyList.sourceFullPath = TransferThread::internalStringTostring(actionToDoTransfer.source); + itemOfCopyList.sourceFileName = TransferThread::internalStringTostring(actionToDoTransfer.source); + } + else + { + itemOfCopyList.sourceFullPath = TransferThread::internalStringTostring(actionToDoTransfer.source); + itemOfCopyList.sourceFileName = TransferThread::internalStringTostring(actionToDoTransfer.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=actionToDoTransfer.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + itemOfCopyList.destinationFullPath = TransferThread::internalStringTostring(actionToDoTransfer.destination); + itemOfCopyList.destinationFileName = TransferThread::internalStringTostring(actionToDoTransfer.destination); + } + else + { + itemOfCopyList.destinationFullPath = TransferThread::internalStringTostring(actionToDoTransfer.destination); + itemOfCopyList.destinationFileName = TransferThread::internalStringTostring(actionToDoTransfer.destination.substr(destinationIndex+1)); + } + itemOfCopyList.size = actionToDoTransfer.size; + itemOfCopyList.mode = actionToDoTransfer.mode; + return itemOfCopyList; +} + +//generate id number +uint64_t ListThread::generateIdNumber() +{ + idIncrementNumber++; + if(idIncrementNumber>(((quint64)1024*1024)*1024*1024*2)) + idIncrementNumber=0; + return idIncrementNumber; +} + +//do new actions +void ListThread::doNewActions_start_transfer() +{ + /*ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, numberOfTranferRuning: %2") + .arg(actionToDoListTransfer.size()).arg(getNumberOfTranferRuning()).toStdString());*/ + if(stopIt || putInPause) + return; + int numberOfTranferRuning=getNumberOfTranferRuning(); + const int &loop_size=transferThreadList.size(); + //lunch the transfer in WaitForTheTransfer + //high priority + int int_for_loop=0; + while(int_for_loop<loop_size) + { + TransferThreadAsync *transferThread=transferThreadList.at(int_for_loop); + if(transferThread->getStat()==TransferStat_WaitForTheTransfer/*ready to start the transfer*/ && transferThread->transferId!=0) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(transferThread->transferSize>=parallelizeIfSmallerThan) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(numberOfTranferRuning<ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)+ + ", start in parallele beacuase size is "+std::to_string(transferThread->transferSize)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + int_for_loop++; + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + + //low priority + int_for_loop=0; + while(int_for_loop<loop_size) + { + TransferThreadAsync *transferThread=transferThreadList.at(int_for_loop); + if(transferThread->getStat()==TransferStat_PreOperation/*wait user dialog action*/) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(transferThread->transferSize>=parallelizeIfSmallerThan) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + if(numberOfTranferRuning<ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); + transferThread->startTheTransfer(); + numberOfTranferRuning++; + } + } + int_for_loop++; + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfTranferRuning: "+std::to_string(numberOfTranferRuning)); +} + +/** \brief lunch the pre-op or inode op + 1) locate the next next item to do into the both list + 1a) optimisation posible on the mkpath/rmpath + 2) determine what need be lunched + 3) lunch it, rerun the 2) + */ +void ListThread::doNewActions_inode_manipulation() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionToDoList.size(): "+std::to_string(actionToDoListTransfer.size())); + #endif + if(stopIt) + checkIfReadyToCancel(); + if(stopIt || putInPause) + return; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + #endif + //lunch the pre-op or inode op + TransferThreadAsync *currentTransferThread; + int int_for_loop=0; + int int_for_internal_loop=0; + int int_for_transfer_thread_search=0; + actionToDoListTransfer_count=actionToDoListTransfer.size(); + actionToDoListInode_count=actionToDoListInode.size(); + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + //search the next transfer action to do + while(int_for_loop<actionToDoListTransfer_count) + { + ActionToDoTransfer& currentActionToDoTransfer=actionToDoListTransfer[int_for_loop]; + if(!currentActionToDoTransfer.isRunning) + { + //search the next inode action to do + while(int_for_internal_loop<actionToDoListInode_count) + { + if(!actionToDoListInode.at(int_for_internal_loop).isRunning) + { + if(currentActionToDoTransfer.id<actionToDoListInode.at(int_for_internal_loop).id) + { + //do the tranfer action in the next code + break; + } + else + { + //do the inode action + #include "ListThread_InodeAction.cpp" + } + } + int_for_internal_loop++; + } + //do the tranfer action + while(int_for_transfer_thread_search<loop_sub_size_transfer_thread_search) + { + /** + transferThreadList.at(int_for_transfer_thread_search)->transferId==0) /!\ important! + Because the other thread can have call doNewAction before than this thread have the finish event parsed! + I this case it lose all data + */ + currentTransferThread=transferThreadList.at(int_for_transfer_thread_search); + if(currentTransferThread->getStat()==TransferStat_Idle && currentTransferThread->transferId==0 && + overCheckUsedThread.find(currentTransferThread)==overCheckUsedThread.cend()) // /!\ important! + { + overCheckUsedThread.insert(currentTransferThread); + + std::string drive=driveManagement.getDrive(TransferThread::internalStringTostring(currentActionToDoTransfer.destination)); + if(requiredSpace.find(drive)!=requiredSpace.cend() && + (currentActionToDoTransfer.mode!=Ultracopier::Move || + drive!=driveManagement.getDrive(TransferThread::internalStringTostring(currentActionToDoTransfer.source)))) + { + requiredSpace[drive]-=currentActionToDoTransfer.size; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed removed: %1, space needed: %2, on: %3").arg( + currentActionToDoTransfer.size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString()); + } + currentTransferThread->transferId=currentActionToDoTransfer.id; + currentTransferThread->transferSize=currentActionToDoTransfer.size; + putAtBottomAfterError.erase(currentTransferThread); + if(!currentTransferThread->setFiles( + currentActionToDoTransfer.source, + currentActionToDoTransfer.size, + currentActionToDoTransfer.destination, + currentActionToDoTransfer.mode + )) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(int_for_loop)+"] id: "+ + std::to_string(currentTransferThread->transferId)+ + " is idle, but seam busy at set name: "+TransferThread::internalStringTostring(currentActionToDoTransfer.destination) + ); + break; + } + currentActionToDoTransfer.isRunning=true; + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(int_for_loop)+"] id: "+ + std::to_string(currentTransferThread->transferId)+ + " is idle, use it for "+TransferThread::internalStringTostring(currentActionToDoTransfer.destination) + ); + + /// \note wrong position? Else write why it's here + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type = Ultracopier::PreOperation; + newAction.addAction.id = currentActionToDoTransfer.id; + const size_t sourceIndex=currentActionToDoTransfer.source.rfind('/'); + if(sourceIndex == std::string::npos) + { + newAction.addAction.sourceFullPath = '/'; + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.source); + } + else + { + newAction.addAction.sourceFullPath = TransferThread::internalStringTostring(currentActionToDoTransfer.source); + newAction.addAction.sourceFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.source.substr(sourceIndex+1)); + } + const size_t destinationIndex=currentActionToDoTransfer.destination.rfind('/'); + if(destinationIndex == std::string::npos) + { + newAction.addAction.destinationFullPath = '/'; + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.destination); + } + else + { + newAction.addAction.destinationFullPath = TransferThread::internalStringTostring(currentActionToDoTransfer.destination); + newAction.addAction.destinationFileName = TransferThread::internalStringTostring(currentActionToDoTransfer.destination.substr(destinationIndex+1)); + } + newAction.addAction.size = currentActionToDoTransfer.size; + newAction.addAction.mode = currentActionToDoTransfer.mode; + actionDone.push_back(newAction); + int_for_transfer_thread_search++; + numberOfInodeOperation++; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + break; + } + int_for_transfer_thread_search++; + } + if(int_for_internal_loop==loop_sub_size_transfer_thread_search) + { + /// \note Can be normal when all thread is not initialized + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"unable to found free thread to do the transfer"); + #endif + break; + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + if(numberOfInodeOperation>=inodeThreads) + break; + if(followTheStrictOrder) + break; + } + int_for_loop++; + } + //search the next inode action to do + int_for_internal_loop=0; + while(int_for_internal_loop<actionToDoListInode_count) + { + if(!actionToDoListInode.at(int_for_internal_loop).isRunning) + { + //do the inode action + #include "ListThread_InodeAction.cpp" + } + int_for_internal_loop++; + } + //error checking + if(actionToDoListInode_count>inodeThreads) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("The index have been detected as out of max range: %1>%2").arg(actionToDoListInode_count).arg(inodeThreads).toStdString()); + return; + } +} + +//restart transfer if it can +void ListThread::restartTransferIfItCan() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + TransferThreadAsync *transfer=qobject_cast<TransferThreadAsync *>(QObject::sender()); + if(transfer==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"transfer thread not located!"); + return; + } + int numberOfTranferRuning=getNumberOfTranferRuning(); + if(numberOfTranferRuning<ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER && transfer->getStat()==TransferStat_WaitForTheTransfer) + transfer->startTheTransfer(); + doNewActions_start_transfer(); +} + + +void ListThread::set_setFilters(const std::vector<Filters_rules> &include,const std::vector<Filters_rules> &exclude) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("include.size(): %1, exclude.size(): %2").arg(include.size()).arg(exclude.size()).toStdString()); + this->include=include; + this->exclude=exclude; + unsigned int index=0; + while(index<scanFileOrFolderThreadsPool.size()) + { + scanFileOrFolderThreadsPool.at(index)->setFilters(include,exclude); + index++; + } +} + +void ListThread::set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + emit send_sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void ListThread::set_updateMount() +{ + driveManagement.tryUpdate(); + emit send_updateMount(); +} + +void ListThread::mkPathFirstFolderFinish() +{ + int int_for_loop=0; + const int &loop_size=actionToDoListInode.size(); + while(int_for_loop<loop_size) + { + const ActionToDoInode &actionToDoInode=actionToDoListInode.at(int_for_loop); + if(actionToDoInode.isRunning) + { + if(actionToDoInode.type==ActionType_MkPath || actionToDoInode.type==ActionType_SyncDate) + { + //to send to the log + emit mkPath(TransferThread::internalStringTostring(actionToDoInode.destination)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop mkpath: "+TransferThread::internalStringTostring(actionToDoInode.destination)); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_loop); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); + if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) + updateTheStatus(); + numberOfInodeOperation--; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + doNewActions_inode_manipulation(); + return; + } + if(actionToDoInode.type==ActionType_MovePath || actionToDoInode.type==ActionType_RealMove + #ifdef ULTRACOPIER_PLUGIN_RSYNC + || actionToDoInode.type==ActionType_RmSync + #endif + ) + { + //to send to the log + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(actionToDoInode.type!=ActionType_RmSync) + emit mkPath(actionToDoInode.destination); + #else + emit mkPath(TransferThread::internalStringTostring(actionToDoInode.destination)); + #endif + emit rmPath(TransferThread::internalStringTostring(actionToDoInode.source)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop mkpath: "+TransferThread::internalStringTostring(actionToDoInode.destination)); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_loop); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); + if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) + updateTheStatus(); + numberOfInodeOperation--; + #ifdef ULTRACOPIER_PLUGIN_DEBUG_SCHEDULER + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"numberOfInodeOperation: "+std::to_string(numberOfInodeOperation)); + #endif + doNewActions_inode_manipulation(); + return; + } + + } + int_for_loop++; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to found item into the todo list"); +} + +/// \note Can be call without queue because all call will be serialized +void ListThread::fileAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame) +{ + emit send_fileAlreadyExists(source,destination,isSame,qobject_cast<TransferThreadAsync *>(sender())); +} + +/// \note Can be call without queue because all call will be serialized +void ListThread::errorOnFile(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, const ErrorType &errorType) +{ + TransferThreadAsync * transferThread=qobject_cast<TransferThreadAsync *>(sender()); + if(transferThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Thread locating error"); + return; + } + ErrorLogEntry errorLogEntry; + errorLogEntry.source=TransferThread::internalStringTostring(transferThread->getSourcePath()); + errorLogEntry.destination=TransferThread::internalStringTostring(transferThread->getDestinationPath()); + errorLogEntry.mode=transferThread->getMode(); + errorLogEntry.error=errorString; + errorLog.push_back(errorLogEntry); + emit errorToRetry(TransferThread::internalStringTostring(transferThread->getSourcePath()), + TransferThread::internalStringTostring(transferThread->getDestinationPath()), + errorString); + emit send_errorOnFile(fileInfo,errorString,transferThread,errorType); +} + +/// \note Can be call without queue because all call will be serialized +void ListThread::folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame) +{ + emit send_folderAlreadyExists(source,destination,isSame,qobject_cast<ScanFileOrFolder *>(sender())); +} + +/// \note Can be call without queue because all call will be serialized +/// \todo all this part +void ListThread::errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType) +{ + emit send_errorOnFolder(fileInfo,errorString,qobject_cast<ScanFileOrFolder *>(sender()),errorType); +} + +//to run the thread +void ListThread::run() +{ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + clockForTheCopySpeed=new QTimer(); + #endif + exec(); +} + +void ListThread::getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, + const ErrorType &errorType) +{ + (void)fileInfo; + (void)errorString; + (void)errorType; + thread->putAtBottom(); +} + +/// \to create transfer thread +void ListThread::createTransferThread() +{ + if(stopIt) + return; + if(transferThreadList.size()>=(unsigned int)inodeThreads) + return; + transferThreadList.push_back(new TransferThreadAsync()); + TransferThreadAsync * last=transferThreadList.back(); + last->transferId=0; + last->transferSize=0; + last->setRightTransfer(doRightTransfer); + last->setKeepDate(keepDate); + last->setOsSpecFlags(os_spec_flags); + last->setNativeCopy(native_copy); + last->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(!last->setBlockSize(blockSizeAfterSpeedLimitation)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size: "+std::to_string(blockSizeAfterSpeedLimitation)); + #endif + last->setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + last->setBuffer(buffer); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + last->setRsync(rsync); + #endif + + last->writeThread.writeFileList=new QMultiHash<QString,WriteThread *>(); + last->writeThread.writeFileListMutex=new QMutex(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(last,&TransferThread::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif // ULTRACOPIER_PLUGIN_DEBUG + if(!connect(last,&TransferThread::errorOnFile, this,&ListThread::errorOnFile, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::fileAlreadyExists, this,&ListThread::fileAlreadyExists, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::tryPutAtBottom, this,&ListThread::transferPutAtBottom, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::readStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::preOperationStopped, this,&ListThread::doNewActions_start_transfer, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::postOperationStopped, this,&ListThread::transferInodeIsClosed, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::checkIfItCanBeResumed, this,&ListThread::restartTransferIfItCan, Qt::QueuedConnection)) + abort(); + if(!connect(last,&TransferThread::pushStat, this,&ListThread::newTransferStat, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_sendNewRenamingRules, last,&TransferThread::setRenamingRules, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_updateMount, last,&TransferThread::set_updateMount, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + last->setMultiForBigSpeed(multiForBigSpeed); + //speed limitation + connect(clockForTheCopySpeed, &QTimer::timeout, last, &TransferThreadAsync::timeOfTheBlockCopyFinished, Qt::QueuedConnection); + #endif + + last->setObjectName(QStringLiteral("transfer %1").arg(transferThreadList.size()-1)); + last->readThread.setObjectName(QStringLiteral("read %1").arg(transferThreadList.size()-1)); + last->writeThread.setObjectName(QStringLiteral("write %1").arg(transferThreadList.size()-1)); + last->setRenamingRules(firstRenamingRule,otherRenamingRule); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + last->setId(transferThreadList.size()-1); + #endif + if(transferThreadList.size()>=(unsigned int)inodeThreads) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"create the last of the "+std::to_string(inodeThreads)+" transferThread"); + return; + } + if(stopIt) + return; + doNewActions_inode_manipulation(); + emit askNewTransferThread(); +} + +void ListThread::deleteTransferThread() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + int loop_size=transferThreadList.size(); + if(loop_size>inodeThreads) + { + int index=0; + while(index<loop_size && loop_size>inodeThreads) + { + if(transferThreadList.at(index)->getStat()==TransferStat_Idle && transferThreadList.at(index)->transferId==0) + { + transferThreadList.at(index)->stop(); + delete transferThreadList.at(index);//->deleteLayer(); + transferThreadList[index]=NULL; + transferThreadList.erase(transferThreadList.cbegin()+index); + loop_size--; + } + else + index++; + } + if(loop_size==inodeThreads) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads is lowered to the right value: "+std::to_string(inodeThreads)); + } +} + +void ListThread::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; + mkPathQueue.setMkFullPath(mkFullPath); + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setMkFullPath(mkFullPath); + index++; + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread.h b/plugins/CopyEngine/Ultracopier-Spec/ListThread.h new file mode 100755 index 0000000..361f65c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread.h @@ -0,0 +1,437 @@ +/** \file ListThread.h +\brief Define the list thread, and management to the action to do +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef LISTTHREAD_H +#define LISTTHREAD_H + +#include <QThread> +#include <QObject> +#include <string> +#include <vector> +#include <unordered_set> +#include <unordered_map> +#include <string> +#include <QSemaphore> +#include <QTextStream> +#include <QFile> +#include <QTimer> + +#include "../../../interface/PluginInterface_CopyEngine.h" +#include "ScanFileOrFolder.h" +#include "MkPath.h" +#include "Environment.h" +#include "DriveManagement.h" +#include "async/TransferThreadAsync.h" + +/// \brief Define the list thread, and management to the action to do +class ListThread : public QThread +{ + Q_OBJECT +public: + explicit ListThread(FacilityInterface * facilityInterface); + ~ListThread(); + + //duplication copy detection + /** \brief compare the current sources of the copy, with the passed arguments + * \param sources the sources list to compares with the current sources list + * \return true if have same sources, else false (or empty) */ + bool haveSameSource(const std::vector<std::string> &sources); + /** \brief compare the current destination of the copy, with the passed arguments + * \param destination the destination to compares with the current destination + * \return true if have same destination, else false (or empty) */ + bool haveSameDestination(const std::string &destination); + /// \return empty if multiple or no destination + std::string getUniqueDestinationFolder() const; + //external soft like file browser have send copy/move list to do + /** \brief send copy with destination + * \param sources the sources list to copy + * \param destination the destination to copy + * \return true if the copy have been accepted */ + bool newCopy(const std::vector<std::string> &sources,const std::string &destination); + /** \brief send move without destination, ask the destination + * \param sources the sources list to move + * \param destination the destination to move + * \return true if the move have been accepted */ + bool newMove(const std::vector<std::string> &sources,const std::string &destination); + /** \brief to set drives detected + * specific to this copy engine */ + /// \brief to set the collision action + void setCollisionAction(const FileExistsAction &alwaysDoThisActionForFileExists); + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + void syncTransferList(); + /// \brief to store one action to do + struct ActionToDoTransfer + { + uint64_t id; + uint64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder + #ifdef WIDESTRING + std::wstring source;///< Used to set: source for transfer, folder to create, folder to drop + std::wstring destination; + #else + std::string source;///< Used to set: source for transfer, folder to create, folder to drop + std::string destination; + #endif + Ultracopier::CopyMode mode; + bool isRunning;///< store if the action si running + //TTHREAD * transfer; // -> see transferThreadList + }; + std::vector<ActionToDoTransfer> actionToDoListTransfer; + /// \brief to store one action to do + struct ActionToDoInode + { + ActionType type;///< \see ActionType + uint64_t id; + int64_t size;///< Used to set: used in case of transfer or remainingInode for drop folder + #ifdef WIDESTRING + std::wstring source;///< Keep to copy the right/date, to remove (for move) + std::wstring destination;///< Used to set: folder to create, folder to drop + #else + std::string source;///< Keep to copy the right/date, to remove (for move) + std::string destination;///< Used to set: folder to create, folder to drop + #endif + bool isRunning;///< store if the action si running + }; + std::vector<ActionToDoInode> actionToDoListInode; + std::vector<ActionToDoInode> actionToDoListInode_afterTheTransfer; + int numberOfInodeOperation; + struct ErrorLogEntry + { + std::string source; + std::string destination; + std::string error; + Ultracopier::CopyMode mode; + }; + std::vector<ErrorLogEntry> errorLog; + //dir operation thread queue + MkPath mkPathQueue; + //to get the return value from copyEngine + bool getReturnBoolToCopyEngine() const; + std::pair<quint64,quint64> getReturnPairQuint64ToCopyEngine() const; + Ultracopier::ItemOfCopyList getReturnItemOfCopyListToCopyEngine() const; + void setMkFullPath(const bool mkFullPath); + std::unordered_set<void *> overCheckUsedThread; + + void autoStartIfNeeded(); + /// \brief set auto start + void setAutoStart(const bool autoStart); +public slots: + //action on the copy + /// \brief put the transfer in pause + void pause(); + /// \brief resume the transfer + void resume(); + /** \brief skip one transfer entry + * \param id id of the file to remove */ + void skip(const uint64_t &id); + /** \brief skip as interanl one transfer entry + * \param id id of the file to remove */ + bool skipInternal(const uint64_t &id); + /// \brief cancel all the transfer + void cancel(); + //edit the transfer list + /** \brief remove the selected item + * \param ids ids is the id list of the selected items */ + void removeItems(const std::vector<uint64_t> &ids); + /** \brief move on top of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnTop(std::vector<uint64_t> ids); + /** \brief move up the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsUp(std::vector<uint64_t> ids); + /** \brief move down the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsDown(std::vector<uint64_t> ids); + /** \brief move on bottom of the list the selected item + * \param ids ids is the id list of the selected items */ + void moveItemsOnBottom(std::vector<uint64_t> ids); + + /** \brief give the forced mode, to export/import transfer list */ + void forceMode(const Ultracopier::CopyMode &mode); + /// \brief export the transfer list into a file + void exportTransferList(const std::string &fileName); + /// \brief import the transfer list into a file + void importTransferList(const std::string &fileName); + + /// \brief set the folder local collision + void setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists); + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const int64_t &speedLimitation); + /// \brief set the copy info and options before runing + void setRightTransfer(const bool doRightTransfer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + /// \brief set rsync + void setRsync(const bool rsync); + #endif + /// \brief set check destination folder + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + /// \brief set data local to the thread + void setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists); + /// \brief do new actions, start transfer + void doNewActions_start_transfer(); + /** \brief lunch the pre-op or inode op + 1) locate the next next item to do into the both list + 1a) optimisation posible on the mkpath/rmpath + 2) determine what need be lunched + 3) lunch it, rerun the 2) + */ + void doNewActions_inode_manipulation(); + /// \brief restart transfer if it can + void restartTransferIfItCan(); + void getNeedPutAtBottom(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, TransferThreadAsync *thread, const ErrorType &errorType); + + /// \brief update the transfer stat + void newTransferStat(const TransferStat &stat,const quint64 &id); + + void set_setFilters(const std::vector<Filters_rules> &include,const std::vector<Filters_rules> &exclude); + void set_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + void set_updateMount(); + + //send action done + void sendActionDone(); + //send progression + void sendProgression(); + + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + void setFollowTheStrictOrder(const bool &followTheStrictOrder); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setInodeThreads(const int &inodeThreads); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void setCheckDiskSpace(const bool &checkDiskSpace); + void setBuffer(const bool &buffer); + void exportErrorIntoTransferList(const std::string &fileName); +private: + //can't be static into WriteThread, linked by instance then by ListThread + QMultiHash<QString,WriteThread *> *writeFileList; + QMutex *writeFileListMutex; + + QSemaphore mkpathTransfer; + std::string sourceDrive; + bool sourceDriveMultiple; + std::string destinationDrive; + INTERNALTYPEPATH destinationFolder; + bool destinationDriveMultiple; + bool destinationFolderMultiple; + DriveManagement driveManagement; + + bool stopIt; + std::vector<ScanFileOrFolder *> scanFileOrFolderThreadsPool; + int numberOfTransferIntoToDoList; + std::vector<TransferThreadAsync *> transferThreadList; + ScanFileOrFolder * newScanThread(Ultracopier::CopyMode mode); + uint64_t bytesToTransfer; + uint64_t bytesTransfered; + bool autoStart; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + std::vector<Ultracopier::ReturnActionOnCopyList> actionDone;///< to action to send to the interface + uint64_t idIncrementNumber;///< to store the last id returned + int64_t actualRealByteTransfered; + FolderExistsAction alwaysDoThisActionForFolderExists; + bool checkDestinationFolderExists; + unsigned int parallelizeIfSmallerThan; + bool moveTheWholeFolder; + bool deletePartiallyTransferredFiles; + int inodeThreads; + bool renameTheOriginalDestination; + bool checkDiskSpace; + bool buffer; + bool followTheStrictOrder; + std::unordered_set<TransferThreadAsync *> putAtBottomAfterError; + std::unordered_map<std::string,uint64_t> requiredSpace; + std::vector<std::pair<uint64_t,uint32_t> > timeToTransfer; + //unsigned int putAtBottom;//why here? more correct into CopyEngine(), then translated to CopyEngine + std::vector<Filters_rules> include,exclude; + Ultracopier::CopyMode mode; + bool forcedMode; + std::string firstRenamingRule; + std::string otherRenamingRule; + /* here to prevent: + QObject::killTimer: timers cannot be stopped from another thread + QObject::startTimer: timers cannot be started from another thread */ + + static Ultracopier::ItemOfCopyList actionToDoTransferToItemOfCopyList(const ActionToDoTransfer &actionToDoTransfer); + //add file transfer to do + uint64_t addToTransfer(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode& mode, const int64_t sendedsize=-1); + //generate id number + uint64_t generateIdNumber(); + //warning the first entry is accessible will copy + bool removeSingleItem(const uint64_t &id); + //put on top + bool moveOnTopItem(const uint64_t &id); + //move up + bool moveUpItem(const uint64_t &id); + //move down + bool moveDownItem(const uint64_t &id); + //put on bottom + bool moveOnBottomItem(const uint64_t &id); + //general transfer + void startGeneralTransfer(); + //debug windows if needed + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + QTimer timerUpdateDebugDialog; + #endif + void detectDrivesOfCurrentTransfer(const std::vector<INTERNALTYPEPATH> &sources, const INTERNALTYPEPATH &destination); + FacilityInterface * facilityInterface; + QSemaphore waitConstructor,waitCancel; + int actionToDoListTransfer_count,actionToDoListInode_count; + bool doTransfer,doInode; + int64_t oversize;//used as temp variable + int64_t currentProgression; + int64_t copiedSize,totalSize,localOverSize; + std::vector<Ultracopier::ProgressionItem> progressionList; + //memory variable for transfer thread creation + bool doRightTransfer; + bool keepDate; + bool os_spec_flags; + bool native_copy; + bool mkFullPath; + std::vector<std::string> drives; + FileExistsAction alwaysDoThisActionForFileExists; + int speedLimitation; + //to return value to the copyEngine + bool returnBoolToCopyEngine; + std::pair<quint64,quint64> returnPairQuint64ToCopyEngine; + std::vector<Ultracopier::ItemOfCopyList> returnListItemOfCopyListToCopyEngine; + Ultracopier::ItemOfCopyList returnItemOfCopyListToCopyEngine; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QTimer *clockForTheCopySpeed; + int blockSizeAfterSpeedLimitation;//in Bytes + int multiForBigSpeed; + int blockSize; + #endif + bool putInPause; + + void realByteTransfered(); + int getNumberOfTranferRuning() const; + bool needMoreSpace() const; +private slots: + void exportTransferListInternal(const std::string &fileName); + void importTransferListInternal(const std::string &fileName); + + void scanThreadHaveFinishSlot(); + void scanThreadHaveFinish(bool skipFirstRemove=false); + void autoStartAndCheckSpace(); + void updateTheStatus(); + void fileTransfer(const INTERNALTYPEPATH &sourceFileInfo, const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode); + void fileTransferWithInode(const INTERNALTYPEPATH &sourceFileInfo, const INTERNALTYPEPATH &destinationFileInfo, + const Ultracopier::CopyMode &mode, const TransferThread::dirent_uc &inode); + //mkpath event + void mkPathFirstFolderFinish(); + /** \brief put the current file at bottom in case of error + \note ONLY IN CASE OF ERROR */ + void transferPutAtBottom(); + //transfer is finished + void transferInodeIsClosed(); + //debug windows if needed + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void timedUpdateDebugDialog(); + #endif + //dialog message + /// \note Can be call without queue because all call will be serialized + void fileAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame); + /// \note Can be call without queue because all call will be serialized + void errorOnFile(const INTERNALTYPEPATH &fileInfo,const std::string &errorString, const ErrorType &errorType); + /// \note Can be call without queue because all call will be serialized + void folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame); + /// \note Can be call without queue because all call will be serialized + void errorOnFolder(const INTERNALTYPEPATH &fileInfo, const std::string &errorString, const ErrorType &errorType); + //to run the thread + void run(); + /// \to create transfer thread + void createTransferThread(); + void deleteTransferThread(); + //mk path to do + uint64_t addToMkPath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const int &inode); + //add path to do + void addToMovePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove); + void addToKeepAttributePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove); + //add to real move + void addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + //rsync rm + void addToRmForRsync(const std::string& destination); + #endif + //send the progression, after full reset of the interface (then all is empty) + void syncTransferList_internal(); + + void checkIfReadyToCancel(); +signals: + //send information about the copy + void actionInProgess(const Ultracopier::EngineActionInProgress &) const; //should update interface information on this event + + void newActionOnList(const std::vector<Ultracopier::ReturnActionOnCopyList> &) const;///very important, need be temporized to group the modification to do and not flood the interface + void syncReady() const; + void doneTime(const std::vector<std::pair<uint64_t,uint32_t> >&) const; + + /** \brief to get the progression for a specific file + * \param id the id of the transfer, id send during population the transfer list + * first = current transfered byte, second = byte to transfer */ + void pushFileProgression(const std::vector<Ultracopier::ProgressionItem> &progressionList) const; + //get information about the copy + /** \brief to get the general progression + * first = current transfered byte, second = byte to transfer */ + void pushGeneralProgression(const uint64_t &,const uint64_t &) const; + + void newFolderListing(const std::string &path) const; + + //when can be deleted + void canBeDeleted() const; + void haveNeedPutAtBottom(bool needPutAtBottom,const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread,const ErrorType &errorType) const; + + //send error occurred + void error(const std::string &path,const uint64_t &size,const uint64_t &mtime,const std::string &error) const; + void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) const; + //for the extra logging + void rmPath(const std::string &path) const; + void mkPath(const std::string &path) const; + /// \brief To debug source + #ifdef ULTRACOPIER_PLUGIN_DEBUG + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW + void updateTheDebugInfo(const std::vector<std::string> &,const std::vector<std::string>&,const int &) const; + #endif + + //other signal + /// \note Can be call without queue because all call will be serialized + void send_fileAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame,TransferThreadAsync * thread) const; + /// \note Can be call without queue because all call will be serialized + void send_errorOnFile(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,TransferThreadAsync * thread, const ErrorType &errorType) const; + /// \note Can be call without queue because all call will be serialized + void send_folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame,ScanFileOrFolder * thread) const; + /// \note Can be call without queue because all call will be serialized + void send_errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,ScanFileOrFolder * thread, const ErrorType &errorType) const; + //send the progression + void send_syncTransferList() const; + //mkpath error event + void mkPathErrorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType) const; + //to close + void tryCancel() const; + //to ask new transfer thread + void askNewTransferThread() const; + + void warningTransferList(const std::string &warning) const; + void errorTransferList(const std::string &error) const; + void send_sendNewRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule) const; + void send_realBytesTransfered(const uint64_t &) const; + + void send_parallelizeIfSmallerThan(const int ¶llelizeIfSmallerThan) const; + void send_updateMount(); + void missingDiskSpace(std::vector<Diskspace> list) const; + void isInPause(const bool &) const; + + void exportTransferListSend(const std::string &fileName); + void importTransferListSend(const std::string &fileName); +}; + +#endif // LISTTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp new file mode 100755 index 0000000..85b3113 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadActions.cpp @@ -0,0 +1,129 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +void ListThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already in pause!"); + return; + } + putInPause=true; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(index<loop_sub_size_transfer_thread_search) + { + transferThreadList.at(index)->pause(); + index++; + } + emit isInPause(true); +} + +void ListThread::resume() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(!putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already resumed!"); + return; + } + putInPause=false; + startGeneralTransfer(); + doNewActions_start_transfer(); + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(index<loop_sub_size_transfer_thread_search) + { + transferThreadList.at(index)->resume(); + index++; + } + emit isInPause(false); +} + +void ListThread::skip(const uint64_t &id) +{ + skipInternal(id); +} + +bool ListThread::skipInternal(const uint64_t &id) +{ + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(index<loop_sub_size_transfer_thread_search) + { + if(transferThreadList.at(index)->transferId==id) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip one transfer: "+std::to_string(id)); + transferThreadList.at(index)->skip(); + return true; + } + index++; + } + int int_for_internal_loop=0; + const int &loop_size=actionToDoListTransfer.size(); + while(int_for_internal_loop<loop_size) + { + if(actionToDoListTransfer.at(int_for_internal_loop).id==id) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[%1] remove at not running, for id: %2").arg(int_for_internal_loop).arg(id).toStdString()); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::RemoveItem; + newAction.userAction.moveAt=1; + newAction.addAction=actionToDoTransferToItemOfCopyList(actionToDoListTransfer.at(int_for_internal_loop)); + newAction.userAction.position=int_for_internal_loop; + actionDone.push_back(newAction); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+int_for_internal_loop); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("actionToDoListTransfer.size(): %1, actionToDoListInode: %2, actionToDoListInode_afterTheTransfer: %3").arg(actionToDoListTransfer.size()).arg(actionToDoListInode.size()).arg(actionToDoListInode_afterTheTransfer.size()).toStdString()); + if(actionToDoListTransfer.empty() && actionToDoListInode.empty() && actionToDoListInode_afterTheTransfer.empty()) + updateTheStatus(); + return true; + } + int_for_internal_loop++; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"skip transfer not found: "+std::to_string(id)); + return false; +} + +//executed in this thread +void ListThread::cancel() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(stopIt) + { + waitCancel.release(); + return; + } + stopIt=true; + int index=0; + int loop_size=transferThreadList.size(); + while(index<loop_size) + { + transferThreadList.at(index)->stop(); + transferThreadList.at(index)->transferId=0; + index++; + } + index=0; + loop_size=scanFileOrFolderThreadsPool.size(); + while(index<loop_size) + { + scanFileOrFolderThreadsPool.at(index)->stop(); + delete scanFileOrFolderThreadsPool.at(index);//->deleteLayer(); + scanFileOrFolderThreadsPool[index]=NULL; + index++; + } + scanFileOrFolderThreadsPool.clear(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(clockForTheCopySpeed!=NULL) + { + clockForTheCopySpeed->stop(); + delete clockForTheCopySpeed; + clockForTheCopySpeed=NULL; + } + #endif + checkIfReadyToCancel(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp new file mode 100755 index 0000000..6927caa --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadListChange.cpp @@ -0,0 +1,423 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +//warning the first entry is accessible will copy +void ListThread::removeItems(const std::vector<uint64_t> &ids) +{ + for(unsigned int i=0;i<ids.size();i++) + skipInternal(ids.at(i)); +} + +//put on top +void ListThread::moveItemsOnTop(std::vector<uint64_t> ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int indexToMove=0; + for (unsigned int i=0; i<actionToDoListTransfer.size(); ++i) { + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(indexToMove)); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=indexToMove; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp=actionToDoListTransfer.at(i); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+i); + actionToDoListTransfer.insert(actionToDoListTransfer.cbegin()+indexToMove,temp); + indexToMove++; + if(ids.empty()) + return; + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//move up +void ListThread::moveItemsUp(std::vector<uint64_t> ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=0; + bool haveGoodPosition=false; + for (unsigned int i=0; i<actionToDoListTransfer.size(); ++i) { + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + if(haveGoodPosition) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(i-1)); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=lastGoodPositionReal; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp1=actionToDoListTransfer.at(i); + ActionToDoTransfer temp2=actionToDoListTransfer.at(lastGoodPositionReal); + actionToDoListTransfer[i]=temp2; + actionToDoListTransfer[lastGoodPositionReal]=temp1; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Try move up false, item "+std::to_string(i)); + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + if(ids.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); + return; + } + } + else + { + lastGoodPositionReal=i; + haveGoodPosition=true; + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//move down +void ListThread::moveItemsDown(std::vector<uint64_t> ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=0; + bool haveGoodPosition=false; + for (int i=actionToDoListTransfer.size()-1; i>=0; --i) { + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + if(haveGoodPosition) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(i+1)); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=lastGoodPositionReal; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp1=actionToDoListTransfer.at(i); + ActionToDoTransfer temp2=actionToDoListTransfer.at(lastGoodPositionReal); + actionToDoListTransfer[i]=temp2; + actionToDoListTransfer[lastGoodPositionReal]=temp1; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Try move up false, item "+std::to_string(i)); + } + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + if(ids.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); + return; + } + } + else + { + lastGoodPositionReal=i; + haveGoodPosition=true; + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +//put on bottom +void ListThread::moveItemsOnBottom(std::vector<uint64_t> ids) +{ + if(actionToDoListTransfer.size()<=1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list size is empty"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + //do list operation + int lastGoodPositionReal=actionToDoListTransfer.size()-1; + for (int i=lastGoodPositionReal; i>=0; --i) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Check action on item "+std::to_string(i)); + if(vectorcontainsAtLeastOne(ids,actionToDoListTransfer.at(i).id)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"move item "+std::to_string(i)+" to "+std::to_string(lastGoodPositionReal)); + vectorremoveOne(ids,actionToDoListTransfer.at(i).id); + Ultracopier::ReturnActionOnCopyList newAction; + newAction.type=Ultracopier::MoveItem; + newAction.addAction.id=actionToDoListTransfer.at(i).id; + newAction.userAction.moveAt=lastGoodPositionReal; + newAction.userAction.position=i; + actionDone.push_back(newAction); + ActionToDoTransfer temp=actionToDoListTransfer.at(i); + actionToDoListTransfer.erase(actionToDoListTransfer.cbegin()+i); + actionToDoListTransfer.insert(actionToDoListTransfer.cbegin()+lastGoodPositionReal,temp); + lastGoodPositionReal--; + if(ids.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop with return"); + return; + } + } + } + sendActionDone(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"stop"); +} + +void ListThread::exportTransferList(const std::string &fileName) +{ + emit exportTransferListSend(fileName); +} + +void ListThread::exportTransferListInternal(const std::string &fileName) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QFile transferFile(QString::fromStdString(fileName)); + if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) + { + transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); + if(!forcedMode) + transferFile.write(QStringLiteral("Transfer;").toUtf8()); + else + { + if(mode==Ultracopier::Copy) + transferFile.write(QStringLiteral("Copy;").toUtf8()); + else + transferFile.write(QStringLiteral("Move;").toUtf8()); + } + transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); + bool haveError=false; + int size=actionToDoListTransfer.size(); + for (int index=0;index<size;++index) { + if(actionToDoListTransfer.at(index).mode==Ultracopier::Copy) + { + if(!forcedMode || mode==Ultracopier::Copy) + { + if(forcedMode) + transferFile.write((TransferThread::internalStringTostring(actionToDoListTransfer.at(index).source)+ + ";"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).destination)+"\n").c_str()); + else + transferFile.write(("Copy;"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).source)+ + ";"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).destination)+"\n").c_str()); + } + else + haveError=true; + } + else if(actionToDoListTransfer.at(index).mode==Ultracopier::Move) + { + if(!forcedMode || mode==Ultracopier::Move) + { + if(forcedMode) + transferFile.write((TransferThread::internalStringTostring(actionToDoListTransfer.at(index).source)+ + ";"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).destination)+"\n").c_str()); + else + transferFile.write(("Move;"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).source)+ + ";"+TransferThread::internalStringTostring(actionToDoListTransfer.at(index).destination)+"\n").c_str()); + } + else + haveError=true; + } + } + if(haveError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Unable do to move or copy item into wrong forced mode: %1").arg(transferFile.errorString()).toStdString()); + emit errorTransferList(tr("Unable do to move or copy item into wrong forced mode: %1").arg(transferFile.errorString()).toStdString()); + } + transferFile.close(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Unable to save the transfer list: %1").arg(transferFile.errorString()).toStdString()); + emit errorTransferList(tr("Unable to save the transfer list: %1").arg(transferFile.errorString()).toStdString()); + return; + } +} + +void ListThread::importTransferList(const std::string &fileName) +{ + emit importTransferListSend(fileName); +} + +void ListThread::importTransferListInternal(const std::string &fileName) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QFile transferFile(QString::fromStdString(fileName)); + if(transferFile.open(QIODevice::ReadOnly)) + { + std::string content; + QByteArray data=transferFile.readLine(64); + if(data.size()<=0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Problem reading file, or file-size is 0"); + emit errorTransferList(tr("Problem reading file, or file-size is 0").toStdString()); + return; + } + content=QString::fromUtf8(data).toStdString(); + if(content!="Ultracopier;Transfer-list;Transfer;Ultracopier\n" && content!="Ultracopier;Transfer-list;Copy;Ultracopier\n" && content!="Ultracopier;Transfer-list;Move;Ultracopier\n") + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong header: "+content); + emit errorTransferList(tr("Wrong header: \"%1\"").arg(QString::fromStdString(content)).toStdString()); + return; + } + bool transferListMixedMode=false; + if(content=="Ultracopier;Transfer-list;Transfer;Ultracopier\n") + { + if(forcedMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The transfer list is in mixed mode, but this instance is not"); + emit errorTransferList(tr("The transfer list is in mixed mode, but this instance is not in this mode").toStdString()); + return; + } + else + transferListMixedMode=true; + } + if(content=="Ultracopier;Transfer-list;Copy;Ultracopier\n" && (forcedMode && mode==Ultracopier::Move)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("The transfer list is in copy mode, but this instance is not: forcedMode: %1, mode: %2").arg(forcedMode).arg(mode).toStdString()); + emit errorTransferList(tr("The transfer list is in copy mode, but this instance is not in this mode").toStdString()); + return; + } + if(content=="Ultracopier;Transfer-list;Move;Ultracopier\n" && (forcedMode && mode==Ultracopier::Copy)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("The transfer list is in move mode, but this instance is not: forcedMode: %1, mode: %2").arg(forcedMode).arg(mode).toStdString()); + emit errorTransferList(tr("The transfer list is in move mode, but this instance is not in this mode").toStdString()); + return; + } + + bool updateTheStatus_copying=actionToDoListTransfer.size()>0 || actionToDoListInode.size()>0 || actionToDoListInode_afterTheTransfer.size()>0; + Ultracopier::EngineActionInProgress updateTheStatus_action_in_progress; + if(updateTheStatus_copying) + updateTheStatus_action_in_progress=Ultracopier::CopyingAndListing; + else + updateTheStatus_action_in_progress=Ultracopier::Listing; + emit actionInProgess(updateTheStatus_action_in_progress); + + bool errorFound=false; + std::regex correctLine; + if(transferListMixedMode) + correctLine=std::regex("^(Copy|Move);[^;]+;[^;]+[\n\r]*$"); + else + correctLine=std::regex("^[^;]+;[^;]+[\n\r]*$"); + std::vector<std::string> args; + Ultracopier::CopyMode tempMode; + do + { + data=transferFile.readLine(65535*2); + if(data.size()>0) + { + content=std::string(data.constData(),data.size()); + //do the import here + if(std::regex_match(content,correctLine)) + { + stringreplaceAll(content,"\n",""); + args=stringsplit(content,';'); + if(forcedMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import in forced mode: %2,%3") + .arg(QString::fromStdString(args.at(0))) + .arg(QString::fromStdString(args.at(1))) + .toStdString()); + addToTransfer(TransferThread::stringToInternalString(args.at(0)), + TransferThread::stringToInternalString(args.at(1)),mode); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("New data to import: %1,%2,%3") + .arg(QString::fromStdString(args.at(0))) + .arg(QString::fromStdString(args.at(1))) + .arg(QString::fromStdString(args.at(2))) + .toStdString()); + if(args.at(0)=="Copy") + tempMode=Ultracopier::Copy; + else + tempMode=Ultracopier::Move; + addToTransfer(TransferThread::stringToInternalString(args.at(1)),TransferThread::stringToInternalString(args.at(2)),tempMode); + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong line syntax: "+content); + errorFound=true; + } + } + } + while(data.size()>0); + transferFile.close(); + if(errorFound) + emit warningTransferList(tr("Some errors have been found during the line parsing").toStdString()); + + updateTheStatus();//->sendActionDone(); into this + autoStartAndCheckSpace(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); + emit errorTransferList(tr("Unable to open the transfer list: %1").arg(transferFile.errorString()).toStdString()); + return; + } +} + +void ListThread::exportErrorIntoTransferList(const std::string &fileName) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QFile transferFile(QString::fromStdString(fileName)); + if(transferFile.open(QIODevice::WriteOnly|QIODevice::Truncate)) + { + transferFile.write(QStringLiteral("Ultracopier;Transfer-list;").toUtf8()); + if(!forcedMode) + transferFile.write(QStringLiteral("Transfer;").toUtf8()); + else + { + if(mode==Ultracopier::Copy) + transferFile.write(QStringLiteral("Copy;").toUtf8()); + else + transferFile.write(QStringLiteral("Move;").toUtf8()); + } + transferFile.write(QStringLiteral("Ultracopier\n").toUtf8()); + bool haveError=false; + int size=errorLog.size(); + for (int index=0;index<size;++index) { + if(forcedMode) + transferFile.write((errorLog.at(index).source+";"+errorLog.at(index).destination+"\n").c_str()); + else + { + if(errorLog.at(index).mode==Ultracopier::Copy) + transferFile.write(("Copy;"+errorLog.at(index).source+";"+errorLog.at(index).destination+"\n").c_str()); + else if(errorLog.at(index).mode==Ultracopier::Move) + transferFile.write(("Move;"+errorLog.at(index).source+";"+errorLog.at(index).destination+"\n").c_str()); + else + haveError=true; + } + } + if(haveError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable do to move or copy item into wrong forced mode: "+transferFile.errorString().toStdString()); + emit errorTransferList(tr("Unable do to move or copy item into wrong forced mode: %1").arg(transferFile.errorString()).toStdString()); + } + transferFile.close(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to save the transfer list: "+transferFile.errorString().toStdString()); + emit errorTransferList(tr("Unable to save the transfer list: %1").arg(transferFile.errorString()).toStdString()); + return; + } +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadMedia.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadMedia.cpp new file mode 100755 index 0000000..4eba9a0 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadMedia.cpp @@ -0,0 +1,169 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" +#include "async/TransferThreadAsync.h" + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::haveSameSource(const std::vector<std::string> &sources) +{ + if(stopIt) + return false; + if(sourceDriveMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDriveMultiple"); + return false; + } + if(sourceDrive.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourceDrive.isEmpty()"); + return true; + } + unsigned int index=0; + while(index<sources.size()) + { + if(driveManagement.getDrive(sources.at(index))!=sourceDrive) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sources.at(index))!=sourceDrive"); + return false; + } + index++; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"seam have same source"); + return true; +} + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::haveSameDestination(const std::string &destination) +{ + if(stopIt) + return false; + if(destinationDriveMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); + return false; + } + if(destinationDrive.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDrive.isEmpty()"); + return true; + } + if(driveManagement.getDrive(destination)!=destinationDrive) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination!=destinationDrive"); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"seam have same destination"); + return true; +} + +/// \return empty if multiple or no destination +std::string ListThread::getUniqueDestinationFolder() const +{ + if(stopIt) + return std::string(); + if(destinationFolderMultiple) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destinationDriveMultiple"); + return std::string(); + } + return TransferThread::internalStringTostring(destinationFolder); +} + +void ListThread::detectDrivesOfCurrentTransfer(const std::vector<INTERNALTYPEPATH> &sources,const INTERNALTYPEPATH &destination) +{ + /* code to detect volume/mount point to group by windows */ + if(!sourceDriveMultiple) + { + unsigned int index=0; + while(index<sources.size()) + { + const std::string &tempDrive=driveManagement.getDrive(TransferThread::internalStringTostring(sources.at(index))); + //if have not already source, set the source + if(sourceDrive.empty()) + sourceDrive=tempDrive; + //if have previous source and the news source is not the same + if(sourceDrive!=tempDrive) + { + sourceDriveMultiple=true; + break; + } + index++; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("source informations, sourceDrive: %1, sourceDriveMultiple: %2").arg(QString::fromStdString(sourceDrive)).arg(sourceDriveMultiple).toStdString()); + if(!destinationDriveMultiple) + { + const std::string &tempDrive=driveManagement.getDrive(TransferThread::internalStringTostring(destination)); + //if have not already destination, set the destination + if(destinationDrive.empty()) + destinationDrive=tempDrive; + //if have previous destination and the news destination is not the same + if(destinationDrive!=tempDrive) + destinationDriveMultiple=true; + } + if(!destinationFolderMultiple) + { + //if have not already destination, set the destination + if(destinationFolder.empty()) + destinationFolder=destination; + //if have previous destination and the news destination is not the same + if(destinationFolder!=destination) + destinationFolderMultiple=true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("destination informations, destinationDrive: %1, destinationDriveMultiple: %2").arg(QString::fromStdString(destinationDrive)).arg(destinationDriveMultiple).toStdString()); +} + +//return +bool ListThread::needMoreSpace() const +{ + if(!checkDiskSpace) + return false; + std::vector<Diskspace> diskspace_list; + for( auto& spaceDrive : requiredSpace ) { + const QString &drive=QString::fromStdString(spaceDrive.first); + #ifdef Q_OS_WIN32 + if(spaceDrive.first!="A:\\" && spaceDrive.first!="A:/" && spaceDrive.first!="A:" && spaceDrive.first!="A" && spaceDrive.first!="a:\\" && spaceDrive.first!="a:/" && spaceDrive.first!="a:" && spaceDrive.first!="a") + { + #endif + QStorageInfo storageInfo(drive); + storageInfo.refresh(); + const qint64 &availableSpace=storageInfo.bytesAvailable(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + const qint64 &bytesFree=storageInfo.bytesFree(); + #endif + + if(availableSpace<0 || + //workaround for all 0 value in case of bug from Qt + (availableSpace==0 && storageInfo.bytesTotal()==0) + ) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); + } + else if(spaceDrive.second>(quint64)availableSpace) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("availableSpace: %1, space needed: %2, on: %3, bytesFree: %4").arg(availableSpace).arg(spaceDrive.second).arg(drive).arg(bytesFree).toStdString()); + #ifdef Q_OS_WIN32 + //if(drive.contains(QRegularExpression("^[a-zA-Z]:[\\\\/]"))) + if(drive.contains(QRegularExpression("^[a-zA-Z]:"))) + #endif + { + Diskspace diskspace; + diskspace.drive=spaceDrive.first; + diskspace.freeSpace=availableSpace; + diskspace.requiredSpace=spaceDrive.second; + diskspace_list.push_back(diskspace); + } + #ifdef Q_OS_WIN32 + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"not local drive"); + #endif + } + #ifdef Q_OS_WIN32 + } + #endif + } + if(!diskspace_list.empty()) + emit missingDiskSpace(diskspace_list); + return ! diskspace_list.empty(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp new file mode 100755 index 0000000..f4a1857 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadNew.cpp @@ -0,0 +1,104 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::newCopy(const std::vector<std::string> &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start: "+stringimplode(sources,";")+", destination: "+destination); + ScanFileOrFolder * scanFileOrFolderThread=newScanThread(Ultracopier::Copy); + if(scanFileOrFolderThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); + return false; + } + std::regex base_regex("^[a-z][a-z][a-z]*:/.*"); + std::smatch base_match; + std::vector<INTERNALTYPEPATH> sourcesClean; + unsigned int index=0; + while(index<sources.size()) + { + std::string source=sources.at(index); + //can be: file://192.168.0.99/share/file.txt + //can be: file:///C:/file.txt + //can be: file:///home/user/fileatrootunderunix + #ifndef Q_OS_WIN + if(stringStartWith(source,"file:///")) + source.replace(0,7,""); + #else + if(stringStartWith(source,"file:///")) + source.replace(0,8,""); + else if(stringStartWith(source,"file://")) + source.replace(0,5,""); + else if(stringStartWith(source,"file:/")) + source.replace(0,6,""); + #endif + else if (std::regex_match(source, base_match, base_regex)) + return false; + if(index<99) + { + if(sources.at(index)!=source) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,sources.at(index)+" -> "+source); + } + index++; + sourcesClean.push_back(TransferThread::stringToInternalString(source)); + } + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"sourcesClean: "+stringimplode(sourcesClean,";")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+destination); + const INTERNALTYPEPATH &Wdest=TransferThread::stringToInternalString(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+TransferThread::internalStringTostring(Wdest)); + scanFileOrFolderThread->addToList(sourcesClean,Wdest); + scanThreadHaveFinish(true); + detectDrivesOfCurrentTransfer(sourcesClean,TransferThread::stringToInternalString(destination)); + return true; +} + +// -> add thread safe, by Qt::BlockingQueuedConnection +bool ListThread::newMove(const std::vector<std::string> &sources,const std::string &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + ScanFileOrFolder * scanFileOrFolderThread = newScanThread(Ultracopier::Move); + if(scanFileOrFolderThread==NULL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get new thread"); + return false; + } + std::regex base_regex("^[a-z][a-z][a-z]*:/.*"); + std::smatch base_match; + std::vector<INTERNALTYPEPATH> sourcesClean; + unsigned int index=0; + while(index<sources.size()) + { + std::string source=sources.at(index); + //can be: file://192.168.0.99/share/file.txt + //can be: file:///C:/file.txt + //can be: file:///home/user/fileatrootunderunix + #ifndef Q_OS_WIN + if(stringStartWith(source,"file:///")) + source.replace(0,7,""); + #else + if(stringStartWith(source,"file:///")) + source.replace(0,8,""); + else if(stringStartWith(source,"file://")) + source.replace(0,5,""); + else if(stringStartWith(source,"file:/")) + source.replace(0,6,""); + #endif + else if (std::regex_match(source, base_match, base_regex)) + return false; + if(index<99) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,sources.at(index)+" -> "+source); + index++; + sourcesClean.push_back(TransferThread::stringToInternalString(source)); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+destination); + const INTERNALTYPEPATH &Wdest=TransferThread::stringToInternalString(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination: "+TransferThread::internalStringTostring(Wdest)); + scanFileOrFolderThread->addToList(sourcesClean,Wdest); + scanThreadHaveFinish(true); + detectDrivesOfCurrentTransfer(sourcesClean,TransferThread::stringToInternalString(destination)); + return true; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp new file mode 100755 index 0000000..25d710f --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadOptions.cpp @@ -0,0 +1,296 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" +#include "async/TransferThreadAsync.h" + +//set the copy info and options before runing +void ListThread::setRightTransfer(const bool doRightTransfer) +{ + mkPathQueue.setRightTransfer(doRightTransfer); + this->doRightTransfer=doRightTransfer; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setRightTransfer(doRightTransfer); + index++; + } +} + +//set keep date +void ListThread::setKeepDate(const bool keepDate) +{ + mkPathQueue.setKeepDate(keepDate); + this->keepDate=keepDate; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setKeepDate(keepDate); + index++; + } +} + +void ListThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setOsSpecFlags(os_spec_flags); + index++; + } +} + +void ListThread::setNativeCopy(bool native_copy) +{ + this->native_copy=native_copy; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setNativeCopy(native_copy); + index++; + } +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void ListThread::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setRsync(rsync); + index++; + } + for(unsigned int i=0;i<scanFileOrFolderThreadsPool.size();i++) + scanFileOrFolderThreadsPool.at(i)->setRsync(rsync); +} +#endif + +//set check destination folder +void ListThread::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) +{ + this->checkDestinationFolderExists=checkDestinationFolderExists; + for(unsigned int i=0;i<scanFileOrFolderThreadsPool.size();i++) + scanFileOrFolderThreadsPool.at(i)->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); +} + +void ListThread::setCollisionAction(const FileExistsAction &alwaysDoThisActionForFileExists) +{ + this->alwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + index++; + } +} + +//set the folder local collision +void ListThread::setFolderCollision(const FolderExistsAction &alwaysDoThisActionForFolderExists) +{ + this->alwaysDoThisActionForFolderExists=alwaysDoThisActionForFolderExists; +} + +//speedLimitation in KB/s +bool ListThread::setSpeedLimitation(const int64_t &speedLimitation) +{ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"maxSpeed in KB/s: "+std::to_string(speedLimitation)); + + if(speedLimitation>1024*1024) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"speedLimitation out of range"); + return false; + } + this->speedLimitation=speedLimitation; + + multiForBigSpeed=0; + if(speedLimitation>0) + { + blockSizeAfterSpeedLimitation=blockSize; + + //try resolv the interval + int newInterval;//in ms + do + { + multiForBigSpeed++; + //at max speed, is out of range for int, it's why quint64 is used + newInterval=(((quint64)blockSize*(quint64)multiForBigSpeed*1000/* *1000 because interval is into ms, not s*/)/((quint64)speedLimitation*(quint64)1024)); + if(newInterval<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated newInterval wrong"); + return false; + } + } + while(newInterval<ULTRACOPIER_PLUGIN_MINTIMERINTERVAL); + + if(newInterval<=0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated newInterval wrong"); + return false; + } + //wait time too big, then shrink the block size and set interval to max size + if(newInterval>ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"wait time too big, then shrink the block size and set interval to max size"); + newInterval=ULTRACOPIER_PLUGIN_MAXTIMERINTERVAL; + multiForBigSpeed=1; + blockSizeAfterSpeedLimitation=(this->speedLimitation*1024*newInterval)/1000; + + if(blockSizeAfterSpeedLimitation<10) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"calculated block size wrong"); + return false; + } + + //set the new block size into the thread + const int &loop_size=transferThreadList.size(); + int int_for_loop=0; + while(int_for_loop<loop_size) + { + if(!transferThreadList.at(int_for_loop)->setBlockSize(blockSizeAfterSpeedLimitation)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the block size"); + int_for_loop++; + } + } + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("fixed speed with new block size and new interval in BlockSize: %1, multiForBigSpeed: %2, newInterval: %3, maxSpeed: %4") + .arg(blockSizeAfterSpeedLimitation) + .arg(multiForBigSpeed) + .arg(newInterval) + .arg(speedLimitation) + .toStdString() + ); + + clockForTheCopySpeed->setInterval(newInterval); + if(clockForTheCopySpeed!=NULL) + clockForTheCopySpeed->start(); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); + } + else + { + if(clockForTheCopySpeed!=NULL) + clockForTheCopySpeed->stop(); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"clockForTheCopySpeed == NULL at this point"); + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loop<loop_size) + { + transferThreadList.at(int_for_loop)->setBlockSize(blockSize); + int_for_loop++; + } + } + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loop<loop_size) + { + transferThreadList.at(int_for_loop)->setMultiForBigSpeed(multiForBigSpeed); + int_for_loop++; + } + + return true; + #else + Q_UNUSED(speedLimitation); + return false; + #endif +} + +//set data local to the thread +void ListThread::setAlwaysFileExistsAction(const FileExistsAction &alwaysDoThisActionForFileExists) +{ + this->alwaysDoThisActionForFileExists=alwaysDoThisActionForFileExists; + unsigned int int_for_loop=0; + while(int_for_loop<transferThreadList.size()) + { + transferThreadList.at(int_for_loop)->setAlwaysFileExistsAction(alwaysDoThisActionForFileExists); + int_for_loop++; + } +} + +/** \brief give the forced mode, to export/import transfer list */ +void ListThread::forceMode(const Ultracopier::CopyMode &mode) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(mode==Ultracopier::Move) + setRsync(false); + #endif + if(mode==Ultracopier::Copy) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to copy"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Force mode to move"); + this->mode=mode; + forcedMode=true; +} + +void ListThread::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + for(unsigned int i=0;i<scanFileOrFolderThreadsPool.size();i++) + scanFileOrFolderThreadsPool.at(i)->setMoveTheWholeFolder(moveTheWholeFolder); + this->moveTheWholeFolder=moveTheWholeFolder; +} + +void ListThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setDeletePartiallyTransferredFiles(deletePartiallyTransferredFiles); + index++; + } +} + +void ListThread::setInodeThreads(const int &inodeThreads) +{ + if(inodeThreads<1 || inodeThreads>32) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"inodeThreads is out of ranges: "+std::to_string(inodeThreads)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"inodeThreads: "+std::to_string(inodeThreads)); + this->inodeThreads=inodeThreads; + createTransferThread(); + deleteTransferThread(); +} + +void ListThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"renameTheOriginalDestination: "+std::to_string(renameTheOriginalDestination)); + this->renameTheOriginalDestination=renameTheOriginalDestination; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setRenameTheOriginalDestination(renameTheOriginalDestination); + index++; + } +} + +void ListThread::setCheckDiskSpace(const bool &checkDiskSpace) +{ + this->checkDiskSpace=checkDiskSpace; +} + +void ListThread::setBuffer(const bool &buffer) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"setBuffer: "+std::to_string(buffer)); + this->buffer=buffer; + unsigned int index=0; + while(index<transferThreadList.size()) + { + transferThreadList.at(index)->setBuffer(buffer); + index++; + } +} + +void ListThread::setFollowTheStrictOrder(const bool &order) +{ + this->followTheStrictOrder=order; + for(unsigned int i=0;i<scanFileOrFolderThreadsPool.size();i++) + scanFileOrFolderThreadsPool.at(i)->setFollowTheStrictOrder(this->followTheStrictOrder); +} + diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp new file mode 100755 index 0000000..48cc444 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadScan.cpp @@ -0,0 +1,97 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +ScanFileOrFolder * ListThread::newScanThread(Ultracopier::CopyMode mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start with: "+std::to_string(mode)); + + //create new thread because is auto-detroyed + scanFileOrFolderThreadsPool.push_back(new ScanFileOrFolder(mode)); + ScanFileOrFolder * scanFileOrFolderThreads=scanFileOrFolderThreadsPool.back(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::finishedTheListing, this,&ListThread::scanThreadHaveFinishSlot, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::fileTransfer, this,&ListThread::fileTransfer, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::fileTransferWithInode, this,&ListThread::fileTransferWithInode, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::debugInformation, this,&ListThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::newFolderListing, this,&ListThread::newFolderListing)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToMovePath, this,&ListThread::addToMovePath, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToKeepAttributePath, this,&ListThread::addToKeepAttributePath, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToRealMove, this,&ListThread::addToRealMove, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToMkPath, this,&ListThread::addToMkPath, Qt::QueuedConnection)) + abort(); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::addToRmForRsync, this,&ListThread::addToRmForRsync, Qt::QueuedConnection)) + abort(); + #endif + + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::errorOnFolder, this,&ListThread::errorOnFolder, Qt::QueuedConnection)) + abort(); + if(!connect(scanFileOrFolderThreads,&ScanFileOrFolder::folderAlreadyExists, this,&ListThread::folderAlreadyExists, Qt::QueuedConnection)) + abort(); + + if(!connect(this,&ListThread::send_updateMount, scanFileOrFolderThreads,&ScanFileOrFolder::set_updateMount, Qt::QueuedConnection)) + abort(); + + scanFileOrFolderThreads->setFilters(include,exclude); + scanFileOrFolderThreads->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge); + scanFileOrFolderThreads->setMoveTheWholeFolder(moveTheWholeFolder); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + scanFileOrFolderThreads->setRsync(rsync); + #endif + if(scanFileOrFolderThreadsPool.size()==1) + updateTheStatus(); + scanFileOrFolderThreads->setRenamingRules(firstRenamingRule,otherRenamingRule); + scanFileOrFolderThreads->setFollowTheStrictOrder(followTheStrictOrder); + return scanFileOrFolderThreads; +} + +void ListThread::scanThreadHaveFinishSlot() +{ + scanThreadHaveFinish(); +} + +void ListThread::scanThreadHaveFinish(bool skipFirstRemove) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"listing thread have finish, skipFirstRemove: "+std::to_string(skipFirstRemove)); + if(!skipFirstRemove) + { + ScanFileOrFolder * senderThread = qobject_cast<ScanFileOrFolder *>(QObject::sender()); + if(senderThread==NULL) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"sender pointer null (plugin copy engine)"); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); + delete senderThread; + vectorremoveOne(scanFileOrFolderThreadsPool,senderThread); + if(scanFileOrFolderThreadsPool.empty()) + updateTheStatus(); + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start the next thread, scanFileOrFolderThreadsPool.size(): "+std::to_string(scanFileOrFolderThreadsPool.size())); + if(scanFileOrFolderThreadsPool.size()>0) + { + //then start the next listing threads + if(scanFileOrFolderThreadsPool.front()->isFinished()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Start listing thread"); + scanFileOrFolderThreadsPool.front()->start(); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"The listing thread is already running"); + } + else + autoStartAndCheckSpace(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp new file mode 100755 index 0000000..bbba3ee --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThreadStat.cpp @@ -0,0 +1,184 @@ +#include "ListThread.h" +#include <QStorageInfo> +#include <QtGlobal> +#include "../../../cpp11addition.h" + +#include "async/TransferThreadAsync.h" + +/// \brief update the transfer stat +void ListThread::newTransferStat(const TransferStat &stat,const quint64 &id) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferStat: "+std::to_string(stat)); + Ultracopier::ReturnActionOnCopyList newAction; + switch(stat) + { + case TransferStat_Idle: + return; + break; + case TransferStat_PreOperation: + return; + break; + case TransferStat_WaitForTheTransfer: + return; + break; + case TransferStat_Transfer: + newAction.type=Ultracopier::Transfer; + break; + case TransferStat_PostTransfer: + case TransferStat_PostOperation: + newAction.type=Ultracopier::PostOperation; + break; + default: + return; + break; + } + newAction.addAction.id = id; + actionDone.push_back(newAction); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW +void ListThread::timedUpdateDebugDialog() +{ + std::vector<std::string> newList; + int index=0; + int loop_sub_size_transfer_thread_search=transferThreadList.size(); + while(index<loop_sub_size_transfer_thread_search) + { + QString stat; + switch(transferThreadList.at(index)->getStat()) + { + case TransferStat_Idle: + stat="Idle"; + break; + case TransferStat_PreOperation: + stat="PreOperation"; + break; + case TransferStat_WaitForTheTransfer: + stat="WaitForTheTransfer"; + break; + case TransferStat_Transfer: + stat="Transfer"; + break; + case TransferStat_PostOperation: + stat="PostOperation"; + break; + case TransferStat_PostTransfer: + stat="PostTransfer"; + break; + default: + stat=QStringLiteral("??? (%1)").arg(transferThreadList.at(index)->getStat()); + break; + } + newList.push_back(QStringLiteral("%1) (%3,%4) %2") + .arg(index) + .arg(stat) + .arg(transferThreadList.at(index)->readingLetter()) + .arg(transferThreadList.at(index)->writingLetter()) + .toStdString() + ); + index++; + } + std::vector<std::string> newList2; + index=0; + const int &loop_size=actionToDoListTransfer.size(); + while(index<loop_size) + { + newList2.push_back( + TransferThread::internalStringTostring(actionToDoListTransfer.at(index).source)+ + " "+std::to_string(actionToDoListTransfer.at(index).size)+" "+ + TransferThread::internalStringTostring(actionToDoListTransfer.at(index).destination) + ); + if(index>((inodeThreads+ULTRACOPIER_PLUGIN_MAXPARALLELTRANFER)*2+1)) + { + newList2.push_back("..."); + break; + } + index++; + } + emit updateTheDebugInfo(newList,newList2,numberOfInodeOperation); +} +#endif + +int ListThread::getNumberOfTranferRuning() const +{ + int numberOfTranferRuning=0; + const int &loop_size=transferThreadList.size(); + //lunch the transfer in WaitForTheTransfer + int int_for_loop=0; + while(int_for_loop<loop_size) + { + if(transferThreadList.at(int_for_loop)->getStat()==TransferStat_Transfer && transferThreadList.at(int_for_loop)->transferId!=0 && transferThreadList.at(int_for_loop)->transferSize>=parallelizeIfSmallerThan) + numberOfTranferRuning++; + int_for_loop++; + } + return numberOfTranferRuning; +} + +//send action done +void ListThread::sendActionDone() +{ + if(!actionDone.empty()) + { + emit newActionOnList(actionDone); + actionDone.clear(); + } + if(!timeToTransfer.empty()) + { + emit doneTime(timeToTransfer); + timeToTransfer.clear(); + } +} + +//send progression +void ListThread::sendProgression() +{ + if(actionToDoListTransfer.empty()) + return; + oversize=0; + currentProgression=0; + int int_for_loop=0; + const int &loop_size=transferThreadList.size(); + while(int_for_loop<loop_size) + { + TransferThreadAsync * temp_transfer_thread=transferThreadList.at(int_for_loop); + switch(temp_transfer_thread->getStat()) + { + case TransferStat_Transfer: + case TransferStat_PostTransfer: + case TransferStat_PostOperation: + { + copiedSize=temp_transfer_thread->copiedSize(); + + //for the general progression + currentProgression+=copiedSize; + + //the oversize (when the file is bigger after/during the copy then what was during the listing) + if(copiedSize>(qint64)temp_transfer_thread->transferSize) + localOverSize=copiedSize-temp_transfer_thread->transferSize; + else + localOverSize=0; + + //the current size copied + totalSize=temp_transfer_thread->transferSize+localOverSize; + std::pair<uint64_t,uint64_t> progression=temp_transfer_thread->progression(); + Ultracopier::ProgressionItem tempItem; + tempItem.currentRead=progression.first; + tempItem.currentWrite=progression.second; + tempItem.id=temp_transfer_thread->transferId; + tempItem.total=totalSize; + progressionList.push_back(tempItem); + + //add the oversize to the general progression + oversize+=localOverSize; + } + break; + default: + break; + } + int_for_loop++; + } + emit pushFileProgression(progressionList); + progressionList.clear(); + emit pushGeneralProgression(bytesTransfered+currentProgression,bytesToTransfer+oversize); + realByteTransfered(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp b/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp new file mode 100755 index 0000000..b26cb35 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ListThread_InodeAction.cpp @@ -0,0 +1,91 @@ +/** \file ListThread_InodeAction.cpp +\brief To be included into ListThread.cpp, to optimize and prevent code duplication +\see ListThread.cpp */ + +#ifdef LISTTHREAD_H + +//do the inode action +ActionToDoInode& currentActionToDoInode=actionToDoListInode[int_for_internal_loop]; +switch(currentActionToDoInode.type) +{ + case ActionType_RealMove: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch real move, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + case ActionType_MkPath: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch mkpath, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + case ActionType_RmSync: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmsync, source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.destination,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + break; + #endif + case ActionType_MovePath: + //then empty (no file), can try remove it + if(currentActionToDoInode.size==0 || actionToDoListTransfer.empty())//don't put afterTheTransfer because actionToDoListInode_afterTheTransfer -> already afterTheTransfer + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmpath: source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + } + else //have do the destination, put the remove to after + { + currentActionToDoInode.size=0;//why just not do .size--? + actionToDoListInode_afterTheTransfer.push_back(currentActionToDoInode); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_internal_loop); + int_for_internal_loop--; + actionToDoListInode_count--; + if(numberOfInodeOperation>=inodeThreads) + return; + } + break; + case ActionType_SyncDate: + //then empty (no file), can try remove it + if(currentActionToDoInode.size==0 || actionToDoListTransfer.empty())//don't put afterTheTransfer because actionToDoListInode_afterTheTransfer -> already afterTheTransfer + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"launch rmpath: source: "+TransferThread::internalStringTostring(currentActionToDoInode.source)+ + ", destination: "+TransferThread::internalStringTostring(currentActionToDoInode.destination)); + mkPathQueue.addPath(currentActionToDoInode.source,currentActionToDoInode.destination,currentActionToDoInode.type); + currentActionToDoInode.isRunning=true; + numberOfInodeOperation++; + if(numberOfInodeOperation>=inodeThreads) + return; + } + else //have do the destination, put the remove to after + { + currentActionToDoInode.size=0;//why just not do .size--? + actionToDoListInode_afterTheTransfer.push_back(currentActionToDoInode); + actionToDoListInode.erase(actionToDoListInode.cbegin()+int_for_internal_loop); + int_for_internal_loop--; + actionToDoListInode_count--; + if(numberOfInodeOperation>=inodeThreads) + return; + } + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Wrong type at inode action"); + return; +} + +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp b/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp new file mode 100755 index 0000000..3d6729c --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/MkPath.cpp @@ -0,0 +1,676 @@ +#include "MkPath.h" +#include "TransferThread.h" +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 +#include <accctrl.h> +#include <aclapi.h> +#endif + +#ifdef Q_OS_WIN32 + #ifndef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include <windows.h> + #endif +#endif + +#ifdef WIDESTRING +INTERNALTYPEPATH MkPath::text_slash=L"/"; +#else +INTERNALTYPEPATH MkPath::text_slash="/"; +#endif + +MkPath::MkPath() : + waitAction(false), + stopIt(false), + doRightTransfer(false), + keepDate(false), + mkFullPath(false), + doTheDateTransfer(false) +{ + setObjectName("MkPath"); + moveToThread(this); + start(); +} + +MkPath::~MkPath() +{ + stopIt=true; + quit(); + wait(); +} + +void MkPath::addPath(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination, const ActionType &actionType) +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(stopIt) + return; + emit internalStartAddPath(source,destination,actionType); +} + +void MkPath::skip() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit internalStartSkip(); +} + +void MkPath::retry() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit internalStartRetry(); +} + +void MkPath::run() +{ + connect(this,&MkPath::internalStartAddPath, this,&MkPath::internalAddPath,Qt::QueuedConnection); + connect(this,&MkPath::internalStartDoThisPath, this,&MkPath::internalDoThisPath,Qt::QueuedConnection); + connect(this,&MkPath::internalStartSkip, this,&MkPath::internalSkip,Qt::QueuedConnection); + connect(this,&MkPath::internalStartRetry, this,&MkPath::internalRetry,Qt::QueuedConnection); + exec(); +} + +void MkPath::internalDoThisPath() +{ + if(waitAction || pathList.empty()) + return; + const Item &item=pathList.front(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(item.destination.find(TransferThread::stringToInternalString("//")) != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(item.source.find(TransferThread::stringToInternalString("//")) != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(item.source)+ + ", destination: "+TransferThread::internalStringTostring(item.destination)+ + ", move: "+std::to_string(item.actionType)); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(item.actionType==ActionType_RmSync) + { + if(item.destination.isFile()) + { + QFile removedFile(item.destination.absoluteFilePath()); + if(!removedFile.remove()) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+item.destination+", error: "+removedFile.errorString().toStdString()); + emit errorOnFolder(item.destination,removedFile.errorString().toStdString()); + return; + } + } + else if(!rmpath(item.destination.absoluteFilePath())) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the inode: "+item.destination); + emit errorOnFolder(item.destination,tr("Unable to remove").toStdString()); + return; + } + pathList.removeFirst(); + emit firstFolderFinish(); + checkIfCanDoTheNext(); + return; + } + #endif + doTheDateTransfer=false; + if(keepDate) + { + const int64_t &sourceLastModified=TransferThread::readFileMDateTime(item.source); + if(!TransferThread::exists(item.source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources not exists: "+TransferThread::internalStringTostring(item.source)); + doTheDateTransfer=false; + } + else if(ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS>=sourceLastModified) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"the sources is older to copy the time: "+TransferThread::internalStringTostring(item.source)+ + ": "+QDateTime::fromMSecsSinceEpoch((uint64_t)ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS*(uint64_t)1000).toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()+ + ">="+QDateTime::fromMSecsSinceEpoch((uint64_t)sourceLastModified*(uint64_t)1000).toString("dd.MM.yyyy hh:mm:ss.zzz").toStdString()); + doTheDateTransfer=false; + } + else + { + doTheDateTransfer=readFileDateTime(item.source); + /*if(!doTheDateTransfer) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get source folder time: "+item.source.absoluteFilePath()); + emit errorOnFolder(item.source,tr("Unable to get time")); + return; + }*/ + } + } + if(TransferThread::is_dir(item.destination) && item.actionType==ActionType_RealMove) + pathList.front().actionType=ActionType_MovePath; + if(item.actionType!=ActionType_RealMove) + { + if(!TransferThread::is_dir(item.destination)) + { + if(mkFullPath) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkpath: "+TransferThread::internalStringTostring(item.destination)); + if(!TransferThread::mkpath(item.destination)) + { + if(!TransferThread::is_dir(item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+ + TransferThread::internalStringTostring(item.destination)+ + #ifdef Q_OS_WIN32 + ", LastError: "+TransferThread::GetLastErrorStdStr() + #else + ", errno: "+std::to_string(errno) + #endif + ); + emit errorOnFolder(item.destination,tr("Unable to create the folder").toStdString()); + return; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkdir: "+TransferThread::internalStringTostring(item.destination)); + if(!TransferThread::mkdir(item.destination)) + { + if(!TransferThread::is_dir(item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+ + TransferThread::internalStringTostring(item.destination)+ + #ifdef Q_OS_WIN32 + ", LastError: "+TransferThread::GetLastErrorStdStr() + #else + ", errno: "+std::to_string(errno) + #endif + ); + emit errorOnFolder(item.destination,tr("Unable to create the folder").toStdString()); + return; + } + } + } + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"TransferThread::mkpath ignore exists: "+TransferThread::internalStringTostring(item.destination)); + } + else + { + if(!TransferThread::is_dir(item.source)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source folder don't exists: "+TransferThread::internalStringTostring(item.source)); + emit errorOnFolder(item.destination,tr("The source folder don't exists").toStdString()); + return; + } + if(!TransferThread::is_dir(item.source))//it's really an error? + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"The source is not a folder: "+TransferThread::internalStringTostring(item.source)); + /*if(stopIt) + return; + waitAction=true; + emit errorOnFolder(item.destination,tr("The source is not a folder")); + return;*/ + } + if(stringStartWith(item.destination,(item.source+text_slash))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"move into it self: "+TransferThread::internalStringTostring(item.destination)); + int random=rand(); + INTERNALTYPEPATH tempFolder=FSabsolutePath(item.source)+text_slash+TransferThread::stringToInternalString(std::to_string(random)); + while(TransferThread::is_dir(tempFolder)) + { + random=rand(); + tempFolder=FSabsolutePath(item.source)+text_slash+TransferThread::stringToInternalString(std::to_string(random)); + } + if(!TransferThread::rename(item.source,tempFolder)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to temporary rename the folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.destination,tr("Unable to temporary rename the folder").toStdString()); + return; + } + /* http://doc.qt.io/qt-5/qdir.html#rename + * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. + if(!dir.mkpath(FSabsolutePath(item.destination))) + { + if(!dir.exists(FSabsolutePath(item.destination))) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+item.destination.absoluteFilePath()); + emit errorOnFolder(item.destination,tr("Unable to create the folder")); + return; + } + }*/ + if(!TransferThread::rename(tempFolder,item.destination)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to do the final real move the folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.destination,tr("Unable to do the final real move the folder").toStdString()); + return; + } + } + else + { + /* http://doc.qt.io/qt-5/qdir.html#rename + * On most file systems, rename() fails only if oldName does not exist, or if a file with the new name already exists. + if(!dir.mkpath(FSabsolutePath(item.destination))) + { + if(!dir.exists(FSabsolutePath(item.destination))) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: "+item.destination.absoluteFilePath()); + emit errorOnFolder(item.destination,tr("Unable to create the folder")); + return; + } + }*/ + if(!TransferThread::rename(item.source,item.destination)!=0) + { + if(stopIt) + return; + waitAction=true; + #ifdef Q_OS_WIN32 + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: from: "+TransferThread::internalStringTostring(item.source)+", soruce exists: "+ + std::to_string(TransferThread::is_dir(item.source))+", to: "+TransferThread::internalStringTostring(item.destination) + +", destination exist: "+std::to_string(TransferThread::is_dir(item.destination))+": "+strError + ); + emit errorOnFolder(item.destination,tr("Unable to move the folder").toStdString()+": "+strError); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to make the folder: from: "+TransferThread::internalStringTostring(item.source)+", soruce exists: "+ + std::to_string(TransferThread::is_dir(item.source))+", to: "+TransferThread::internalStringTostring(item.destination) + +", destination exist: "+std::to_string(TransferThread::is_dir(item.destination))+": "+std::to_string(errno) + ); + emit errorOnFolder(item.destination,tr("Unable to move the folder: errno: %1").arg(errno).toStdString()); + #endif + return; + } + } + } + if(doTheDateTransfer) + if(!writeFileDateTime(item.destination)) + { + if(!TransferThread::exists(item.destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not exists): "+TransferThread::internalStringTostring(item.destination)); + else if(!TransferThread::is_dir(item.destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time (not a dir): "+TransferThread::internalStringTostring(item.destination)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to set destination folder time: "+TransferThread::internalStringTostring(item.destination)); + /*if(stopIt) + return; + waitAction=true; + + emit errorOnFolder(item.source,tr("Unable to set time")); + return;*/ + } + if(doRightTransfer && item.actionType!=ActionType_RealMove) + { + #ifdef Q_OS_UNIX + struct stat permissions; + if(stat(TransferThread::internalStringTostring(item.source).c_str(), &permissions)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get the right: "+TransferThread::internalStringTostring(item.destination)); + else + { + if(chmod(TransferThread::internalStringTostring(item.destination).c_str(), permissions.st_mode)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to chmod the right: "+TransferThread::internalStringTostring(item.destination)); + if(chown(TransferThread::internalStringTostring(item.destination).c_str(), permissions.st_uid, permissions.st_gid)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to chown the right: "+TransferThread::internalStringTostring(item.destination)); + } + #else + PSECURITY_DESCRIPTOR PSecurityD; + PACL dacl; + + HANDLE hFile = CreateFileW(item.source.c_str(), GENERIC_READ , + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning, + std::string("CreateFile() failed. Error: INVALID_HANDLE_VALUE ")+TransferThread::internalStringTostring(item.source).c_str()+", GetLastError(): "+std::to_string(GetLastError()) + ); + else + { + DWORD lasterror = GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, + NULL, NULL, &dacl, NULL, &PSecurityD); + CloseHandle(hFile); + if (lasterror != ERROR_SUCCESS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + else + { + hFile = CreateFileW(item.destination.c_str(),READ_CONTROL | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY , + 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"CreateFile() failed. Error: INVALID_HANDLE_VALUE"); + else + { + lasterror = SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION , NULL, NULL, dacl, NULL); + if (lasterror != ERROR_SUCCESS) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + } + //free(dacl); + //free(PSecurityD); + CloseHandle(hFile); + } + } + #endif + } + if(item.actionType==ActionType_MovePath) + { + if(!rmpath(item.source)) + { + if(stopIt) + return; + waitAction=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to remove the source folder: "+TransferThread::internalStringTostring(item.destination)); + emit errorOnFolder(item.source,tr("Unable to remove").toStdString()); + return; + } + } + pathList.erase(pathList.cbegin()); + emit firstFolderFinish(); + checkIfCanDoTheNext(); +} + +void MkPath::internalAddPath(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination, const ActionType &actionType) +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + Item tempPath; + tempPath.source=source; + tempPath.destination=destination; + tempPath.actionType=actionType; + pathList.push_back(tempPath); + if(!waitAction) + checkIfCanDoTheNext(); +} + +void MkPath::checkIfCanDoTheNext() +{ + if(!waitAction && !stopIt && pathList.size()>0) + emit internalStartDoThisPath(); +} + +void MkPath::internalSkip() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + waitAction=false; + pathList.erase(pathList.cbegin()); + emit firstFolderFinish(); + checkIfCanDoTheNext(); +} + +void MkPath::internalRetry() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + waitAction=false; + checkIfCanDoTheNext(); +} + +void MkPath::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; +} + +void MkPath::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; +} + +void MkPath::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; +} + +bool MkPath::rmpath(const INTERNALTYPEPATH &dir + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ,const bool &toSync + #endif + ) +{ + if(!TransferThread::is_dir(dir)) + return false; + bool allHaveWork=true; + #ifdef Q_OS_UNIX + std::vector<TransferThread::dirent_uc> list; + if(!TransferThread::entryInfoList(dir,list)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"folder list error: "+TransferThread::internalStringTostring(dir)+", errno: "+std::to_string(errno)); + return false; + } + for (unsigned int i = 0; i < list.size(); ++i) + { + TransferThread::dirent_uc fileInfo=list.at(i); + if(!fileInfo.isFolder) + { + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(toSync) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove a file: "+fileInfo+", due to: "+file.errorString().toStdString()); + allHaveWork=false; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); + allHaveWork=false; + } + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+TransferThread::internalStringTostring(fileInfo.d_name)); + allHaveWork=false; + #endif + } + else + { + //return the fonction for scan the new folder + if(!rmpath(FSabsolutePath(dir)+TransferThread::stringToInternalString("/")+fileInfo.d_name+TransferThread::stringToInternalString("/"))) + allHaveWork=false; + } + } + #else + HANDLE hFind = NULL; + allHaveWork=true; + WIN32_FIND_DATAW fdFile; + if((hFind = FindFirstFileW((TransferThread::toFinalPath(dir)+L"\\*").c_str(), &fdFile)) == INVALID_HANDLE_VALUE) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"folder list error: "+TransferThread::internalStringTostring(dir)+", errno: "+std::to_string(errno)); + return false; + } + + if(allHaveWork) + do + { + #ifdef WIDESTRING + if(wcscmp(fdFile.cFileName, L".")!=0 && wcscmp(fdFile.cFileName, L"..")!=0) + #else + if(strcmp(fdFile.cFileName, ".")!=0 && strcmp(fdFile.cFileName, "..")!=0) + #endif + { + if(fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + //return the fonction for scan the new folder + #ifdef WIDESTRING + if(!rmpath(dir+L'\\'+fdFile.cFileName+L'/')) + #else + if(!rmpath(dir+'\\'+fdFile.cFileName+'/')) + #endif + allHaveWork=false; + } + else + { + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(toSync) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + QFile file(fileInfo.absoluteFilePath()); + if(!file.remove()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove a file: "+fileInfo+", due to: "+file.errorString().toStdString()); + allHaveWork=false; + } + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+fileInfo.fileName().toStdString()); + allHaveWork=false; + } + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"found a file: "+TransferThread::internalStringTostring(fdFile.cFileName)); + allHaveWork=false; + #endif + } + } + } + while(FindNextFileW(hFind, &fdFile)); + FindClose(hFind); + #endif + if(!allHaveWork) + return false; + allHaveWork=TransferThread::rmdir(dir); + if(!allHaveWork) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to remove the folder: "+TransferThread::internalStringTostring(FSabsolutePath(dir))); + return allHaveWork; +} + +//fonction to edit the file date time +bool MkPath::readFileDateTime(const INTERNALTYPEPATH &source) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"readFileDateTime("+TransferThread::internalStringTostring(source)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + struct stat info; + if(stat(TransferThread::internalStringTostring(source).c_str(),&info)!=0) + return false; + #ifdef Q_OS_MAC + time_t ctime=info.st_ctimespec.tv_sec; + time_t actime=info.st_atimespec.tv_sec; + time_t modtime=info.st_mtimespec.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #else + time_t ctime=info.st_ctim.tv_sec; + time_t actime=info.st_atim.tv_sec; + time_t modtime=info.st_mtim.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #endif + Q_UNUSED(ctime); + return true; + #else + #ifdef Q_OS_WIN32 + HANDLE hFileSouce = CreateFileW(TransferThread::toFinalPath(source).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY | FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hFileSouce == INVALID_HANDLE_VALUE) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to read: "+TransferThread::internalStringTostring(source)+", error: "+std::to_string(GetLastError())); + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + if(!GetFileTime(hFileSouce, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileSouce); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to get the file time"); + return false; + } + this->ftCreate=ftCreate; + this->ftAccess=ftAccess; + this->ftWrite=ftWrite; + CloseHandle(hFileSouce); + return true; + #else + return false; + #endif + #endif + return false; +} + +bool MkPath::writeFileDateTime(const INTERNALTYPEPATH &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"writeFileDateTime("+TransferThread::internalStringTostring(destination)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + #ifdef Q_OS_LINUX + return utime(TransferThread::internalStringTostring(destination).c_str(),&butime)==0; + #else //mainly for mac + return utime(TransferThread::internalStringTostring(destination).c_str(),&butime)==0; + #endif + #else + #ifdef Q_OS_WIN32 + HANDLE hFileDestination = CreateFileW(TransferThread::toFinalPath(destination).c_str(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hFileDestination == INVALID_HANDLE_VALUE) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + wchar_t filePath[65535]; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"open failed to write: "+QString::fromWCharArray(filePath).toStdString()+", error: "+std::to_string(GetLastError())); + #endif + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + ftCreate=this->ftCreate; + ftAccess=this->ftAccess; + ftWrite=this->ftWrite; + if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileDestination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"unable to set the file time"); + return false; + } + CloseHandle(hFileDestination); + return true; + #else + return false; + #endif + #endif + return false; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/MkPath.h b/plugins/CopyEngine/Ultracopier-Spec/MkPath.h new file mode 100755 index 0000000..1b3a674 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/MkPath.h @@ -0,0 +1,100 @@ +/** \file MkPath.h +\brief Make the path given as queued mkpath +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef MKPATH_H +#define MKPATH_H + +#include <QThread> +#include <string> +#include <QSemaphore> +#include <vector> +#include <QDir> +#include <QDateTime> + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +#include "Environment.h" + +#ifdef Q_OS_UNIX + #include <utime.h> + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> +#else + #ifdef Q_OS_WIN32 + #include <windows.h> + #endif +#endif + +/// \brief Make the path given as queued mkpath +class MkPath : public QThread +{ + Q_OBJECT +public: + explicit MkPath(); + ~MkPath(); + /// \brief add path to make + void addPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination,const ActionType &actionType); + void setRightTransfer(const bool doRightTransfer); + void setKeepDate(const bool keepDate); + void setMkFullPath(const bool mkFullPath); +signals: + void errorOnFolder(const INTERNALTYPEPATH &,const std::string &,const ErrorType &errorType=ErrorType_FolderWithRety) const; + void firstFolderFinish(); + void internalStartAddPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const ActionType &actionType) const; + void internalStartDoThisPath() const; + void internalStartSkip() const; + void internalStartRetry() const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +public slots: + /// \brief skip after creation error + void skip(); + /// \brief retry after creation error + void retry(); +private: + void run(); + bool waitAction; + bool stopIt; + bool skipIt; + struct Item + { + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + ActionType actionType; + }; + std::vector<Item> pathList; + void checkIfCanDoTheNext(); + bool doRightTransfer; + bool keepDate; + bool mkFullPath; + bool doTheDateTransfer; + #ifdef Q_OS_UNIX + utimbuf butime; + #else + #ifdef Q_OS_WIN32 + FILETIME ftCreate, ftAccess, ftWrite; + #endif + #endif + //fonction to edit the file date time + bool readFileDateTime(const INTERNALTYPEPATH &source); + bool writeFileDateTime(const INTERNALTYPEPATH &destination); + static INTERNALTYPEPATH text_slash; +private slots: + void internalDoThisPath(); + void internalAddPath(const INTERNALTYPEPATH& source, const INTERNALTYPEPATH& destination,const ActionType &actionType); + void internalSkip(); + void internalRetry(); + bool rmpath(const INTERNALTYPEPATH &dir + #ifdef ULTRACOPIER_PLUGIN_RSYNC + , const bool &toSync=false + #endif + ); +}; + +#endif // MKPATH_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/README.md b/plugins/CopyEngine/Ultracopier-Spec/README.md new file mode 100755 index 0000000..a15b943 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/README.md @@ -0,0 +1,3 @@ +# Copy Engine: Ultracopier + +This is the default copy engine. diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp new file mode 100755 index 0000000..8c0d698 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.cpp @@ -0,0 +1,96 @@ +#include "RenamingRules.h" +#include "ui_RenamingRules.h" + +#include <QMessageBox> + +RenamingRules::RenamingRules(QWidget *parent) : + QDialog(parent), + ui(new Ui::RenamingRules) +{ + ui->setupUi(this); + connectUI(); + setRenamingRules("",""); +} + +RenamingRules::~RenamingRules() +{ + delete ui; +} + +void RenamingRules::on_buttonBox_clicked(QAbstractButton *button) +{ + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::RejectRole) + reject(); + if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::ResetRole) + { + setRenamingRules("",""); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); + } +} + +void RenamingRules::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) +{ + disconnectUI(); + if(firstRenamingRule.find("%name%")==std::string::npos || firstRenamingRule.find("%suffix%")==std::string::npos) + firstRenamingRule.clear(); + if(otherRenamingRule.find("%name%")==std::string::npos || otherRenamingRule.find("%suffix%")==std::string::npos + || otherRenamingRule.find("%number%")==std::string::npos) + otherRenamingRule.clear(); + + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; + + if(!firstRenamingRule.empty()) + ui->firstRenamingRule->setText(QString::fromStdString(firstRenamingRule)); + else + ui->firstRenamingRule->setText(tr("%1 - copy%2").arg(QStringLiteral("%name%")).arg(QStringLiteral("%suffix%"))); + if(!otherRenamingRule.empty()) + ui->otherRenamingRule->setText(QString::fromStdString(otherRenamingRule)); + else + ui->otherRenamingRule->setText(tr("%1 - copy (%2)%3").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")).arg(QStringLiteral("%suffix%"))); + connectUI(); +} + +void RenamingRules::connectUI() +{ + connect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); + connect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); +} + +void RenamingRules::disconnectUI() +{ + disconnect(ui->firstRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::firstRenamingRule_haveChanged); + disconnect(ui->otherRenamingRule,&QLineEdit::editingFinished,this,&RenamingRules::otherRenamingRule_haveChanged); +} + +void RenamingRules::firstRenamingRule_haveChanged() +{ + QString newValue=ui->firstRenamingRule->text(); + if(!newValue.contains("%name%") || !newValue.contains("%suffix%")) + newValue.clear(); + if(newValue==tr("%1 - copy%2").arg(QStringLiteral("%name%")).arg(QStringLiteral("%name%"))) + newValue=QStringLiteral(""); + if(newValue.toStdString()==firstRenamingRule) + return; + firstRenamingRule=newValue.toStdString(); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void RenamingRules::otherRenamingRule_haveChanged() +{ + QString newValue=ui->otherRenamingRule->text(); + if(!newValue.contains("%name%") || !newValue.contains("%suffix%") || !newValue.contains("%number%")) + newValue.clear(); + if(newValue==tr("%1 - copy (%2)%3").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")).arg(QStringLiteral("%name%"))) + newValue=QStringLiteral(""); + if(newValue.toStdString()==otherRenamingRule) + return; + otherRenamingRule=newValue.toStdString(); + emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule); +} + +void RenamingRules::newLanguageLoaded() +{ + ui->retranslateUi(this); + setRenamingRules(firstRenamingRule,otherRenamingRule); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h new file mode 100755 index 0000000..b2e9d02 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.h @@ -0,0 +1,34 @@ +#ifndef RENAMINGRULES_H +#define RENAMINGRULES_H + +#include <QDialog> +#include <QAbstractButton> + +namespace Ui { +class RenamingRules; +} + +/** Define rules for renaming */ +class RenamingRules : public QDialog +{ + Q_OBJECT +public: + explicit RenamingRules(QWidget *parent = 0); + ~RenamingRules(); + void setRenamingRules(std::string firstRenamingRule, std::string otherRenamingRule); + void newLanguageLoaded(); +private: + Ui::RenamingRules *ui; + void connectUI(); + void disconnectUI(); + std::string firstRenamingRule; + std::string otherRenamingRule; +private slots: + void on_buttonBox_clicked(QAbstractButton *button); + void firstRenamingRule_haveChanged(); + void otherRenamingRule_haveChanged(); +signals: + void sendNewRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule) const; +}; + +#endif // RENAMINGRULES_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui new file mode 100755 index 0000000..0219249 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/RenamingRules.ui @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>RenamingRules</class> + <widget class="QDialog" name="RenamingRules"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>491</width> + <height>293</height> + </rect> + </property> + <property name="windowTitle"> + <string>Renaming rules</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>2</number> + </property> + <property name="leftMargin"> + <number>2</number> + </property> + <property name="topMargin"> + <number>2</number> + </property> + <property name="rightMargin"> + <number>2</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>First renaming</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLineEdit" name="firstRenamingRule"> + <property name="placeholderText"> + <string extracomment="%name% should not be translated">%name% - copy%suffix%</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>Second renaming</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLineEdit" name="otherRenamingRule"> + <property name="placeholderText"> + <string extracomment="%name%, %number% should not be translated">%name% - copy (%number%)%suffix%</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string extracomment="%name%, %number% should not be translated"><html><head/><body><p>Variables: <span style=" font-weight:600;">%name%</span> for the original file name, <span style=" font-weight:600;">%number%</span> for the extra number, <span style=" font-weight:600;">%suffix%</span> file suffix</p></body></html></string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>1</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Close|QDialogButtonBox::RestoreDefaults</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>RenamingRules</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>RenamingRules</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp new file mode 100755 index 0000000..014585d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.cpp @@ -0,0 +1,953 @@ +#include "ScanFileOrFolder.h" +#include "TransferThread.h" +#include <QtGlobal> +#include <regex> +#include "../../../cpp11addition.h" + +#ifdef Q_OS_WIN32 + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include <windows.h> +#endif + +#ifdef WIDESTRING +std::wstring ScanFileOrFolder::text_slash=L"/"; +std::wstring ScanFileOrFolder::text_antislash=L"\\"; +std::wstring ScanFileOrFolder::text_dot=L"."; +#else +std::string ScanFileOrFolder::text_slash="/"; +std::string ScanFileOrFolder::text_antislash="\\"; +std::string ScanFileOrFolder::text_dot="."; +#endif + +ScanFileOrFolder::ScanFileOrFolder(const Ultracopier::CopyMode &mode) : + moveTheWholeFolder(false), + stopIt(false), + stopped(false), + folderExistsAction(FolderExistsAction::FolderExists_NotSet), + fileErrorAction(FileErrorAction::FileError_NotSet), + checkDestinationExists(false), + copyListOrder(false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync(false), + #endif + mode(Ultracopier::CopyMode::Copy), + reloadTheNewFilters(false), + haveFilters(false) +{ + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync = false; + #endif + moveTheWholeFolder = true; + stopped = true; + stopIt = false; + this->mode = mode; + folder_isolation = std::regex("^(.*/)?([^/]+)/$"); + setObjectName(QStringLiteral("ScanFileOrFolder")); + /*#ifdef Q_OS_WIN32 + QString userName; + DWORD size=255; + WCHAR * userNameW=new WCHAR[size]; + if(GetUserNameW(userNameW,&size)) + { + userName=QString::fromWCharArray(userNameW,size-1); + blackList.push_back(QFileInfo(QStringLiteral("C:/Users/%1/AppData/Roaming/").arg(userName))); + } + delete userNameW; + #endif*/ +} + +ScanFileOrFolder::~ScanFileOrFolder() +{ + stop(); + quit(); + wait(); +} + +bool ScanFileOrFolder::isFinished() const +{ + return stopped; +} + +void ScanFileOrFolder::addToList(const std::vector<INTERNALTYPEPATH>& sources,const INTERNALTYPEPATH& destination) +{ + stopIt=false; + this->sources=parseWildcardSources(sources); + this->destination=destination; + #ifdef WIDESTRING + QFileInfo destinationInfo(QString::fromStdWString(this->destination)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"check symblink: "+destinationInfo.absoluteFilePath().toStdString()+", destination: "+TransferThread::internalStringTostring(destination)); + #ifdef WIDESTRING + while(TransferThread::is_symlink(destinationInfo.absoluteFilePath().toStdWString())) + #else + while(TransferThread::is_symlink(destinationInfo.absoluteFilePath().toStdString())) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"resolv destination to: "+destinationInfo.symLinkTarget().toStdString()); + if(QFileInfo(destinationInfo.symLinkTarget()).isAbsolute()) + this->destination=destinationInfo.symLinkTarget().toStdWString(); + else + this->destination=destinationInfo.absolutePath().toStdWString()+text_slash+destinationInfo.symLinkTarget().toStdWString(); + destinationInfo.setFile(QString::fromStdWString(this->destination)); + } + if(sources.size()>1 || QFileInfo(QString::fromStdWString(destination)).isDir()) + /* Disabled because the separator transformation product bug + * if(!destination.endsWith(QDir::separator())) + this->destination+=QDir::separator();*/ + if(!stringEndsWith(destination,'/') && !stringEndsWith(destination,'\\')) + this->destination+=text_slash;//put unix separator because it's transformed into that's under windows too + #else + QFileInfo destinationInfo(QString::fromStdString(this->destination)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"check symblink: "+destinationInfo.absoluteFilePath().toStdString()); + while(destinationInfo.isSymLink()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"resolv destination to: "+destinationInfo.symLinkTarget().toStdString()); + if(QFileInfo(destinationInfo.symLinkTarget()).isAbsolute()) + this->destination=destinationInfo.symLinkTarget().toStdString(); + else + this->destination=destinationInfo.absolutePath().toStdString()+text_slash+destinationInfo.symLinkTarget().toStdString(); + destinationInfo.setFile(QString::fromStdString(this->destination)); + } + if(sources.size()>1 || QFileInfo(QString::fromStdString(destination)).isDir()) + /* Disabled because the separator transformation product bug + * if(!destination.endsWith(QDir::separator())) + this->destination+=QDir::separator();*/ + if(!stringEndsWith(destination,'/') && !stringEndsWith(destination,'\\')) + this->destination+=text_slash;//put unix separator because it's transformed into that's under windows too + #endif + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"addToList("+stringimplode(sources,";")+","+this->destination+")"); +} + + +std::vector<INTERNALTYPEPATH> ScanFileOrFolder::parseWildcardSources(const std::vector<INTERNALTYPEPATH> &sources) const +{ + std::regex splitFolder("[/\\\\]"); + std::vector<INTERNALTYPEPATH> returnList; + unsigned int index=0; + while(index<(unsigned int)sources.size()) + { + std::string sourceAt=TransferThread::internalStringTostring(sources.at(index)); + if(sourceAt.find("*") != std::string::npos) + { + std::vector<std::string> toParse=stringregexsplit(sourceAt,splitFolder); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"before wildcard parse: "+sourceAt+", toParse: "+stringimplode(toParse,", ")); + std::vector<std::vector<std::string> > recomposedSource; + { + std::vector<std::string> t; + t.push_back(""); + recomposedSource.push_back(t); + } + while(toParse.size()>0) + { + if(toParse.front().find("*") != std::string::npos) + { + std::string toParseFirst=toParse.front(); + if(toParseFirst.empty()) + toParseFirst=TransferThread::internalStringTostring(text_slash); + std::vector<std::vector<std::string> > newRecomposedSource; + stringreplaceAll(toParseFirst,"*","[^/\\\\]*"); + std::regex toResolv=std::regex(toParseFirst); + unsigned int index_recomposedSource=0; + while(index_recomposedSource<recomposedSource.size())//parse each url part + { + std::string fileInfo(stringimplode(recomposedSource.at(index_recomposedSource),TransferThread::internalStringTostring(text_slash))); + std::vector<TransferThread::dirent_uc> list; + + if(TransferThread::is_dir(fileInfo.c_str())) + { + if(TransferThread::entryInfoList(TransferThread::stringToInternalString(fileInfo),list)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"list the folder: "+fileInfo+", with the wildcard: "+toParseFirst); + unsigned int index_fileList=0; + while(index_fileList<list.size()) + { + const std::string &fileName=TransferThread::internalStringTostring(list.at(index_fileList).d_name); + if(std::regex_match(fileName,toResolv)) + { + std::vector<std::string> tempList=recomposedSource.at(index_recomposedSource); + tempList.push_back(fileName); + newRecomposedSource.push_back(tempList); + } + index_fileList++; + } + } + } + index_recomposedSource++; + } + recomposedSource=newRecomposedSource; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"add toParse: "+stringimplode(toParse,TransferThread::internalStringTostring(text_slash))); + unsigned int index_recomposedSource=0; + while(index_recomposedSource<recomposedSource.size()) + { + recomposedSource[index_recomposedSource].push_back(toParse.front()); + if(!QFileInfo(QString::fromStdString(stringimplode(recomposedSource.at(index_recomposedSource),TransferThread::internalStringTostring(text_slash)))).exists()) + recomposedSource.erase(recomposedSource.cbegin()+index_recomposedSource); + else + index_recomposedSource++; + } + } + toParse.erase(toParse.cbegin()); + } + unsigned int index_recomposedSource=0; + while(index_recomposedSource<recomposedSource.size()) + { + returnList.push_back(TransferThread::stringToInternalString(stringimplode(recomposedSource.at(index_recomposedSource),TransferThread::internalStringTostring(text_slash)))); + index_recomposedSource++; + } + } + else + returnList.push_back(TransferThread::stringToInternalString(sourceAt)); + index++; + } + return returnList; +} + +void ScanFileOrFolder::setFilters(const std::vector<Filters_rules> &include, const std::vector<Filters_rules> &exclude) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + QMutexLocker lock(&filtersMutex); + this->include_send=include; + this->exclude_send=exclude; + reloadTheNewFilters=true; + haveFilters=include_send.size()>0 || exclude_send.size()>0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"haveFilters: "+std::to_string(haveFilters)+", include_send.size(): "+std::to_string(include_send.size())+", exclude_send.size(): "+std::to_string(exclude_send.size())); +} + +//set action if Folder are same or exists +void ScanFileOrFolder::setFolderExistsAction(const FolderExistsAction &action, const std::string &newName) +{ + this->newName=TransferThread::stringToInternalString(newName); + folderExistsAction=action; + waitOneAction.release(); +} + +//set action if error +void ScanFileOrFolder::setFolderErrorAction(const FileErrorAction &action) +{ + fileErrorAction=action; + waitOneAction.release(); +} + +void ScanFileOrFolder::stop() +{ + stopIt=true; + waitOneAction.release(); +} + +void ScanFileOrFolder::run() +{ + stopped=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice, + "start the listing with destination: "+TransferThread::internalStringTostring(destination)+", mode: "+std::to_string(mode)); + #ifdef Q_OS_UNIX + destination=resolvDestination(destination); + #endif + #ifdef WIDESTRING + stringreplaceAll(destination,L"\\",L"/"); + #else + stringreplaceAll(destination,"\\","/"); + #endif + if(stopIt) + { + stopped=true; + return; + } + if(fileErrorAction==FileError_Skip) + { + stopped=true; + return; + } + unsigned int sourceIndex=0; + while(sourceIndex<sources.size()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"size source to list: "+std::to_string(sourceIndex)+TransferThread::internalStringTostring(text_slash)+std::to_string(sources.size())); + if(stopIt) + { + stopped=true; + return; + } + INTERNALTYPEPATH source=sources.at(sourceIndex); + #ifdef WIDESTRING + stringreplaceAll(source,L"\\",L"/"); + #else + stringreplaceAll(source,"\\","/"); + #endif + if(TransferThread::is_dir(source)) + { + /* Bad way; when you copy c:\source\folder into d:\destination, you wait it create the folder d:\destination\folder + //listFolder(source.absoluteFilePath()+QDir::separator(),destination); + listFolder(source.absoluteFilePath()+text_slash,destination);//put unix separator because it's transformed into that's under windows too + */ + //put unix separator because it's transformed into that's under windows too + INTERNALTYPEPATH tempString=destination; + if(!stringEndsWith(tempString,text_slash) && !stringEndsWith(tempString,text_antislash)) + tempString+=text_slash; + tempString+=TransferThread::resolvedName(source); + if(moveTheWholeFolder && mode==Ultracopier::Move && !QFileInfo( + #ifdef WIDESTRING + QString::fromStdWString(tempString) + #else + QString::fromStdString(tempString) + #endif + ).exists() && + driveManagement.isSameDrive(TransferThread::internalStringTostring(source),TransferThread::internalStringTostring(tempString))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"tempString: move and not exists: "+TransferThread::internalStringTostring(tempString)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"do real move: "+TransferThread::internalStringTostring(source)+" to "+TransferThread::internalStringTostring(tempString)); + emit addToRealMove(source,tempString); + } + else + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"tempString: "+tempString+" normal listing, blacklist size: "+std::to_string(blackList.size())); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"tempString: "+TransferThread::internalStringTostring(tempString)+" normal listing"); + if(stringEndsWith(source,'/')) + source.erase(source.end()-1); + if(stringEndsWith(tempString,'/')) + tempString.erase(tempString.end()-1); + listFolder(source,tempString); + } + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+" is file or symblink"); + if(stringEndsWith(destination,'/') || stringEndsWith(destination,'\\')) + emit fileTransfer(source,destination+TransferThread::resolvedName(source),mode); + else + emit fileTransfer(source,destination+text_slash+TransferThread::resolvedName(source),mode); + } + sourceIndex++; + } + stopped=true; + if(stopIt) + return; + emit finishedTheListing(); +} + +#ifdef Q_OS_UNIX +INTERNALTYPEPATH ScanFileOrFolder::resolvDestination(const INTERNALTYPEPATH &destination) +{ + INTERNALTYPEPATH temp(destination); + char buf[PATH_MAX]; + ssize_t nbytes=0; + nbytes=readlink(TransferThread::internalStringTostring(destination).c_str(), buf, sizeof(buf)); + while(nbytes!=-1) { + temp=FSabsolutePath(temp); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + temp+=TransferThread::stringToInternalString("/"); + temp+=TransferThread::stringToInternalString(std::string(buf,nbytes)); + /// \todo change for pure c++ code + #ifdef WIDESTRING + temp=QFileInfo(QString::fromStdWString(temp)).absoluteFilePath().toStdWString(); + #else + temp=QFileInfo(QString::fromStdString(temp)).absoluteFilePath().toStdString(); + #endif + nbytes=readlink(TransferThread::internalStringTostring(temp).c_str(), buf, sizeof(buf)); + } + return temp; + /*do + { + fileErrorAction=FileError_NotSet; + if(isBlackListed(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"isBlackListed: "+destination); + emit errorOnFolder(destination,tr("Blacklisted folder").toStdString(),ErrorType_Folder); + waitOneAction.acquire(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionNum: "+std::to_string(fileErrorAction)); + } + } while(fileErrorAction==FileError_Retry || fileErrorAction==FileError_PutToEndOfTheList); + return newDestination;*/ +} +#endif + +/*bool ScanFileOrFolder::isBlackListed(const QFileInfo &destination) +{ + int index=0; + int size=blackList.size(); + while(index<size) + { + if(stringStartWith(destination,blackList.at(index))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,destination+" start with: "+blackList.at(index)); + return true; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,destination+" not start with: "+blackList.at(index)); + index++; + } + return false; +}*/ + +void ScanFileOrFolder::listFolder(INTERNALTYPEPATH source,INTERNALTYPEPATH destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination) + ); + if(stopIt) + return; + #ifdef Q_OS_UNIX + destination=resolvDestination(destination); + #endif + if(stopIt) + return; + if(fileErrorAction==FileError_Skip) + return; + //if is same + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + if(source==destination) + { + emit folderAlreadyExists(source,destination,true); + waitOneAction.acquire(); + INTERNALTYPEPATH destinationSuffixPath; + switch(folderExistsAction) + { + case FolderExists_Merge: + break; + case FolderExists_Skip: + return; + break; + case FolderExists_Rename: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination before rename: "+TransferThread::internalStringTostring(destination)); + if(newName.empty()) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"pattern: "+folder_isolation.str()); + //resolv the new name + destinationSuffixPath=TransferThread::resolvedName(destination); + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + #ifdef WIDESTRING + destinationSuffixPath=tr("%1 - copy").arg(QString::fromStdWString(TransferThread::resolvedName(destination))).toStdWString(); + #else + destinationSuffixPath=tr("%1 - copy").arg(QString::fromStdString(TransferThread::resolvedName(destination))).toStdString(); + #endif + else + destinationSuffixPath=TransferThread::stringToInternalString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + #ifdef WIDESTRING + destinationSuffixPath=tr("%1 - copy (%2)").arg(QString::fromStdWString(TransferThread::resolvedName(destination))).arg(num).toStdWString(); + #else + destinationSuffixPath=tr("%1 - copy (%2)").arg(QString::fromStdString(TransferThread::resolvedName(destination))).arg(num).toStdString(); + #endif + else + { + destinationSuffixPath=TransferThread::stringToInternalString(otherRenamingRule); + #ifdef WIDESTRING + stringreplaceAll(destinationSuffixPath,L"%number%",std::to_wstring(num)); + #else + stringreplaceAll(destinationSuffixPath,"%number%",std::to_string(num)); + #endif + } + } + #ifdef WIDESTRING + stringreplaceAll(destinationSuffixPath,L"%name%",TransferThread::resolvedName(destination)); + #else + stringreplaceAll(destinationSuffixPath,"%name%",TransferThread::resolvedName(destination)); + #endif + num++; + { + std::string::size_type n=destination.rfind('/'); + if(n == std::string::npos) + n=destination.rfind('.'); + else + n=destination.rfind(n,'.'); + if(n == std::string::npos) + { + destination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + destination+=text_slash; + destination+=destinationSuffixPath; + } + else + { + destination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + destination+=text_slash; + destination+=destinationSuffixPath+TransferThread::stringToInternalString(".")+destination.substr(n); + } + } + } + while(TransferThread::exists(destination)); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"use new name: "+TransferThread::internalStringTostring(newName)); + destinationSuffixPath = newName; + } + destination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + destination+=text_slash; + destination+=destinationSuffixPath; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination after rename: "+TransferThread::internalStringTostring(destination)); + break; + default: + return; + break; + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + //check if destination exists + if(checkDestinationExists) + { + if(TransferThread::exists(destination)) + { + emit folderAlreadyExists(source,destination,false); + waitOneAction.acquire(); + INTERNALTYPEPATH destinationSuffixPath; + switch(folderExistsAction) + { + case FolderExists_Merge: + break; + case FolderExists_Skip: + return; + break; + case FolderExists_Rename: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination before rename: "+TransferThread::internalStringTostring(destination)); + if(newName.empty()) + { + //resolv the new name + int num=1; + INTERNALTYPEPATH tempdestination; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + #ifdef WIDESTRING + destinationSuffixPath=tr("%name% - copy").toStdWString(); + #else + destinationSuffixPath=tr("%name% - copy").toStdString(); + #endif + else + destinationSuffixPath=TransferThread::stringToInternalString(firstRenamingRule); + } + else + { + if(otherRenamingRule.empty()) + #ifdef WIDESTRING + destinationSuffixPath=tr("%name% - copy (%number%)").toStdWString(); + #else + destinationSuffixPath=tr("%name% - copy (%number%)").toStdString(); + #endif + else + destinationSuffixPath=TransferThread::stringToInternalString(otherRenamingRule); + #ifdef WIDESTRING + stringreplaceAll(destinationSuffixPath,L"%number%",std::to_wstring(num)); + #else + stringreplaceAll(destinationSuffixPath,"%number%",std::to_string(num)); + #endif + } + #ifdef WIDESTRING + stringreplaceAll(destinationSuffixPath,L"%name%",TransferThread::resolvedName(destination)); + #else + stringreplaceAll(destinationSuffixPath,"%name%",TransferThread::resolvedName(destination)); + #endif + tempdestination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + tempdestination+=text_slash; + tempdestination+=destinationSuffixPath; + num++; + } + while(TransferThread::exists(tempdestination)); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"use new name: "+TransferThread::internalStringTostring(newName)); + destinationSuffixPath = newName; + } + { + std::string::size_type n=destination.rfind('/'); + if(n == std::string::npos) + n=destination.rfind('.'); + else + n=destination.rfind(n,'.'); + if(n == std::string::npos) + { + destination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + destination+=text_slash; + destination+=destinationSuffixPath; + } + else + { + destination=FSabsolutePath(destination); + if(!stringEndsWith(destination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + destination+=text_slash; + destination+=destinationSuffixPath+ + TransferThread::stringToInternalString(".")+destination.substr(n); + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"destination after rename: "+TransferThread::internalStringTostring(destination)); + break; + default: + return; + break; + } + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"checkDestinationExists but stat failed"); + } + if(stopIt) + return; + std::vector<TransferThread::dirent_uc> entryList; + do + { + fileErrorAction=FileError_NotSet; + if(!TransferThread::entryInfoList(source,entryList)) + { + #ifdef Q_OS_UNIX + int saveerrno=errno; + const std::string &errorStr=strerror(saveerrno); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Problem with the folder "+TransferThread::internalStringTostring(source)+" to read: "+std::to_string(saveerrno)); + emit errorOnFolder(source,tr("Problem with folder read").toStdString()+": "+errorStr); + #else + const std::string &errorStr=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Problem with the folder "+TransferThread::internalStringTostring(source)+" to read: "+errorStr); + emit errorOnFolder(source,tr("Problem with folder read").toStdString()+": "+errorStr); + #endif + waitOneAction.acquire(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"actionNum: "+std::to_string(fileErrorAction)); + } + } while(fileErrorAction==FileError_Retry); + + if(copyListOrder) + std::sort(entryList.begin(), entryList.end(), [](TransferThread::dirent_uc a, TransferThread::dirent_uc b) { + return a.d_name<b.d_name; + }); + if(stopIt) + return; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + #ifdef WIDESTRING + if(destination.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find(L"//") != std::wstring::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #else + if(destination.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path destination contains error"); + if(source.find("//") != std::string::npos) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"path source contains error"); + #endif + #endif + const unsigned int sizeEntryList=entryList.size(); + emit newFolderListing(TransferThread::internalStringTostring(source)); + if(mode!=Ultracopier::Move) + emit addToMkPath(source,destination,sizeEntryList); + for(unsigned int index=0;index<sizeEntryList;++index) + { + const TransferThread::dirent_uc &fileInfo=entryList.at(index); + if(stopIt) + return; + if(haveFilters) + { + if(reloadTheNewFilters) + { + QMutexLocker lock(&filtersMutex); + QCoreApplication::processEvents(QEventLoop::AllEvents); + reloadTheNewFilters=false; + this->include=this->include_send; + this->exclude=this->exclude_send; + } + const INTERNALTYPEPATH &fileName=fileInfo.d_name; + if(fileInfo.isFolder) + { + bool excluded=false,included=(include.size()==0); + unsigned int filters_index=0; + while(filters_index<exclude.size()) + { + if(exclude.at(filters_index).apply_on==ApplyOn_folder || exclude.at(filters_index).apply_on==ApplyOn_fileAndFolder) + { + if(std::regex_match(TransferThread::internalStringTostring(fileName),exclude.at(filters_index).regex)) + { + excluded=true; + break; + } + } + filters_index++; + } + if(excluded) + {} + else + { + filters_index=0; + while(filters_index<include.size()) + { + if(include.at(filters_index).apply_on==ApplyOn_folder || include.at(filters_index).apply_on==ApplyOn_fileAndFolder) + { + if(std::regex_match(TransferThread::internalStringTostring(fileName),include.at(filters_index).regex)) + { + included=true; + break; + } + } + filters_index++; + } + if(!included) + {} + else + { + INTERNALTYPEPATH fullSource=source; + if(!stringEndsWith(fullSource,'/')) + fullSource+='/'; + fullSource+=fileName; + INTERNALTYPEPATH fullDestination=destination; + if(!stringEndsWith(fullDestination,'/')) + fullDestination+='/'; + fullDestination+=fileName; + listFolder(fullSource,fullDestination); + } + } + } + else + { + bool excluded=false,included=(include.size()==0); + unsigned int filters_index=0; + while(filters_index<exclude.size()) + { + if(exclude.at(filters_index).apply_on==ApplyOn_file || exclude.at(filters_index).apply_on==ApplyOn_fileAndFolder) + { + if(std::regex_match(TransferThread::internalStringTostring(fileName),exclude.at(filters_index).regex)) + { + excluded=true; + break; + } + } + filters_index++; + } + if(excluded) + {} + else + { + filters_index=0; + while(filters_index<include.size()) + { + if(include.at(filters_index).apply_on==ApplyOn_file || include.at(filters_index).apply_on==ApplyOn_fileAndFolder) + { + if(std::regex_match(TransferThread::internalStringTostring(fileName),include.at(filters_index).regex)) + { + included=true; + break; + } + } + filters_index++; + } + if(!included) + {} + else + { + INTERNALTYPEPATH fullSource=source; + if(!stringEndsWith(fullSource,'/')) + fullSource+='/'; + fullSource+=fileName; + #ifndef ULTRACOPIER_PLUGIN_RSYNC + #ifdef Q_OS_WIN32 + emit fileTransferWithInode(fullSource,destination+TransferThread::stringToInternalString("/")+fileName,mode,fileInfo); + #else + emit fileTransfer(fullSource,destination+TransferThread::stringToInternalString("/")+fileName,mode); + #endif + #else + { + bool sendToTransfer=false; + if(!rsync) + sendToTransfer=true; + else if(!QFile::exists(destination.absoluteFilePath()+"/"+fileInfo.fileName())) + sendToTransfer=true; + else if(fileInfo.lastModified()!=QFileInfo(destination.absoluteFilePath()+"/"+fileInfo.fileName()).lastModified()) + sendToTransfer=true; + if(sendToTransfer) + #ifdef Q_OS_WIN32 + emit fileTransferWithInode(fileInfo.absoluteFilePath(),destination.absoluteFilePath()+"/"+fileInfo.fileName(),mode,fileInfo); + #else + emit fileTransfer(fileInfo.absoluteFilePath(),destination.absoluteFilePath()+"/"+fileInfo.fileName(),mode); + #endif + } + #endif + } + } + } + } + else + { + const INTERNALTYPEPATH fileName(fileInfo.d_name); + if(fileInfo.isFolder)//possible wait time here + { + //listFolder(source,destination,suffixPath+fileInfo.fileName()+QDir::separator()); + INTERNALTYPEPATH fullSource=source; + if(!stringEndsWith(fullSource,'/')) + fullSource+='/'; + fullSource+=fileName; + INTERNALTYPEPATH fullDestination=destination; + if(!stringEndsWith(fullDestination,'/')) + fullDestination+='/'; + fullDestination+=fileName; + listFolder(fullSource,fullDestination); + } + else + { + INTERNALTYPEPATH fullSource=source; + if(!stringEndsWith(fullSource,'/')) + fullSource+='/'; + fullSource+=fileName; + #ifndef ULTRACOPIER_PLUGIN_RSYNC + #ifdef Q_OS_WIN32 + emit fileTransferWithInode(fullSource,destination+TransferThread::stringToInternalString("/")+fileName,mode,fileInfo); + #else + emit fileTransfer(fullSource,destination+TransferThread::stringToInternalString("/")+fileName,mode); + #endif + #else + { + bool sendToTransfer=false; + if(!rsync) + sendToTransfer=true; + else if(!QFile::exists(destination.absoluteFilePath()+"/"+fileInfo.fileName())) + sendToTransfer=true; + else if(fileInfo.lastModified()!=QFileInfo(destination.absoluteFilePath()+"/"+fileInfo.fileName()).lastModified()) + sendToTransfer=true; + if(sendToTransfer) + #ifdef Q_OS_WIN32 + emit fileTransferWithInode(fileInfo.absoluteFilePath(),destination.absoluteFilePath()+"/"+fileInfo.fileName(),mode,fileInfo); + #else + emit fileTransfer(fileInfo.absoluteFilePath(),destination.absoluteFilePath()+"/"+fileInfo.fileName(),mode); + #endif + } + #endif + } + } + } + #ifdef ULTRACOPIER_PLUGIN_RSYNC + if(rsync) + { + //check the reverse path here + QFileInfoList entryListDestination; + if(copyListOrder) + entryListDestination=QDir(destination.absoluteFilePath()).entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System,QDir::DirsFirst|QDir::Name|QDir::IgnoreCase);//possible wait time here + else + entryListDestination=QDir(destination.absoluteFilePath()).entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System);//possible wait time here + int sizeEntryListDestination=entryListDestination.size(); + int index=0; + for (int indexDestination=0;indexDestination<sizeEntryListDestination;++indexDestination) + { + index=0; + while(index<sizeEntryList) + { + if(entryListDestination.at(indexDestination).fileName()==entryList.at(index).fileName()) + break; + index++; + } + if(index==sizeEntryList) + { + //then not found, need be remove + emit addToRmForRsync(entryListDestination.at(indexDestination)); + } + } + return; + } + #endif + if(mode==Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+", sizeEntryList: "+std::to_string(sizeEntryList)); + emit addToMovePath(source,destination,sizeEntryList); + } + else// if(keepDate or keep permition, perfer alwasy send it) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"source: "+TransferThread::internalStringTostring(source)+", sizeEntryList: "+std::to_string(sizeEntryList)); + emit addToKeepAttributePath(source,destination,sizeEntryList); + } +} + +//set if need check if the destination exists +void ScanFileOrFolder::setCheckDestinationFolderExists(const bool checkDestinationFolderExists) +{ + this->checkDestinationExists=checkDestinationFolderExists; +} + +void ScanFileOrFolder::setRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; +} + +void ScanFileOrFolder::setMoveTheWholeFolder(const bool &moveTheWholeFolder) +{ + this->moveTheWholeFolder=moveTheWholeFolder; +} + +void ScanFileOrFolder::setFollowTheStrictOrder(const bool &order) +{ + this->copyListOrder=order; +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void ScanFileOrFolder::setRsync(const bool rsync) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"set rsync: "+std::to_string(rsync)); + this->rsync=rsync; +} +#endif + +void ScanFileOrFolder::set_updateMount() +{ + driveManagement.tryUpdate(); +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h new file mode 100755 index 0000000..f74d355 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ScanFileOrFolder.h @@ -0,0 +1,118 @@ +/** \file scanFileOrFolder.h +\brief Thread changed to list recursively the folder +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QThread> +#include <QFileInfo> +#include <QDir> +#include <QSemaphore> +#include <QEventLoop> +#include <QCoreApplication> +#include <QMutexLocker> +#include <regex> +#include <string> +#include <vector> + +#include "Environment.h" +#include "DriveManagement.h" +#include "TransferThread.h" + +#ifndef SCANFILEORFOLDER_H +#define SCANFILEORFOLDER_H + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#else +#define INTERNALTYPEPATH std::string +#endif + +/// \brief Thread changed to list recursively the folder +class ScanFileOrFolder : public QThread +{ + Q_OBJECT +public: + explicit ScanFileOrFolder(const Ultracopier::CopyMode &mode); + ~ScanFileOrFolder(); + /// \brief to the a folder listing + void stop(); + /// \brief to get if is finished + bool isFinished() const; + /// \brief set action if Folder are same or exists + void setFolderExistsAction(const FolderExistsAction &action, const std::string &newName=std::string()); + /// \brief set action if error + void setFolderErrorAction(const FileErrorAction &action); + /// \brief set if need check if the destination exists + void setCheckDestinationFolderExists(const bool checkDestinationFolderExists); + void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + void setMoveTheWholeFolder(const bool &moveTheWholeFolder); + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif +signals: + void fileTransfer(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const Ultracopier::CopyMode &mode) const; + void fileTransferWithInode(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const Ultracopier::CopyMode &mode,const TransferThread::dirent_uc &inode) const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; + void folderAlreadyExists(const INTERNALTYPEPATH &source,const INTERNALTYPEPATH &destination,const bool &isSame) const; + void errorOnFolder(const INTERNALTYPEPATH &fileInfo,const std::string &errorString,const ErrorType &errorType=ErrorType_FolderWithRety) const; + void finishedTheListing() const; + + void newFolderListing(const std::string &path) const; + void addToMkPath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inode) const; + void addToMovePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove) const; + void addToKeepAttributePath(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination, const int& inodeToRemove) const; + void addToRealMove(const INTERNALTYPEPATH& source,const INTERNALTYPEPATH& destination) const; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void addToRmForRsync(const INTERNALTYPEPATH& destination) const; + #endif +public slots: + void addToList(const std::vector<INTERNALTYPEPATH>& sources,const INTERNALTYPEPATH& destination); + void setFilters(const std::vector<Filters_rules> &include,const std::vector<Filters_rules> &exclude); + void setFollowTheStrictOrder(const bool &order); + void set_updateMount(); +protected: + void run(); +private: + DriveManagement driveManagement; + bool moveTheWholeFolder; + std::vector<INTERNALTYPEPATH> sources; + INTERNALTYPEPATH destination; + volatile bool stopIt; + void listFolder(INTERNALTYPEPATH source, INTERNALTYPEPATH destination); + #ifdef Q_OS_UNIX + INTERNALTYPEPATH resolvDestination(const INTERNALTYPEPATH &destination); + #endif + volatile bool stopped; + QSemaphore waitOneAction; + FolderExistsAction folderExistsAction; + FileErrorAction fileErrorAction; + volatile bool checkDestinationExists; + INTERNALTYPEPATH newName; + bool copyListOrder; + std::regex folder_isolation; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + Ultracopier::CopyMode mode; + std::vector<Filters_rules> include,exclude; + std::vector<Filters_rules> include_send,exclude_send; + bool reloadTheNewFilters; + bool haveFilters; + QMutex filtersMutex; + std::string firstRenamingRule; + std::string otherRenamingRule; + //std::vector<std::string> blackList; + /** Parse the multiple wildcard source, it allow resolv multiple wildcard with Qt into their path + * The string: /toto/f*a/yy*a/toto.mp3 + * Will give: /toto/f1a/yy*a/toto.mp3, /toto/f2a/yy*a/toto.mp3 + * Will give: /toto/f2a/yy1a/toto.mp3, /toto/f2a/yy2a/toto.mp3 + */ + std::vector<INTERNALTYPEPATH> parseWildcardSources(const std::vector<INTERNALTYPEPATH> &sources) const; + + static INTERNALTYPEPATH text_slash; + static INTERNALTYPEPATH text_antislash; + static INTERNALTYPEPATH text_dot; +}; + +#endif // SCANFILEORFOLDER_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h new file mode 100755 index 0000000..c1758f4 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h new file mode 100755 index 0000000..5898e5a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/StructEnumDefinition_CopyEngine.h @@ -0,0 +1,118 @@ +/** \file StructEnumDefinition_CopyEngine.h +\brief Define the structure and enumeration used in the copy engine +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <string> +#include <regex> + +#ifndef STRUCTDEF_COPYENGINE_H +#define STRUCTDEF_COPYENGINE_H + +/// \brief Define action if file exists +enum FileExistsAction +{ + FileExists_NotSet=0, + FileExists_Cancel=1, + FileExists_Skip=2, + FileExists_Overwrite=3, + FileExists_OverwriteIfNotSameMdate=4, + FileExists_OverwriteIfNewer=5, + FileExists_OverwriteIfOlder=6, + FileExists_OverwriteIfNotSameSize=7, + FileExists_OverwriteIfNotSameSizeAndDate=8, + FileExists_Rename=9 +}; + +/// \brief Define action if file error +enum FileErrorAction +{ + FileError_NotSet=1, + FileError_Cancel=2, + FileError_Skip=3, + FileError_Retry=4, + FileError_PutToEndOfTheList=5 +}; + +/// \brief to have the transfer status +enum TransferStat +{ + TransferStat_Idle=0, + TransferStat_PreOperation=1, + TransferStat_WaitForTheTransfer=2, + TransferStat_Transfer=3, + TransferStat_PostTransfer=5, + TransferStat_PostOperation=6 +}; + +/// \brief Define overwrite mode +/*enum OverwriteMode +{ + OverwriteMode_None, + OverwriteMode_Overwrite, + OverwriteMode_OverwriteIfNewer, + OverwriteMode_OverwriteIfNotSameModificationDate +};*/ + +/// \brief Define action if file exists +enum FolderExistsAction +{ + FolderExists_NotSet=0, + FolderExists_Cancel=1, + FolderExists_Merge=2, + FolderExists_Skip=3, + FolderExists_Rename=4 +}; + +enum ErrorType +{ + ErrorType_Normal=0, + ErrorType_Folder=1, + ErrorType_FolderWithRety=2, + ErrorType_Rights=3 +}; + +enum SearchType +{ + SearchType_rawText=0, + SearchType_simpleRegex=1, + SearchType_perlRegex=2 +}; + +enum ApplyOn +{ + ApplyOn_file=0, + ApplyOn_fileAndFolder=1, + ApplyOn_folder=2 +}; + +/** to store into different way the filter rules to be exported */ +struct Filters_rules +{ + std::string search_text; + SearchType search_type; + ApplyOn apply_on; + bool need_match_all; + std::regex regex; +}; + +/// \brief get action type +enum ActionType +{ + ActionType_MkPath=1, + ActionType_MovePath=2, + ActionType_RealMove=3, + #ifdef ULTRACOPIER_PLUGIN_RSYNC + ActionType_RmSync=4, + #endif + ActionType_SyncDate=5 +}; + +struct Diskspace +{ + std::string drive; + uint64_t requiredSpace; + uint64_t freeSpace; +}; + +#endif // STRUCTDEF_COPYENGINE_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp new file mode 100755 index 0000000..9cbad5a --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp @@ -0,0 +1,1547 @@ +//presume bug linked as multple paralelle inode to resume after "overwrite" +//then do overwrite node function to not re-set the file name + +#include "TransferThread.h" +#include <string> +#include <dirent.h> +#include <limits.h> +#ifdef WIDESTRING +#include <locale> +//#include <codecvt> +#endif + +#ifdef Q_OS_WIN32 +#include <accctrl.h> +#include <aclapi.h> +#endif + +#include "../../../cpp11addition.h" + +TransferThread::TransferThread() : + mode(Ultracopier::CopyMode::Copy), + transfer_stat (TransferStat_Idle), + doRightTransfer (false), + #ifdef ULTRACOPIER_PLUGIN_RSYNC + rsync (false), + #endif + keepDate (false), + mkFullPath (false), + stopIt (false), + fileExistsAction (FileExists_NotSet), + alwaysDoFileExistsAction (FileExists_NotSet), + needSkip (false), + needRemove (false), + deletePartiallyTransferredFiles (true), + renameTheOriginalDestination (false), + writeError (false), + readError (false), + havePermission (false), + haveTransferTime (false) +{ + id=0; + renameRegex=std::regex("^(.*)(\\.[a-zA-Z0-9]+)$"); + #ifdef Q_OS_WIN32 + regRead=std::regex("^[a-zA-Z]:"); + #endif + transferSize = 0;//external set by ListThread + + #ifndef Q_OS_UNIX + PSecurityD=NULL; + dacl=NULL; + #endif + #ifdef Q_OS_Win32 + stopItWin=0; + #endif + //if not QThread + run(); +} + +TransferThread::~TransferThread() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + //else cash without this disconnect + //disconnect(&readThread); + //disconnect(&writeThread); + #ifndef Q_OS_UNIX + if(PSecurityD!=NULL) + { + free(PSecurityD); + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + #endif +} + +void TransferThread::run() +{ + moveToThread(this); + + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] start: ")+QString::number((qint64)QThread::currentThreadId()))); + transfer_stat = TransferStat_Idle; + stopIt = false; + fileExistsAction = FileExists_NotSet; + alwaysDoFileExistsAction= FileExists_NotSet; + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&driveManagement,&DriveManagement::debugInformation,this, &TransferThread::debugInformation, Qt::QueuedConnection)) + abort(); + #endif +} + +TransferStat TransferThread::getStat() const +{ + return transfer_stat; +} + +#ifdef WIDESTRING +INTERNALTYPEPATH TransferThread::stringToInternalString(const std::string& utf8) +{ + /* buggy on MXE + std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter; + return converter.from_bytes(utf8);*/ + return QString::fromUtf8(utf8.data(),utf8.size()).toStdWString(); + //return widen(utf8); +} + +std::string TransferThread::internalStringTostring(const INTERNALTYPEPATH& utf16) +{ + /* buggy on MXE + std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1; + return conv1.to_bytes(utf16);*/ + const QByteArray &data=QString::fromStdWString(utf16).toUtf8(); + return std::string(data.constData(),data.size()); + //return narrow(utf16); +} +#else +std::string TransferThread::stringToInternalString(const std::string& utf8) +{ + return utf8; +} + +std::string TransferThread::internalStringTostring(const std::string& utf16) +{ + return utf16; +} +#endif + +bool TransferThread::setFiles(const INTERNALTYPEPATH& source, const int64_t &size, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode &mode) +{ + if(transfer_stat!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + return false; + } + //to prevent multiple file alocation into ListThread::doNewActions_inode_manipulation() + transfer_stat = TransferStat_PreOperation; + //emit pushStat(stat,transferId); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + this->source = source; + this->destination = destination; + this->mode = mode; + this->size = size; + stopIt = false; + #ifdef Q_OS_WIN32 + stopItWin=0; + #endif + fileExistsAction = FileExists_NotSet; + canStartTransfer = false; + sended_state_preOperationStopped= false; + fileContentError = false; + writeError = false; + readError = false; + haveTransferTime = false; + canStartTransfer = false; + resetExtraVariable(); + emit internalStartPreOperation(); + startTransferTime.restart(); + return true; +} + +void TransferThread::setFileRename(const std::string &nameForRename) +{ + if(transfer_stat!=TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+(", destination: ")+TransferThread::internalStringTostring(destination)); + return; + } + if(QString::fromStdString(nameForRename).contains(QRegularExpression(QStringLiteral("[/\\\\\\*]")))) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't use this kind of name, internal error")); + emit errorOnFile(destination,tr("Try rename with using special characters").toStdString()); + return; + } + #ifdef WIDESTRING + std::string::size_type n=destination.rfind(L'/'); + #else + std::string::size_type n=destination.rfind('/'); + #endif + #ifdef Q_OS_WIN32 + const std::wstring::size_type n2=destination.rfind(L'\\'); + if(n2>n && (n2!=std::wstring::npos || n==std::wstring::npos)) + n=n2; + #endif + #ifdef WIDESTRING + if(n != std::wstring::npos) + #else + if(n != std::string::npos) + #endif + { + INTERNALTYPEPATH destinationPath=destination.substr(0,n);//+1 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] nameForRename: "+nameForRename+", destinationPath: "+internalStringTostring(destinationPath)); + if(stringEndsWith(destinationPath,'/') + #ifdef Q_OS_WIN32 + || stringEndsWith(destinationPath,'\\') + #endif + ) + destination=destinationPath+TransferThread::stringToInternalString(nameForRename); + else + destination=destinationPath+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + } + else + destination=TransferThread::stringToInternalString(nameForRename); + + /*why all this code? + if(!renameTheOriginalDestination) + destination=destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + else + { + //INTERNALTYPEPATH tempDestination=destination; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] rename "+TransferThread::internalStringTostring(destination)+ + ": to: "+TransferThread::internalStringTostring(destination)+"/"+nameForRename); + if(!rename(destination,(destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename)))) + { + if(!is_file(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source not exists "+TransferThread::internalStringTostring(destination)+ + ": destination: "+TransferThread::internalStringTostring(destination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,tr("File not found").toStdString()); + return; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to do real move "+TransferThread::internalStringTostring(destination)+ + ": "+TransferThread::internalStringTostring(destination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,"errno: "+std::string(strerror(errno))); + return; + } + if(source==destination) + source=destination+TransferThread::stringToInternalString("/")+TransferThread::stringToInternalString(nameForRename); + destination=tempDestination; + }*/ + fileExistsAction = FileExists_NotSet; + resetExtraVariable(); + emit internalStartPreOperation(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] destination is: "+TransferThread::internalStringTostring(destination)); +} + +bool TransferThread::rename(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination) +{ + #ifdef Q_OS_WIN32 + return MoveFileExW( + TransferThread::toFinalPath(source).c_str(), + TransferThread::toFinalPath(destination).c_str(), + MOVEFILE_REPLACE_EXISTING); + #else + return ::rename(TransferThread::internalStringTostring(source).c_str(), + TransferThread::internalStringTostring(destination).c_str())==0; + #endif +} + +void TransferThread::setAlwaysFileExistsAction(const FileExistsAction &action) +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] action to do always: ")+QString::number(action))); + alwaysDoFileExistsAction=action; +} + +void TransferThread::resetExtraVariable() +{ + sended_state_preOperationStopped=false; + writeError = false; + readError = false; + needRemove = false; + needSkip = false; + retry = false; + havePermission = false; +} + +bool TransferThread::isSame() +{ + //check if source and destination is not the same + //source.absoluteFilePath()==destination.absoluteFilePath() not work is source don't exists + if(source==destination) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!is_file(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start source: "+TransferThread::internalStringTostring(source)+" not exists"); + if(is_symlink(source)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start source: "+TransferThread::internalStringTostring(source)+" isSymLink"); + if(is_symlink(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start destination: "+TransferThread::internalStringTostring(destination)+" isSymLink"); + #endif + if(fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_Skip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] is same but skip"); + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + emit postOperationStopped(); + //quit + return true; + } + if(checkAlwaysRename()) + return false; + emit fileAlreadyExists(source,destination,true); + return true; + } + return false; +} + +bool TransferThread::destinationExists() +{ + //check if destination exists + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+QStringLiteral("overwrite: %1, alwaysDoFileExistsAction: %2, readError: %3, writeError: %4") + .arg(fileExistsAction) + .arg(alwaysDoFileExistsAction) + .arg(readError) + .arg(writeError) + .toStdString() + ); + if(alwaysDoFileExistsAction==FileExists_Overwrite || readError || writeError + #ifdef ULTRACOPIER_PLUGIN_RSYNC + || rsync + #endif + ) + return false; + + bool destinationExists=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] time to first FS access"); + destinationExists=is_file(destination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] finish first FS access: "+std::to_string(destinationExists)); + if(destinationExists) + { + if(fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_Skip) + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + emit postOperationStopped(); + //quit + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(checkAlwaysRename()) + return false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(is_file(source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfNewer || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNewer)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(source): "+std::to_string(sm)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(destination): "+std::to_string(sd)); + if(sm>sd || sm==-1 || sd==-1) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfOlder || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfOlder)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(source): "+std::to_string(sm)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(destination): "+std::to_string(sd)); + if(sm<sd/* || sm==-1 || sd==-1*/) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfNotSameMdate || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNotSameMdate)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(source): "+std::to_string(sm)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileMDateTime(destination): "+std::to_string(sd)); + if(sm!=sd || sm==-1 || sd==-1) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfNotSameSize || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNotSameMdate)) + { + if(file_stat_size(source)!=file_stat_size(destination)) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction==FileExists_OverwriteIfNotSameSizeAndDate || (fileExistsAction==FileExists_NotSet && alwaysDoFileExistsAction==FileExists_OverwriteIfNotSameMdate)) + { + const int64_t &sm=readFileMDateTime(source); + const int64_t &sd=readFileMDateTime(destination); + if(sm==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(source,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(source,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sd==-1) + { + #ifndef Q_OS_WIN32 + const int e=errno; + emit errorOnFile(destination,"Unable to read modification time: "+std::string(strerror(e))+" ("+std::to_string(e)+")"); + #else + emit errorOnFile(destination,"Unable to read modification time: "+GetLastErrorStdStr()); + #endif + return true; + } + if(sm!=sd || file_stat_size(source)!=file_stat_size(destination)) + return false; + else + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + if(fileExistsAction!=FileExists_NotSet) + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle;"); + emit postOperationStopped(); + return true; + } + } + if(fileExistsAction==FileExists_NotSet) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] FS access"); + emit fileAlreadyExists(source,destination,false); + return true; + } + } + return false; +} + +/** \example + * /dir1/dir2/file -> file + * /file -> file + * /dir1/dir2/ -> dir2 + * /dir1/ -> dir1 + * / -> root */ +#ifdef Q_OS_WIN32 +std::string TransferThread::resolvedName(std::string inode) +#else +std::string TransferThread::resolvedName(const std::string &inode) +#endif +{ + #ifdef Q_OS_WIN32 + stringreplaceAll(inode,"\\","/"); + #endif + const std::string::size_type &lastPos=inode.rfind('/'); + if(lastPos == std::string::npos || (lastPos==0 && inode.size()==1)) + return "root"; + if((lastPos+1)!=inode.size()) + return inode.substr(lastPos+1); + if(inode.size()==1) + return "root"; + const std::string::size_type &previousLastPos=inode.rfind('/',inode.size()-2); + if((lastPos-2)==previousLastPos || previousLastPos == std::string::npos) + return "root"; + return inode.substr(previousLastPos+1,lastPos-previousLastPos-1); +} + +#ifdef Q_OS_WIN32 +std::wstring TransferThread::resolvedName(std::wstring inode) +#else +std::wstring TransferThread::resolvedName(const std::wstring &inode) +#endif +{ + #ifdef Q_OS_WIN32 + stringreplaceAll(inode,L"\\",L"/"); + #endif + const std::wstring::size_type &lastPos=inode.rfind(L'/'); + if(lastPos == std::wstring::npos || (lastPos==0 && inode.size()==1)) + return L"root"; + if((lastPos+1)!=inode.size()) + return inode.substr(lastPos+1); + if(inode.size()==1) + return L"root"; + const std::wstring::size_type &previousLastPos=inode.rfind(L'/',inode.size()-2); + if((lastPos-2)==previousLastPos || previousLastPos == std::wstring::npos) + return L"root"; + return inode.substr(previousLastPos+1,lastPos-previousLastPos-1); +} + +INTERNALTYPEPATH TransferThread::getSourcePath() const +{ + return source; +} + +INTERNALTYPEPATH TransferThread::getDestinationPath() const +{ + return destination; +} + +Ultracopier::CopyMode TransferThread::getMode() const +{ + return mode; +} + +//return true if has been renamed +bool TransferThread::checkAlwaysRename() +{ + if(alwaysDoFileExistsAction==FileExists_Rename) + { + INTERNALTYPEPATH newDestination=destination; + std::string fileName=resolvedName(TransferThread::internalStringTostring(newDestination)); + std::string suffix; + std::string newFileName; + //resolv the suffix + if(std::regex_match(fileName,renameRegex)) + { + suffix=fileName; + suffix=std::regex_replace(suffix,renameRegex,"$2"); + fileName=std::regex_replace(fileName,renameRegex,"$1"); + } + //resolv the new name + int num=1; + do + { + if(num==1) + { + if(firstRenamingRule.empty()) + newFileName=tr("%name% - copy%suffix%").toStdString(); + else + newFileName=firstRenamingRule; + } + else + { + if(otherRenamingRule.empty()) + newFileName=tr("%name% - copy (%number%)%suffix%").toStdString(); + else + newFileName=otherRenamingRule; + stringreplaceAll(newFileName,"%number%",std::to_string(num)); + } + stringreplaceAll(newFileName,"%name%",fileName); + stringreplaceAll(newFileName,"%suffix%",suffix); + newDestination=FSabsolutePath(newDestination); + if(!stringEndsWith(newDestination,'/') + #ifdef Q_OS_WIN32 + && !stringEndsWith(destination,'\\') + #endif + ) + newDestination+=TransferThread::stringToInternalString("/"); + newDestination+=TransferThread::stringToInternalString(newFileName); + num++; + } + while(is_file(newDestination)); + if(!renameTheOriginalDestination) + destination=newDestination; + else + { + if(rename(destination.c_str(),newDestination.c_str())!=0) + { + if(!is_file(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source not exists "+TransferThread::internalStringTostring(destination)+ + ": destination: "+TransferThread::internalStringTostring(newDestination)+", error: "+std::to_string(errno)); + emit errorOnFile(destination,tr("File not found").toStdString()); + readError=true; + return true; + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to do real move "+TransferThread::internalStringTostring(destination)+ + ": "+TransferThread::internalStringTostring(newDestination)+", error: "+std::to_string(errno)); + readError=true; + emit errorOnFile(destination,std::string(strerror(errno))+", errno: "+std::string(strerror(errno))); + return true; + } + } + return true; + } + return false; +} + +/// \warning not check if path have double //, if have do bug return failed +/// \warning check mkpath() call should not exists because only existing dest is allowed now +#ifdef Q_OS_UNIX +bool TransferThread::mkpath(const INTERNALTYPEPATH &path, const mode_t &mode) +#else +bool TransferThread::mkpath(const INTERNALTYPEPATH &path) +#endif +{ + #ifdef Q_OS_WIN32 + if(!mkdir(path)) + if(errno==EEXIST) + return true; + + printf("%i",errno); + #ifndef WIDESTRING + #error if windows, WIDESTRING need be enabled + #endif + //use reverse method to performance, more complex to code but less system call/fs call + std::wstring::size_type previouspos=path.size(); + std::wstring::size_type lastpos=std::string::npos; + + const wchar_t *pathC=path.c_str(); + wchar_t pathCedit[32000]; + wcscpy(pathCedit,pathC); + std::vector<std::wstring::size_type> pathSplit; + pathSplit.push_back(path.size()); + do + { + lastpos=path.rfind(L'/',previouspos-1); + if(lastpos == std::wstring::npos) + return false; + + while(pathC[lastpos-1]==L'/') + if(lastpos>0) + lastpos--; + else + return false; + + //buggy case? + #ifdef Q_OS_UNIX + if(lastpos<2) + return false; + #else + if(lastpos<4) + return false; + #endif + + pathCedit[lastpos]=L'\0'; + previouspos=lastpos; + + errno=0; + if(!mkdir(pathCedit)) + if(errno!=EEXIST && errno!=ENOENT) + return false; + //here errno can be: EEXIST, ENOENT, 0 + if(errno==ENOENT) + pathSplit.push_back(lastpos); + } while(lastpos>0 && errno==ENOENT); + + do + { + wcscpy(pathCedit,pathC); + lastpos=pathSplit.back(); + pathSplit.pop_back(); + pathCedit[lastpos]=L'\0'; + #ifdef Q_OS_UNIX + if(mkdir(pathCedit, mode)==-1) + #else + if(!mkdir(pathCedit)) + #endif + if(errno!=EEXIST) + return false; + } while(!pathSplit.empty()); + return true; + #else + char pathC[PATH_MAX]; + strcpy(pathC,TransferThread::internalStringTostring(path).c_str()); + if(!mkdir(path)) + if(errno==EEXIST) + return true; + + printf("%i",errno); + //use reverse method to performance, more complex to code but less system call/fs call + std::string::size_type previouspos=path.size(); + std::string::size_type lastpos=std::string::npos; + + char pathCedit[PATH_MAX]; + strcpy(pathCedit,pathC); + std::vector<std::string::size_type> pathSplit; + pathSplit.push_back(path.size()); + do + { + lastpos=path.rfind('/',previouspos-1); + if(lastpos == std::string::npos) + return false; + + while(pathC[lastpos-1]=='/') + if(lastpos>0) + lastpos--; + else + return false; + + //buggy case? + #ifdef Q_OS_UNIX + if(lastpos<2) + return false; + #else + if(lastpos<4) + return false; + #endif + + pathCedit[lastpos]='\0'; + previouspos=lastpos; + + errno=0; + #ifdef Q_OS_UNIX + if(::mkdir(pathCedit, mode)==-1) + #else + if(::mkdir(pathCedit)==-1) + #endif + if(errno!=EEXIST && errno!=ENOENT) + return false; + //here errno can be: EEXIST, ENOENT, 0 + if(errno==ENOENT) + pathSplit.push_back(lastpos); + } while(lastpos>0 && errno==ENOENT); + + do + { + strcpy(pathCedit,pathC); + lastpos=pathSplit.back(); + pathSplit.pop_back(); + pathCedit[lastpos]='\0'; + #ifdef Q_OS_UNIX + if(::mkdir(pathCedit, mode)==-1) + #else + if(::mkdir(pathCedit)==-1) + #endif + if(errno!=EEXIST) + return false; + } while(!pathSplit.empty()); + return true; + #endif +} + +#ifdef Q_OS_UNIX +bool TransferThread::mkdir(const INTERNALTYPEPATH &file_path, const mode_t &mode) +#else +bool TransferThread::mkdir(const INTERNALTYPEPATH &file_path) +#endif +{ +#ifdef Q_OS_WIN32 + const bool r = CreateDirectory(TransferThread::toFinalPath(file_path).c_str(),NULL); + const DWORD &t=GetLastError(); + if(!r) + { + if(t==183/*is_dir(file_path) performance impact*/) + errno=EEXIST; + else if(t==3/*is_dir(file_path) performance impact*/) + errno=ENOENT; + else + errno=t; + } + return r; +#else + #ifdef Q_OS_UNIX + return ::mkdir(TransferThread::internalStringTostring(file_path).c_str(),mode)==0; + #else + return ::mkdir(TransferThread::internalStringTostring(file_path).c_str())==0; + #endif +#endif +} + +bool TransferThread::canBeMovedDirectly() const +{ + if(mode!=Ultracopier::Move) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] mode!=Ultracopier::Move"); + return false; + } + return is_symlink(source) || driveManagement.isSameDrive( + TransferThread::internalStringTostring(destination), + TransferThread::internalStringTostring(source) + ); +} + +bool TransferThread::canBeCopiedDirectly() const +{ + return is_symlink(source); +} + +//set the copy info and options before runing +void TransferThread::setRightTransfer(const bool doRightTransfer) +{ + this->doRightTransfer=doRightTransfer; +} + +/// \brief set buffer +void TransferThread::setBuffer(const bool buffer) +{ + Q_UNUSED(buffer); +} + +/*void TransferThread::setBufferSize(const int parallelBuffer,const int serialBuffer) +{ + writeThread->setBufferSize(const int parallelBuffer,const int serialBuffer); +}*/ + +//set keep date +void TransferThread::setKeepDate(const bool keepDate) +{ + this->keepDate=keepDate; +} + +bool TransferThread::doFilePostOperation() +{ + //do operation needed by copy + //set the time if no write thread used + + if(/*not implied by is_symlink, exist can be false because symlink dest not exists*/ + !exists(destination) && !is_symlink(destination)) + { + if(!stopIt) + if(/*true when the destination have been remove but not the symlink:*/!is_symlink(source)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date: File not found"); + emit errorOnFile(destination,tr("Unable to change the date").toStdString()+": "+tr("File not found").toStdString()); + return false; + } + } + else + { + if(doRightTransfer) + { + //should be never used but... + /*source.refresh(); + if(source.exists())*/ + if(havePermission) + { + if(!writeDestinationFilePermissions(destination)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to set the destination file permission"); + //emit errorOnFile(destination,tr("Unable to set the destination file permission")); + //return false; + } + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try doRightTransfer when source not exists"); + } + //date at end because previous change can touch the file + if(doTheDateTransfer) + { + if(!writeDestinationFileDateTime(destination)) + { + if(!is_file(destination)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date (is not a file)"); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to change the date"); + /* error with virtual folder under windows */ + #ifndef Q_OS_WIN32 + if(keepDate) + { + emit errorOnFile(destination,tr("Unable to change the date").toStdString()); + return false; + } + #endif + } + /*else -> need be done at source m time read + { + #ifndef Q_OS_WIN32 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the destination time: "+destination.lastModified().toString().toStdString()); + if(destination.lastModified()<ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] read the destination time lower than min time: "+destination.lastModified().toString().toStdString()); + if(keepDate) + { + emit errorOnFile(destination,tr("Unable to change the date").toStdString()); + return false; + } + } + #endif + }*/ + } + + } + if(stopIt) + return false; + + return true; +} + +////////////////////////////////////////////////////////////////// +///////////////////////// Normal event /////////////////////////// +////////////////////////////////////////////////////////////////// + +int64_t TransferThread::readFileMDateTime(const INTERNALTYPEPATH &source) +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"readFileDateTime("+source+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + struct stat info; + if(stat(TransferThread::internalStringTostring(source).c_str(),&info)!=0) + return -1; + #ifdef Q_OS_MAC + return info.st_mtimespec.tv_sec; + #else + return info.st_mtim.tv_sec; + #endif + #else + #ifdef Q_OS_WIN32 + HANDLE hFileSouce = CreateFileW(TransferThread::toFinalPath(source).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); + if(hFileSouce == INVALID_HANDLE_VALUE) + return -1; + FILETIME ftCreate, ftAccess, ftWrite; + if(!GetFileTime(hFileSouce, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileSouce); + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to get the file time: "+TransferThread::GetLastErrorStdStr()); + return -1; + } + CloseHandle(hFileSouce); + const int64_t UNIX_TIME_START = 0x019DB1DED53E8000; //January 1, 1970 (start of Unix epoch) in "ticks" + const int64_t TICKS_PER_SECOND = 10000000; //a tick is 100ns + LARGE_INTEGER li; + li.LowPart = ftWrite.dwLowDateTime; + li.HighPart = ftWrite.dwHighDateTime; + return (li.QuadPart - UNIX_TIME_START) / TICKS_PER_SECOND; + #else + return -1; + #endif + #endif + return -1; +} + +//fonction to read the file date time +bool TransferThread::readSourceFileDateTime(const INTERNALTYPEPATH &source) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] readFileDateTime("+TransferThread::internalStringTostring(source)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + struct stat info; + if(stat(TransferThread::internalStringTostring(source).c_str(),&info)!=0) + return false; + #ifdef Q_OS_MAC + time_t ctime=info.st_ctimespec.tv_sec; + time_t actime=info.st_atimespec.tv_sec; + time_t modtime=info.st_mtimespec.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #else + time_t ctime=info.st_ctim.tv_sec; + time_t actime=info.st_atim.tv_sec; + time_t modtime=info.st_mtim.tv_sec; + //this function avalaible on unix and mingw + butime.actime=actime; + butime.modtime=modtime; + #endif + if((uint64_t)modtime<ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the sources is older to copy the time: "+TransferThread::internalStringTostring(source)); + return false; + } + Q_UNUSED(ctime); + return true; + #else + #ifdef Q_OS_WIN32 + HANDLE hFileSouce = CreateFileW(TransferThread::toFinalPath(source).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); + if(hFileSouce == INVALID_HANDLE_VALUE) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] open failed to read: "+QString::fromWCharArray(filePath).toStdString()+", error: "+TransferThread::GetLastErrorStdStr()); + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + if(!GetFileTime(hFileSouce, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileSouce); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to get the file time"); + return false; + } + this->ftCreate=ftCreate; + this->ftAccess=ftAccess; + this->ftWrite=ftWrite; + CloseHandle(hFileSouce); + const uint64_t modtime=(uint64_t)ftWrite.dwLowDateTime + ((uint64_t)2^32 * (uint64_t)ftWrite.dwHighDateTime); + if(modtime<ULTRACOPIER_PLUGIN_MINIMALYEAR_TIMESTAMPS) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the sources is older to copy the time: "+source+": "+source.lastModified().toString().toStdString()); + return false; + } + return true; + #else + return false; + #endif + #endif + return false; +} + +bool TransferThread::writeDestinationFileDateTime(const INTERNALTYPEPATH &destination) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeFileDateTime("+TransferThread::internalStringTostring(destination)+")"); + /** Why not do it with Qt? Because it not support setModificationTime(), and get the time with Qt, that's mean use local time where in C is UTC time */ + #ifdef Q_OS_UNIX + return utime(TransferThread::internalStringTostring(destination).c_str(),&butime)==0; + #else + #ifdef Q_OS_WIN32 + HANDLE hFileDestination = CreateFileW(TransferThread::toFinalPath(destination).c_str(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + if(hFileDestination == INVALID_HANDLE_VALUE) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] open failed to write: "+QString::fromWCharArray(filePath).toStdString()+", error: "+TransferThread::GetLastErrorStdStr()); + return false; + } + FILETIME ftCreate, ftAccess, ftWrite; + ftCreate=this->ftCreate; + ftAccess=this->ftAccess; + ftWrite=this->ftWrite; + if(!SetFileTime(hFileDestination, &ftCreate, &ftAccess, &ftWrite)) + { + CloseHandle(hFileDestination); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to set the file time"); + return false; + } + CloseHandle(hFileDestination); + return true; + #else + return false; + #endif + #endif + return false; +} + +bool TransferThread::readSourceFilePermissions(const INTERNALTYPEPATH &source) +{ + #ifdef Q_OS_UNIX + if(stat(TransferThread::internalStringTostring(source).c_str(), &permissions)!=0) + return false; + else + return true; + #else + HANDLE hFile = CreateFileW(source.c_str(), GENERIC_READ , + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] CreateFile() failed. Error: INVALID_HANDLE_VALUE: "+TransferThread::GetLastErrorStdStr()); + return false; + } + DWORD lasterror = GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, + NULL, NULL, &dacl, NULL, &PSecurityD); + if (lasterror != ERROR_SUCCESS) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] GetSecurityInfo() failed. Error"+std::to_string(lasterror)); + return false; + } + CloseHandle(hFile); + return true; + #endif +} + +bool TransferThread::writeDestinationFilePermissions(const INTERNALTYPEPATH &destination) +{ + #ifdef Q_OS_UNIX + if(chmod(TransferThread::internalStringTostring(destination).c_str(), permissions.st_mode)!=0) + return false; + if(chown(TransferThread::internalStringTostring(destination).c_str(), permissions.st_uid, permissions.st_gid)!=0) + return false; + return true; + #else + HANDLE hFile = CreateFileW(destination.c_str(),READ_CONTROL | WRITE_OWNER | WRITE_DAC | ACCESS_SYSTEM_SECURITY,0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hFile == INVALID_HANDLE_VALUE) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] CreateFile() failed. Error: INVALID_HANDLE_VALUE: "+TransferThread::GetLastErrorStdStr()); + return false; + } + DWORD lasterror = SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION , NULL, NULL, dacl, NULL); + if (lasterror != ERROR_SUCCESS) { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] SetSecurityInfo() failed. Error"+std::to_string(lasterror)); + return false; + } + CloseHandle(hFile); + if(PSecurityD!=NULL) + { + //free(PSecurityD);//crash on some NAS, it's why is commented, http://forum-ultracopier.first-world.info/viewtopic.php?f=8&t=903&p=3689#p3689 + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + return true; + #endif +} + +//retry after error +void TransferThread::putAtBottom() +{ + emit tryPutAtBottom(); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void TransferThread::setRsync(const bool rsync) +{ + this->rsync=rsync; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void TransferThread::setId(int id) +{ + this->id=id; +} +#endif + +void TransferThread::setRenamingRules(const std::string &firstRenamingRule, const std::string &otherRenamingRule) +{ + this->firstRenamingRule=firstRenamingRule; + this->otherRenamingRule=otherRenamingRule; +} + +void TransferThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; +} + +void TransferThread::setRenameTheOriginalDestination(const bool &renameTheOriginalDestination) +{ + this->renameTheOriginalDestination=renameTheOriginalDestination; +} + +void TransferThread::set_updateMount() +{ + driveManagement.tryUpdate(); +} + +bool TransferThread::is_symlink(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExW(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r != FALSE) + { + return fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); + } + else + return false; + #else + return is_symlink(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_symlink(const char * const filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExA(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r != FALSE) + { + return fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); + } + else + return false; + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISLNK(p_statbuf.st_mode)) + return true; + #endif + return false; +} + +bool TransferThread::is_file(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_NORMAL || dwAttrib & FILE_ATTRIBUTE_ARCHIVE) + ); + #else + return is_file(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_file(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY)); + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISREG(p_statbuf.st_mode)) + return true; + return false; + #endif +} + +bool TransferThread::is_dir(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) && + !(dwAttrib & FILE_ATTRIBUTE_REPARSE_POINT)); + #else + return is_dir(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::is_dir(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) && + !(dwAttrib & FILE_ATTRIBUTE_REPARSE_POINT)); + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + if (S_ISDIR(p_statbuf.st_mode)) + return true; + return false; + #endif +} + +bool TransferThread::exists(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesW(TransferThread::toFinalPath(filename).c_str()); + return dwAttrib != INVALID_FILE_ATTRIBUTES; + #else + return exists(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +bool TransferThread::exists(const char * const filename) +{ + #ifdef Q_OS_WIN32 + DWORD dwAttrib = GetFileAttributesA(TransferThread::toFinalPath(filename).c_str()); + return dwAttrib != INVALID_FILE_ATTRIBUTES; + #else + struct stat p_statbuf; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return false; + #endif + return true; +} + +int64_t TransferThread::file_stat_size(const INTERNALTYPEPATH &filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExW(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r == FALSE) + return -1; + int64_t size=fileInfo.nFileSizeHigh; + size<<=32; + size|=fileInfo.nFileSizeLow; + return size; + #else + return file_stat_size(TransferThread::internalStringTostring(filename).c_str()); + #endif +} + +int64_t TransferThread::file_stat_size(const char * const filename) +{ + #ifdef Q_OS_WIN32 + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExA(TransferThread::toFinalPath(filename).c_str(), GetFileExInfoStandard, &fileInfo); + if(r == FALSE) + return -1; + int64_t size=fileInfo.nFileSizeHigh; + size<<=32; + size|=fileInfo.nFileSizeLow; + return size; + #else + struct stat p_statbuf; + if (stat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return -1; + if (lstat(filename, &p_statbuf) < 0) + //if error or file not exists, considere as regular file + return -1; + return p_statbuf.st_size; + #endif +} + +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector<INTERNALTYPEPATH> &list) +{ + std::vector<dirent_uc> listTemp; + if(!TransferThread::entryInfoList(path,listTemp)) + return false; + for(const dirent_uc &u : listTemp) + list.push_back(u.d_name); + return true; +} + +bool TransferThread::rmdir(const INTERNALTYPEPATH &path) +{ + #ifdef Q_OS_WIN32 + return RemoveDirectoryW(TransferThread::toFinalPath(path).c_str()); + #else + return ::rmdir(TransferThread::internalStringTostring(path).c_str())==0; + #endif +} + +#ifdef Q_OS_UNIX +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector<dirent_uc> &list) +{ + DIR *dp; + struct dirent *ep; + dp=opendir(TransferThread::internalStringTostring(path).c_str()); + if(dp!=NULL) + { + do { + ep=readdir(dp); + if(ep!=NULL) + { + const std::string name(ep->d_name); + if(name!="." && name!="..") + { + dirent_uc tempValue; + #if defined(__HAIKU__) + struct stat sp; + memset(&sp,0,sizeof(sp)); + if(stat((TransferThread::internalStringTostring(path)+"/"+name).c_str(), &sp)==0) + tempValue.isFolder=S_ISDIR(sp.st_mode); + else + return false; + #else + tempValue.isFolder=ep->d_type==DT_DIR; + #endif + tempValue.d_name=TransferThread::stringToInternalString(ep->d_name); + list.push_back(tempValue); + } + } + } while(ep!=NULL); + (void) closedir(dp); + return true; + } + return false; +} +#else +bool TransferThread::entryInfoList(const INTERNALTYPEPATH &path,std::vector<dirent_uc> &list) +{ + HANDLE hFind = NULL; + #ifdef WIDESTRING + WIN32_FIND_DATAW fdFile; + if((hFind = FindFirstFileW((TransferThread::toFinalPath(path)+L"\\*").c_str(), &fdFile)) == INVALID_HANDLE_VALUE) + #else + WIN32_FIND_DATAA fdFile; + char finalpath[MAX_PATH]; + strcpy(finalpath,path.c_str()); + strcat(finalpath,"\\*"); + if((hFind = FindFirstFileW(finalpath, &fdFile)) == INVALID_HANDLE_VALUE) + #endif + return false; + do + { + #ifdef WIDESTRING + if(wcscmp(fdFile.cFileName, L".")!=0 && wcscmp(fdFile.cFileName, L"..")!=0) + #else + if(strcmp(fdFile.cFileName, ".")!=0 && strcmp(fdFile.cFileName, "..")!=0) + #endif + { + dirent_uc tempValue; + tempValue.isFolder= + (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + !(fdFile.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + ; + tempValue.d_name=fdFile.cFileName; + tempValue.size=fdFile.nFileSizeHigh; + tempValue.size<<=32; + tempValue.size|=fdFile.nFileSizeLow; + list.push_back(tempValue); + } + } + while(FindNextFileW(hFind, &fdFile)); + FindClose(hFind); + return true; +} +#endif + +void TransferThread::setMkFullPath(const bool mkFullPath) +{ + this->mkFullPath=mkFullPath; +} + +/*int TransferThread::fseeko64(FILE *__stream, uint64_t __off, int __whence) +{ + #if defined(__HAIKU__) || defined(Q_OS_MAC) || defined(ANDROID) || defined(__ANDROID_API__) + return ::fseeko(__stream,__off,__whence); + #else + return ::fseeko64(__stream,__off,__whence); + #endif +} + +int TransferThread::ftruncate64(int __fd, uint64_t __length) +{ + #if defined(__HAIKU__) || defined(Q_OS_MAC) || defined(ANDROID) || defined(__ANDROID_API__) + return ::ftruncate(__fd,__length); + #else + //return ::ftruncate64(__fd,__length); + return ::ftruncate(__fd,__length); + #endif +}*/ + +int64_t TransferThread::transferTime() const +{ + return startTransferTime.elapsed(); +} + +#ifdef Q_OS_WIN32 +std::wstring TransferThread::toFinalPath(std::wstring path) +{ + if(path.size()==2 && path.at(1)==L':') + path+=L"\\"; + stringreplaceAll(path,L"/",L"\\"); + std::wstring pathW; + if(path.size()>2 && path.substr(0,2)==L"\\\\")//nas + pathW=L"\\\\?\\UNC\\"+path.substr(2); + else + pathW=L"\\\\?\\"+path; + return pathW; +} + +std::string TransferThread::toFinalPath(std::string path) +{ + if(path.size()==2 && path.at(1)==':') + path+="\\"; + stringreplaceAll(path,"/","\\"); + std::string pathW; + if(path.size()>2 && path.substr(0,2)=="\\\\")//nas + pathW="\\\\?\\UNC\\"+path.substr(2); + else + pathW="\\\\?\\"+path; + return pathW; +} + +bool TransferThread::unlink(const std::wstring &path) +{ + return DeleteFileW(TransferThread::toFinalPath(path).c_str()) || RemoveDirectoryW(TransferThread::toFinalPath(path).c_str()); +} + +std::string TransferThread::GetLastErrorStdStr() +{ + DWORD error = GetLastError(); + if (error) + { + LPVOID lpMsgBuf; + DWORD bufLen = FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_DEFAULT), + (LPSTR) &lpMsgBuf, + 0, NULL ); + if (bufLen) + { + std::string result((char *)lpMsgBuf, (int)bufLen); + LocalFree(lpMsgBuf); + return result+" ("+std::to_string(error)+")"; + } + return "1: "+std::to_string(error); + } + return "2: "+std::to_string(error); +} +#else +bool TransferThread::unlink(const INTERNALTYPEPATH &path) +{ + return ::unlink(internalStringTostring(path).c_str())==0; +} +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h new file mode 100755 index 0000000..42db854 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/TransferThread.h @@ -0,0 +1,265 @@ +/** \file TransferThread.h +\brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QObject> +#include <QTime> +#include <QThread> + +#include <regex> +#include <vector> +#include <string> +#include <utility> +#include <dirent.h> +#include <atomic> + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +//defore the next define +#include "CopyEngineUltracopier-SpecVariable.h" + +#ifdef Q_OS_UNIX + #include <utime.h> + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> +#endif +#ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #include <utime.h> + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> + #endif +#endif + +#ifdef Q_OS_WIN32 +#include <windows.h> +#endif + +#include "Environment.h" +#include "DriveManagement.h" +#include "StructEnumDefinition_CopyEngine.h" + +#ifndef TRANSFERTHREAD_H +#define TRANSFERTHREAD_H + +/// \brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +class TransferThread : public QThread +{ + Q_OBJECT +public: + explicit TransferThread(); + ~TransferThread(); + /// \brief get transfer stat + TransferStat getStat() const; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + #endif + /// \brief get the transfer time in ms + int64_t transferTime() const; + /// \brief to store the transfer id + std::atomic<uint64_t> transferId; + /// \brief to store the transfer size + uint64_t transferSize; + + //not copied size, ... + #ifdef Q_OS_WIN32 + static std::string resolvedName(std::string inode); + static std::wstring resolvedName(std::wstring inode); + #else + static std::string resolvedName(const std::string &inode); + static std::wstring resolvedName(const std::wstring &inode); + #endif + INTERNALTYPEPATH getSourcePath() const; + INTERNALTYPEPATH getDestinationPath() const; + Ultracopier::CopyMode getMode() const; + // \warning check mkpath() call should not exists because only existing dest is allowed now + #ifdef Q_OS_UNIX + static bool mkpath(const INTERNALTYPEPATH &file_path, const mode_t &mode=0755); + static bool mkdir(const INTERNALTYPEPATH &file_path, const mode_t &mode=0755); + #else + static bool mkpath(const INTERNALTYPEPATH &file_path); + static bool mkdir(const INTERNALTYPEPATH &file_path); + #endif + #ifdef WIDESTRING + static INTERNALTYPEPATH stringToInternalString(const std::string& utf8); + static std::string internalStringTostring(const INTERNALTYPEPATH& utf16); + #else + static std::string stringToInternalString(const std::string& utf8); + static std::string internalStringTostring(const std::string& utf16); + #endif + #ifdef Q_OS_WIN32 + static std::wstring toFinalPath(std::wstring path); + static std::string toFinalPath(std::string path); + static bool unlink(const std::wstring &path); + static std::string GetLastErrorStdStr(); + #else + static bool unlink(const INTERNALTYPEPATH &path);//return true if sucess + #endif + + static int64_t readFileMDateTime(const INTERNALTYPEPATH &source); + static bool is_symlink(const char * const filename); + static bool is_symlink(const INTERNALTYPEPATH &filename); + static bool is_file(const char * const filename); + static bool is_file(const INTERNALTYPEPATH &filename); + static bool is_dir(const char * const filename); + static bool is_dir(const INTERNALTYPEPATH &filename); + static bool exists(const char * const filename); + static bool exists(const INTERNALTYPEPATH &filename); + static int64_t file_stat_size(const INTERNALTYPEPATH &filename); + static int64_t file_stat_size(const char * const filename); + static bool entryInfoList(const INTERNALTYPEPATH &path, std::vector<INTERNALTYPEPATH> &list); + static bool rmdir(const INTERNALTYPEPATH &path); + struct dirent_uc + { + #ifdef Q_OS_WIN32 + int64_t size; + #endif + INTERNALTYPEPATH d_name; + bool isFolder; + }; + static bool entryInfoList(const INTERNALTYPEPATH &path, std::vector<dirent_uc> &list); + void setMkFullPath(const bool mkFullPath); + /*static int fseeko64(FILE *__stream, uint64_t __off, int __whence); + static int ftruncate64(int __fd, uint64_t __length);*/ + static bool rename(const INTERNALTYPEPATH &source, const INTERNALTYPEPATH &destination); +protected: + void run(); + virtual void resetExtraVariable(); + bool isSame(); + bool destinationExists(); + + //different pre-operation + bool checkAlwaysRename();///< return true if has been renamed + bool canBeMovedDirectly() const; + bool canBeCopiedDirectly() const; + + //fonction to edit the file date time + bool readSourceFileDateTime(const INTERNALTYPEPATH &source); + bool writeDestinationFileDateTime(const INTERNALTYPEPATH &destination); + bool readSourceFilePermissions(const INTERNALTYPEPATH &source); + bool writeDestinationFilePermissions(const INTERNALTYPEPATH &destination); +signals: + //internal signal + void internalStartPostOperation() const; + void internalStartPreOperation() const; + //force into the right thread + void internalTryStartTheTransfer() const; + //to send state + void preOperationStopped() const; + void checkIfItCanBeResumed() const; + //void transferStarted();//not sended (and not used then) + void readStopped() const; + void writeStopped() const; + void postOperationStopped() const; + //get dialog + void fileAlreadyExists(const INTERNALTYPEPATH &info,const INTERNALTYPEPATH &info2,const bool &isSame) const; + void errorOnFile(const INTERNALTYPEPATH &info,const std::string &string,const ErrorType &errorType=ErrorType_Normal) const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + void tryPutAtBottom() const; + /// \brief update the transfer stat + void pushStat(const TransferStat &stat,const uint64_t &pos) const; +public slots: + /// \brief to set files to transfer + virtual bool setFiles(const INTERNALTYPEPATH& source,const int64_t &size,const INTERNALTYPEPATH& destination,const Ultracopier::CopyMode &mode); + /// \brief to set the new name of the destination + void setFileRename(const std::string &nameForRename); + /// \brief to start the transfer of data + void setAlwaysFileExistsAction(const FileExistsAction &action); + /// \brief set the copy info and options before runing + void setRightTransfer(const bool doRightTransfer); + /// \brief set buffer + virtual void setBuffer(const bool buffer); + /// \brief set keep date + void setKeepDate(const bool keepDate); + /// \brief put the current file at bottom + void putAtBottom(); + + #ifdef ULTRACOPIER_PLUGIN_RSYNC + void setRsync(const bool rsync); + #endif + + void setRenamingRules(const std::string &firstRenamingRule,const std::string &otherRenamingRule); + + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + void setRenameTheOriginalDestination(const bool &renameTheOriginalDestination); + void set_updateMount(); +protected: + enum MoveReturn + { + MoveReturn_skip=0, + MoveReturn_moved=1, + MoveReturn_error=2 + }; + + Ultracopier::CopyMode mode; + std::atomic<TransferStat> transfer_stat; + bool doRightTransfer; + #ifdef ULTRACOPIER_PLUGIN_RSYNC + bool rsync; + #endif + bool keepDate; + bool mkFullPath; + volatile bool stopIt; + #ifdef Q_OS_WIN32 + int stopItWin; + #endif + DriveManagement driveManagement; + volatile bool canStartTransfer; + bool retry; + INTERNALTYPEPATH source; + INTERNALTYPEPATH destination; + int64_t size; + FileExistsAction fileExistsAction; + FileExistsAction alwaysDoFileExistsAction; + bool needSkip,needRemove; + int id; + bool deletePartiallyTransferredFiles; + std::string firstRenamingRule; + std::string otherRenamingRule; + //error management + bool renameTheOriginalDestination; + bool fileContentError; + bool doTheDateTransfer; + int parallelizeIfSmallerThan; + //error management + bool writeError; + bool readError; + std::regex renameRegex; + #ifdef Q_OS_UNIX + utimbuf butime; + #else + #ifdef Q_OS_WIN32 + FILETIME ftCreate, ftAccess, ftWrite; + std::regex regRead; + #else + #error Not unix, not windows, fix this + #endif + #endif + #ifdef Q_OS_UNIX + struct stat permissions; + #else + PSECURITY_DESCRIPTOR PSecurityD; + PACL dacl; + #endif + bool havePermission; + //to send state + bool sended_state_preOperationStopped; + //different post-operation + bool doFilePostOperation(); +protected: + QTime startTransferTime; + bool haveTransferTime; +}; + +#endif // TRANSFERTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp new file mode 100755 index 0000000..d83e8ff --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.cpp @@ -0,0 +1,883 @@ +#include "ReadThread.h" +#include "../TransferThread.h" + +#ifdef Q_OS_LINUX +#include <fcntl.h> +#endif + +#ifdef Q_OS_UNIX +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> +#include <fcntl.h> +#endif +#include <iostream> + +ReadThread::ReadThread() +{ + start(); + moveToThread(this); + stopIt=false; + putInPause=false; + blockSize=ULTRACOPIER_PLUGIN_DEFAULT_BLOCK_SIZE*1024; + setObjectName(QStringLiteral("read")); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + isInReadLoop=false; + tryStartRead=false; + lastGoodPosition=0; + isOpen.release(); + + #ifdef Q_OS_UNIX + from=-1; + #else + from=nullptr; + #endif +} + +ReadThread::~ReadThread() +{ + stopIt=true; + //disconnect(this);//-> do into ~TransferThread() + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + pauseMutex.release(); + //if(isOpen.available()<=0) + emit internalStartClose(); + isOpen.acquire(); + exit(); + wait(); +} + +void ReadThread::run() +{ + if(!connect(this,&ReadThread::internalStartOpen, this,&ReadThread::internalOpenSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartReopen, this,&ReadThread::internalReopen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartRead, this,&ReadThread::internalRead, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::internalStartClose, this,&ReadThread::internalCloseSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&ReadThread::checkIfIsWait, this,&ReadThread::isInWait, Qt::QueuedConnection)) + abort(); + exec(); +} + +void ReadThread::openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode) +{ + if(!isRunning()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination"+TransferThread::internalStringTostring(file)); + errorString_internal=tr("Internal error, please report it!").toStdString(); + emit error(); + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] open source: "+TransferThread::internalStringTostring(file)); + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + if(file==this->file) + { + std::cerr << "["+std::to_string(id)+"] Try reopen already opened same file: " << TransferThread::internalStringTostring(file) << std::endl; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+TransferThread::internalStringTostring(file)); + } + else + { + std::cerr << "["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(this->file) << ", can't open " << TransferThread::internalStringTostring(file) << std::endl; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(this->file)); + } + internalCloseSlot(); + /* try bypass the bug + return;//better than hard shutdown + abort(); + emit internalStartClose();*/ + isOpen.acquire(); + isOpen.release(); + } + if(isInReadLoop) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already readding: "+TransferThread::internalStringTostring(file)); + return; + } + if(tryStartRead) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already try read: "+TransferThread::internalStringTostring(file)); + return; + } + stopIt=false; + fakeMode=false; + lastGoodPosition=0; + this->file=file; + this->mode=mode; + emit internalStartOpen(); +} + +std::string ReadThread::errorString() const +{ + return errorString_internal; +} + +void ReadThread::stop() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); + stopIt=true; + pauseMutex.release(); + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + #endif + //if(isOpen.available()<=0 || from>=0) + emit internalStartClose(); +} + +void ReadThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); + if(stopIt) + return; + pauseMutex.tryAcquire(pauseMutex.available()); + putInPause=true; +} + +void ReadThread::resume() +{ + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + putInPause=false; + stopIt=false; + } + else + return; + #ifdef Q_OS_UNIX + if(from<0) + #else + if(from==NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); + return; + } + pauseMutex.release(); +} + +bool ReadThread::seek(const int64_t &position) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with: "+std::to_string(position)); + if((int64_t)position>size()) + return false; + + #ifdef Q_OS_UNIX + if(from<0) + abort();//internal failure + return lseek(from,position,SEEK_SET)==position; + #else + if(from==NULL) + abort();//internal failure + LARGE_INTEGER liSize; + liSize.QuadPart=position; + return SetFilePointerEx(from,liSize,NULL,FILE_BEGIN); + #endif +} + +int64_t ReadThread::size() const +{ + #ifdef Q_OS_UNIX + struct stat st; + if(fstat(from, &st)==0) + return st.st_size; + else + { + struct stat source_statbuf; + #ifdef Q_OS_UNIX + if(lstat(TransferThread::internalStringTostring(file).c_str(), &source_statbuf)==0) + #else + if(stat(TransferThread::internalStringTostring(file).c_str(), &source_statbuf)==0) + #endif + return source_statbuf.st_size; + else + return -1; + } + #else + LARGE_INTEGER lpFileSize; + if(!GetFileSizeEx(from,&lpFileSize)) + { + WIN32_FILE_ATTRIBUTE_DATA sourceW; + if(GetFileAttributesExW(file.c_str(),GetFileExInfoStandard,&sourceW)) + { + uint64_t size=sourceW.nFileSizeHigh; + size<<=32; + size|=sourceW.nFileSizeLow; + return size; + } + else + return -1; + } + else + return lpFileSize.QuadPart; + #endif +} + +void ReadThread::postOperation() +{ + emit internalStartClose(); +} + +bool ReadThread::internalOpenSlot() +{ + return internalOpen(); +} + +bool ReadThread::internalOpen(bool resetLastGoodPosition) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen source: "+ + TransferThread::internalStringTostring(file)+", open in write because move: "+std::to_string(mode==Ultracopier::Move)); + if(stopIt) + { + emit closed(); + return false; + } + putInPause=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] this file is already open: "+TransferThread::internalStringTostring(file)); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + emit closed(); + return false; + } + /*can have permision to remove but not write + * if(mode==Ultracopier::Move) + openMode=QIODevice::ReadWrite;*/ + seekToZero=false; + #ifdef Q_OS_UNIX + from = ::open(TransferThread::internalStringTostring(file).c_str(), O_RDONLY); + #else + DWORD flags=FILE_ATTRIBUTE_NORMAL; + if(os_spec_flags) + flags|=FILE_FLAG_SEQUENTIAL_SCAN; + from=CreateFileW(file.c_str(),GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,flags,NULL); + #endif + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=INVALID_HANDLE_VALUE) + #endif + { + if(stopIt) + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + emit closed(); + return false; + } + pauseMutex.tryAcquire(pauseMutex.available()); + #ifdef Q_OS_LINUX + if(os_spec_flags) + { + posix_fadvise(from, 0, 0, POSIX_FADV_WILLNEED); + posix_fadvise(from, 0, 0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(from, 0, 0, POSIX_FADV_NOREUSE); + } + #endif + if(stopIt) + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + emit closed(); + return false; + } + + //do one at same time + #ifdef Q_OS_UNIX + { + struct stat st; + fstat(from, &st); + size_at_open=st.st_size; + #ifdef Q_OS_MAC + mtime_at_open=st.st_mtimespec.tv_sec; + #else + mtime_at_open=st.st_mtim.tv_sec; + #endif + } + #else + { + LARGE_INTEGER lpFileSize; + GetFileSizeEx(from,&lpFileSize); + size_at_open=lpFileSize.QuadPart; + FILETIME LastWriteTime; + GetFileTime(from,NULL,NULL,&LastWriteTime); + mtime_at_open=LastWriteTime; + } + #endif + + putInPause=false; + if(resetLastGoodPosition) + lastGoodPosition=0; + if(!seek(lastGoodPosition)) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + isOpen.acquire(); + emit opened(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return true; + } + else + { + #ifdef Q_OS_WIN32 + from=NULL; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + DWORD e = GetLastError(); + #endif + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(e)+")" + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } +} + +void ReadThread::internalRead() +{ + if(writeThread==nullptr) + abort(); + isInReadLoop=true; + tryStartRead=false; + if(stopIt) + { + if(seekToZero && + #ifdef Q_OS_WIN32 + from!=NULL + #else + from>=0 + #endif + ) + { + stopIt=false; + lastGoodPosition=0; + seek(0); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + int sizeReaden=0; + #ifdef Q_OS_WIN32 + if(from==NULL) + #else + if(from<0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] is not open!"); + isInReadLoop=false; + return; + } + char * data=NULL; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + numberOfBlockCopied=0; + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start the copy"); + emit readIsStarted(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + do + { + //read one block + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] read put in pause"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + pauseMutex.acquire(); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose(); + return; + } + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Read; + #endif + data=(char *)malloc(blockSize); + if(data==NULL) + { + errorString_internal="Out of memory"; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+"Out of memory" + ); + isInReadLoop=false; + emit error(); + return; + } + #ifdef Q_OS_WIN32 + DWORD lpNumberOfBytesRead=0; + const BOOL retRead=ReadFile(from,data,blockSize, + &lpNumberOfBytesRead,NULL); + sizeReaden=lpNumberOfBytesRead; + #else + sizeReaden=::read(from,data,blockSize); + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + #ifdef Q_OS_WIN32 + if(retRead==FALSE) + #else + if(sizeReaden<0) + #endif + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=tr("Unable to read the source file: ").toStdString()+strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to read the source file: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + isInReadLoop=false; + emit error(); + return; + } + if(sizeReaden>0) + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=WaitWritePipe; + #endif + if(!writeThread->write(data,sizeReaden))//speed limitation here + { + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + if(!stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopped because the write is stopped: "+std::to_string(lastGoodPosition)); + stopIt=true; + } + } + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt == true, then quit"); + isInReadLoop=false; + internalClose();//need re-open the destination and then the source + return; + } + lastGoodPosition+=sizeReaden; + } + /* + if(lastGoodPosition>16*1024) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("[")+QString::number(id)+QStringLiteral("] ")+QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error())); + errorString_internal=QStringLiteral("Test error in reading: %1 (%2)").arg(file.errorString()).arg(file.error()); + isInReadLoop=false; + emit error(); + return; + } + */ + } + while(sizeReaden>0 && !stopIt); + if(lastGoodPosition>size()) + { + errorString_internal=tr("File truncated during the read, possible data change").toStdString(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Source truncated during the read"); + isInReadLoop=false; + emit error(); + return; + } + isInReadLoop=false; + if(stopIt) + { + stopIt=false; + return; + } + postOperation(); + emit readIsStopped();//will product by signal connection writeThread->endIsDetected(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop the read"); +} + +void ReadThread::startRead() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(tryStartRead) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] already in try start"); + return; + } + if(isInReadLoop) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); + else + { + tryStartRead=true; + emit internalStartRead(); + } +} + +void ReadThread::internalCloseSlot() +{ + internalClose(); +} + +void ReadThread::internalClose(bool callByTheDestructor) +{ + /// \note never send signal here, because it's called by the destructor + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[")+QString::number(id)+QStringLiteral("] start")); + bool closeTheFile=false; + if(!fakeMode) + { + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + closeTheFile=true; + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + isInReadLoop=false; + } + } + if(!callByTheDestructor) + emit closed(); + + /// \note always the last of this function + if(closeTheFile) + isOpen.release(); +} + +/** \brief set block size +\param block the new block size in B +\return Return true if succes */ +bool ReadThread::setBlockSize(const int blockSize) +{ + //can be smaller than min block size to do correct speed limitation + if(blockSize>1 && blockSize<ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE*1024) + { + this->blockSize=blockSize; + //set the new max speed because the timer have changed + return true; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); + return false; + } +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT +/*! \brief Set the max speed +\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ +void ReadThread::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + this->multiForBigSpeed=multiForBigSpeed; + waitNewClockForSpeed.release(); +} + +/// \brief For give timer every X ms +void ReadThread::timeOfTheBlockCopyFinished() +{ + /* this is the old way to limit the speed, it product blocking + *if(waitNewClockForSpeed.available()<ULTRACOPIER_PLUGIN_NUMSEMSPEEDMANAGEMENT) + waitNewClockForSpeed.release();*/ + + //try this new way: + /* only if speed limited, else will accumulate waitNewClockForSpeed + * Disabled because: Stop call of this method when no speed limit + if(this->maxSpeed>0)*/ + if(waitNewClockForSpeed.available()<=1) + waitNewClockForSpeed.release(); +} +#endif + +/// \brief do the fake open +void ReadThread::fakeOpen() +{ + fakeMode=true; + emit opened(); +} + +/// \brief do the fake writeIsStarted +void ReadThread::fakeReadIsStarted() +{ + emit readIsStarted(); +} + +/// \brief do the fake writeIsStopped +void ReadThread::fakeReadIsStopped() +{ + postOperation(); + emit readIsStopped(); +} + +int64_t ReadThread::getLastGoodPosition() const +{ + /*if(lastGoodPosition>file.size()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("[")+QString::number(id)+QStringLiteral("] Bug, the lastGoodPosition is greater than the file size!")); + return file.size(); + } + else*/ + return lastGoodPosition; +} + +//reopen after an error +void ReadThread::reopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(isInReadLoop) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] try reopen where read is not finish"); + return; + } + stopIt=true; + emit internalStartReopen(); +} + +bool ReadThread::internalReopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=false; + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + #ifdef Q_OS_UNIX + if(::close(from)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + from=-1; + #else + if(CloseHandle(from)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + from=NULL; + #endif + this->file.clear(); + isOpen.release(); + } + int64_t temp_size=-1; + #ifdef Q_OS_UNIX + uint64_t temp_mtime=0; + { + struct stat st; + if(::stat(TransferThread::internalStringTostring(file).c_str(), &st)!=-1) + { + temp_size=st.st_size; + #ifdef Q_OS_MAC + temp_mtime=st.st_mtimespec.tv_sec; + #else + temp_mtime=st.st_mtim.tv_sec; + #endif + } + } + if(size_at_open!=temp_size || mtime_at_open!=temp_mtime) + #else + FILETIME temp_mtime; + { + LARGE_INTEGER FileSize; + GetFileSizeEx(from,&FileSize); + temp_size=FileSize.QuadPart; + GetFileTime(from,NULL,NULL,&temp_mtime); + } + if(size_at_open!=temp_size || mtime_at_open.dwLowDateTime!=temp_mtime.dwLowDateTime || mtime_at_open.dwHighDateTime!=temp_mtime.dwHighDateTime) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] source file have changed since the last open, restart all"); + //fix this function like the close function + if(internalOpen(true)) + { + emit resumeAfterErrorByRestartAll(); + return true; + } + else + return false; + } + else + { + //fix this function like the close function + if(internalOpen(false)) + { + emit resumeAfterErrorByRestartAtTheLastPosition(); + return true; + } + else + return false; + } + return false; +} + +//set the write thread +void ReadThread::setWriteThread(WriteThread * writeThread) +{ + this->writeThread=writeThread; +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void ReadThread::setId(int id) +{ + this->id=id; +} +#endif + +void ReadThread::seekToZeroAndWait() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=true; + seekToZero=true; + emit checkIfIsWait(); +} + +void ReadThread::isInWait() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + if(seekToZero) + { + stopIt=false; + seekToZero=false; + #ifdef Q_OS_UNIX + if(from>=0) + #else + if(from!=NULL) + #endif + { + lastGoodPosition=0; + seek(0); + } + else + internalOpen(true); + emit isSeekToZeroAndWait(); + } +} + +bool ReadThread::isReading() const +{ + return isInReadLoop; +} + +void ReadThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h new file mode 100755 index 0000000..4de0129 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/ReadThread.h @@ -0,0 +1,163 @@ +/** \file ReadThread.h +\brief Thread changed to open/close and read the source file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef READTHREAD_H +#define READTHREAD_H + +#include <QThread> +#include <QByteArray> +#include <QSemaphore> +#include <QCryptographicHash> + +#ifdef Q_OS_WIN32 +#include <windows.h> +#endif + +#include "WriteThread.h" +#include "../Environment.h" +#include "../StructEnumDefinition_CopyEngine.h" +#include "../CopyEngineUltracopier-SpecVariable.h" + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +/// \brief Thread changed to open/close and read the source file +class ReadThread : public QThread +{ + Q_OBJECT +public: + explicit ReadThread(); + ~ReadThread(); +protected: + void run(); +public: + /// \brief open with the name and copy mode + void openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode); + /// \brief return the error string + std::string errorString() const; + //QByteArray read(qint64 position,qint64 maxSize); + /// \brief stop the copy + void stop(); + /// \brief put the copy in pause + void pause(); + /// \brief resume the copy + void resume(); + /// \brief get the size of the source file + int64_t size() const; + /// \brief get the last good position + int64_t getLastGoodPosition() const; + /// \brief start the reading of the source file + void startRead(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief set the current max speed in KB/s + void setMultiForBigSpeed(const int &multiForBigSpeed); + #endif + /// \brief set block size in KB mostly for speed + bool setBlockSize(const int blockSize); + /// \brief reopen after an error + void reopen(); + /// \brief set the write thread + void setWriteThread(WriteThread * writeThread); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief stat + enum ReadStat + { + Idle=0, + InodeOperation=1, + Read=2, + WaitWritePipe=3 + }; + ReadStat status; + #endif + /// \brief return if it's reading + bool isReading() const; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief executed at regular interval to do a speed throling + void timeOfTheBlockCopyFinished(); + #endif + /// \brief do the fake open + void fakeOpen(); + /// \brief do the fake readIsStarted + void fakeReadIsStarted(); + /// \brief do the fake readIsStopped + void fakeReadIsStopped(); + + void setOsSpecFlags(bool os_spec_flags); +public slots: + /// \brief to reset the copy, and put at the same state when it just open + void seekToZeroAndWait(); + void postOperation(); +signals: + void error() const; + void opened() const; + void readIsStarted() const; + void readIsStopped() const; + void closed() const; + void isSeekToZeroAndWait() const; + void checkIfIsWait() const; + void resumeAfterErrorByRestartAll() const; + void resumeAfterErrorByRestartAtTheLastPosition() const; + // internal signals + void internalStartOpen() const; + void internalStartReopen() const; + void internalStartRead() const; + void internalStartClose() const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; + +private: + std::string errorString_internal; + volatile bool stopIt; + Ultracopier::CopyMode mode; + bool os_spec_flags; + int64_t lastGoodPosition; + volatile int blockSize;//in Bytes + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QSemaphore waitNewClockForSpeed; + volatile int numberOfBlockCopied; ///< Multiple for count the number of block copied + volatile int multiForBigSpeed; ///< Multiple for count the number of block needed + #endif + WriteThread* writeThread; + int id; + QSemaphore isOpen; + QSemaphore pauseMutex; + volatile bool putInPause; + volatile bool isInReadLoop; + volatile bool seekToZero; + volatile bool tryStartRead; + int64_t size_at_open; + #ifdef Q_OS_UNIX + uint64_t mtime_at_open; + #else + FILETIME mtime_at_open; + #endif + bool fakeMode; + //internal function + bool seek(const int64_t &position);/// \todo search if is use full + + #ifdef Q_OS_UNIX + int from; + #else + HANDLE from; + #endif + INTERNALTYPEPATH file; +private slots: + bool internalOpen(bool resetLastGoodPosition=true); + bool internalOpenSlot(); + bool internalReopen(); + void internalRead(); + void internalClose(bool callByTheDestructor=false); + void internalCloseSlot(); + void isInWait(); +}; + +#endif // READTHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp new file mode 100755 index 0000000..b5af928 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp @@ -0,0 +1,1442 @@ +//presume bug linked as multple paralelle inode to resume after "overwrite" +//then do overwrite node function to not re-set the file name + +#include "TransferThreadAsync.h" +#include <string> +#include <dirent.h> + +#ifdef Q_OS_WIN32 +#include <accctrl.h> +#include <aclapi.h> +#include <winbase.h> + +#define REPARSE_MOUNTPOINT_HEADER_SIZE 8 + +typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + } DUMMYUNIONNAME; +} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; + +/*memo> HANDLE hToken = NULL; +TOKEN_PRIVILEGES tp; +try { + if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) throw ::GetLastError(); + if (!::LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid)) throw ::GetLastError(); + tp.PrivilegeCount = 1; + tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + if (!::AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL)) throw ::GetLastError(); +} +catch (DWORD) { + ok=false; +} +if (hToken) + ::CloseHandle(hToken);*/ +#endif + +#include "../../../../cpp11addition.h" + +#ifndef Q_OS_WIN32 +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#endif + +TransferThreadAsync::TransferThreadAsync() : + transferProgression(0) +{ + haveStartTime=false; + #ifndef Q_OS_UNIX + PSecurityD=NULL; + dacl=NULL; + #endif + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+QStringLiteral("] start: ")+QString::number((qint64)QThread::currentThreadId()))); + //the error push + readThread.setWriteThread(&writeThread); + + TransferThread::run(); + if(!connect(this,&TransferThreadAsync::internalStartPostOperation, this, &TransferThreadAsync::doFilePostOperation, Qt::QueuedConnection)) + abort(); + + //the thread change operation + if(!connect(this,&TransferThread::internalStartPreOperation, this, &TransferThreadAsync::preOperation, Qt::QueuedConnection)) + abort(); + if(!connect(this,&TransferThread::internalStartPostOperation, this, &TransferThreadAsync::postOperation, Qt::QueuedConnection)) + abort(); + if(!connect(this,&TransferThread::internalTryStartTheTransfer, this, &TransferThreadAsync::internalStartTheTransfer, Qt::QueuedConnection)) + abort(); + + //the error push + if(!connect(&readThread,&ReadThread::error, this, &TransferThreadAsync::read_error, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::error, this, &TransferThreadAsync::write_error, Qt::QueuedConnection)) + abort(); + //the state change operation + if(!connect(&readThread,&ReadThread::readIsStopped, this, &TransferThreadAsync::read_readIsStopped, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::readIsStopped, &writeThread, &WriteThread::endIsDetected, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::closed, this, &TransferThreadAsync::read_closed, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::closed, this, &TransferThreadAsync::write_closed, Qt::QueuedConnection)) + abort(); + + if(!connect(this, &TransferThreadAsync::openRead,&readThread,&ReadThread::openRead, Qt::QueuedConnection)) + abort(); + if(!connect(this, &TransferThreadAsync::openWrite,&writeThread,&WriteThread::openWrite, Qt::QueuedConnection)) + abort(); + + //when both is ready, startRead() + if(!connect(&readThread,&ReadThread::opened, this, &TransferThreadAsync::read_opened, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::opened, this, &TransferThreadAsync::write_opened, Qt::QueuedConnection)) + abort(); + + //error management +/* if(!connect(&readThread,&ReadThread::isSeekToZeroAndWait, this, &TransferThreadAsync::readThreadIsSeekToZeroAndWait, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::resumeAfterErrorByRestartAtTheLastPosition,this, &TransferThreadAsync::readThreadResumeAfterError, Qt::QueuedConnection)) + abort(); + if(!connect(&readThread,&ReadThread::resumeAfterErrorByRestartAll,&writeThread, &WriteThread::flushAndSeekToZero, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::flushedAndSeekedToZero, this, &TransferThread::readThreadResumeAfterError, Qt::QueuedConnection)) + abort();*/ + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!connect(&readThread,&ReadThread::debugInformation, this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&writeThread,&WriteThread::debugInformation, this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + if(!connect(&driveManagement,&DriveManagement::debugInformation,this, &TransferThreadAsync::debugInformation, Qt::QueuedConnection)) + abort(); + #endif + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: "+std::to_string((int64_t)QThread::currentThreadId())); + start(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop: "+std::to_string((int64_t)QThread::currentThreadId())); +} + +TransferThreadAsync::~TransferThreadAsync() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + readThread.stop(); + readThread.exit(); + readThread.wait(); + writeThread.stop(); + writeThread.exit(); + writeThread.wait(); + exit(0); + wait(); + //else cash without this disconnect + //disconnect(&readThread); + //disconnect(&writeThread); + #ifndef Q_OS_UNIX + if(PSecurityD!=NULL) + { + //free(PSecurityD); + PSecurityD=NULL; + } + if(dacl!=NULL) + { + //free(dacl); + dacl=NULL; + } + #endif +} + +void TransferThreadAsync::run() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: "+std::to_string((int64_t)QThread::currentThreadId())); + moveToThread(this); + exec(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop: "+std::to_string((int64_t)QThread::currentThreadId())); +} + +void TransferThreadAsync::startTheTransfer() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transferId==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert if transferId==0")); + return; + } + startTransferTime.restart(); + haveTransferTime=true; + emit internalTryStartTheTransfer(); +} + +void TransferThreadAsync::internalStartTheTransfer() +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(QThread::currentThread()!=this) + abort(); + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_Idle) + { + if(mode!=Ultracopier::Move) + { + /// \bug can pass here because in case of direct move on same media, it return to idle stat directly + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at idle")); + } + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_PostOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at PostOperation")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(transfer_stat==TransferStat_Transfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] can't start transfert at Transfer")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start")); + if(canStartTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] canStartTransfer is already set to true")); + // call for second time, first time was not ready, if blocked in preop why? + //ifCanStartTransfer(); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] check how start the transfer")); + canStartTransfer=true; + + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] start directly the transfer")); + ifCanStartTransfer(); +} + +bool TransferThreadAsync::setFiles(const INTERNALTYPEPATH& source, const int64_t &size, const INTERNALTYPEPATH& destination, const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start, source: "+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + if(transfer_stat!=TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+TransferThread::internalStringTostring(source)+ + ", destination: "+TransferThread::internalStringTostring(destination)); + return false; + } + if(!isRunning()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] The current thread is not running"); + if(!TransferThread::setFiles(source,size,destination,mode)) + return false; + transferProgression=0; + //transferSize=0;//set by ListThread at currentTransferThread->transferSize=currentActionToDoTransfer.size; very important to do parallel small file + sended_state_readStopped=false; + readIsClosedVariable=false; + writeIsClosedVariable=false; + readIsOpenVariable=false; + writeIsOpenVariable=false; + realMove=false; + return true; +} + +void TransferThreadAsync::resetExtraVariable() +{ + transferProgression=0; + readIsOpenVariable=false; + writeIsOpenVariable=false; + TransferThread::resetExtraVariable(); +} + +bool TransferThreadAsync::remainFileOpen() const +{ + return remainSourceOpen() || remainDestinationOpen(); +} + +bool TransferThreadAsync::remainSourceOpen() const +{ + return !readIsClosedVariable; +} + +bool TransferThreadAsync::remainDestinationOpen() const +{ + return !writeIsClosedVariable; +} + +void TransferThreadAsync::preOperation() +{ + if(transfer_stat!=TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination) + +" transfer_stat: "+std::to_string(transfer_stat)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start: source: "+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + haveStartTime=true; + needRemove=false; + if(isSame()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] is same "+ + TransferThread::internalStringTostring(source)+" than "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after is same"); + /*Why this code? + if(readError) + { + readError=false; + return; + }*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before destination exists"); + if(destinationExists()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] destination exists: "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after destination exists"); + /*Why this code? + if(readError) + { + readError=false; + return; + }*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before keep date"); + #ifdef Q_OS_WIN32 + doTheDateTransfer=!is_symlink(source); + #else + doTheDateTransfer=true; + #endif + if(doTheDateTransfer) + { + doTheDateTransfer=readSourceFileDateTime(source); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after keep date"); + #ifdef Q_OS_MAC + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] read the source time: "+std::to_string(butime.modtime)); + #endif + if(!doTheDateTransfer) + { + //will have the real error at source open + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to read the source time: "+TransferThread::internalStringTostring(source)); + if(keepDate) + { + emit errorOnFile(source,tr("Wrong modification date or unable to get it, you can disable time transfer to do it").toStdString()); + return; + } + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before perm"); + if(doRightTransfer) + havePermission=readSourceFilePermissions(source); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after perm"); + transfer_stat=TransferStat_WaitForTheTransfer; + ifCanStartTransfer(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit preOperationStopped()"); + emit preOperationStopped(); +} + +void TransferThreadAsync::postOperation() +{ + doFilePostOperation(); +} + +#ifdef Q_OS_WIN32 +DWORD CALLBACK progressRoutine( + LARGE_INTEGER TotalFileSize, + LARGE_INTEGER TotalBytesTransferred, + LARGE_INTEGER StreamSize, + LARGE_INTEGER StreamBytesTransferred, + DWORD dwStreamNumber, + DWORD dwCallbackReason, + HANDLE hSourceFile, + HANDLE hDestinationFile, + LPVOID lpData +) +{ + (void)TotalFileSize; + (void)TotalBytesTransferred; + (void)StreamSize; + (void)StreamBytesTransferred; + (void)dwStreamNumber; + (void)dwCallbackReason; + (void)hSourceFile; + (void)hDestinationFile; + (void)lpData; + + static_cast<TransferThreadAsync *>(lpData)->setProgression(TotalBytesTransferred.QuadPart,TotalFileSize.QuadPart); + return PROGRESS_CONTINUE; +} + +void TransferThreadAsync::setProgression(const uint64_t &pos, const uint64_t &size) +{ + if(transfer_stat==TransferStat_Transfer) + { + if(pos==size) + emit readStopped(); + transferProgression=pos; + } +} +#endif + +/// \brief set buffer +void TransferThreadAsync::setBuffer(const bool buffer) +{ + writeThread.buffer=buffer; +} + +void TransferThreadAsync::ifCanStartTransfer() +{ + realMove=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start "+internalStringTostring(source)+"->"+internalStringTostring(destination)); + if(transfer_stat!=TransferStat_WaitForTheTransfer /*wait preoperation*/ || !canStartTransfer/*wait start call*/) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+ + "] transfer_stat:"+std::to_string(transfer_stat)+ + ", canStartTransfer: "+std::to_string(canStartTransfer)); + //preOperationStopped();//tiger to seam maybe is can be started, maybe this generate a bug + return; + } + transfer_stat=TransferStat_Transfer; + + #ifdef WIDESTRING + const size_t destinationIndex=destination.rfind(L'/'); + if(destinationIndex!=std::string::npos && destinationIndex<destination.size()) + { + const std::wstring &path=destination.substr(0,destinationIndex); + if(!is_dir(path)) + if(!TransferThread::mkpath(path)) + { + #ifdef Q_OS_WIN32 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to create the destination folder: "+internalStringTostring(path)+" "+TransferThread::GetLastErrorStdStr()); + emit errorOnFile(destination,tr("Unable to create the destination folder: ").toStdString()+TransferThread::GetLastErrorStdStr()); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to create the destination folder: "+internalStringTostring(path)+" "+std::to_string(errno)); + emit errorOnFile(destination,tr("Unable to create the destination folder, errno: %1").arg(QString::number(errno)).toStdString()); + #endif + return; + } + } + #else + const size_t destinationIndex=destination.rfind('/'); + if(destinationIndex!=std::string::npos && destinationIndex<destination.size()) + { + const std::string &path=destination.substr(0,destinationIndex); + if(!is_dir(path)) + if(!TransferThread::mkpath(path)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to create the destination folder: "+path); + #ifdef Q_OS_WIN32 + emit errorOnFile(destination,tr("Unable to create the destination folder: ")+TransferThread::GetLastErrorStdStr()); + #else + emit errorOnFile(destination,tr("Unable to create the destination folder, errno: %1").arg(QString::number(errno)).toStdString()); + #endif + return; + } + } + #endif + + /* http://www.flexhex.com/docs/articles/hard-links.phtml + * Do here the smblink logic + * Under windows: BOOLEAN CreateSymbolicLinkA( + LPCSTR lpSymlinkFileName, + LPCSTR lpTargetFileName, + DWORD dwFlags + unix: int symlink(const char *target, const char *linkpath); +); + + */ + + emit pushStat(transfer_stat,transferId); + realMove=(mode==Ultracopier::Move && driveManagement.isSameDrive( + internalStringTostring(source), + internalStringTostring(destination) + )); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start copy"); + needRemove=true; + bool successFull=false; + readError=false; + writeError=false; + if(realMove) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start real move"); + successFull=TransferThread::rename(source,destination); + #ifdef Q_OS_UNIX + if(!successFull && errno==18) + { + //try full move + realMove=false; + openRead(source,mode); + openWrite(destination,0); + return; + } + #endif + } + else + { + #ifdef Q_OS_WIN32 + bool isJunction=false; + bool isSymlink=false; + WIN32_FILE_ATTRIBUTE_DATA fileInfo; + BOOL r = GetFileAttributesExW(TransferThread::toFinalPath(source).c_str(), GetFileExInfoStandard, &fileInfo); + if(r != FALSE) + { + /*isJunction = fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT);*/ + isSymlink = fileInfo.dwFileAttributes != INVALID_FILE_ATTRIBUTES && + (fileInfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); + } + if(isSymlink) + { + BYTE buf[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; + REPARSE_DATA_BUFFER& ReparseBuffer = (REPARSE_DATA_BUFFER&)buf; + DWORD dwRet=0; + HANDLE hDir = ::CreateFile(TransferThread::toFinalPath(source).c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hDir != INVALID_HANDLE_VALUE) + { + BOOL ioc = ::DeviceIoControl(hDir, FSCTL_GET_REPARSE_POINT, NULL, 0, &ReparseBuffer, + MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &dwRet, NULL); + ::CloseHandle(hDir); + if(ioc!=FALSE) + { + if(ReparseBuffer.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) + { + //printf("%S\n",ReparseBuffer.MountPointReparseBuffer.PathBuffer); + isJunction=true; + } + else + { + //printf("%S\n",ReparseBuffer.SymbolicLinkReparseBuffer.PathBuffer); + } + } + else + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + } + else + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + if(isJunction)//junction + { + std::wstring cleanPath(ReparseBuffer.MountPointReparseBuffer.PathBuffer); + if(cleanPath.substr(0,4)==L"\\??\\") + cleanPath=cleanPath.substr(4); + successFull=TransferThreadAsync::mkJunction( + TransferThread::toFinalPath(destination).c_str(), + cleanPath.c_str() + ); + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + else//symlink or symlinkD + { + successFull=CopyFileExW(TransferThread::toFinalPath(source).c_str(),TransferThread::toFinalPath(destination).c_str(), + (LPPROGRESS_ROUTINE)progressRoutine,this,&stopItWin,COPY_FILE_ALLOW_DECRYPTED_DESTINATION | 0x00000800);//0x00000800 is COPY_FILE_COPY_SYMLINK + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + } + else + #else + if(TransferThread::is_symlink(source)) + { + realMove=true; + bool isFileOrSymlink=false; + { + struct stat p_statbuf; + if (lstat(TransferThread::internalStringTostring(destination).c_str(), &p_statbuf) < 0) + {} + else if (S_ISLNK(p_statbuf.st_mode)) + isFileOrSymlink=true; + else if (S_ISREG(p_statbuf.st_mode)) + isFileOrSymlink=true; + } + if(isFileOrSymlink) + if(!unlink(destination)) + { + const int terr=errno; + if(terr!=2) + { + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=false; + writeError=true; + emit errorOnFile(destination,strError); + return; + } + } + char buf[PATH_MAX]; + const ssize_t s=readlink(TransferThread::internalStringTostring(source).c_str(),buf,sizeof(buf)); + buf[s]=0x00; + if(s<0) + { + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=true; + writeError=false; + emit errorOnFile(source,strError); + return; + } + else + { + if(symlink(buf,TransferThread::internalStringTostring(destination).c_str())!=0) + { + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + buf+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + readError=true; + writeError=false; + emit errorOnFile(destination,strError); + return; + } + } + successFull=true; + } + else + #endif + { + #ifdef Q_OS_WIN32 + if(native_copy) + { + successFull=CopyFileExW(TransferThread::toFinalPath(source).c_str(),TransferThread::toFinalPath(destination).c_str(), + (LPPROGRESS_ROUTINE)progressRoutine,this,&stopItWin,COPY_FILE_ALLOW_DECRYPTED_DESTINATION | 0x00000800);//0x00000800 is COPY_FILE_COPY_SYMLINK + if(successFull==FALSE) + { + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + } + } + else + #endif + { + openRead(source,mode); + openWrite(destination,0); + return; + } + } + } + if(!successFull) + { + #ifdef Q_OS_WIN32 + const std::string &strError=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error: "+ + GetLastErrorStdStr()+" "+TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError + ); + #else + const int terr=errno; + const std::string &strError=strerror(terr); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stop copy in error "+ + TransferThread::internalStringTostring(source)+"->"+TransferThread::internalStringTostring(destination)+ + " "+strError+"("+std::to_string(terr)+")" + ); + #endif + if(stopIt) + { + if(!source.empty()) + if(exists(source) && source!=destination) + unlink(destination); + resetExtraVariable(); + return;//and reset? + } + #ifdef Q_OS_WIN32 + readError=true; + writeError=true; + emit errorOnFile(destination,strError); + #else + if(readError) + emit errorOnFile(source,strError); + else + emit errorOnFile(destination,strError); + #endif + return; + } + readIsClosedVariable=true; + writeIsClosedVariable=true; + checkIfAllIsClosedAndDoOperations(); +} + +void TransferThreadAsync::checkIfAllIsClosedAndDoOperations() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop copy"); + if((readError || writeError) && !needSkip && !stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] resolve error before progress"); + return; + } + if(remainFileOpen()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] remainFileOpen()"); + return; + } + if(!source.empty() && needRemove && (stopIt || needSkip)) + if(is_file(source) && source!=destination) + unlink(destination); + transfer_stat=TransferStat_Idle; + + transferSize=readThread.getLastGoodPosition(); + + if(mode==Ultracopier::Move && !realMove) + if(exists(destination)) + if(!unlink(source)) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] move and unable to remove: "+ + TransferThread::internalStringTostring(source)+ + #ifdef Q_OS_WIN32 + GetLastErrorStdStr() + #else + strerror(errno) + #endif + ); + transfer_stat=TransferStat_PostTransfer; + emit pushStat(transfer_stat,transferId); + transfer_stat=TransferStat_PostOperation; + emit pushStat(transfer_stat,transferId); + doFilePostOperation(); + + source.clear(); + destination.clear(); + resetExtraVariable(); + //don't need remove because have correctly finish (it's not in: have started) + needRemove=false; + needSkip=false; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit postOperationStopped() transfer_stat=TransferStat_Idle"); + transfer_stat=TransferStat_Idle; + emit postOperationStopped(); +} + +//stop the current copy +void TransferThreadAsync::stop() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + haveStartTime=false; + if(transfer_stat==TransferStat_Idle) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] transfer_stat==TransferStat_Idle"); + return; + } + if(transfer_stat==TransferStat_PreOperation) + { + transfer_stat=TransferStat_Idle; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] transfer_stat==TransferStat_PreOperation"); + return; + } + if(realMove) + { + if(readError || writeError) + transfer_stat=TransferStat_Idle; + return; + } + readThread.stop(); + writeThread.stop(); +} + +//retry after error +void TransferThreadAsync::retryAfterError() +{ + /// \warning skip the resetExtraVariable(); to be more exact and resolv some bug + if(transfer_stat==TransferStat_Idle) + { + if(transferId==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+ + ("] seam have bug, source: ")+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] restart all, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)); + readError=false; + //writeError=false; + emit internalStartPreOperation(); + return; + } + //opening error + if(transfer_stat==TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] is not idle, source: "+TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)+ + ", stat: "+std::to_string(transfer_stat)); + readError=false; + //writeError=false; + emit internalStartPreOperation(); + //tryOpen();-> recheck all, because can be an error into isSame(), rename(), ... + return; + } + //data streaming error + if(transfer_stat!=TransferStat_PostOperation && transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] is not in right stat, source: ")+ + TransferThread::internalStringTostring(source)+", destination: "+TransferThread::internalStringTostring(destination)+", stat: "+std::to_string(transfer_stat)); + return; + } + if(transfer_stat==TransferStat_PostOperation) + { + emit internalStartPostOperation(); + return; + } + emit internalTryStartTheTransfer(); +} + +//skip the copy +void TransferThreadAsync::skip() +{ + #ifdef Q_OS_WIN32 + stopItWin=1; + #endif + stopIt=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with stat: "+std::to_string(transfer_stat)); + switch(static_cast<TransferStat>(transfer_stat)) + { + case TransferStat_WaitForTheTransfer: + //needRemove=true;never put that's here, can product destruction of the file + case TransferStat_PreOperation: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + needSkip=true; + //check if all is source and destination is closed + if(remainFileOpen()) + { + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + resetExtraVariable(); + break; + case TransferStat_Transfer: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + //needRemove=true;never put that's here, can product destruction of the file + needSkip=true; + if(realMove) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+ + "] Do the direct FS fake close, realMove: "+std::to_string(realMove)); + /*readThread.fakeReadIsStarted(); + writeThread.fakeWriteIsStarted(); + readThread.fakeReadIsStopped(); + writeThread.fakeWriteIsStopped();*/ + emit readStopped(); + emit postOperationStopped(); + transfer_stat=TransferStat_Idle; + emit pushStat(transfer_stat,transferId); + return; + } + writeThread.flushBuffer(); + if(remainFileOpen()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] remainFileOpen"); + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wait nothing, just quit"); + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + if(!source.empty() && needRemove) + if(exists(source) && source!=destination) + unlink(destination); + break; + case TransferStat_PostTransfer: + if(needSkip) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] skip already in progress"); + return; + } + //needRemove=true;never put that's here, can product destruction of the file + needSkip=true; + if(realMove) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] Do the direct FS fake close, realMove: "+std::to_string(realMove)); + readThread.fakeReadIsStarted(); + writeThread.fakeWriteIsStarted(); + readThread.fakeReadIsStopped(); + writeThread.fakeWriteIsStopped(); + return; + } + writeThread.flushBuffer(); + if(remainFileOpen()) + { + if(remainSourceOpen()) + readThread.stop(); + if(remainDestinationOpen()) + writeThread.stop(); + } + else // wait nothing, just quit + { + transfer_stat=TransferStat_PostOperation; + emit internalStartPostOperation(); + } + break; + case TransferStat_PostOperation: + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] can skip in this state: "+std::to_string(transfer_stat)); + return; + } + //can be reset + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] transfer_stat=TransferStat_Idle"); + transfer_stat=TransferStat_Idle; + //emit to manager with List Thread + emit postOperationStopped(); +} + +//return info about the copied size +int64_t TransferThreadAsync::copiedSize() +{ + switch(static_cast<TransferStat>(transfer_stat)) + { + case TransferStat_Transfer: + case TransferStat_PostOperation: + case TransferStat_PostTransfer: + return (readThread.getLastGoodPosition()+writeThread.getLastGoodPosition())/2; + default: + return 0; + } +} + +//retry after error +void TransferThreadAsync::putAtBottom() +{ + emit tryPutAtBottom(); +} + +#ifdef ULTRACOPIER_PLUGIN_RSYNC +/// \brief set rsync +void TransferThreadAsync::setRsync(const bool rsync) +{ + this->rsync=rsync; +} +#endif + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void TransferThreadAsync::setId(int id) +{ + TransferThread::setId(id); +} + +char TransferThreadAsync::readingLetter() const +{ + switch(static_cast<TransferStat>(readThread.status)) + { + case TransferStat_Idle: + return '_'; + break; + case TransferStat_PreOperation: + return 'I'; + break; + case TransferStat_WaitForTheTransfer: + return 'W'; + break; + case TransferStat_Transfer: + return 'C'; + break; + case TransferStat_PostTransfer: + return 'R'; + break; + case TransferStat_PostOperation: + return 'P'; + break; + default: + return '?'; + } +} + +char TransferThreadAsync::writingLetter() const +{ + switch(static_cast<TransferStat>(writeThread.status)) + { + case TransferStat_Idle: + return '_'; + break; + case TransferStat_PreOperation: + return 'I'; + break; + case TransferStat_WaitForTheTransfer: + return 'W'; + break; + case TransferStat_Transfer: + return 'C'; + break; + case TransferStat_PostTransfer: + return 'R'; + break; + case TransferStat_PostOperation: + return 'P'; + break; + default: + return '?'; + } +} +#endif + +//not copied size, ... +uint64_t TransferThreadAsync::realByteTransfered() const +{ + const uint64_t &l=readThread.getLastGoodPosition(); + switch(static_cast<TransferStat>(transfer_stat)) + { + case TransferStat_Transfer: + case TransferStat_PostTransfer: + return l; + case TransferStat_PostOperation: + return l; + default: + return 0; + } +} + +//first is read, second is write +std::pair<uint64_t, uint64_t> TransferThreadAsync::progression() const +{ + std::pair<uint64_t,uint64_t> returnVar; + switch(static_cast<TransferStat>(transfer_stat)) + { + case TransferStat_Transfer: + returnVar.first=readThread.getLastGoodPosition(); + returnVar.second=writeThread.getLastGoodPosition(); + /*if(returnVar.first<returnVar.second) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+QStringLiteral("] read is smaller than write"));*/ + break; + case TransferStat_PostTransfer: + returnVar.first=transferSize; + returnVar.second=transferSize; + /*if(returnVar.first<returnVar.second) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+QStringLiteral("] read is smaller than write"));*/ + break; + case TransferStat_PostOperation: + returnVar.first=transferSize; + returnVar.second=transferSize; + break; + default: + returnVar.first=0; + returnVar.second=0; + } + return returnVar; +} + +void TransferThreadAsync::setFileExistsAction(const FileExistsAction &action) +{ + if(transfer_stat!=TransferStat_PreOperation) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] already used, source: ")+ + TransferThread::internalStringTostring(source)+(", destination: ")+TransferThread::internalStringTostring(destination)); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+("] action: ")+std::to_string(action)); + if(action!=FileExists_Rename) + fileExistsAction = action; + else + { + //always rename pass here + fileExistsAction = action; + alwaysDoFileExistsAction=action; + } + if(action==FileExists_Skip) + { + skip(); + return; + } + resetExtraVariable(); + emit internalStartPreOperation(); +} + +#ifndef Q_OS_WIN32 +/*bool TransferThreadAsync::copy(const char *from,const char *to) +{ + transferProgression=0; + int fd_to, fd_from; + char buf[4096]; + ssize_t nread; + int saved_errno; + + fd_from = open(from, O_RDONLY); + if (fd_from < 0) + { + readError=true; + return false; + } + #ifdef Q_OS_LINUX + posix_fadvise(fd_from, 0, 0, POSIX_FADV_WILLNEED); + posix_fadvise(fd_from, 0, 0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(fd_from, 0, 0, POSIX_FADV_NOREUSE); + #endif + + // | O_DSYNC slow down + // | O_SYNC slow down + // O_DIRECT Invalid argument + int flags=O_WRONLY | O_CREAT; + //if(!buffer) flags|=??; + fd_to = open(to, flags, 0666); + if (fd_to < 0) + { + writeError=true; + goto out_error; + } + #ifdef Q_OS_LINUX + posix_fadvise(fd_to, 0, 0, POSIX_FADV_WILLNEED); + posix_fadvise(fd_to, 0, 0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(fd_to, 0, 0, POSIX_FADV_NOREUSE); + #endif + + while (nread = read(fd_from, buf, sizeof buf), nread > 0) + { + if(stopIt) + { + close(fd_to); + close(fd_from); + return false; + } + char *out_ptr = buf; + ssize_t nwritten; + + do { + nwritten = write(fd_to, out_ptr, nread); + if(stopIt) + { + close(fd_to); + close(fd_from); + return false; + } + + if (nwritten >= 0) + { + nread -= nwritten; + out_ptr += nwritten; + transferProgression += nwritten; + } + else if (errno != EINTR) + { + writeError=true; + goto out_error; + } + } while (nread > 0); + } + + if (nread == 0) + { + ftruncate(fd_to,transferProgression); + if (close(fd_to) < 0) + { + fd_to = -1; + readError=true; + goto out_error; + } + if (close(fd_from) < 0) + return -1; + if(stopIt) + return -1; + + emit readStopped(); + return true; + } + + out_error: + saved_errno = errno; + + close(fd_from); + if (fd_to >= 0) + close(fd_to); + + errno = saved_errno; + return false; +}*/ +#endif + +//implemente to connect async +void TransferThreadAsync::read_error() +{ + if(readError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already in read error!"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + fileContentError = true; + readError = true; + //writeIsReadyVariable = false;//wrong because write can be ready here + if(!writeError)//already display error for the write + emit errorOnFile(source,readThread.errorString()); +} + +void TransferThreadAsync::read_readIsStopped() +{ + if(realMove) + return; + if(!sended_state_readStopped) + { + sended_state_readStopped=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit readIsStopped()"); + emit readStopped(); + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] drop dual read stopped"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + canStartTransfer=false; + //check here if need start checksuming or not + transfer_stat=TransferStat_PostTransfer; + emit pushStat(transfer_stat,transferId); +} + +void TransferThreadAsync::read_closed() +{ + if(realMove) + return; + if(readIsClosedVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] double event dropped")); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + readIsClosedVariable=true; + checkIfAllIsClosedAndDoOperations(); +} + +void TransferThreadAsync::write_error() +{ + if(writeError) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already in write error!"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + fileContentError = true; + writeError = true; + if(!readError)//already display error for the read + emit errorOnFile(destination,writeThread.errorString()); +} + +void TransferThreadAsync::write_closed() +{ + if(realMove) + return; + if(writeIsClosedVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); + return; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + writeIsClosedVariable=true; + if(stopIt && needRemove && source!=destination) + { + if(is_file(source)) + unlink(destination); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+("] try destroy the destination when the source don't exists")); + } + checkIfAllIsClosedAndDoOperations(); +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + + +//set block size in Bytes for speed limitation +bool TransferThreadAsync::setBlockSize(const unsigned int blockSize) +{ + bool read=readThread.setBlockSize(blockSize); + bool write=writeThread.setBlockSize(blockSize); + return (read && write); +} + +//set the current max speed in KB/s +void TransferThreadAsync::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + readThread.setMultiForBigSpeed(multiForBigSpeed); + writeThread.setMultiForBigSpeed(multiForBigSpeed); +} + +void TransferThreadAsync::timeOfTheBlockCopyFinished() +{ + readThread.timeOfTheBlockCopyFinished(); + writeThread.timeOfTheBlockCopyFinished(); +} +#endif + +//pause the copy +void TransferThreadAsync::pause() +{ + //only pause/resume during the transfer of file data + //from transfer_stat!=TransferStat_Idle because it resume at wrong order + if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); + return; + } + haveStartTime=false; + readThread.pause(); + writeThread.pause(); +} + +//resume the copy +void TransferThreadAsync::resume() +{ + //only pause/resume during the transfer of file data + //from transfer_stat!=TransferStat_Idle because it resume at wrong order + if(transfer_stat!=TransferStat_Transfer && transfer_stat!=TransferStat_PostTransfer) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] wrong stat to put in pause"); + return; + } + readThread.resume(); + writeThread.resume(); +} + +//when both is ready, startRead() +void TransferThreadAsync::read_opened() +{ + if(readIsOpenVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already readIsOpenVariable=true"); + return; + } + readIsOpenVariable=true; + transferSize=readThread.size(); + if(writeIsOpenVariable) + readThread.startRead(); +} + +void TransferThreadAsync::write_opened() +{ + if(writeIsOpenVariable) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already writeIsOpenVariable=true"); + return; + } + writeIsOpenVariable=true; + if(readIsOpenVariable) + readThread.startRead(); +} + +#ifdef Q_OS_WIN32 +bool TransferThreadAsync::mkJunction(LPCWSTR szJunction, LPCWSTR szPath) +{ + BYTE buf[sizeof(REPARSE_DATA_BUFFER) + MAX_PATH * sizeof(WCHAR)]; + REPARSE_DATA_BUFFER& ReparseBuffer = (REPARSE_DATA_BUFFER&)buf; + + if (!::CreateDirectoryW(szJunction, NULL)) + return false; + HANDLE hDir = ::CreateFileW(szJunction, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (hDir == INVALID_HANDLE_VALUE) + return false; + + memset(buf, 0, sizeof(buf)); + ReparseBuffer.ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; + int len = wcslen(szPath)+1; + ReparseBuffer.MountPointReparseBuffer.PrintNameOffset = (len--) * sizeof(WCHAR); + ReparseBuffer.MountPointReparseBuffer.SubstituteNameLength = len * sizeof(WCHAR); + ReparseBuffer.ReparseDataLength = ReparseBuffer.MountPointReparseBuffer.SubstituteNameLength + 12; + wcscpy(ReparseBuffer.MountPointReparseBuffer.PathBuffer, szPath); + + DWORD dwRet; + if (!::DeviceIoControl(hDir, FSCTL_SET_REPARSE_POINT, &ReparseBuffer, + ReparseBuffer.ReparseDataLength+REPARSE_MOUNTPOINT_HEADER_SIZE, NULL, 0, &dwRet, NULL)) + { + ::CloseHandle(hDir); + ::RemoveDirectoryW(szJunction); + return false; + } + + ::CloseHandle(hDir); + return true; +} +#endif + +void TransferThreadAsync::setOsSpecFlags(bool os_spec_flags) +{ + readThread.setOsSpecFlags(os_spec_flags); + writeThread.setOsSpecFlags(os_spec_flags); +} + +void TransferThreadAsync::setNativeCopy(bool native_copy) +{ + this->native_copy=native_copy; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h new file mode 100755 index 0000000..83ddb91 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h @@ -0,0 +1,153 @@ +/** \file TransferThreadAsync.h +\brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include <QObject> +#include <QTime> + +#include <regex> +#include <vector> +#include <string> +#include <utility> +#include <dirent.h> + +//defore the next define +#include "../CopyEngineUltracopier-SpecVariable.h" + +#include "ReadThread.h" +#include "WriteThread.h" + +#ifdef Q_OS_UNIX + #include <utime.h> + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> +#endif +#ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_SET_TIME_UNIX_WAY + #include <utime.h> + #include <time.h> + #include <unistd.h> + #include <sys/stat.h> + #endif +#endif + +#ifdef Q_OS_WIN32 +#include <windows.h> +#endif + +#include "../TransferThread.h" +#include "../Environment.h" +#include "../DriveManagement.h" +#include "../StructEnumDefinition_CopyEngine.h" + +#ifndef TransferThreadAsync_H +#define TransferThreadAsync_H + +/// \brief Thread changed to manage the inode operation, the signals, canceling, pre and post operations +class TransferThreadAsync : public TransferThread +{ + Q_OBJECT +public: + explicit TransferThreadAsync(); + ~TransferThreadAsync(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief get the reading letter + char readingLetter() const; + /// \brief get the writing letter + char writingLetter() const; + #endif + + //not copied size, ... + uint64_t realByteTransfered() const; + std::pair<uint64_t, uint64_t> progression() const; + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //set block size in Bytes for speed limitation + bool setBlockSize(const unsigned int blockSize); + void setMultiForBigSpeed(const int &multiForBigSpeed); + void timeOfTheBlockCopyFinished(); + void setOsSpecFlags(bool os_spec_flags); + void setNativeCopy(bool native_copy); + #endif + /// \brief pause the copy + void pause(); + /// \brief resume the copy + void resume(); + + bool haveStartTime; + ReadThread readThread; + WriteThread writeThread; + bool native_copy; + void setBuffer(const bool buffer); + + #ifdef Q_OS_WIN32 + static bool mkJunction(LPCWSTR szJunction, LPCWSTR szPath); + #endif +protected: + void run(); +private slots: + void preOperation(); + void postOperation(); + //force into the right thread + void internalStartTheTransfer(); + + //implemente to connect async + void read_error(); + void read_readIsStopped(); + void read_closed(); + void write_error(); + void write_closed(); + void read_opened(); + void write_opened(); +signals: + //internal signal + void internalStartResumeAfterErrorAndSeek() const; + void internalStartPostOperation() const; + //async due to tread conflict on from, if(from>=0) {do something, abort() -> on abort from =-1} + void openRead(const INTERNALTYPEPATH &file, const Ultracopier::CopyMode &mode); + //async due to tread conflict on to, if(to>=0) {do something, abort() -> on abort to =-1} + void openWrite(const INTERNALTYPEPATH &file,const uint64_t &startSize); +public slots: + /// \brief to start the transfer of data + void startTheTransfer(); + /// \brief stop the copy + void stop(); + /// \brief skip the copy + void skip(); + /// \brief retry after error + void retryAfterError(); + /// \brief return info about the copied size + int64_t copiedSize(); + /// \brief put the current file at bottom + void putAtBottom(); + /// \brief to set files to transfer + bool setFiles(const INTERNALTYPEPATH &source, const int64_t &size, const INTERNALTYPEPATH &destination, const Ultracopier::CopyMode &mode); + /// \brief to set file exists action to do + void setFileExistsAction(const FileExistsAction &action); + #ifdef Q_OS_WIN32 + void setProgression(const uint64_t &pos,const uint64_t &size); + #endif +private: + //ready = open + ready to operation (no error to resolv) + bool transferIsReadyVariable; + uint64_t transferProgression; + bool sended_state_readStopped; + bool readIsClosedVariable; + bool writeIsClosedVariable; + bool readIsOpenVariable; + bool writeIsOpenVariable; + bool realMove; + bool remainFileOpen() const; + bool remainSourceOpen() const; + bool remainDestinationOpen() const; + void resetExtraVariable(); + void ifCanStartTransfer(); + void checkIfAllIsClosedAndDoOperations(); +}; + +#endif // TransferThreadAsync_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp new file mode 100755 index 0000000..2d6748e --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.cpp @@ -0,0 +1,1164 @@ +#include "WriteThread.h" + +#ifdef Q_OS_LINUX +#include <fcntl.h> +#endif +#include "../TransferThread.h" + +#ifdef Q_OS_UNIX +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> +#include <fcntl.h> +#endif + +unsigned int WriteThread::numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; + +WriteThread::WriteThread() +{ + deletePartiallyTransferredFiles = true; + lastGoodPosition = 0; + stopIt = false; + isOpen.release(); + moveToThread(this); + setObjectName(QStringLiteral("write")); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status = Idle; + #endif + putInPause = false; + needRemoveTheFile = false; + start(); + + #ifdef Q_OS_UNIX + to=-1; + #else + to=nullptr; + #endif +} + +WriteThread::~WriteThread() +{ + stopIt=true; + needRemoveTheFile=true; + pauseMutex.release(); + writeFull.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); + #endif + writeFull.release(); + pauseMutex.release(); + // useless because stopIt will close all thread, but if thread not runing run it + //endIsDetected(); + emit internalStartClose(); + isOpen.acquire(); + if(!file.empty()) + resumeNotStarted(); + //disconnect(this);//-> do into ~TransferThread() + quit(); + wait(); +} + +void WriteThread::run() +{ + if(!connect(this,&WriteThread::internalStartOpen, this,&WriteThread::internalOpen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartReopen, this,&WriteThread::internalReopen, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartWrite, this,&WriteThread::internalWrite, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartClose, this,&WriteThread::internalCloseSlot, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartEndOfFile, this,&WriteThread::internalEndOfFile, Qt::QueuedConnection)) + abort(); + if(!connect(this,&WriteThread::internalStartFlushAndSeekToZero, this,&WriteThread::internalFlushAndSeekToZero, Qt::QueuedConnection)) + abort(); + exec(); +} + +//internal function +bool WriteThread::seek(const int64_t &position)/// \todo search if is use full +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start with: "+std::to_string(position)); + if((int64_t)position>size()) + return false; + + #ifdef Q_OS_UNIX + if(to<0) + abort();//internal failure + return lseek(to,position,SEEK_SET)==position; + #else + if(to==NULL) + abort();//internal failure + LARGE_INTEGER liSize; + liSize.QuadPart=position; + return SetFilePointerEx(to,liSize,NULL,FILE_BEGIN); + #endif +} + +int64_t WriteThread::size() const +{ + #ifdef Q_OS_UNIX + struct stat st; + fstat(to, &st); + return st.st_size; + #else + LARGE_INTEGER lpFileSize; + if(!GetFileSizeEx(to,&lpFileSize)) + return -1; + else + return lpFileSize.QuadPart; + #endif +} + +bool WriteThread::internalOpen() +{ + //do a bug + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] internalOpen destination: "+TransferThread::internalStringTostring(file)); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + emit closed(); + return false; + } + #ifdef Q_OS_UNIX + if(to>=0) + #else + if(to!=NULL) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] already open! destination: "+TransferThread::internalStringTostring(file)); + return false; + } + if(file.empty()) + { + errorString_internal=tr("Path resolution error (Empty path)").toStdString(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+"Unable to open: "+TransferThread::internalStringTostring(file)+", error: Empty path"); + emit error(); + return false; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] before the mutex"); + //set to LISTBLOCKSIZE + while(writeFull.available()<(int)numberOfBlock) + writeFull.release(); + if(writeFull.available()>(int)numberOfBlock) + writeFull.acquire(writeFull.available()-numberOfBlock); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the mutex"); + stopIt=false; + endDetected=false; + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=InodeOperation; + #endif + //mkpath check if exists and return true if already exists + { + INTERNALTYPEPATH destination=file; + #ifdef WIDESTRING + const size_t destinationIndex=destination.rfind(L'/'); + if(destinationIndex!=std::string::npos && destinationIndex<destination.size()) + { + const std::wstring &path=destination.substr(0,destinationIndex); + if(!TransferThread::is_dir(path)) + if(!TransferThread::mkpath(path)) + { + #ifdef Q_OS_WIN32 + errorString_internal=tr("Unable to create the destination folder: ").toStdString()+TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable create the folder: "+ + TransferThread::internalStringTostring(destination)+", error: "+ + errorString_internal); + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + #else + /// \todo do real folder error here + errorString_internal=tr("Unable to create the destination folder, errno: %1").arg(QString::number(errno)).toStdString(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+"Unable create the folder: "+ + TransferThread::internalStringTostring(destination)+", error: "+ + errorString_internal); + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + #endif + } + } + #else + const size_t destinationIndex=destination.rfind('/'); + if(destinationIndex!=std::string::npos && destinationIndex<destination.size()) + { + const std::string &path=destination.substr(0,destinationIndex); + if(!TransferThread::is_dir(path)) + if(!TransferThread::mkpath(path)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Unable to create the destination folder: "+path); + #ifdef Q_OS_WIN32 + errorString_internal=tr("Unable to create the destination folder: ")+TransferThread::GetLastErrorStdStr(); + #else + errorString_internal=tr("Unable to create the destination folder, errno: %1").arg(QString::number(errno)).toStdString(); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + } + #endif + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the mkpath"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + emit closed(); + return false; + } + //try open it + { + QMutexLocker lock_mutex(writeFileListMutex); + #ifdef WIDESTRING + QString qtFile=QString::fromStdWString(file); + #else + QString qtFile=QString::fromStdString(file); + #endif + if(writeFileList->count(qtFile,this)==0) + { + writeFileList->insert(qtFile,this); + if(writeFileList->count(qtFile)>1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] in waiting because same file is found"); + return false; + } + } + } + bool fileWasExists=TransferThread::is_file(file); + #ifdef Q_OS_UNIX + // The last parameter (0755) does nothing. It is simply accepted for compatibility with the UNIX "open" function. + // Needed for major build compatibility + to = ::open(TransferThread::internalStringTostring(file).c_str(), O_WRONLY | O_CREAT, 0755); + #else + DWORD flags=FILE_ATTRIBUTE_NORMAL; + if(os_spec_flags) + flags|=FILE_FLAG_SEQUENTIAL_SCAN; + /*if(!buffer) + //FILE_FLAG_NO_BUFFERING Under Windows 10 do The parameter is incorrect. (87) + flags|=FILE_FLAG_NO_BUFFERING;//FILE_FLAG_WRITE_THROUGH |*/ + to=CreateFileW(file.c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS, + flags,NULL); + #endif + #ifdef Q_OS_UNIX + if(to>=0) + #else + if(to!=INVALID_HANDLE_VALUE) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the open"); + { + QMutexLocker lock_mutex(&accessList); + if(!theBlockList.empty()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] General file corruption detected"); + stopIt=true; + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + return false; + } + } + pauseMutex.tryAcquire(pauseMutex.available()); + #ifdef Q_OS_LINUX + if(os_spec_flags) + { + posix_fadvise(to, 0, 0, POSIX_FADV_NOREUSE); + posix_fadvise(to, 0, 0, POSIX_FADV_SEQUENTIAL); + } + #endif + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] after the pause mutex"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + if(destTruncate(startSize)!=0) + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + if(!seek(0)) + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek after open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + isOpen.acquire(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit opened()"); + emit opened(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + needRemoveTheFile=false; + postOperationRequested=false; + return true; + } + else + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + #else + int t=errno; + #endif + if(!fileWasExists && TransferThread::is_file(file)) + if(unlink(TransferThread::internalStringTostring(file).c_str())!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file created but can't be removed"); + if(stopIt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close because stopIt is at true"); + resumeNotStarted(); + this->file.clear(); + emit closed(); + return false; + } + #ifdef Q_OS_WIN32 + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to open: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + return false; + } +} + +void WriteThread::openWrite(const INTERNALTYPEPATH &file, const uint64_t &startSize) +{ + if(!isRunning()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] the thread not running to open destination: "+TransferThread::internalStringTostring(file)+", numberOfBlock: "+std::to_string(numberOfBlock)); + errorString_internal=tr("Internal error, please report it!").toStdString(); + emit error(); + return; + } + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + if(file==this->file) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] Try reopen already opened same file: "+TransferThread::internalStringTostring(file)); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] previous file is already open: "+TransferThread::internalStringTostring(file)); + //emit internalStartClose(); + internalCloseSlot(); + isOpen.acquire(); + isOpen.release(); + } + if(numberOfBlock<1 || (numberOfBlock>ULTRACOPIER_PLUGIN_MAX_PARALLEL_NUMBER_OF_BLOCK && numberOfBlock>ULTRACOPIER_PLUGIN_MAX_SEQUENTIAL_NUMBER_OF_BLOCK)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] numberOfBlock wrong, set to default"); + this->numberOfBlock=ULTRACOPIER_PLUGIN_DEFAULT_PARALLEL_NUMBER_OF_BLOCK; + } + /*else + this->numberOfBlock=numberOfBlock;*/ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] "+"open destination: "+TransferThread::internalStringTostring(file)); + stopIt=false; + fakeMode=false; + lastGoodPosition=0; + this->file=file; + this->startSize=startSize; + endDetected=false; + writeFullBlocked=false; + emit internalStartOpen(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + numberOfBlockCopied=0; + #endif +} + +void WriteThread::endIsDetected() +{ + if(endDetected) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] double event dropped"); + return; + } + endDetected=true; + pauseMutex.release(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + emit internalStartEndOfFile(); +} + +std::string WriteThread::errorString() const +{ + return errorString_internal; +} + +void WriteThread::stop() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop()"); + needRemoveTheFile=true; + stopIt=true; + if(isOpen.available()>0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] isOpen.available()>0"); + + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + } + + return; + } + writeFull.release(); + pauseMutex.release(); + pauseMutex.release(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); + #endif + // useless because stopIt will close all thread, but if thread not runing run it + endIsDetected(); + //for the stop for skip: void TransferThread::skip() + emit internalStartClose(); +} + +void WriteThread::flushBuffer() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + writeFull.release(); + writeFull.acquire(); + pauseMutex.release(); + { + QMutexLocker lock_mutex(&accessList); + while(!theBlockList.empty()) + { + free(theBlockList.front().data); + theBlockList.pop(); + } + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] stop"); +} + +/// \brief buffer is empty +bool WriteThread::bufferIsEmpty() +{ + bool returnVal; + { + QMutexLocker lock_mutex(&accessList); + returnVal=theBlockList.empty(); + } + return returnVal; +} + +void WriteThread::internalEndOfFile() +{ + if(!bufferIsEmpty()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] buffer is not empty!"); + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] writeIsStopped"); + postOperation(); + emit writeIsStopped(); + } +} + +#ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT +/*! \brief Set the max speed +\param tempMaxSpeed Set the max speed in KB/s, 0 for no limit */ +void WriteThread::setMultiForBigSpeed(const int &multiForBigSpeed) +{ + this->multiForBigSpeed=multiForBigSpeed; + waitNewClockForSpeed.release(); + waitNewClockForSpeed2.release(); +} + +/// \brief For give timer every X ms +void WriteThread::timeOfTheBlockCopyFinished() +{ + /* this is the old way to limit the speed, it product blocking + *if(waitNewClockForSpeed.available()<ULTRACOPIER_PLUGIN_NUMSEMSPEEDMANAGEMENT) + waitNewClockForSpeed.release();*/ + + //try this new way: + /* only if speed limited, else will accumulate waitNewClockForSpeed + * Disabled because: Stop call of this method when no speed limit + if(this->maxSpeed>0)*/ + if(waitNewClockForSpeed.available()<=1) + waitNewClockForSpeed.release(); + if(waitNewClockForSpeed2.available()<=1) + waitNewClockForSpeed2.release(); +} +#endif + +void WriteThread::resumeNotStarted() +{ + QMutexLocker lock_mutex(writeFileListMutex); + #ifdef WIDESTRING + QString qtFile=QString::fromStdWString(file); + #else + QString qtFile=QString::fromStdString(file); + #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(!writeFileList->contains(qtFile)) + { + /*ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] file: \""+ + TransferThread::internalStringTostring(file)+ + "\" for similar inode is not located into the list of "+ + std::to_string(writeFileList.size())+" items!");*/ + return; + } + #endif + writeFileList->remove(qtFile,this); + if(writeFileList->contains(qtFile)) + { + QList<WriteThread *> writeList=writeFileList->values(qtFile); + if(!writeList.isEmpty()) + writeList.first()->reemitStartOpen(); + return; + } +} + +void WriteThread::pause() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] try put read thread in pause"); + pauseMutex.tryAcquire(pauseMutex.available()); + putInPause=true; + return; +} + +void WriteThread::resume() +{ + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + putInPause=false; + stopIt=false; + } + else + return; + #ifdef Q_OS_WIN32 + if(to==NULL) + #else + if(to<0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] file is not open"); + return; + } + pauseMutex.release(); +} + +void WriteThread::reemitStartOpen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] start"); + emit internalStartOpen(); +} + +void WriteThread::postOperation() +{ + if(postOperationRequested) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped"); + return; + } + postOperationRequested=true; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + emit internalStartClose(); +} + +void WriteThread::internalCloseSlot() +{ + internalClose(); +} + +void WriteThread::internalClose(bool emitSignal) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] close for file: "+TransferThread::internalStringTostring(file)); + /// \note never send signal here, because it's called by the destructor + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Close; + #endif + bool emit_closed=false; + if(!fakeMode) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] !fakeMode: "+TransferThread::internalStringTostring(file)); + #ifdef Q_OS_WIN32 + if(to!=NULL) + #else + if(to>=0) + #endif + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] to>=0: "+TransferThread::internalStringTostring(file)); + if(!needRemoveTheFile) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] !needRemoveTheFile: "+TransferThread::internalStringTostring(file)); + if(startSize!=lastGoodPosition) + if(destTruncate(lastGoodPosition)!=0) + { + if(emitSignal) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to resize: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + } + else + needRemoveTheFile=true; + } + } + #ifdef Q_OS_UNIX + if(::close(to)!=0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+std::to_string(errno)); + to=-1; + #else + if(CloseHandle(to)==0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] unable to close: "+TransferThread::GetLastErrorStdStr()); + to=NULL; + #endif + this->file.clear(); + if(needRemoveTheFile || stopIt) + { + if(deletePartiallyTransferredFiles) + { + if(unlink(TransferThread::internalStringTostring(file).c_str())!=0) + if(emitSignal) + { + #ifdef Q_OS_UNIX + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to remove the destination file: "+std::to_string(errno)); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] unable to remove the destination file: "+TransferThread::GetLastErrorStdStr()); + #endif + } + } + } + //here and not after, because the transferThread don't need try close if not open + if(emitSignal) + emit_closed=true; + } + } + else + { + //here and not after, because the transferThread don't need try close if not open + + if(emitSignal) + emit_closed=true; + } + needRemoveTheFile=false; + resumeNotStarted(); + this->file.clear(); + if(emit_closed) + emit closed(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + + /// \note always the last of this function + if(!fakeMode) + isOpen.release(); +} + +void WriteThread::internalReopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + INTERNALTYPEPATH tempFile=file; + internalClose(false); + flushBuffer(); + stopIt=false; + lastGoodPosition=0; + file=tempFile; + if(internalOpen()) + emit reopened(); +} + +void WriteThread::reopen() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start"); + stopIt=true; + endDetected=false; + emit internalStartReopen(); +} + +#ifdef ULTRACOPIER_PLUGIN_DEBUG +//to set the id +void WriteThread::setId(int id) +{ + this->id=id; +} +#endif + +/// \brief do the fake open +void WriteThread::fakeOpen() +{ + fakeMode=true; + postOperationRequested=false; + emit opened(); +} + +/// \brief do the fake writeIsStarted +void WriteThread::fakeWriteIsStarted() +{ + emit writeIsStarted(); +} + +/// \brief do the fake writeIsStopped +void WriteThread::fakeWriteIsStopped() +{ + postOperation(); + emit writeIsStopped(); +} + +/** \brief set block size +\param block the new block size in B +\return Return true if succes */ +bool WriteThread::setBlockSize(const int blockSize) +{ + //can be smaller than min block size to do correct speed limitation + if(blockSize>1 && blockSize<ULTRACOPIER_PLUGIN_MAX_BLOCK_SIZE*1024) + { + //this->blockSize=blockSize; + return true; + } + else + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"block size out of range: "+std::to_string(blockSize)); + return false; + } +} + +/// \brief get the last good position +int64_t WriteThread::getLastGoodPosition() const +{ + return lastGoodPosition; +} + +void WriteThread::flushAndSeekToZero() +{ + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"flushAndSeekToZero: "+std::to_string(blockSize)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"flushAndSeekToZero"); + stopIt=true; + emit internalStartFlushAndSeekToZero(); +} + +void WriteThread::internalFlushAndSeekToZero() +{ + flushBuffer(); + if(!seek(0)) + { + #ifdef Q_OS_WIN32 + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to seek: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+")" + ); + #endif + emit error(); + return; + } + stopIt=false; + emit flushedAndSeekedToZero(); +} + +void WriteThread::setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles) +{ + this->deletePartiallyTransferredFiles=deletePartiallyTransferredFiles; +} + +bool WriteThread::write(char * data, const unsigned int size) +{ + if(stopIt) + return false; + bool atMax; + if(stopIt) + return false; + { + QMutexLocker lock_mutex(&accessList); + DataBlock d; + d.data=data; + d.size=size; + theBlockList.push(d); + atMax=(theBlockList.size()>=numberOfBlock); + } + emit internalStartWrite(); + if(atMax) + { + writeFullBlocked=true; + writeFull.acquire(); + writeFullBlocked=false; + } + if(stopIt) + return false; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //wait for limitation speed if stop not query + if(multiForBigSpeed>0) + { + numberOfBlockCopied2++; + if(numberOfBlockCopied2>=multiForBigSpeed) + { + numberOfBlockCopied2=0; + waitNewClockForSpeed2.acquire(); + } + } + #endif + if(stopIt) + return false; + return true; +} + +void WriteThread::internalWrite() +{ + bool haveBlock; + do + { + if(putInPause) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"["+std::to_string(id)+"] write put in pause"); + if(stopIt) + return; + pauseMutex.acquire(); + if(stopIt) + return; + } + if(stopIt) + { +// ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] stopIt"); + return; + } + if(stopIt) + return; + //read one block + { + QMutexLocker lock_mutex(&accessList); + if(theBlockList.empty()) + haveBlock=false; + else + { + blockArray=theBlockList.front(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + if(multiForBigSpeed>0) + { + theBlockList.pop(); + //if remove one block + writeFull.release(); + } + else + #endif + { + theBlockList.pop(); + //if remove one block + writeFull.release(); + } + haveBlock=true; + } + } + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + if(!haveBlock) + { + //ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] End detected of the file"); + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + //wait for limitation speed if stop not query + if(multiForBigSpeed>0) + { + numberOfBlockCopied++; + if(writeFullBlocked) + { + if(numberOfBlockCopied>=(multiForBigSpeed*2)) + { + numberOfBlockCopied=0; + waitNewClockForSpeed.acquire(); + if(stopIt) + { + free(blockArray.data); + break; + } + } + } + else + { + if(numberOfBlockCopied>=multiForBigSpeed) + { + numberOfBlockCopied=0; + waitNewClockForSpeed.acquire(); + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + break; + } + } + } + } + #endif + if(stopIt) + { + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + return; + } + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Write; + #endif + + #ifdef Q_OS_WIN32 + BOOL retRead=TRUE; + #endif + if(blockArray.size<=0) + bytesWriten=0; + else + { + #ifdef Q_OS_WIN32 + DWORD lpNumberOfBytesWrite=0; + retRead=WriteFile(to,blockArray.data,blockArray.size, + &lpNumberOfBytesWrite,NULL); + bytesWriten=lpNumberOfBytesWrite; + #else + bytesWriten=::write(to,blockArray.data,blockArray.size); + #endif + } + if(blockArray.data!=NULL) + { + free(blockArray.data); + blockArray.data=NULL; + } + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + status=Idle; + #endif + //mutex for stream this data + if(lastGoodPosition==0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] emit writeIsStarted()"); + emit writeIsStarted(); + } + if(stopIt) + return; + #ifdef Q_OS_WIN32 + if(retRead==FALSE) + #else + if(bytesWriten<0) + #endif + { + #ifdef Q_OS_WIN32 + #ifdef ULTRACOPIER_PLUGIN_DEBUG + DWORD e = GetLastError(); + #endif + errorString_internal=TransferThread::GetLastErrorStdStr(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to write: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(e)+") to write "+std::to_string(blockArray.size)+"B at "+std::to_string(lastGoodPosition)+"B" + ); + #else + int t=errno; + errorString_internal=strerror(t); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+ + "Unable to write: "+TransferThread::internalStringTostring(file)+ + ", error: "+errorString_internal+" ("+std::to_string(t)+") to write "+std::to_string(blockArray.size)+"B at "+std::to_string(lastGoodPosition)+"B" + ); + #endif + stopIt=true; + emit error(); + return; + } + if(bytesWriten!=blockArray.size) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+std::to_string(id)+"] "+QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size).toStdString()); + errorString_internal=QStringLiteral("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size).toStdString(); + stopIt=true; + emit error(); + return; + } + lastGoodPosition+=bytesWriten; + } while(true); +} + +//return 0 if sucess +int WriteThread::destTruncate(const uint64_t &startSize) +{ + #ifdef Q_OS_WIN32 + if(to==NULL) + abort(); + seek(startSize); + if(SetEndOfFile(to)!=0) + return 0; + else + return 1; + #else + if(to<0) + abort(); + return ::ftruncate(to,startSize); + #endif +} + +void WriteThread::setOsSpecFlags(bool os_spec_flags) +{ + this->os_spec_flags=os_spec_flags; +} diff --git a/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h new file mode 100755 index 0000000..5e0b265 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/async/WriteThread.h @@ -0,0 +1,181 @@ +/** \file WriteThread.h +\brief Thread changed to open/close and write the destination file +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef WRITETHREAD_H +#define WRITETHREAD_H + +#include <QThread> +#include <QByteArray> +#include <QMutex> +#include <QSemaphore> +#include <QCryptographicHash> +#include <queue> + +#ifdef Q_OS_WIN32 +#include <windows.h> +#endif + +#include "../Environment.h" +#include "../StructEnumDefinition_CopyEngine.h" +#include "../CopyEngineUltracopier-SpecVariable.h" + +#ifdef WIDESTRING +#define INTERNALTYPEPATH std::wstring +#define INTERNALTYPECHAR wchar_t +#else +#define INTERNALTYPEPATH std::string +#define INTERNALTYPECHAR char +#endif + +/// \brief Thread changed to open/close and write the destination file +class WriteThread : public QThread +{ + Q_OBJECT +public: + explicit WriteThread(); + ~WriteThread(); + //internal function + bool seek(const int64_t &position);/// \todo search if is use full + /// \brief get the size of the destination file + int64_t size() const; + + //can't be static into WriteThread, linked by instance then by ListThread + QMultiHash<QString,WriteThread *> *writeFileList; + QMutex *writeFileListMutex; + bool buffer; + static unsigned int numberOfBlock; +protected: + void run(); +public: + /// \brief open the destination to open it + void openWrite(const INTERNALTYPEPATH &file,const uint64_t &startSize); + /// \brief to return the error string + std::string errorString() const; + /// \brief to stop all + void stop(); + /// \brief to write data + bool write(char *data, const unsigned int size); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief to set the id + void setId(int id); + /// \brief get the write stat + enum WriteStat + { + Idle=0, + InodeOperation=1, + Write=2, + Close=3, + Read=5 + }; + WriteStat status; + #endif + /// \brief do the fake open + void fakeOpen(); + /// \brief do the fake writeIsStarted + void fakeWriteIsStarted(); + /// \brief do the fake writeIsStopped + void fakeWriteIsStopped(); + /// \brief set block size in KB mostly for speed + bool setBlockSize(const int blockSize); + /// \brief get the last good position + int64_t getLastGoodPosition() const; + /// \brief buffer is empty + bool bufferIsEmpty(); + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + /// \brief set the current max speed in KB/s + void setMultiForBigSpeed(const int &multiForBigSpeed); + #endif + void pause(); + void resume(); + void reemitStartOpen(); + //return 0 if sucess + int destTruncate(const uint64_t &startSize); + void setOsSpecFlags(bool os_spec_flags); +public slots: + /// \brief start the operation + void postOperation(); + /// \brief flush buffer + void flushBuffer(); + /// \brief set the end is detected + void endIsDetected(); + /// \brief reopen the file + void reopen(); + /// \brief flush and seek to zero + void flushAndSeekToZero(); + void setDeletePartiallyTransferredFiles(const bool &deletePartiallyTransferredFiles); + /// \brief executed at regular interval to do a speed throling + void timeOfTheBlockCopyFinished(); + + void resumeNotStarted(); +signals: + void error() const; + void opened() const; + void reopened() const; + void writeIsStarted() const; + void writeIsStopped() const; + void flushedAndSeekedToZero() const; + void closed() const; + //internal signals + void internalStartOpen() const; + void internalStartReopen() const; + void internalStartWrite() const; + void internalStartClose() const; + void internalStartEndOfFile() const; + void internalStartFlushAndSeekToZero() const; + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; +private: + struct DataBlock + { + char * data; + unsigned int size; + }; + std::string errorString_internal; + volatile bool stopIt; + volatile bool postOperationRequested; + bool os_spec_flags; + QMutex accessList; ///< For use the list + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + QSemaphore waitNewClockForSpeed,waitNewClockForSpeed2; + volatile int numberOfBlockCopied,numberOfBlockCopied2; ///< Multiple for count the number of block copied + volatile int multiplicatorForBigSpeed; ///< Multiple for count the number of block needed + volatile int MultiForBigSpeed; + #endif + QSemaphore writeFull; + volatile bool writeFullBlocked; + QSemaphore isOpen; + QSemaphore pauseMutex; + volatile bool putInPause; + std::queue<DataBlock> theBlockList; ///< Store the block list + uint64_t lastGoodPosition; + DataBlock blockArray; ///< temp data for block writing, the data + int64_t bytesWriten; ///< temp data for block writing, the bytes writen + int id; + volatile bool endDetected; + uint64_t startSize; + bool fakeMode; + bool needRemoveTheFile; + bool deletePartiallyTransferredFiles; + #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT + volatile int multiForBigSpeed; ///< Multiple for count the number of block needed + #endif + + #ifdef Q_OS_UNIX + int to; + #else + HANDLE to; + #endif + INTERNALTYPEPATH file; +private slots: + bool internalOpen(); + void internalWrite(); + void internalCloseSlot(); + void internalClose(bool emitSignal=true); + void internalReopen(); + void internalEndOfFile(); + void internalFlushAndSeekToZero(); +}; + +#endif // WRITETHREAD_H diff --git a/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui b/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui new file mode 100755 index 0000000..e646a2d --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/copyEngineOptions.ui @@ -0,0 +1,602 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>copyEngineOptions</class> + <widget class="QWidget" name="copyEngineOptions"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>801</width> + <height>504</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolBox" name="toolBox"> + <property name="currentIndex"> + <number>2</number> + </property> + <widget class="QWidget" name="page_trasnfer"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>801</width> + <height>376</height> + </rect> + </property> + <attribute name="label"> + <string>Transfer</string> + </attribute> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="7" column="1"> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>278</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_18"> + <property name="text"> + <string>Move the whole folder</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QCheckBox" name="moveTheWholeFolder"/> + </item> + <item row="1" column="2"> + <widget class="QCheckBox" name="keepDate"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Keep the file date</string> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label_9"> + <property name="text"> + <string>Auto start</string> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QCheckBox" name="checksum"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Transfer the file rights</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QCheckBox" name="doRightTransfer"/> + </item> + <item row="6" column="2"> + <widget class="QCheckBox" name="autoStart"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Create full path if not exists</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_rsync"> + <property name="text"> + <string notr="true">Rsync</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QCheckBox" name="mkpath"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QCheckBox" name="rsync"/> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Checksum</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="page_error_collision"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>801</width> + <height>376</height> + </rect> + </property> + <attribute name="label"> + <string>Error and collision</string> + </attribute> + <layout class="QGridLayout" name="gridLayout_4"> + <item row="2" column="0"> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string>When folder error</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QCheckBox" name="checkBoxDestinationFolderExists"/> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_12"> + <property name="text"> + <string>When file error</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QComboBox" name="comboBoxFileError"> + <item> + <property name="text"> + <string notr="true">Ask</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Skip</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Put at the end</string> + </property> + </item> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_13"> + <property name="text"> + <string>When file collision</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QComboBox" name="comboBoxFileCollision"> + <item> + <property name="text"> + <string notr="true">Ask</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Skip</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Overwrite</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Overwrite if not same size and date</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Overwrite if newer</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Overwrite if older</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Rename</string> + </property> + </item> + <item> + <property name="text"> + <string>Overwrite if not same size</string> + </property> + </item> + <item> + <property name="text"> + <string>Overwrite if modification date differs</string> + </property> + </item> + </widget> + </item> + <item row="2" column="2"> + <widget class="QComboBox" name="comboBoxFolderError"> + <item> + <property name="text"> + <string notr="true">Ask</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Skip</string> + </property> + </item> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>When folder collision</string> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QComboBox" name="comboBoxFolderCollision"> + <item> + <property name="text"> + <string notr="true">Ask</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Merge</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Skip</string> + </property> + </item> + <item> + <property name="text"> + <string notr="true">Rename</string> + </property> + </item> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string>Check if destination folder exists</string> + </property> + </widget> + </item> + <item row="7" column="1"> + <widget class="QPushButton" name="renamingRules"> + <property name="text"> + <string>Renaming rules</string> + </property> + </widget> + </item> + <item row="8" column="1"> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>193</height> + </size> + </property> + </spacer> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="label_20"> + <property name="text"> + <string>Delete partially transferred files</string> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QCheckBox" name="deletePartiallyTransferredFiles"/> + </item> + <item row="6" column="2"> + <widget class="QCheckBox" name="renameTheOriginalDestination"/> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label_22"> + <property name="text"> + <string>Rename the original destination</string> + </property> + </widget> + </item> + </layout> + <zorder>label_12</zorder> + <zorder>label_13</zorder> + <zorder>label_6</zorder> + <zorder>label_7</zorder> + <zorder>label_8</zorder> + <zorder>comboBoxFileError</zorder> + <zorder>comboBoxFileCollision</zorder> + <zorder>comboBoxFolderError</zorder> + <zorder>comboBoxFolderCollision</zorder> + <zorder>checkBoxDestinationFolderExists</zorder> + <zorder>renamingRules</zorder> + <zorder>label_20</zorder> + <zorder>deletePartiallyTransferredFiles</zorder> + <zorder>renameTheOriginalDestination</zorder> + <zorder>label_22</zorder> + </widget> + <widget class="QWidget" name="page_performance"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>801</width> + <height>376</height> + </rect> + </property> + <attribute name="label"> + <string>Performance</string> + </attribute> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="1"> + <widget class="QSpinBox" name="inodeThreads"> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>32</number> + </property> + <property name="value"> + <number>16</number> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_21"> + <property name="text"> + <string>Inode threads</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QCheckBox" name="followTheStrictOrder"/> + </item> + <item row="3" column="1"> + <widget class="QSpinBox" name="spinBox"> + <property name="suffix"> + <string>MB</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>1024</number> + </property> + <property name="value"> + <number>300</number> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QSpinBox" name="spinBox_2"> + <property name="suffix"> + <string>MB</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>1024</number> + </property> + <property name="value"> + <number>100</number> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QCheckBox" name="buffer"> + <property name="toolTip"> + <string>Uncheck this under Windows create problem</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>OS Buffer</string> + </property> + </widget> + </item> + <item row="7" column="1"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>197</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_10"> + <property name="text"> + <string>Disable parallel transfer when are different devices</string> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_14"> + <property name="text"> + <string>Buffer for different device</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="label_15"> + <property name="text"> + <string>OS FLags</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>Buffer for same device</string> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label_16"> + <property name="text"> + <string>OS native copy (disable speed limitation)</string> + </property> + </widget> + </item> + <item row="5" column="1"> + <widget class="QCheckBox" name="os_spec_flags"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="6" column="1"> + <widget class="QCheckBox" name="native_copy"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="page_misc"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>801</width> + <height>376</height> + </rect> + </property> + <attribute name="label"> + <string>Misc</string> + </attribute> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="0"> + <widget class="QLabel" name="label_23"> + <property name="text"> + <string>Check the disk space</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QCheckBox" name="checkDiskSpace"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_24"> + <property name="text"> + <string>Use this folder when destination is not set</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLineEdit" name="defaultDestinationFolder"/> + </item> + <item> + <widget class="QPushButton" name="defaultDestinationFolderBrowse"> + <property name="text"> + <string>Browse</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>353</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="filters"> + <property name="text"> + <string>Filters</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>352</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="3" column="1"> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>159</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc b/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc new file mode 100755 index 0000000..7ae0fdc --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/copyEngineResources.qrc @@ -0,0 +1,8 @@ +<RCC> + <qresource prefix="/CopyEngine/Ultracopier-Spec"> + <file>resources/add.png</file> + <file>resources/edit.png</file> + <file>resources/remove.png</file> + <file>resources/filter.png</file> + </qresource> +</RCC> diff --git a/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui new file mode 100755 index 0000000..5803f99 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/debugDialog.ui @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>debugDialog</class> + <widget class="QWidget" name="debugDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>665</width> + <height>392</height> + </rect> + </property> + <property name="windowTitle"> + <string notr="true">Monitor</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string notr="true">Transfer thread</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QListWidget" name="transferThreadList"> + <property name="uniformItemSizes"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string notr="true">Transfer list</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QListWidget" name="tranferList"> + <property name="uniformItemSizes"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QGroupBox" name="groupBox_3"> + <property name="title"> + <string notr="true">Variables</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string notr="true">Active transfer:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="alreadyExistsQueue"/> + </item> + <item row="1" column="1"> + <widget class="QSpinBox" name="spinBoxNumberOfInode"> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="maximum"> + <number>9999</number> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QSpinBox" name="spinBoxActiveTransfer"> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="maximum"> + <number>9999</number> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string notr="true">Number of inode manipuled:</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QSpinBox" name="errorQueue"/> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string notr="true">alreadyExistsQueueItem:</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string notr="true">errorQueueItem:</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/documentation.dox b/plugins/CopyEngine/Ultracopier-Spec/documentation.dox new file mode 100755 index 0000000..5a0fbf6 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/documentation.dox @@ -0,0 +1,39 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage Copy engine + + \section mainpage_overview Overview + + The default copy engine for Ultracopier. Support file/folder, copy/move, ...\n + More informations on <a href="http://ultracopier-wiki.first-world.info/">the wiki of ultracopier</a>. + + \section mainpage_platforms Platforms + + This plugin might be usable in all environments where you find Qt 5, but Gcc is requiered for some part. You need qtsystem modules for QtSystemInfo\n + This plugin requires Qt 5.0 or newer. Tested on Qt 5.0.\n + + \section mainpage_downloads Downloads + + You can find the link on <a href="http://ultracopier.first-world.info/">Ultracopier</a> project page, via git, snapshot sources, ... + + \section mainpage_algorithm Algorithm + + Like say previously you will have more informations on the wiki.\n + Then file transfer is done via pipe mecamism system:\n + <ul> + <li>push at no blocking into table up to the table is full, after is blocked up to one entry is free</li> + <li>Other thread read the table up to have no more data, then is blocked</li> + </ul> + The transfer thread do listing of the folder, removing folder, make folder is one thread for each.\n + The transfer list, have thread pool to do the inode operation (open, close, set date, ...). Do all inode operation in parallele, but transfer the data as sequential. + + \section license GPL Version 3 + The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4. + +*/ diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui new file mode 100755 index 0000000..b603924 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileErrorDialog.ui @@ -0,0 +1,264 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>fileErrorDialog</class> + <widget class="QWidget" name="fileErrorDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>723</width> + <height>185</height> + </rect> + </property> + <property name="windowTitle"> + <string>Error with file</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Error</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label_error"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout_2"> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::ExpandingFieldsGrow</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label_size"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_size"> + <property name="text"> + <string notr="true">0 KiB</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_file_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>File name</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_file_name"> + <property name="text"> + <string notr="true">source.txt</string> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_file_destination"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Destination</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QLabel" name="label_content_file_destination"> + <property name="text"> + <string notr="true">../toto.txt</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_folder"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_content_folder"> + <property name="text"> + <string notr="true">/folder/</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBoxAlways"> + <property name="text"> + <string>&Always perform this action</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="Rights"> + <property name="text"> + <string>Try in with elevated privileges</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="PutToBottom"> + <property name="text"> + <string>Put to bottom</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Retry"> + <property name="text"> + <string>Retry</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Skip"> + <property name="text"> + <string>&Skip</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Cancel"> + <property name="text"> + <string>&Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>checkBoxAlways</sender> + <signal>toggled(bool)</signal> + <receiver>Cancel</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>112</x> + <y>131</y> + </hint> + <hint type="destinationlabel"> + <x>438</x> + <y>142</y> + </hint> + </hints> + </connection> + <connection> + <sender>checkBoxAlways</sender> + <signal>toggled(bool)</signal> + <receiver>Retry</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>155</x> + <y>131</y> + </hint> + <hint type="destinationlabel"> + <x>309</x> + <y>134</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui new file mode 100755 index 0000000..2ca480b --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileExistsDialog.ui @@ -0,0 +1,428 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>fileExistsDialog</class> + <widget class="QWidget" name="fileExistsDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>615</width> + <height>222</height> + </rect> + </property> + <property name="windowTitle"> + <string>The file exists</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Source</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Destination</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_source_size"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_source_size"> + <property name="text"> + <string notr="true">0 KiB</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_source_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_source_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_source_file_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>File name</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_source_file_name"> + <property name="text"> + <string notr="true">source.txt</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_3"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_content_source_folder"> + <property name="text"> + <string notr="true">/source/</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout"> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::ExpandingFieldsGrow</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="label_destination_size"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_destination_size"> + <property name="text"> + <string notr="true">0 KiB</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_destination_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_destination_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_destination_file_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>File name</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_destination_file_name"> + <property name="text"> + <string notr="true">destination.txt</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_4"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_content_destination_folder"> + <property name="text"> + <string notr="true">/destination/</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLineEdit" name="lineEditNewName"> + <property name="text"> + <string notr="true"/> + </property> + <property name="placeholderText"> + <string notr="true"/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="SuggestNewName"> + <property name="text"> + <string>Suggest new &name</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBoxAlways"> + <property name="text"> + <string>&Always perform this action</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="Rename"> + <property name="text"> + <string>&Rename</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="Overwrite"> + <property name="text"> + <string>&Overwrite</string> + </property> + <property name="popupMode"> + <enum>QToolButton::MenuButtonPopup</enum> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Skip"> + <property name="text"> + <string>&Skip</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Cancel"> + <property name="text"> + <string>&Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + <action name="actionOverwrite_if_newer"> + <property name="text"> + <string>Overwrite if newer</string> + </property> + </action> + <action name="actionOverwrite_if_not_same_modification_date"> + <property name="text"> + <string>Overwrite if modification date differs</string> + </property> + <property name="toolTip"> + <string>Overwrite if modification date differs</string> + </property> + </action> + <action name="actionOverwrite_if_older"> + <property name="text"> + <string>Overwrite if older</string> + </property> + <property name="toolTip"> + <string>Overwrite if older</string> + </property> + </action> + <action name="actionOverwrite_if_not_same_size"> + <property name="text"> + <string>Overwrite if not same size</string> + </property> + <property name="toolTip"> + <string>Overwrite if not same size</string> + </property> + </action> + <action name="actionOverwrite_if_not_same_size_and_date"> + <property name="text"> + <string>Overwrite if not same size and date</string> + </property> + <property name="toolTip"> + <string>Overwrite if not same size and date</string> + </property> + </action> + </widget> + <resources/> + <connections> + <connection> + <sender>checkBoxAlways</sender> + <signal>toggled(bool)</signal> + <receiver>Cancel</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>115</x> + <y>130</y> + </hint> + <hint type="destinationlabel"> + <x>440</x> + <y>129</y> + </hint> + </hints> + </connection> + <connection> + <sender>checkBoxAlways</sender> + <signal>toggled(bool)</signal> + <receiver>lineEditNewName</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>62</x> + <y>129</y> + </hint> + <hint type="destinationlabel"> + <x>108</x> + <y>93</y> + </hint> + </hints> + </connection> + <connection> + <sender>checkBoxAlways</sender> + <signal>toggled(bool)</signal> + <receiver>SuggestNewName</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>144</x> + <y>138</y> + </hint> + <hint type="destinationlabel"> + <x>326</x> + <y>98</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui new file mode 100755 index 0000000..c019a63 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/fileIsSameDialog.ui @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>fileIsSameDialog</class> + <widget class="QWidget" name="fileIsSameDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>411</width> + <height>142</height> + </rect> + </property> + <property name="windowTitle"> + <string>The source and destination are same</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_size"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_size"> + <property name="text"> + <string notr="true">0 KiB</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_file_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>File name</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_file_name"> + <property name="text"> + <string notr="true">source.txt</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_2"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_content_folder"> + <property name="text"> + <string notr="true">/toto/</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLineEdit" name="lineEditNewName"> + <property name="text"> + <string notr="true"/> + </property> + <property name="placeholderText"> + <string notr="true"/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="SuggestNewName"> + <property name="text"> + <string>Suggest new &name</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBoxAlways"> + <property name="text"> + <string>&Always perform this action</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="Rename"> + <property name="text"> + <string>&Rename</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Skip"> + <property name="text"> + <string>&Skip</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Cancel"> + <property name="text"> + <string>&Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui b/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui new file mode 100755 index 0000000..440b5ca --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/folderExistsDialog.ui @@ -0,0 +1,309 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>folderExistsDialog</class> + <widget class="QDialog" name="folderExistsDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>476</width> + <height>140</height> + </rect> + </property> + <property name="windowTitle"> + <string>The source and destination is identical</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_source"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Source</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_destination"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Destination</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label_source_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_source_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_source_folder_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder name</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_source_folder_name"> + <property name="text"> + <string notr="true">folder</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_source_folder"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_source_folder"> + <property name="text"> + <string notr="true">/source/</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_destination_modified"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Modified</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_destination_folder_name"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder name</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label_content_destination_modified"> + <property name="text"> + <string notr="true">Today</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_content_destination_folder_name"> + <property name="text"> + <string notr="true">folder</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_destination_folder"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Folder</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_content_destination_folder"> + <property name="text"> + <string notr="true">/destination/</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLineEdit" name="lineEditNewName"> + <property name="text"> + <string notr="true"/> + </property> + <property name="placeholderText"> + <string notr="true"/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="SuggestNewName"> + <property name="text"> + <string>Suggest new &name</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QCheckBox" name="checkBoxAlways"> + <property name="text"> + <string>&Always perform this action</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Rename"> + <property name="text"> + <string>&Rename</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Merge"> + <property name="text"> + <string>Merge</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Skip"> + <property name="text"> + <string>Skip</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="Cancel"> + <property name="text"> + <string>&Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>checkBoxAlways</sender> + <signal>clicked(bool)</signal> + <receiver>lineEditNewName</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>132</x> + <y>126</y> + </hint> + <hint type="destinationlabel"> + <x>135</x> + <y>101</y> + </hint> + </hints> + </connection> + <connection> + <sender>checkBoxAlways</sender> + <signal>clicked(bool)</signal> + <receiver>SuggestNewName</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>113</x> + <y>129</y> + </hint> + <hint type="destinationlabel"> + <x>304</x> + <y>100</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/plugins/CopyEngine/Ultracopier-Spec/informations.xml b/plugins/CopyEngine/Ultracopier-Spec/informations.xml new file mode 100755 index 0000000..7281da3 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/informations.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package> + <title xml:lang="en"><![CDATA[Copy engine OS Specific of Ultracopier]]></title><!-- english is required --> + <title xml:lang="fr"><![CDATA[Moteur de copie spécifique à l'OS d'ultracopier]]></title> + <!-- What kind of plugin this is --> + <category>CopyEngine</category> + <!-- Who wrote this plugin --> + <author><![CDATA[BRULE Herman, alpha_one_x86 (alpha_one_x86@first-world.info)]]></author> + <!-- URL of page or site for this plugin (may provide additional information, bug reports, feature requests). --> + <website xml:lang="en"><![CDATA[http://ultracopier.first-world.info/]]></website><!-- not required --> + <website xml:lang="fr"><![CDATA[http://ultracopier-fr.first-world.info/]]></website><!-- not required --> + <!-- the date-time format should be in timestamps format --> + <pubDate>1287496800</pubDate> + <!-- the architecture code of this plugin, found PlatformMacro.h into ultracopier source --> + <architecture>windows-x86</architecture> + <!-- Detailed description --> + <description xml:lang="en"><![CDATA[Copy engine of Ultracopier, OS Specific, Posix for Unix, Win32API for windows]]></description> + <description xml:lang="fr"><![CDATA[Moteur de copie d'ultracopier, spécifique à l'OS, Posix pour Unix, Win32API pour windows]]></description> + <!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number --> + <version>2.2.4.4</version> + <!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. --> + <name>Ultracopier Spec</name> + <!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. --> + <dependencies><![CDATA[ + ]]></dependencies> +</package> diff --git a/plugins/CopyEngine/Ultracopier-Spec/plugin.json b/plugins/CopyEngine/Ultracopier-Spec/plugin.json new file mode 100755 index 0000000..9e26dfe --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/plugin.json @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/plugins/CopyEngine/Ultracopier-Spec/ports.h b/plugins/CopyEngine/Ultracopier-Spec/ports.h new file mode 100755 index 0000000..f888794 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/ports.h @@ -0,0 +1,6 @@ +#if defined(PLATFORM_MAC) || defined(PLATFORM_HAIKU) + #define fseeko64 stat + #define ftruncate64 ftruncate + #define off64_t off_t + #define O_LARGEFILE 0 +#endif diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/add.png b/plugins/CopyEngine/Ultracopier-Spec/resources/add.png Binary files differnew file mode 100755 index 0000000..7932127 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/resources/add.png diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png b/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png Binary files differnew file mode 100755 index 0000000..5464856 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/resources/edit.png diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png b/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png Binary files differnew file mode 100755 index 0000000..9bb3164 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/resources/filter.png diff --git a/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png b/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png Binary files differnew file mode 100755 index 0000000..b711740 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/resources/remove.png |