[gnote] Make errors, printed to console, translatable



commit 66ec4b3c06fc18de9471063185114d8bc278aaa4
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Wed Apr 17 21:55:44 2013 +0300

    Make errors, printed to console, translatable

 po/POTFILES.in                                          | 10 ++++++++++
 src/addinmanager.cpp                                    |  2 +-
 src/addins/bugzilla/bugzillapreferences.cpp             |  2 +-
 src/addins/exporttohtml/exporttohtmlnoteaddin.cpp       |  6 +++---
 .../notedirectorywatcherapplicationaddin.cpp            | 17 ++++++++++++-----
 src/addins/noteoftheday/noteoftheday.cpp                |  3 ++-
 src/addins/noteoftheday/noteofthedaypreferences.cpp     |  3 ++-
 src/dbus/remotecontrol-client-glue.cpp                  |  6 ++++--
 src/dbus/remotecontrol.cpp                              |  4 +++-
 src/gnote.cpp                                           |  4 ++--
 src/iconmanager.cpp                                     |  4 +++-
 src/note.cpp                                            | 10 +++++-----
 src/notebuffer.cpp                                      |  7 ++++---
 src/notemanager.cpp                                     |  6 +++---
 src/remotecontrolproxy.cpp                              |  5 +++--
 src/sharp/xmlreader.cpp                                 |  5 ++++-
 src/sharp/xsltransform.cpp                              |  5 +++--
 src/synchronization/filesystemsyncserver.cpp            |  9 +++++----
 src/synchronization/gnotesyncclient.cpp                 |  7 +++++--
 src/synchronization/syncmanager.cpp                     |  6 +++---
 20 files changed, 78 insertions(+), 43 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7534d87..f5f2352 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,6 +17,7 @@ src/addins/fixedwidth/fixedwidthmenuitem.cpp
 src/addins/inserttimestamp/inserttimestamp.desktop.in
 src/addins/inserttimestamp/inserttimestampnoteaddin.cpp
 src/addins/inserttimestamp/inserttimestamppreferences.cpp
+src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
 src/addins/notedirectorywatcher/notedirectorywatcher.desktop.in
 src/addins/noteoftheday/noteoftheday.desktop.in
 src/addins/noteoftheday/noteoftheday.cpp
@@ -36,6 +37,9 @@ src/addins/underline/underlinemenuitem.cpp
 src/addins/webdavsyncservice/webdavsyncservice.desktop.in
 src/addins/webdavsyncservice/webdavsyncserviceaddin.cpp
 src/gnote.cpp
+src/dbus/remotecontrol-client-glue.cpp
+src/dbus/remotecontrol.cpp
+src/iconmanager.cpp
 src/notebooks/createnotebookdialog.cpp
 src/notebooks/notebookapplicationaddin.cpp
 src/notebooks/notebook.cpp
@@ -44,16 +48,22 @@ src/notebooks/notebookmenuitem.cpp
 src/notebooks/notebooknewnotemenuitem.cpp
 src/notebooks/notebooknoteaddin.cpp
 src/note.cpp
+src/notebuffer.cpp
 src/notemanager.cpp
 src/noterenamedialog.cpp
 src/notewindow.cpp
 src/preferencesdialog.cpp
 src/recentchanges.cpp
+src/remotecontrolproxy.cpp
 src/searchnoteswidget.cpp
 src/sharp/addinstreemodel.cpp
 src/sharp/modulemanager.cpp
+src/sharp/xmlreader.cpp
 src/sharp/xmlwriter.cpp
+src/sharp/xsltransform.cpp
+src/synchronization/filesystemsyncserver.cpp
 src/synchronization/fusesyncserviceaddin.cpp
+src/synchronization/gnotesyncclient.cpp
 src/synchronization/syncdialog.cpp
 src/synchronization/syncmanager.cpp
 src/synchronization/syncutils.cpp
