From 8585a4cae42f6be5025b4cbdae399d57633c699f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 4 Jan 2026 21:04:09 +0100 Subject: Fix some untranslatable strings, spotted by Rob van Nieuwkerk. --- src/lib/dcp_content.cc | 2 +- src/lib/dcp_examiner.cc | 2 +- src/lib/exceptions.cc | 7 +++++++ src/lib/exceptions.h | 4 +--- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index d26b726c2..effa3cb40 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -192,7 +192,7 @@ DCPContent::read_directory(boost::filesystem::path p) if (!have_assetmap) { if (!have_metadata) { - throw DCPError("No ASSETMAP or ASSETMAP.xml file found: is this a DCP?"); + throw DCPError(_("No ASSETMAP or ASSETMAP.xml file found: is this a DCP?")); } else { throw ProjectFolderError(); } diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 4e8f611de..a5180822a 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -112,7 +112,7 @@ DCPExaminer::DCPExaminer(shared_ptr content, bool tolerant) } if (!selected_cpl) { - throw DCPError("No CPLs found in DCP"); + throw DCPError(_("No CPLs found in DCP")); } if (content->kdm()) { diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc index e2e7fc4bc..cbab29430 100644 --- a/src/lib/exceptions.cc +++ b/src/lib/exceptions.cc @@ -190,3 +190,10 @@ SQLError::get_filename(SQLiteDatabase& db) return {}; } + + +CPLNotFoundError::CPLNotFoundError(string id) + : DCPError(fmt::format(_("CPL {} not found"), id)) +{ + +} diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 212d002e2..e6f795975 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -342,9 +342,7 @@ public: class CPLNotFoundError : public DCPError { public: - CPLNotFoundError(std::string id) - : DCPError(fmt::format("CPL {} not found", id)) - {} + CPLNotFoundError(std::string id); }; -- cgit v1.2.3