Only warn about a missing text language for subtitles (not closed captions).
authorCarl Hetherington <cth@carlh.net>
Sun, 30 Jul 2023 22:51:11 +0000 (00:51 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 30 Jul 2023 22:51:13 +0000 (00:51 +0200)
I haven't properly checked that closed captions shouldn't have some
language metadata, but the existing GUI code explicitly disallows
setup of a closed caption language.

src/lib/hints.cc
src/lib/hints.h

index 6c574d9916b85ede608e424cdfeccbc9f7134533..d472dfc0394180933698ba089f09373fce74bbbb 100644 (file)
@@ -397,7 +397,7 @@ try
        auto const check_loudness_done = check_loudness ();
        check_ffec_and_ffmc_in_smpte_feature ();
        check_out_of_range_markers ();
-       check_text_languages ();
+       check_subtitle_languages();
        check_audio_language ();
 
        if (check_loudness_done) {
@@ -647,14 +647,14 @@ Hints::join ()
 
 
 void
-Hints::check_text_languages ()
+Hints::check_subtitle_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\", \"Content→Open subtitles\" or \"Content→Closed captions\" tab."));
+                       if (j->use() && j->type() == TextType::OPEN_SUBTITLE && !j->language()) {
+                               hint (_("At least one piece of subtitle content has no specified language.  "
+                                       "It is advisable to set the language for each piece of subtitle content "
+                                       "in the \"Content→Timed text\" or \"Content→Open subtitles\" tab."));
                                return;
                        }
                }
index b29b1c0fc49754c12d3f8fd49d84a002b3ab04a0..9f8bb6aa73737864402b8c7e1115efb699be969b 100644 (file)
@@ -80,7 +80,7 @@ private:
        bool check_loudness ();
        void check_ffec_and_ffmc_in_smpte_feature ();
        void check_out_of_range_markers ();
-       void check_text_languages ();
+       void check_subtitle_languages();
        void check_audio_language ();
 
        boost::thread _thread;