diff --git a/src/addinmanager.cpp b/src/addinmanager.cpp
index f7ae871..9c0e6e5 100644
--- a/src/addinmanager.cpp
+++ b/src/addinmanager.cpp
@@ -298,7 +298,7 @@ namespace gnote {
   void AddinManager::load_addins_for_note(const Note::Ptr & note)
   {
     if(m_note_addins.find(note) != m_note_addins.end()) {
-      ERR_OUT("trying to load addins when they are already loaded");
+      ERR_OUT(_("Trying to load addins when they are already loaded"));
       return;
     }
     IdAddinMap loaded_addins;
diff --git a/src/addins/bugzilla/bugzillapreferences.cpp b/src/addins/bugzilla/bugzillapreferences.cpp
index dc22855..410fb4d 100644
--- a/src/addins/bugzilla/bugzillapreferences.cpp
+++ b/src/addins/bugzilla/bugzillapreferences.cpp
@@ -386,7 +386,7 @@ namespace bugzilla {
         update_icon_store ();
       } 
       catch (const sharp::Exception & e) {
-        ERR_OUT("Error removing icon %s: %s", icon_path.c_str(), e.what());
+        ERR_OUT(_("Error removing icon %s: %s"), icon_path.c_str(), e.what());
       }
     }
   }
