Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
authorCarl Hetherington <cth@carlh.net>
Mon, 4 Jun 2018 10:13:38 +0000 (11:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 4 Jun 2018 10:13:38 +0000 (11:13 +0100)
12 files changed:
ChangeLog
platform/osx/make_dmg.sh
src/lib/job_manager.cc
src/lib/job_manager.h
src/lib/po/fr_FR.po
src/lib/util.cc
src/tools/dcpomatic_batch.cc
src/tools/po/fr_FR.po
src/wx/full_config_dialog.cc
src/wx/job_view.cc
src/wx/po/fr_FR.po
test/util_test.cc

index 186d614de238c2017fc16c215a7056f7122c163d..4d3741eebb4d4968ce05e2a5d831232b3c86ad7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-29  Carl Hetherington  <cth@carlh.net>
+
+       * Updated fr_FR translation from Thierry Journet.
+
 2018-05-27  Carl Hetherington  <cth@carlh.net>
 
        * Support notifications on jobs finishing (#1286).
index 27a4da816eeeb739d8c84968e661648d01884d28..f2f459785ee88c453155a60e99a6b9282be61060 100644 (file)
@@ -121,10 +121,12 @@ function copy_resources {
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/colour_conversions.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/defaults.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/kdm_email.png "$dest"
+    cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/email.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/servers.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/tms.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/keys.png "$dest"
     cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/cover_sheet.png "$dest"
+    cp $ROOT/32/src/dcpomatic/graphics/osx/preferences/notifications.png "$dest"
     cp $ROOT/32/src/dcpomatic/fonts/LiberationSans-Regular.ttf "$dest"
     cp $ROOT/32/src/dcpomatic/fonts/LiberationSans-Italic.ttf "$dest"
     cp $ROOT/32/src/dcpomatic/fonts/LiberationSans-Bold.ttf "$dest"
index e3b6e257b4f4a9bb05c7b9e3e2815de9570d5d4a..6d651d2ba1d51adc531efc64b51c6c5f88002d31 100644 (file)
@@ -90,6 +90,21 @@ JobManager::add (shared_ptr<Job> j)
        return j;
 }
 
+shared_ptr<Job>
+JobManager::add_after (shared_ptr<Job> after, shared_ptr<Job> j)
+{
+       {
+               boost::mutex::scoped_lock lm (_mutex);
+               list<shared_ptr<Job> >::iterator i = find (_jobs.begin(), _jobs.end(), after);
+               DCPOMATIC_ASSERT (i != _jobs.end());
+               _jobs.insert (i, j);
+       }
+
+       emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
+
+       return j;
+}
+
 list<shared_ptr<Job> >
 JobManager::get () const
 {
index 9cba0fd094a46bd44796532543e6e7ac9ebce4ac..a382dd7363732cc4ddd20fad782005bd438ea2ff 100644 (file)
@@ -41,6 +41,7 @@ class JobManager : public Signaller, public boost::noncopyable
 {
 public:
        boost::shared_ptr<Job> add (boost::shared_ptr<Job>);
+       boost::shared_ptr<Job> add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
        std::list<boost::shared_ptr<Job> > get () const;
        bool work_to_do () const;
        bool errors () const;
index e2de8ab54104835de84ca638a4753aa0453e3a85..535f6bab754de562856f9b14f123ef308be2c6d1 100644 (file)
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: DCP-o-matic FRENCH\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-05-20 20:14+0100\n"
-"PO-Revision-Date: 2018-04-24 22:27+0100\n"
+"PO-Revision-Date: 2018-05-29 23:36+0100\n"
 "Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
 "Language-Team: \n"
 "Language: fr_FR\n"
@@ -259,7 +259,7 @@ msgstr "BT2020 luminance non-constante"
 
 #: src/lib/ffmpeg_content.cc:578
 msgid "BT2100"
-msgstr ""
+msgstr "BT2100"
 
 #: src/lib/ffmpeg_content.cc:515
 msgid "BT470BG"
@@ -323,14 +323,12 @@ msgid "Checking existing image data"
 msgstr "Recherche de données images existantes"
 
 #: src/lib/ffmpeg_content.cc:577
-#, fuzzy
 msgid "Chroma-derived constant luminance"
-msgstr "BT2020 luminance constante"
+msgstr "Luminance constante dérivée de la chrominance"
 
 #: src/lib/ffmpeg_content.cc:576
-#, fuzzy
 msgid "Chroma-derived non-constant luminance"
-msgstr "BT2020 luminance non-constante"
+msgstr "Luminance non constante dérivée de la chrominance"
 
 #: src/lib/ffmpeg_content.cc:536
 msgid "Colour primaries"
@@ -792,7 +790,7 @@ msgstr "Erreur indéterminée."
 
 #: src/lib/ffmpeg_content.cc:532
 msgid "JEDEC P22"
-msgstr ""
+msgstr "JEDEC P22"
 
 #: src/lib/config.cc:308 src/lib/config.cc:821
 msgid "KDM delivery: $CPL_NAME"
@@ -1163,7 +1161,7 @@ msgstr ""
 
 #: src/lib/dcp_content.cc:521
 msgid "There is no video in this DCP"
-msgstr ""
+msgstr "Il n'y a aucune vidéo dans ce DCP"
 
 #: src/lib/job.cc:173
 msgid ""
index 3eb5ee30e09e06831924988fd7d85e37f9d81ab4..7da5f9f9078f44f10b20b3d3f50dbbf86c3fb16e 100644 (file)
@@ -157,18 +157,27 @@ seconds_to_approximate_hms (int s)
 
        string ap;
 
-       bool const hours = h > 0;
-       bool const minutes = h < 6 && m > 0;
-       bool const seconds = h == 0 && m < 10 && s > 0;
+       bool hours = h > 0;
+       bool minutes = h < 6 && m > 0;
+       bool seconds = h == 0 && m < 10 && s > 0;
 
-       if (hours) {
-               if (m > 30 && !minutes) {
-                       /// TRANSLATORS: h here is an abbreviation for hours
-                       ap += locale_convert<string>(h + 1) + _("h");
-               } else {
-                       /// TRANSLATORS: h here is an abbreviation for hours
-                       ap += locale_convert<string>(h) + _("h");
+       if (m > 30 && !minutes) {
+               /* round up the hours */
+               ++h;
+       }
+       if (s > 30 && !seconds) {
+               /* round up the minutes */
+               ++m;
+               if (m == 60) {
+                       m = 0;
+                       minutes = false;
+                       ++h;
                }
+       }
+
+       if (hours) {
+               /// TRANSLATORS: h here is an abbreviation for hours
+               ap += locale_convert<string>(h) + _("h");
 
                if (minutes || seconds) {
                        ap += N_(" ");
@@ -176,14 +185,8 @@ seconds_to_approximate_hms (int s)
        }
 
        if (minutes) {
-               /* Minutes */
-               if (s > 30 && !seconds) {
-                       /// TRANSLATORS: m here is an abbreviation for minutes
-                       ap += locale_convert<string>(m + 1) + _("m");
-               } else {
-                       /// TRANSLATORS: m here is an abbreviation for minutes
-                       ap += locale_convert<string>(m) + _("m");
-               }
+               /// TRANSLATORS: m here is an abbreviation for minutes
+               ap += locale_convert<string>(m) + _("m");
 
                if (seconds) {
                        ap += N_(" ");
index f6197b1e22f7bc473cfb9fc2622c1f7e11383d66..6d4490ad7bb36a9fc616e3494eb8f2c29d188287 100644 (file)
@@ -101,6 +101,8 @@ public:
                setup_menu (bar);
                SetMenuBar (bar);
 
+               Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this, _1));
+
                Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_add_film, this),    ID_file_add_film);
                Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_quit, this),        wxID_EXIT);
                Bind (wxEVT_MENU, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
@@ -238,6 +240,36 @@ private:
                c->Destroy ();
        }
 
+       void config_changed (Config::Property what)
+       {
+               /* Instantly save any config changes when using the DCP-o-matic GUI */
+               if (what == Config::CINEMAS) {
+                       try {
+                               Config::instance()->write_cinemas();
+                       } catch (exception& e) {
+                               error_dialog (
+                                       this,
+                                       wxString::Format (
+                                               _("Could not write to cinemas file at %s.  Your changes have not been saved."),
+                                               std_to_wx (Config::instance()->cinemas_file().string()).data()
+                                               )
+                                       );
+                       }
+               } else {
+                       try {
+                               Config::instance()->write_config();
+                       } catch (exception& e) {
+                               error_dialog (
+                                       this,
+                                       wxString::Format (
+                                               _("Could not write to config file at %s.  Your changes have not been saved."),
+                                               std_to_wx (Config::instance()->cinemas_file().string()).data()
+                                               )
+                                       );
+                       }
+               }
+       }
+
        boost::optional<boost::filesystem::path> _last_parent;
        wxSizer* _sizer;
        wxPreferencesEditor* _config_dialog;
index 063c5122698ec0249d0fbfaba56696cae25e0d66..1923b39a7783dd1d1c04db5259260bc4e5e39786 100644 (file)
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: DCP-o-matic FRENCH\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-05-20 20:14+0100\n"
-"PO-Revision-Date: 2018-04-24 22:31+0100\n"
+"PO-Revision-Date: 2018-05-29 23:42+0100\n"
 "Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
 "Language-Team: \n"
 "Language: fr_FR\n"
index 85711aa3177a5924d73487548bd71116b5654782..c371239b7fca30d32884aa2768030fcbc3647cdd 100644 (file)
@@ -689,12 +689,7 @@ class EmailPage : public StandardPage
 {
 public:
        EmailPage (wxSize panel_size, int border)
-#ifdef DCPOMATIC_OSX
-               /* We have to force both width and height of this one */
-               : StandardPage (wxSize (480, 128), border)
-#else
                : StandardPage (panel_size, border)
-#endif
        {}
 
        wxString GetName () const
@@ -785,7 +780,7 @@ public:
        KDMEmailPage (wxSize panel_size, int border)
 #ifdef DCPOMATIC_OSX
                /* We have to force both width and height of this one */
-               : StandardPage (wxSize (480, 128), border)
+               : StandardPage (wxSize (panel_size.GetWidth(), 128), border)
 #else
                : StandardPage (panel_size, border)
 #endif
@@ -905,7 +900,7 @@ public:
        NotificationsPage (wxSize panel_size, int border)
 #ifdef DCPOMATIC_OSX
                /* We have to force both width and height of this one */
-               : StandardPage (wxSize (480, 128), border)
+               : StandardPage (wxSize (panel_size.GetWidth(), 128), border)
 #else
                : StandardPage (panel_size, border)
 #endif
@@ -1076,7 +1071,7 @@ public:
        CoverSheetPage (wxSize panel_size, int border)
 #ifdef DCPOMATIC_OSX
                /* We have to force both width and height of this one */
-               : StandardPage (wxSize (480, 128), border)
+               : StandardPage (wxSize (panel_size.GetWidth(), 128), border)
 #else
                : StandardPage (panel_size, border)
 #endif
@@ -1385,7 +1380,7 @@ create_full_config_dialog ()
           the containing window doesn't shrink too much when we select those panels.
           This is obviously an unpleasant hack.
        */
-       wxSize ps = wxSize (520, -1);
+       wxSize ps = wxSize (600, -1);
        int const border = 16;
 #else
        wxSize ps = wxSize (-1, -1);
index d0086ff81aae2acbbe332164f36489355b5f9a0f..43d6f2fedd9ca90f44d4ec3e191fb673af560f2f 100644 (file)
@@ -142,7 +142,7 @@ JobView::finished ()
                        string body = Config::instance()->notification_email();
                        boost::algorithm::replace_all (body, "$JOB_NAME", _job->name());
                        boost::algorithm::replace_all (body, "$JOB_STATUS", _job->status());
-                       JobManager::instance()->add (shared_ptr<Job> (new SendNotificationEmailJob (body)));
+                       JobManager::instance()->add_after (_job, shared_ptr<Job> (new SendNotificationEmailJob (body)));
                }
        }
 }
index 8aa1d0bee6c69668cfb1084aef5baa9555e19356..16062bda7db42c96b70867a83e14f5290385f19a 100644 (file)
@@ -3,14 +3,12 @@
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #
-#: src/wx/audio_panel.cc:56 src/wx/subtitle_panel.cc:56
-#: src/wx/video_panel.cc:82
 msgid ""
 msgstr ""
 "Project-Id-Version: DCP-o-matic FRENCH\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-05-20 20:14+0100\n"
-"PO-Revision-Date: 2018-04-24 22:35+0100\n"
+"PO-Revision-Date: 2018-05-29 23:41+0100\n"
 "Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
 "Language-Team: \n"
 "Language: fr_FR\n"
@@ -28,7 +26,7 @@ msgstr "%"
 #: src/wx/film_name_location_dialog.cc:130
 msgid "%1 already exists as a file, so you cannot use it for a film."
 msgstr ""
-"%1 existe déjà comme nom de fichier. VOus ne pouvez pas l'utiliser pour un "
+"%1 existe déjà comme nom de fichier. Vous ne pouvez pas l'utiliser pour un "
 "projet."
 
 #: src/wx/kdm_dialog.cc:153
@@ -290,7 +288,7 @@ msgstr "Audio"
 
 #: src/wx/isdcf_metadata_dialog.cc:40
 msgid "Audio Language (e.g. EN)"
-msgstr "Langue audio (ex. FR)"
+msgstr "Langue audio (par ex. : FR)"
 
 #: src/wx/player_information.cc:132
 #, c-format
@@ -323,7 +321,7 @@ msgstr "B"
 
 #: src/wx/full_config_dialog.cc:760
 msgid "BCC address"
-msgstr "Adresse BCC"
+msgstr "Adresse CCI"
 
 #: src/wx/colour_conversion_editor.cc:144
 msgid "Blue chromaticity"
@@ -1206,9 +1204,8 @@ msgid "MOV files (*.mov)|*.mov"
 msgstr "FIchiers MOV (*.mov)|*.mov"
 
 #: src/wx/export_dialog.cc:33
-#, fuzzy
 msgid "MP4 / H.264"
-msgstr "H.264"
+msgstr "MP4 / H.264"
 
 #: src/wx/export_dialog.cc:38
 msgid "MP4 files (*.mp4)|*.mp4"
@@ -1307,7 +1304,8 @@ msgstr "DEMANDE de KDM:"
 msgid "NEEDS OV: "
 msgstr "OV Nécessaire:"
 
-#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72 src/wx/screen_dialog.cc:68
+#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72
+#: src/wx/screen_dialog.cc:68
 msgid "Name"
 msgstr "Nom"
 
index e0e70f902c4d0b8bbc7edbbdc39490d8521ea45c..4b3e20ae308580c847a38b26f5c4dc926d48a04b 100644 (file)
@@ -68,6 +68,8 @@ BOOST_AUTO_TEST_CASE (seconds_to_approximate_hms_test)
        BOOST_CHECK_EQUAL (seconds_to_approximate_hms (17 * 60 + 20), "17m");
        BOOST_CHECK_EQUAL (seconds_to_approximate_hms (1 * 3600), "1h");
        BOOST_CHECK_EQUAL (seconds_to_approximate_hms (3600 + 40 * 60), "1h 40m");
+       BOOST_CHECK_EQUAL (seconds_to_approximate_hms (2 * 3600), "2h");
+       BOOST_CHECK_EQUAL (seconds_to_approximate_hms (2 * 3600 - 1), "2h");
        BOOST_CHECK_EQUAL (seconds_to_approximate_hms (13 * 3600 + 40 * 60), "14h");
 }