Add hint for un-set text languages (#1954).
authorCarl Hetherington <cth@carlh.net>
Mon, 5 Apr 2021 22:49:23 +0000 (00:49 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 5 Apr 2021 22:49:23 +0000 (00:49 +0200)
src/lib/hints.cc
src/lib/hints.h

index 5ad0ba4bda0a0bcfe4608e58423bcb31e5df8a83..c9f901c1829b1f9346c7dcf5b52d5558513d358f 100644 (file)
@@ -394,6 +394,7 @@ Hints::thread ()
        check_loudness ();
        check_ffec_and_ffmc_in_smpte_feature ();
        check_out_of_range_markers ();
        check_loudness ();
        check_ffec_and_ffmc_in_smpte_feature ();
        check_out_of_range_markers ();
+       check_text_languages ();
 
        emit (bind(boost::ref(Progress), _("Examining closed captions")));
 
 
        emit (bind(boost::ref(Progress), _("Examining closed captions")));
 
@@ -585,3 +586,18 @@ Hints::join ()
 {
        _thread.join ();
 }
 {
        _thread.join ();
 }
+
+
+void
+Hints::check_text_languages ()
+{
+       for (auto i: film()->content()) {
+               for (auto j: i->text) {
+                       if (j->use() && !j->language()) {
+                               hint (_("At least one piece of subtitle or closed caption content has no specified language.  "
+                                       "It is advisable to set the language for each piece of subtitle or closed caption content in the \"Content→Timed Text\" tab"));
+                               return;
+                       }
+               }
+       }
+}
index 5fc2e245ae6670f00cd25578230c48c2bbefb0f1..a7e476b2c738aa3e58f33a0524c307b7538bfc24 100644 (file)
@@ -74,6 +74,7 @@ private:
        void check_loudness ();
        void check_ffec_and_ffmc_in_smpte_feature ();
        void check_out_of_range_markers ();
        void check_loudness ();
        void check_ffec_and_ffmc_in_smpte_feature ();
        void check_out_of_range_markers ();
+       void check_text_languages ();
 
        boost::thread _thread;
        /** This is used to make a partial DCP containing only the subtitles and closed captions that
 
        boost::thread _thread;
        /** This is used to make a partial DCP containing only the subtitles and closed captions that