diff --git a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp 
b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
index 9d94791..21316d4 100644
--- a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
+++ b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
@@ -114,7 +114,7 @@ void ExportToHtmlNoteAddin::export_button_clicked()
       gnote::utils::open_url("file://" + output_uri.get_absolute_uri());
     } 
     catch (const Glib::Exception & ex) {
-      ERR_OUT ("Could not open exported note in a web browser: %s",
+      ERR_OUT(_("Could not open exported note in a web browser: %s"),
                ex.what().c_str());
 
       std::string detail = str(boost::format(
@@ -141,7 +141,7 @@ void ExportToHtmlNoteAddin::export_button_clicked()
   } 
 #endif
   catch (const sharp::Exception & e) {
-    ERR_OUT("Could not export: %s", e.what());
+    ERR_OUT(_("Could not export: %s"), e.what());
 
     error_message = e.what();
   } 
@@ -149,7 +149,7 @@ void ExportToHtmlNoteAddin::export_button_clicked()
 
   if (!error_message.empty())
   {
-    ERR_OUT("Could not export: %s", error_message.c_str());
+    ERR_OUT(_("Could not export: %s"), error_message.c_str());
 
     std::string msg = str(boost::format(
                             _("Could not save the file \"%s\"")) 
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
index 8e72939..4e73397 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
@@ -20,6 +20,8 @@
 
 #include <fstream>
 
+#include <glibmm/i18n.h>
+
 #include "debug.hpp"
 #include "notedirectorywatcherapplicationaddin.hpp"
 #include "notemanager.hpp"
@@ -219,7 +221,8 @@ void NoteDirectoryWatcherApplicationAddin::add_or_update_note(const std::string
     reader.close();
   }
   catch(std::ios::failure & e) {
-    ERR_OUT("NoteDirectoryWatcher: Update aborted, error reading %s: %s", note_path.c_str(), e.what());
+    /* TRANSLATORS: first %s is file name, second is error */
+    ERR_OUT(_("NoteDirectoryWatcher: Update aborted, error reading %s: %s"), note_path.c_str(), e.what());
     return;
   }
 
@@ -245,19 +248,22 @@ void NoteDirectoryWatcherApplicationAddin::add_or_update_note(const std::string
       title = match_info.fetch(1);
     }
     else {
-      ERR_OUT("NoteDirectoryWatcher: Error reading note title from %s", note_path.c_str());
+      /* TRANSLATORS: %s is file */
+      ERR_OUT(_("NoteDirectoryWatcher: Error reading note title from %s"), note_path.c_str());
       return;
     }
 
     try {
       note = note_manager().create_with_guid(title, note_id);
       if(note == 0) {
-        ERR_OUT("NoteDirectoryWatcher: Unknown error creating note from %s", note_path.c_str());
+        /* TRANSLATORS: %s is file */
+        ERR_OUT(_("NoteDirectoryWatcher: Unknown error creating note from %s"), note_path.c_str());
         return;
       }
     }
     catch(std::exception & e) {
-      ERR_OUT("NoteDirectoryWatcher: Error creating note from %s: %s", note_path.c_str(), e.what());
+      /* TRANSLATORS: first %s is file, second is error */
+      ERR_OUT(_("NoteDirectoryWatcher: Error creating note from %s: %s"), note_path.c_str(), e.what());
       return;
     }
   }
@@ -269,7 +275,8 @@ void NoteDirectoryWatcherApplicationAddin::add_or_update_note(const std::string
     note->load_foreign_note_xml(noteXml, gnote::CONTENT_CHANGED);
   }
   catch(std::exception & e) {
-    ERR_OUT("NoteDirectoryWatcher: Update aborted, error parsing %s: %s", note_path.c_str(), e.what());
+    /* TRANSLATORS: first %s is file, second is error */
+    ERR_OUT(_("NoteDirectoryWatcher: Update aborted, error parsing %s: %s"), note_path.c_str(), e.what());
     if(is_new_note) {
       note_manager().delete_note(note);
     }
diff --git a/src/addins/noteoftheday/noteoftheday.cpp b/src/addins/noteoftheday/noteoftheday.cpp
index 0ddf40d..9320332 100644
--- a/src/addins/noteoftheday/noteoftheday.cpp
+++ b/src/addins/noteoftheday/noteoftheday.cpp
@@ -45,7 +45,8 @@ gnote::Note::Ptr NoteOfTheDay::create(gnote::NoteManager & manager,
     notd = manager.create(title, xml);
   }
   catch (const sharp::Exception & e) {
-    ERR_OUT("NoteOfTheDay could not create %s: %s",
+    /* TRANSLATORS: first %s is note title, second is error */
+    ERR_OUT(_("NoteOfTheDay could not create %s: %s"),
             title.c_str(),
             e.what());
     return gnote::Note::Ptr();
diff --git a/src/addins/noteoftheday/noteofthedaypreferences.cpp 
b/src/addins/noteoftheday/noteofthedaypreferences.cpp
index ffe8a4b..5e9b9ba 100644
--- a/src/addins/noteoftheday/noteofthedaypreferences.cpp
+++ b/src/addins/noteoftheday/noteofthedaypreferences.cpp
@@ -67,7 +67,8 @@ void NoteOfTheDayPreferences::open_template_button_clicked() const
       template_note->queue_save(gnote::CONTENT_CHANGED);
     }
     catch (const sharp::Exception & e) {
-      ERR_OUT("NoteOfTheDay could not create %s: %s",
+      /* TRANSLATORS: first %s is template note title, second is error */
+      ERR_OUT(_("NoteOfTheDay could not create %s: %s"),
               NoteOfTheDay::s_template_title.c_str(),
               e.what());
     }
diff --git a/src/dbus/remotecontrol-client-glue.cpp b/src/dbus/remotecontrol-client-glue.cpp
index 2d7596b..0a70edc 100644
--- a/src/dbus/remotecontrol-client-glue.cpp
+++ b/src/dbus/remotecontrol-client-glue.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2013 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
  */
 
 
+#include <glibmm/i18n.h>
+
 #include "debug.hpp"
 #include "remotecontrol-client-glue.hpp"
 
@@ -133,7 +135,7 @@ Glib::VariantContainerBase RemoteControl_proxy::call_remote(const Glib::ustring
     return call_sync(method_name, parameters);
   }
   catch(...) {
-    ERR_OUT("Remote call failed: %s", method_name.c_str());
+    ERR_OUT(_("Remote call to %s failed"), method_name.c_str());
     return Glib::VariantContainerBase();
   }
 }
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index efdb5c5..8b48ac9 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -18,6 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <glibmm/i18n.h>
+
 #include "config.h"
 
 #include "debug.hpp"
@@ -79,7 +81,7 @@ namespace gnote {
       return note->uri();
     } 
     catch (const std::exception & e) {
-      ERR_OUT("create throw: %s", e.what());
+      ERR_OUT(_("Exception thrown when creating note: %s"), e.what());
     }
     return "";
   }
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 95223de..aae886f 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -190,7 +190,7 @@ namespace gnote {
         {
         }
 
-        ERR_OUT ("Gnote is already running.  Exiting...");
+        ERR_OUT(_("Gnote is already running.  Exiting..."));
         ::exit(-1);
       }
     }
@@ -644,7 +644,7 @@ namespace gnote {
       //gnote already running, execute via D-Bus and exit this instance
       Glib::RefPtr<RemoteControlClient> remote = RemoteControlProxy::get_instance();
       if(!remote) {
-        ERR_OUT("Could not connect to remote instance.");
+        ERR_OUT(_("Could not connect to remote instance."));
       }
       else {
         execute(remote);
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index ec95864..197966e 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -18,6 +18,7 @@
  */
 
 
+#include <glibmm/i18n.h>
 #include <gtkmm/icontheme.h>
 
 #include "debug.hpp"
@@ -59,7 +60,8 @@ Glib::RefPtr<Gdk::Pixbuf> IconManager::get_icon(const std::string & name, int si
     return pixbuf;
   }
   catch(const Glib::Exception & e) {
-    ERR_OUT("Failed to load icon (%s, %d): %s", name.c_str(), size, e.what().c_str());
+    /* TRANSLATORS: the first %s is icon name, %d is for size, last %s is error description */
+    ERR_OUT(_("Failed to load icon (%s, %d): %s"), name.c_str(), size, e.what().c_str());
   }
   return Glib::RefPtr<Gdk::Pixbuf>();
 }
diff --git a/src/note.cpp b/src/note.cpp
index 9af4779..7183cfc 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -415,7 +415,7 @@ namespace gnote {
     } 
     catch (const sharp::Exception & e) {
       // Probably IOException or UnauthorizedAccessException?
-      ERR_OUT("Exception while saving note: %s", e.what());
+      ERR_OUT(_("Exception while saving note: %s"), e.what());
       show_io_error_dialog(dynamic_cast<Gtk::Window*>(m_window->host()));
     }
 
@@ -521,7 +521,7 @@ namespace gnote {
     }
     catch(const sharp::Exception &e) 
     {
-      ERR_OUT("Error while saving: %s", e.what());
+      ERR_OUT(_("Error while saving: %s"), e.what());
     }
   }
 
@@ -944,7 +944,7 @@ namespace gnote {
       m_buffer->set_text(text);
     }
     else {
-      ERR_OUT("Setting text content for closed notes not supported");
+      ERR_OUT(_("Setting text content for closed notes not supported"));
     }
   }
 
@@ -1138,7 +1138,7 @@ namespace gnote {
       }
       catch(sharp::Exception & e) {
         // write failure, but not critical
-        ERR_OUT("Failed to update note format: %s", e.what());
+        ERR_OUT(_("Failed to update note format: %s"), e.what());
       }
     }
     return data;
@@ -1279,7 +1279,7 @@ namespace gnote {
     }
     catch(const std::exception & e)
     {
-      ERR_OUT("filesystem error: '%s'", e.what());
+      ERR_OUT(_("Filesystem error: %s"), e.what());
     }
   }
 
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index b1b6e97..f681bff 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2012 Aurimas Cernius
+ * Copyright (C) 2010-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -23,6 +23,7 @@
 #include <algorithm>
 #include <tr1/array>
 
+#include <glibmm/i18n.h>
 #include <glibmm/main.h>
 
 #include "debug.hpp"
@@ -1488,7 +1489,7 @@ namespace gnote {
               list_stack.push_front (false);
             } 
             else {
-              ERR_OUT("</list> tag mismatch");
+              ERR_OUT(_("</list> tag mismatch"));
             }
           } 
           else {
@@ -1567,7 +1568,7 @@ namespace gnote {
       }
     }
     catch(const std::exception & e) {
-      ERR_OUT("Exception, %s", e.what());
+      ERR_OUT(_("Exception: %s"), e.what());
     }
   }
 
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index 0b96bf8..333e974 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -280,8 +280,7 @@ namespace gnote {
       links_note->queue_save (CONTENT_CHANGED);
     } 
     catch (const std::exception & e) {
-      ERR_OUT("Error creating start notes: %s",
-              e.what());
+      ERR_OUT(_("Error creating start notes: %s"), e.what());
     }
   }
 
@@ -308,7 +307,8 @@ namespace gnote {
         add_note(note);
       } 
       catch (const std::exception & e) {
-        ERR_OUT("Error parsing note XML, skipping \"%s\": %s",
+        /* TRANSLATORS: first %s is file, second is error */
+        ERR_OUT(_("Error parsing note XML, skipping \"%s\": %s"),
                 file_path.c_str(), e.what());
       }
     }
diff --git a/src/remotecontrolproxy.cpp b/src/remotecontrolproxy.cpp
index 8e761be..eb6fb31 100644
--- a/src/remotecontrolproxy.cpp
+++ b/src/remotecontrolproxy.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 
 #include <fstream>
 
+#include <glibmm/i18n.h>
 #include <giomm/dbusownname.h>
 
 
@@ -133,7 +134,7 @@ void RemoteControlProxy::load_introspection_xml()
     s_gnote_interface = node->lookup_interface(GNOTE_INTERFACE_NAME);
   }
   catch(Glib::Error & e) {
-    ERR_OUT("Failed to load interface: %s", e.what().c_str());
+    ERR_OUT(_("Failed to load D-Bus interface: %s"), e.what().c_str());
   }
 }
 
diff --git a/src/sharp/xmlreader.cpp b/src/sharp/xmlreader.cpp
index a558301..bcbfdff 100644
--- a/src/sharp/xmlreader.cpp
+++ b/src/sharp/xmlreader.cpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,6 +25,8 @@
 
 
 
