Skip to content
Snippets Groups Projects
Commit 772032d5 authored by akiraohgaki's avatar akiraohgaki
Browse files

Change messages possible to translate easy

parent 3a985fb0
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ void OcsUrlHandler::process() ...@@ -34,7 +34,7 @@ void OcsUrlHandler::process()
if (!isValid()) { if (!isValid()) {
QJsonObject result; QJsonObject result;
result["status"] = QString("error_validation"); result["status"] = QString("error_validation");
result["message"] = QString("Invalid OCS-URL " + ocsUrl_); result["message"] = QString("Invalid OCS-URL");
emit finishedWithError(result); emit finishedWithError(result);
return; return;
} }
...@@ -138,14 +138,14 @@ void OcsUrlHandler::saveDownloadedFile(qtlib::NetworkResource *resource) ...@@ -138,14 +138,14 @@ void OcsUrlHandler::saveDownloadedFile(qtlib::NetworkResource *resource)
if (!resource->saveData(destFile.path())) { if (!resource->saveData(destFile.path())) {
result["status"] = QString("error_save"); result["status"] = QString("error_save");
result["message"] = QString("Failed to save data as " + destFile.path()); result["message"] = QString("Failed to save data");
emit finishedWithError(result); emit finishedWithError(result);
resource->deleteLater(); resource->deleteLater();
return; return;
} }
result["status"] = QString("success_download"); result["status"] = QString("success_download");
result["message"] = QString("The file has been stored into " + destDir.path()); result["message"] = QString("The file has been downloaded");
emit finishedWithSuccess(result); emit finishedWithSuccess(result);
resource->deleteLater(); resource->deleteLater();
...@@ -159,7 +159,7 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource) ...@@ -159,7 +159,7 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource)
if (!resource->saveData(tempFile.path())) { if (!resource->saveData(tempFile.path())) {
result["status"] = QString("error_save"); result["status"] = QString("error_save");
result["message"] = QString("Failed to save data as " + tempFile.path()); result["message"] = QString("Failed to save data");
emit finishedWithError(result); emit finishedWithError(result);
resource->deleteLater(); resource->deleteLater();
return; return;
...@@ -173,7 +173,7 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource) ...@@ -173,7 +173,7 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource)
if (type == "bin" if (type == "bin"
&& package.installAsProgram(destFile.path())) { && package.installAsProgram(destFile.path())) {
result["message"] = QString("The file has been installed into " + destDir.path()); result["message"] = QString("The file has been installed as program");
} }
else if ((type == "plasma_plasmoids" || type == "plasma4_plasmoids" || type == "plasma5_plasmoids") else if ((type == "plasma_plasmoids" || type == "plasma4_plasmoids" || type == "plasma5_plasmoids")
&& package.installAsPlasmapkg("plasmoid")) { && package.installAsPlasmapkg("plasmoid")) {
...@@ -200,10 +200,10 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource) ...@@ -200,10 +200,10 @@ void OcsUrlHandler::installDownloadedFile(qtlib::NetworkResource *resource)
result["message"] = QString("The KWin window switcher has been installed"); result["message"] = QString("The KWin window switcher has been installed");
} }
else if (package.installAsArchive(destDir.path())) { else if (package.installAsArchive(destDir.path())) {
result["message"] = QString("The archive file has been extracted into " + destDir.path()); result["message"] = QString("The archive file has been extracted");
} }
else if (package.installAsFile(destFile.path())) { else if (package.installAsFile(destFile.path())) {
result["message"] = QString("The file has been installed into " + destDir.path()); result["message"] = QString("The file has been installed");
} }
else { else {
result["status"] = QString("error_install"); result["status"] = QString("error_install");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment