-corrected bug in localization
This commit is contained in:
parent
3e0bd57029
commit
65896b087f
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.14.2, 2023-02-11T01:13:28. -->
|
||||
<!-- Written by QtCreator 4.14.2, 2023-02-12T17:55:57. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@ -141,7 +141,7 @@
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
@ -183,7 +183,7 @@
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
|
@ -256,114 +256,136 @@ Do you want to exit ?</source>
|
||||
Voulez-vous vraiment sortir ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="216"/>
|
||||
<location filename="mainwindow.cpp" line="215"/>
|
||||
<source>The program will keep running in the system tray. To terminate the program, choose <b>Quit</b> in the context menu of the system tray entry.</source>
|
||||
<translation>Le programme continue dans la boîte à miniatures. Pour quitter le programme cliquez sur l'icône <b>Quitter</b> ou dans les menu contextuel.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="502"/>
|
||||
<location filename="mainwindow.cpp" line="500"/>
|
||||
<source>server does not exists</source>
|
||||
<translation>Le serveur n'existe pas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="529"/>
|
||||
<location filename="mainwindow.cpp" line="549"/>
|
||||
<location filename="mainwindow.cpp" line="527"/>
|
||||
<location filename="mainwindow.cpp" line="547"/>
|
||||
<source>Dir</source>
|
||||
<translation>dossier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="533"/>
|
||||
<location filename="mainwindow.cpp" line="617"/>
|
||||
<location filename="mainwindow.cpp" line="531"/>
|
||||
<location filename="mainwindow.cpp" line="615"/>
|
||||
<source>File</source>
|
||||
<translation>Doc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="626"/>
|
||||
<location filename="mainwindow.cpp" line="624"/>
|
||||
<source>File is already downloaded. Do you want to reload it ? The old file will be deleted</source>
|
||||
<translation>Le document est déjà téléchargé. Voulez-vous le télécharger à nouveau ? L'ancien fichier sera effacé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="661"/>
|
||||
<location filename="mainwindow.cpp" line="659"/>
|
||||
<source>File is already downloading</source>
|
||||
<translation>Le document est déjà en téléchargement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="682"/>
|
||||
<source>Starting downloading
|
||||
</source>
|
||||
<translation>Démarrage du téléchargement
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="697"/>
|
||||
<source>finished</source>
|
||||
<translation>Terminé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="705"/>
|
||||
<source>Rsync process crashed</source>
|
||||
<translation>Le processus rsync à planté</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="861"/>
|
||||
<location filename="mainwindow.cpp" line="717"/>
|
||||
<source>stopped by user</source>
|
||||
<translation>stoppé par l'utilisateur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="721"/>
|
||||
<source>Download </source>
|
||||
<translation>Téléchargement </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="867"/>
|
||||
<source>Version</source>
|
||||
<translation>Version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="862"/>
|
||||
<location filename="mainwindow.cpp" line="868"/>
|
||||
<source>Licence</source>
|
||||
<translation>License</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="863"/>
|
||||
<location filename="mainwindow.cpp" line="869"/>
|
||||
<source>Author</source>
|
||||
<translation>Auteur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="864"/>
|
||||
<location filename="mainwindow.cpp" line="870"/>
|
||||
<source>EMail</source>
|
||||
<translation>Courriel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="865"/>
|
||||
<location filename="mainwindow.cpp" line="871"/>
|
||||
<source>Source code</source>
|
||||
<translation>Code source</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="888"/>
|
||||
<location filename="mainwindow.cpp" line="894"/>
|
||||
<source>Since the save path is linked to service, you need to select a service before you can select a folder</source>
|
||||
<translation>Vous devez sélectionnez un service pour pouvoir sélectionnez un dossier par défaut</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="893"/>
|
||||
<location filename="mainwindow.cpp" line="899"/>
|
||||
<source>Choose folder where to save file</source>
|
||||
<translation>Choisissez un dossier où enregistrer le document</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="779"/>
|
||||
<location filename="mainwindow.cpp" line="785"/>
|
||||
<source>Do you want to stop downloading and delete this file from download queue ?</source>
|
||||
<translation>Voulez-vous arrêter le téléchargement et enlever ce fichier de la file de téléchargement ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="793"/>
|
||||
<location filename="mainwindow.cpp" line="799"/>
|
||||
<source>Do you want to delete this file from download queue ?</source>
|
||||
<translation>Voulez-vous enlever ce fichier de la file de téléchargement ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="121"/>
|
||||
<location filename="mainwindow.h" line="122"/>
|
||||
<source>The process failed to start. Either the invoked program is missing, or you may have insufficient permissions or resources to invoke the program.</source>
|
||||
<translation>Le processus échoué, soit le programme est manquant, soit vous n'avez pas l'autorisation de l'exécuter.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="122"/>
|
||||
<location filename="mainwindow.h" line="123"/>
|
||||
<source>The process crashed some time after starting successfully.</source>
|
||||
<translation>Le processus à planté après avoir démarré avec succès.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="123"/>
|
||||
<location filename="mainwindow.h" line="124"/>
|
||||
<source>The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again.</source>
|
||||
<translation>La fonction waitFor...() a dépassé la limite de temps, you pouvez essayer de la relancer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="124"/>
|
||||
<location filename="mainwindow.h" line="125"/>
|
||||
<source>An error occurred when attempting to write to the process. For example, the process may not be running, or it may have closed its input channel.</source>
|
||||
<translation>Une erreur est survenue lors de l'envoi des données vers le processus. Le processus est peut être arrté ou il a fermé son canal d'entrée.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="125"/>
|
||||
<location filename="mainwindow.h" line="126"/>
|
||||
<source>An error occurred when attempting to read from the process. For example, the process may not be running.</source>
|
||||
<translation>Une erreur est survenue lors de la lecturee de données, le processus est probablement arrêté.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.h" line="126"/>
|
||||
<location filename="mainwindow.h" line="127"/>
|
||||
<source>An unknown error occurred. This is the default return value of error().</source>
|
||||
<translation>Une erreur inconnue est survenue. C'est la valeur de retour par défaut de error().</translation>
|
||||
</message>
|
||||
|
Binary file not shown.
7
main.cpp
7
main.cpp
@ -12,8 +12,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Initialization of localization
|
||||
QLocale localeName = QLocale::system();
|
||||
QString localeFile = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/RsyncUI_" + localeName.name() + ".qm";
|
||||
if (myappTranslator.load(localeFile))
|
||||
QString localeDir = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/"; //RsyncUI_" + localeName.name() + ".qm";
|
||||
QString localeFilename = QCoreApplication::applicationName() + "_" + localeName.name();
|
||||
QLocale locale = QLocale();
|
||||
|
||||
if (myappTranslator.load(localeFilename, localeDir))
|
||||
{
|
||||
a.installTranslator(&myappTranslator);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ void MainWindow::quitApp()
|
||||
saveDownloadList();
|
||||
}
|
||||
}
|
||||
delete ui;
|
||||
//delete ui;
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
|
||||
@ -206,7 +206,6 @@ void MainWindow::closeEvent (QCloseEvent *event)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
QCheckBox *cb = new QCheckBox("Don't show this again ?");
|
||||
QAbstractButton * reply;
|
||||
|
||||
if (!event->spontaneous() || !isVisible())
|
||||
return;
|
||||
@ -223,7 +222,7 @@ void MainWindow::closeEvent (QCloseEvent *event)
|
||||
// msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
msgBox.setCheckBox(cb);
|
||||
msgBox.exec();
|
||||
reply = msgBox.clickedButton();
|
||||
msgBox.clickedButton();
|
||||
|
||||
// if response is yes then loading list
|
||||
if (cb->isChecked())
|
||||
@ -372,7 +371,6 @@ void MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
QString line;
|
||||
QString size;
|
||||
QString filename;
|
||||
QTreeWidgetItem * item;
|
||||
QProcess * myProcess;
|
||||
bool isDir = false;
|
||||
bool flag = false;
|
||||
@ -383,7 +381,7 @@ void MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
myProcess = new QProcess(this);
|
||||
myProcess->start(cmd, param);
|
||||
|
||||
// waiting for response of the server with a timeout of 10 seconds
|
||||
// waiting for responsiteme of the server with a timeout of 10 seconds
|
||||
while(myProcess->waitForReadyRead(100000))
|
||||
{
|
||||
while (!flag)
|
||||
@ -411,11 +409,11 @@ void MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
if (parent != NULL)
|
||||
{
|
||||
//adding item to tree
|
||||
item = addTreeChild(parent, filename, size, isDir);
|
||||
addTreeChild(parent, filename, size, isDir);
|
||||
}else
|
||||
{
|
||||
//adding item to tree (as directory)
|
||||
item = addTreeRoot(filename, size, isDir);
|
||||
addTreeRoot(filename, size, isDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -681,6 +679,7 @@ void MainWindow::startDownloading()
|
||||
|
||||
//QtConcurrent::run(&this->downloadO, &downloadFile::download, this);
|
||||
download();
|
||||
this->trayIcon->showMessage("RsyncUI", tr("Starting downloading\n") + this->downloading.path, QSystemTrayIcon::Information);
|
||||
}
|
||||
|
||||
// Slot stopping download
|
||||
@ -695,6 +694,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
QString path;
|
||||
QString str;
|
||||
int pos;
|
||||
QString aborted = tr("finished");
|
||||
|
||||
// test if process crashed
|
||||
if (exitStatus == QProcess::CrashExit)
|
||||
@ -712,8 +712,14 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
rsyncErrorStrings[exitCode]);
|
||||
}else if (exitCode == 20)
|
||||
{
|
||||
aborted = tr("stopped by user");
|
||||
}
|
||||
|
||||
|
||||
this->trayIcon->showMessage("RsyncUI", tr("Download ") + aborted + "\n" + this->downloading.path, QSystemTrayIcon::Information);
|
||||
|
||||
// disconnecting signals to slots
|
||||
disconnect(this->downloading.process, 0, 0, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user