+#include <glibmm/i18n.h>
+
 #include "debug.hpp"
 
 #include "sharp/xmlreader.hpp"
@@ -189,7 +192,7 @@ namespace sharp {
   {
     XmlReader* self = (XmlReader*)arg;
     self->m_error = true;
-    ERR_OUT("XML error %s", msg ? msg : "unknown parse error");
+    ERR_OUT(_("XML error: %s"), msg ? msg : _("unknown parse error"));
   }
 
 }
diff --git a/src/sharp/xsltransform.cpp b/src/sharp/xsltransform.cpp
index 00b7b80..72417b3 100644
--- a/src/sharp/xsltransform.cpp
+++ b/src/sharp/xsltransform.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,6 +25,7 @@
 
 #include <stdlib.h>
 
+#include <glibmm/i18n.h>
 #include <libxslt/xsltutils.h>
 
 #include "sharp/exception.hpp"
@@ -63,7 +64,7 @@ void XslTransform::transform(xmlDocPtr doc, const XsltArgumentList & args, Strea
 {
   const char **params = NULL;
   if(m_stylesheet == NULL) {
-    ERR_OUT("NULL stylesheet");
+    ERR_OUT(_("NULL stylesheet, please fill a bug"));
     return;
   }
 
diff --git a/src/synchronization/filesystemsyncserver.cpp b/src/synchronization/filesystemsyncserver.cpp
index 7ab9c84..8a0181e 100644
--- a/src/synchronization/filesystemsyncserver.cpp
+++ b/src/synchronization/filesystemsyncserver.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
 
 #include <boost/format.hpp>
 #include <boost/lexical_cast.hpp>
+#include <glibmm/i18n.h>
 
 #include "debug.hpp"
 #include "filesystemsyncserver.hpp"
@@ -366,8 +367,8 @@ bool FileSystemSyncServer::commit_sync_transaction()
       }
     }
     catch(std::exception & e) {
-      ERR_OUT("Exception during server cleanup while committing. Server integrity is OK, but \
-there may be some excess files floating around.  Here's the error:%s\n", e.what());
+      ERR_OUT(_("Exception during server cleanup while committing. Server integrity is OK, but "
+                "there may be some excess files floating around.  Here's the error: %s\n"), e.what());
     }
     // * * * End Cleanup Code * * *
   }
