summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/FileTransfer.cpp
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2009-09-02 11:39:27 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2009-09-02 11:39:27 +0200
commit84ae8a43927b479a8b3565e43d0b3a109b164c21 (patch)
tree80a7bed6a04fdb9628b0b039b72050bc6175b712 /lib/Plugins/FileTransfer.cpp
parent6f27b31e64229bf15670b48a19b0348888b0ca28 (diff)
downloadabrt-84ae8a43927b479a8b3565e43d0b3a109b164c21.tar.gz
abrt-84ae8a43927b479a8b3565e43d0b3a109b164c21.tar.xz
abrt-84ae8a43927b479a8b3565e43d0b3a109b164c21.zip
add gettext support for all plugins
Diffstat (limited to 'lib/Plugins/FileTransfer.cpp')
-rw-r--r--lib/Plugins/FileTransfer.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 76dbb07..9e2ee1a 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -49,7 +49,8 @@ void CFileTransfer::SendFile(const std::string& pURL,
if (pURL == "")
{
- warn_client("FileTransfer: URL not specified");
+ warn_client(_("FileTransfer: URL not specified"));
+
return;
}
protocol = "";
@@ -64,7 +65,9 @@ void CFileTransfer::SendFile(const std::string& pURL,
}
}
- update_client("Sending archive " + pFilename + " via " + protocol);
+ char buffer[1024];
+ snprintf(buffer, 1024, _("Sending archive %s via %s"), pFilename.c_str(), protocol.c_str());
+ update_client(std::string(buffer));
if( pURL[len-1] == '/' )
{
@@ -115,7 +118,7 @@ void CFileTransfer::CreateArchive(const std::string& pArchiveName,
std::string cmdline;
int result;
- update_client("Creating an archive...");
+ update_client(_("Creating an archive..."));
/*TODO: consider library for archive creation, if there is any*/
@@ -170,7 +173,7 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
std::string dirname, archivename;
char hostname[HBLEN];
- update_client("File Transfer: Creating a report...");
+ update_client(_("File Transfer: Creating a report..."));
if (pArgs == "store")
{
@@ -191,8 +194,8 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
}
catch (CABRTException& e)
{
- warn_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
- update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
+ warn_client(_("CFileTransfer::Run(): Cannot create and send an archive: ") + e.what());
+ //update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
}
unlink(archivename.c_str());
}
@@ -220,8 +223,8 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
}
catch (CABRTException& e)
{
- warn_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
- update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
+ warn_client(_("CFileTransfer::Run(): Cannot create and send an archive: ") + e.what());
+// update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
}
unlink(archivename.c_str());
}
@@ -241,7 +244,7 @@ void CFileTransfer::SetSettings(const map_plugin_settings_t& pSettings)
}
else
{
- warn_client("FileTransfer: URL not specified");
+ warn_client(_("FileTransfer: URL not specified"));
}
if (pSettings.find("RetryCount") != pSettings.end())