Fix non-translated days of the week (#1455).
[dcpomatic.git] / src / lib / job.cc
index dde8cce62ad42379c999ccf2103f891afbca6b04..8cc6ced8ef2e90f81f83d802466f269f8237eb59 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -172,6 +172,12 @@ Job::run_wrapper ()
                set_progress (1);
                set_state (FINISHED_ERROR);
 
+       } catch (dcp::MissingAssetError& e) {
+
+               set_error (e.message(), e.path().string());
+               set_progress (1);
+               set_state (FINISHED_ERROR);
+
        } catch (dcp::DCPReadError& e) {
 
                set_error (e.message(), e.detail().get_value_or(""));
@@ -288,6 +294,7 @@ Job::set_state (State s)
 
        if (finished) {
                emit (boost::bind (boost::ref (Finished)));
+               FinishedImmediate ();
        }
 }
 
@@ -442,7 +449,7 @@ Job::status () const
                        if (now.date() != finish.date()) {
                                /// TRANSLATORS: the %1 in this string will be filled in with a day of the week
                                /// to say what day a job will finish.
-                               day = String::compose (_(" on %1"), finish.date().day_of_week().as_long_string());
+                               day = String::compose (_(" on %1"), day_of_week_to_string(finish.date().day_of_week()));
                        }
                        /// TRANSLATORS: "remaining; finishing at" here follows an amount of time that is remaining
                        /// on an operation; after it is an estimated wall-clock completion time.