@@ -608,7 +609,7 @@ void FileSystemSyncServer::cleanup_old_sync(const SyncLockInfo &)
     sharp::file_delete(m_lock_path);
   }
   catch(std::exception & e) {
-    ERR_OUT("Error deleting the old sync lock \"%s\": %s", m_lock_path.c_str(), e.what());
+    ERR_OUT(_("Error deleting the old synchronization lock \"%s\": %s"), m_lock_path.c_str(), e.what());
   }
 }
 
diff --git a/src/synchronization/gnotesyncclient.cpp b/src/synchronization/gnotesyncclient.cpp
index e126f91..21ed5d1 100644
--- a/src/synchronization/gnotesyncclient.cpp
+++ b/src/synchronization/gnotesyncclient.cpp
@@ -23,6 +23,7 @@
 
 
 #include <boost/lexical_cast.hpp>
+#include <glibmm/i18n.h>
 
 #include "debug.hpp"
 #include "ignote.hpp"
@@ -150,7 +151,8 @@ namespace sync {
            m_last_sync_date = sharp::DateTime::from_iso8601(value);
          }
          catch(...) {
-           ERR_OUT("Unparsable last-sync-date element in %s", manifest_path.c_str());
+            /* TRANSLATORS: %s is file */
+           ERR_OUT(_("Unparsable last-sync-date element in %s"), manifest_path.c_str());
          }
        }
        else if(reader.get_name() == "last-sync-rev") {
@@ -159,7 +161,8 @@ namespace sync {
            m_last_sync_rev = boost::lexical_cast<int>(value);
          }
          catch(...) {
-           ERR_OUT("Unparsable last-sync-rev element in %s", manifest_path.c_str());
+            /* TRANSLATORS: %s is file */
+           ERR_OUT(_("Unparsable last-sync-rev element in %s"), manifest_path.c_str());
          }
        }
        else if(reader.get_name() == "server-id") {
diff --git a/src/synchronization/syncmanager.cpp b/src/synchronization/syncmanager.cpp
index d021590..4c0c24a 100644
--- a/src/synchronization/syncmanager.cpp
+++ b/src/synchronization/syncmanager.cpp
@@ -121,7 +121,7 @@ namespace sync {
           }
         }
         catch(std::exception & e) {
-          ERR_OUT("Error cleaning up addin after sync: %s", e.what());
+          ERR_OUT(_("Error cleaning up addin after synchronization: %s"), e.what());
         }
       }
     } f;
@@ -146,7 +146,7 @@ namespace sync {
       }
       catch(std::exception & e) {
         set_state(SYNC_SERVER_CREATION_FAILED);
-        ERR_OUT("Exception while creating SyncServer: %s", e.what());
+        ERR_OUT(_("Exception while creating SyncServer: %s"), e.what());
         set_state(IDLE);
         m_sync_thread = NULL;
         f.addin->post_sync_cleanup();// TODO: Needed?
@@ -350,7 +350,7 @@ namespace sync {
 
     }
     catch(std::exception & e) { // top-level try
-      ERR_OUT("Synchronization failed with the following exception: %s", e.what());
+      ERR_OUT(_("Synchronization failed with the following exception: %s"), e.what());
       // TODO: Report graphically to user
       try {
         set_state(IDLE); // stop progress


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]