summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-06 00:49:23 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-06 00:49:23 +0200
commit7560428649a428a4bdc3013f41ae7e8319cd5b42 (patch)
tree7720c91ea269d72ff8131c94214602436e686c5d /src/lib
parent51bb8ac64aabeb5b509ffbaae415900d1b0299bc (diff)
Add hint for un-set text languages (#1954).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/hints.cc16
-rw-r--r--src/lib/hints.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/hints.cc b/src/lib/hints.cc
index 5ad0ba4bd..c9f901c18 100644
--- a/src/lib/hints.cc
+++ b/src/lib/hints.cc
@@ -394,6 +394,7 @@ Hints::thread ()
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")));
@@ -585,3 +586,18 @@ Hints::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;
+ }
+ }
+ }
+}
diff --git a/src/lib/hints.h b/src/lib/hints.h
index 5fc2e245a..a7e476b2c 100644
--- a/src/lib/hints.h
+++ b/src/lib/hints.h
@@ -74,6 +74,7 @@ private:
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