summaryrefslogtreecommitdiff
path: root/src/lib/job.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-28 22:20:07 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-28 22:20:07 +0000
commit0d3f5aae5b99832b7c5d55f32f5bccb365caa3fd (patch)
tree674f3fe851d2ddd619102ca60c54bc1473a56ffe /src/lib/job.cc
parent8bb4ba8f424cac07f7730fca99d5333fcd76a84d (diff)
Various markup and tweaks.
Diffstat (limited to 'src/lib/job.cc')
-rw-r--r--src/lib/job.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index bfad65a0a..77d367136 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -27,6 +27,8 @@
#include "job.h"
#include "util.h"
+#include "i18n.h"
+
using std::string;
using std::list;
using std::stringstream;
@@ -66,11 +68,12 @@ Job::run_wrapper ()
set_progress (1);
set_state (FINISHED_ERROR);
- string m = String::compose ("An error occurred whilst handling the file %1.", boost::filesystem::path (e.filename()).leaf());
+ string m = String::compose (_("An error occurred whilst handling the file %1."), boost::filesystem::path (e.filename()).leaf());
boost::filesystem::space_info const s = boost::filesystem::space (e.filename());
if (s.available < pow (1024, 3)) {
- m += "\n\nThe drive that the film is stored on is low in disc space. Free some more space and try again.";
+ m += N_("\n\n");
+ m += _("The drive that the film is stored on is low in disc space. Free some more space and try again.");
}
set_error (e.what(), m);
@@ -81,7 +84,7 @@ Job::run_wrapper ()
set_state (FINISHED_ERROR);
set_error (
e.what (),
- "It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)"
+ _("It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
);
} catch (...) {
@@ -89,8 +92,8 @@ Job::run_wrapper ()
set_progress (1);
set_state (FINISHED_ERROR);
set_error (
- "Unknown error",
- "It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)"
+ _("Unknown error"),
+ _("It is not known what caused this error. The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
);
}
@@ -273,14 +276,16 @@ Job::status () const
stringstream s;
if (!finished ()) {
- s << pc << "%";
+ s << pc << N_("%");
if (p >= 0 && t > 10 && r > 0) {
- s << "; " << seconds_to_approximate_hms (r) << " remaining";
+ /// TRANSLATORS: remaining here follows an amount of time that is remaining
+ /// on an operation.
+ s << "; " << seconds_to_approximate_hms (r) << " " << _("remaining");
}
} else if (finished_ok ()) {
- s << "OK (ran for " << seconds_to_hms (_ran_for) << ")";
+ s << String::compose (_("OK (ran for %1)"), seconds_to_hms (_ran_for));
} else if (finished_in_error ()) {
- s << "Error (" << error_summary() << ")";
+ s << String::compose (_("Error (%1)"), error_summary());
}
return s.str ();