#include "analytics.h"
#include "compose.hpp"
#include "exceptions.h"
+#include "variant.h"
#include <dcp/filesystem.h>
#include <dcp/raw_convert.h>
#include <dcp/warnings.h>
boost::bind(
boost::ref(Message),
_("Congratulations!"),
- String::compose (_(
- "<h2>You have made %1 DCPs with DCP-o-matic!</h2>"
+ String::compose(_(
+ "<h2>You have made %1 DCPs with %2!</h2>"
"<img width=\"20%%\" src=\"memory:me.jpg\" align=\"center\">"
"<p>Hello. I'm Carl and I'm the "
- "developer of DCP-o-matic. I work on it in my spare time (with the help "
+ "developer of %3. I work on it in my spare time (with the help "
"of a fine volunteer team of testers and translators) and I release it "
"as free software."
- "<p>If you find DCP-o-matic useful, please consider a donation to the "
+ "<p>If you find %4 useful, please consider a donation to the "
"project. Financial support will help me to spend more "
- "time developing DCP-o-matic and making it better!"
+ "time developing %5 and making it better!"
"<p><ul>"
"<li><a href=\"https://dcpomatic.com/donate_amount?amount=40\">Go to Paypal to donate €40</a>"
"<li><a href=\"https://dcpomatic.com/donate_amount?amount=10\">Go to Paypal to donate €10</a>"
"</ul>"
- "<p>Thank you!"), _successful_dcp_encodes
+ "<p>Thank you!"),
+ _successful_dcp_encodes,
+ variant::dcpomatic(),
+ variant::dcpomatic(),
+ variant::dcpomatic(),
+ variant::dcpomatic()
)
)
);
#include "log.h"
#include "ratio.h"
#include "unzipper.h"
+#include "variant.h"
#include "zipper.h"
#include <dcp/certificate_chain.h>
#include <dcp/name_format.h>
_kdm_bcc = f.optional_string_child ("KDMBCC").get_value_or ("");
_kdm_email = f.string_child ("KDMEmail");
- _notification_subject = f.optional_string_child("NotificationSubject").get_value_or(_("DCP-o-matic notification"));
+ _notification_subject = f.optional_string_child("NotificationSubject").get_value_or(variant::insert_dcpomatic(_("%1 notification")));
_notification_from = f.optional_string_child("NotificationFrom").get_value_or("");
_notification_to = f.optional_string_child("NotificationTo").get_value_or("");
for (auto i: f.node_children("NotificationCC")) {
{
_kdm_subject = _("KDM delivery: $CPL_NAME");
- _kdm_email = _(
+ _kdm_email = variant::insert_dcpomatic(_(
"Dear Projectionist\n\n"
"Please find attached KDMs for $CPL_NAME.\n\n"
"Cinema: $CINEMA_NAME\n"
"Screen(s): $SCREENS\n\n"
"The KDMs are valid from $START_TIME until $END_TIME.\n\n"
- "Best regards,\nDCP-o-matic"
- );
+ "Best regards,\n%1"
+ ));
}
void
Config::set_notification_email_to_default ()
{
- _notification_subject = _("DCP-o-matic notification");
+ _notification_subject = variant::insert_dcpomatic(_("%1 notification"));
_notification_email = _(
"$JOB_NAME: $JOB_STATUS"
#include "dcpomatic_log.h"
#include "film.h"
#include "ratio.h"
+#include "variant.h"
#include <dcp/raw_convert.h>
#include <iostream>
#include <string>
string CreateCLI::_help =
- "\nSyntax: %1 [OPTION] <CONTENT> [OPTION] [<CONTENT> ...]\n"
- " -v, --version show DCP-o-matic version\n"
+ string("\nSyntax: %1 [OPTION] <CONTENT> [OPTION] [<CONTENT> ...]\n") +
+ variant::insert_dcpomatic(" -v, --version show %1 version\n") +
" -h, --help show this help\n"
" -n, --name <name> film name\n"
" -t, --template <name> template name\n"
*/
-#include "cross.h"
#include "compose.hpp"
-#include "log.h"
-#include "dcpomatic_log.h"
#include "config.h"
+#include "cross.h"
+#include "dcpomatic_log.h"
#include "exceptions.h"
+#include "log.h"
+#include "variant.h"
#include <dcp/filesystem.h>
#include <dcp/raw_convert.h>
#include <glib.h>
void
start_tool (string executable, string app)
{
+ boost::algorithm::replace_all(app, " ", "\\ ");
+
auto exe_path = directory_containing_executable();
exe_path = exe_path.parent_path(); // Contents
exe_path = exe_path.parent_path(); // DCP-o-matic 2.app
void
start_batch_converter ()
{
- start_tool ("dcpomatic2_batch", "DCP-o-matic\\ 2\\ Batch\\ Converter.app");
+ start_tool("dcpomatic2_batch", variant::dcpomatic_batch_converter_app());
}
void
start_player ()
{
- start_tool ("dcpomatic2_player", "DCP-o-matic\\ 2\\ Player.app");
+ start_tool("dcpomatic2_player", variant::dcpomatic_player_app());
}
#include "config.h"
#include "email.h"
#include "exceptions.h"
+#include "variant.h"
#include <curl/curl.h>
#include <boost/algorithm/string.hpp>
#include <boost/date_time/c_local_time_adjustor.hpp>
"Content-Type: multipart/mixed; boundary=" + boundary + "\r\n";
}
- _email += "Subject: " + encode_rfc1342(_subject) + "\r\n"
- "User-Agent: DCP-o-matic\r\n"
- "\r\n";
+ _email += "Subject: " + encode_rfc1342(_subject) + "\r\n" +
+ variant::insert_dcpomatic("User-Agent: %1\r\n\r\n");
if (!_attachments.empty ()) {
_email += "--" + boundary + "\r\n"
*/
+#include "types.h"
#include <curl/curl.h>
#include <boost/scoped_array.hpp>
#include "image.h"
#include "log.h"
#include "player_video.h"
+#include "variant.h"
#include "version.h"
#include <dcp/raw_convert.h>
#include <dcp/warnings.h>
{
LOG_GENERAL ("Server %1 (%2) starting with %3 threads", dcpomatic_version, dcpomatic_git_commit, _num_threads);
if (_verbose) {
- cout << "DCP-o-matic server starting with " << _num_threads << " threads.\n";
+ cout << variant::dcpomatic_encode_server() << " starting with " << _num_threads << " threads.\n";
}
for (int i = 0; i < _num_threads; ++i) {
#include "encode_server_description.h"
#include "encode_server_finder.h"
#include "exceptions.h"
+#include "variant.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <boost/bind/placeholders.hpp>
new tcp::acceptor (_listen_io_service, tcp::endpoint(tcp::v4(), is_batch_converter ? BATCH_SERVER_PRESENCE_PORT : MAIN_SERVER_PRESENCE_PORT))
);
} catch (...) {
- boost::throw_exception (NetworkError (_("Could not listen for remote encode servers. Perhaps another instance of DCP-o-matic is running.")));
+ boost::throw_exception(NetworkError(variant::insert_dcpomatic(_("Could not listen for remote encode servers. Perhaps another instance of %1 is running."))));
}
start_accept ();
#include "compose.hpp"
#include "cross.h"
#include "log.h"
+#include "variant.h"
#include "version.h"
#include <dcp/version.h>
#include <dcp/warnings.h>
{
list<string> info;
- info.push_back (String::compose ("DCP-o-matic %1 git %2 using %3", dcpomatic_version, dcpomatic_git_commit, dependency_version_summary()));
+ info.push_back(String::compose("%1 %2 git %3 using %4", variant::dcpomatic(), dcpomatic_version, dcpomatic_git_commit, dependency_version_summary()));
{
char buffer[128];
}
#ifdef DCPOMATIC_DEBUG
- info.push_back ("DCP-o-matic built in debug mode.");
+ info.push_back(variant::insert_dcpomatic("%1 built in debug mode."));
#else
- info.push_back ("DCP-o-matic built in optimised mode.");
+ info.push_back(variant::insert_dcpomatic("%1 built in optimised mode."));
#endif
#ifdef LIBDCP_DEBUG
info.push_back ("libdcp built in debug mode.");
#include "job.h"
#include "log.h"
#include "text_content.h"
+#include "variant.h"
#include "video_content.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
if (auto filter = Filter::from_id(i->content())) {
_filters.push_back(*filter);
} else {
- notes.push_back (String::compose (_("DCP-o-matic no longer supports the `%1' filter, so it has been turned off."), i->content()));
+ notes.push_back(String::compose(_("%1 no longer supports the `%2' filter, so it has been turned off."), variant::dcpomatic(), i->content()));
}
}
#include "text_content.h"
#include "transcode_job.h"
#include "upload_job.h"
+#include "variant.h"
#include "video_content.h"
#include "version.h"
#include <libcxml/cxml.h>
{
if (!path) {
if (dcp::filesystem::exists(file("metadata")) && !dcp::filesystem::exists(file(metadata_file))) {
- throw runtime_error (_("This film was created with an older version of DCP-o-matic, and unfortunately it cannot be loaded into this version. You will need to create a new Film, re-add your content and set it up again. Sorry!"));
+ throw runtime_error(
+ variant::insert_dcpomatic(
+ _("This film was created with an older version of %1, and unfortunately it cannot "
+ "be loaded into this version. You will need to create a new Film, re-add your "
+ "content and set it up again. Sorry!")
+ )
+ );
}
path = file (metadata_file);
_state_version = f.number_child<int> ("Version");
if (_state_version > current_state_version) {
- throw runtime_error (_("This film was created with a newer version of DCP-o-matic, and it cannot be loaded into this version. Sorry!"));
+ throw runtime_error(variant::insert_dcpomatic(_("This film was created with a newer version of %1, and it cannot be loaded into this version. Sorry!")));
} else if (_state_version < current_state_version) {
/* This is an older version; save a copy (if we haven't already) */
auto const older = path->parent_path() / String::compose("metadata.%1.xml", _state_version);
} else if (!atmos_rate && rate != video_frame_rate()) {
atmos_rate = rate;
set_video_frame_rate (rate, false);
- Message (_("DCP-o-matic had to change your settings so that the film's frame rate is the same as that of your Atmos content."));
+ Message(variant::insert_dcpomatic(_("%1 had to change your settings so that the film's frame rate is the same as that of your Atmos content.")));
}
}
}
}
if (change_made) {
- Message (_("DCP-o-matic had to change your settings for referring to DCPs as OV. Please review those settings to make sure they are what you want."));
+ Message(variant::insert_dcpomatic(_("%1 had to change your settings for referring to DCPs as OV. Please review those settings to make sure they are what you want.")));
}
if (reel_type() == ReelType::CUSTOM) {
if (too_late != boundaries.end()) {
if (std::distance(too_late, boundaries.end()) > 1) {
- Message(_("DCP-o-matic had to remove some of your custom reel boundaries as they no longer lie within the film."));
+ Message(variant::insert_dcpomatic(_("%1 had to remove some of your custom reel boundaries as they no longer lie within the film.")));
} else {
- Message(_("DCP-o-matic had to remove one of your custom reel boundaries as it no longer lies within the film."));
+ Message(variant::insert_dcpomatic(_("%1 had to remove one of your custom reel boundaries as it no longer lies within the film.")));
}
boundaries.erase(too_late, boundaries.end());
set_custom_reel_boundaries(boundaries);
#include "player.h"
#include "ratio.h"
#include "text_content.h"
+#include "variant.h"
#include "video_content.h"
#include "writer.h"
#include <dcp/cpl.h>
Hints::check_few_audio_channels ()
{
if (film()->audio_channels() < 6) {
- hint (_("Your DCP has fewer than 6 audio channels. This may cause problems on some projectors. You may want to set the DCP to have 6 channels. It does not matter if your content has fewer channels, as DCP-o-matic will fill the extras with silence."));
+ hint(
+ variant::insert_dcpomatic(
+ _("Your DCP has fewer than 6 audio channels. This may cause problems on some projectors. "
+ "You may want to set the DCP to have 6 channels. It does not matter if your content has "
+ "fewer channels, as %1 will fill the extras with silence.")
+ )
+ );
}
}
{
auto ap = film()->audio_processor();
if (ap && (ap->id() == "stereo-5.1-upmix-a" || ap->id() == "stereo-5.1-upmix-b")) {
- hint (_("You are using DCP-o-matic's stereo-to-5.1 upmixer. This is experimental and may result in poor-quality audio. If you continue, you should listen to the resulting DCP in a cinema to make sure that it sounds good."));
+ hint(variant::insert_dcpomatic(
+ _("You are using %1's stereo-to-5.1 upmixer. This is experimental and "
+ "may result in poor-quality audio. If you continue, you should listen to the "
+ "resulting DCP in a cinema to make sure that it sounds good.")
+ )
+ );
}
}
switch (*bad) {
case Config::BAD_SIGNER_UTF8_STRINGS:
- hint(_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error "
- "which will prevent DCPs from being validated correctly on some systems. It is advisable to "
- "re-create the signing certificate chain by clicking the \"Re-make certificates and key...\" "
- "button in the Keys page of Preferences."));
+ hint(variant::insert_dcpomatic(
+ _("The certificate chain that %1 uses for signing DCPs and KDMs contains a small error "
+ "which will prevent DCPs from being validated correctly on some systems. It is advisable to "
+ "re-create the signing certificate chain by clicking the \"Re-make certificates and key...\" "
+ "button in the Keys page of Preferences.")
+ ));
break;
case Config::BAD_SIGNER_VALIDITY_TOO_LONG:
- hint(_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period "
- "that is too long. This will cause problems playing back DCPs on some systems. "
- "It is advisable to re-create the signing certificate chain by clicking the "
- "\"Re-make certificates and key...\" button in the Keys page of Preferences."));
+ hint(variant::insert_dcpomatic(
+ _("The certificate chain that %1 uses for signing DCPs and KDMs has a validity period "
+ "that is too long. This will cause problems playing back DCPs on some systems. "
+ "It is advisable to re-create the signing certificate chain by clicking the "
+ "\"Re-make certificates and key...\" button in the Keys page of Preferences.")
+ ));
break;
default:
/* Some bad situations can't happen here as DCP-o-matic would have refused to start until they are fixed */
#include "job.h"
#include "log.h"
#include "util.h"
+#include "variant.h"
#include <dcp/exceptions.h>
#include <sub/exceptions.h>
#include <boost/date_time/posix_time/posix_time.hpp>
/* 32-bit */
set_error (
_("Failed to encode the DCP."),
- _("This error has probably occurred because you are running the 32-bit version of DCP-o-matic and "
- "trying to use too many encoding threads. Please reduce the 'number of threads DCP-o-matic should "
- "use' in the General tab of Preferences and try again.")
+ String::compose(
+ _("This error has probably occurred because you are running the 32-bit version of %1 and "
+ "trying to use too many encoding threads. Please reduce the 'number of threads %2 should "
+ "use' in the General tab of Preferences and try again."),
+ variant::dcpomatic(),
+ variant::dcpomatic()
+ )
);
done = true;
#else
if (running_32_on_64()) {
set_error (
_("Failed to encode the DCP."),
- _("This error has probably occurred because you are running the 32-bit version of DCP-o-matic. Please re-install DCP-o-matic with the 64-bit installer and try again.")
+ String::compose(
+ _("This error has probably occurred because you are running the 32-bit version of %1. "
+ "Please re-install %2 with the 64-bit installer and try again."),
+ variant::dcpomatic(),
+ variant::dcpomatic()
+ )
);
done = true;
}
set_error (
String::compose (_("Could not open %1"), e.file().string()),
- String::compose (
- _("DCP-o-matic could not open the file %1 (%2). Perhaps it does not exist or is in an unexpected format."),
+ String::compose(_("%1 could not open the file %2 (%3). Perhaps it does not exist or is in an unexpected format."),
+ variant::dcpomatic(),
dcp::filesystem::absolute(e.file()).string(),
e.what()
)
if (e.code() == boost::system::errc::no_such_file_or_directory) {
set_error (
String::compose (_("Could not open %1"), e.path1().string ()),
- String::compose (
- _("DCP-o-matic could not open the file %1 (%2). Perhaps it does not exist or is in an unexpected format."),
+ String::compose(_("%1 could not open the file %2 (%3). Perhaps it does not exist or is in an unexpected format."),
+ variant::dcpomatic(),
dcp::filesystem::absolute(e.path1()).string(),
e.what()
)
#include "film.h"
#include "kdm_with_metadata.h"
#include "screen.h"
+#include "variant.h"
#include <dcp/certificate.h>
#include <dcp/decrypted_kdm.h>
#include <dcp/encrypted_kdm.h>
out (String::compose("Syntax: %1 [OPTION] [COMMAND] <FILM|CPL-ID|DKDM>", program_name));
out ("Commands:");
out ("create create KDMs; default if no other command is specified");
- out ("list-cinemas list known cinemas from DCP-o-matic settings");
- out ("list-dkdm-cpls list CPLs for which DCP-o-matic has DKDMs");
- out ("add-dkdm add DKDM to DCP-o-matic's list");
+ out (variant::insert_dcpomatic("list-cinemas list known cinemas from %1 settings"));
+ out (variant::insert_dcpomatic("list-dkdm-cpls list CPLs for which %1 has DKDMs"));
+ out (variant::insert_dcpomatic("add-dkdm add DKDM to %1's list"));
out (" -h, --help show this help");
out (" -o, --output <path> output file or directory");
out (" -K, --filename-format <format> filename format for KDMs");
out (" -C, --projector-certificate <file> file containing projector certificate");
out (" -T, --trusted-device-certificate <file> file containing a trusted device's certificate");
out (" --decryption-key <file> file containing the private key which can decrypt the given DKDM");
- out (" (DCP-o-matic's configured private key will be used otherwise)");
+ out (variant::insert_dcpomatic(" (%1's configured private key will be used otherwise)"));
out (" --cinemas-file <file> use the given file as a list of cinemas instead of the current configuration");
out ("");
- out ("CPL-ID must be the ID of a CPL that is mentioned in DCP-o-matic's DKDM list.");
+ out (variant::insert_dcpomatic("CPL-ID must be the ID of a CPL that is mentioned in %1's DKDM list."));
out ("");
out ("For example:");
out ("");
out ("Create KDMs for my_great_movie to play in all of Fred's Cinema's screens for the next two weeks and zip them up.");
- out ("(Fred's Cinema must have been set up in DCP-o-matic's KDM window)");
+ out (variant::insert_dcpomatic("(Fred's Cinema must have been set up in %1's KDM window)"));
out ("");
out (String::compose("\t%1 -c \"Fred's Cinema\" -f now -d \"2 weeks\" -z my_great_movie", program_name));
}
#include "config.h"
#include "release_notes.h"
+#include "variant.h"
#include "version.h"
#include "i18n.h"
string const colour = dark ? "white" : "black";
auto const span = String::compose("<span style=\"color: %1\">", colour);
- const string header = String::compose("<h1>%1DCP-o-matic %2 release notes</span></h1>", span, *current);
+ const string header = String::compose("<h1>%1%2 %3 release notes</span></h1>", span, variant::dcpomatic(), *current);
if (!last) {
return header + span +
*/
-#include "send_problem_report_job.h"
#include "compose.hpp"
-#include "film.h"
#include "cross.h"
+#include "email.h"
+#include "environment_info.h"
+#include "film.h"
#include "film.h"
#include "log.h"
+#include "send_problem_report_job.h"
+#include "variant.h"
#include "version.h"
-#include "email.h"
-#include "environment_info.h"
#include <libxml++/libxml++.h>
#include "i18n.h"
body += "---<8----\n";
}
- Email email(_from, {"carl@dcpomatic.com"}, "DCP-o-matic problem report", body);
+ Email email(_from, {"carl@dcpomatic.com"}, variant::insert_dcpomatic("%1 problem report"), body);
email.send("main.carlh.net", 2525, EmailProtocol::STARTTLS);
set_progress (1);
*/
-#include "text_content.h"
-#include "util.h"
+#include "content.h"
#include "exceptions.h"
#include "font.h"
-#include "content.h"
+#include "text_content.h"
+#include "util.h"
+#include "variant.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
#include "i18n.h"
-using std::string;
-using std::vector;
using std::cout;
+using std::dynamic_pointer_cast;
using std::list;
-using std::shared_ptr;
using std::make_shared;
-using std::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::string;
+using std::vector;
using boost::optional;
using dcp::raw_convert;
using namespace dcpomatic;
*/
if (version <= 37) {
if (!lang->content().empty()) {
- notes.push_back (String::compose(
+ notes.push_back(String::compose(
_("A subtitle or closed caption file in this project is marked with the language '%1', "
- "which DCP-o-matic does not recognise. The file's language has been cleared."), lang->content()));
+ "which %2 does not recognise. The file's language has been cleared."), lang->content(), variant::dcpomatic()));
}
} else {
throw;
#include "log.h"
#include "transcode_job.h"
#include "upload_job.h"
+#include "variant.h"
#include <iomanip>
#include <iostream>
return;
case ChangedBehaviour::STOP:
set_progress (1);
- set_error (_("Files have changed since they were added to the project."), _("Open the project in DCP-o-matic, check the settings, then save it before trying again."));
+ set_error(
+ _("Files have changed since they were added to the project."),
+ variant::insert_dcpomatic(_("Open the project in %1, check the settings, then save it before trying again."))
+ );
set_state (FINISHED_ERROR);
return;
default:
#include "string_text.h"
#include "text_decoder.h"
#include "util.h"
+#include "variant.h"
#include "video_content.h"
#include <dcp/atmos_asset.h>
#include <dcp/decrypted_kdm.h>
boost::filesystem::path
mo_path ()
{
- return "DCP-o-matic 2.app/Contents/Resources";
+ return variant::dcpomatic_app() + "/Contents/Resources";
}
#endif
}
}
if (!on_chain) {
- throw KDMError (_("This KDM was not made for DCP-o-matic's decryption certificate."), e.what());
+ throw KDMError(variant::insert_dcpomatic(_("This KDM was not made for %1's decryption certificate.")), e.what());
} else if (kdm_subject_name != dc->leaf().subject()) {
- throw KDMError (_("This KDM was made for DCP-o-matic but not for its leaf certificate."), e.what());
+ throw KDMError(variant::insert_dcpomatic(_("This KDM was made for %1 but not for its leaf certificate.")), e.what());
} else {
throw;
}
--- /dev/null
+/*
+ Copyright (C) 2024 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "variant.h"
+
+
+static char const* _dcpomatic = "DCP-o-matic";
+static char const* _dcpomatic_player = "DCP-o-matic Player";
+static char const* _dcpomatic_kdm_creator = "DCP-o-matic KDM Creator";
+static char const* _dcpomatic_verifier = "DCP-o-matic Verifier";
+static char const* _dcpomatic_app = "DCP-o-matic 2.app";
+static char const* _dcpomatic_player_app = "DCP-o-matic 2 Player.app";
+static char const* _dcpomatic_disk_writer = "DCP-o-matic Disk Writer";
+static char const* _dcpomatic_editor = "DCP-o-matic Editor";
+static char const* _dcpomatic_encode_server = "DCP-o-matic Encode Server";
+static char const* _dcpomatic_batch_converter_app = "DCP-o-matic 2 Batch Converter.app";
+static char const* _dcpomatic_playlist_editor = "DCP-o-matic Playlist Editor";
+static char const* _dcpomatic_combiner = "DCP-o-matic Combiner";
+static char const* _dcpomatic_batch_converter = "DCP-o-matic Batch Converter";
+
+
+std::string
+variant::dcpomatic()
+{
+ return _dcpomatic;
+}
+
+std::string
+variant::dcpomatic_batch_converter()
+{
+ return _dcpomatic_batch_converter;
+}
+
+std::string
+variant::dcpomatic_combiner()
+{
+ return _dcpomatic_combiner;
+}
+
+std::string
+variant::dcpomatic_disk_writer()
+{
+ return _dcpomatic_disk_writer;
+}
+
+std::string
+variant::dcpomatic_editor()
+{
+ return _dcpomatic_editor;
+}
+
+std::string
+variant::dcpomatic_encode_server()
+{
+ return _dcpomatic_encode_server;
+}
+
+std::string
+variant::dcpomatic_kdm_creator()
+{
+ return _dcpomatic_kdm_creator;
+}
+
+std::string
+variant::dcpomatic_player()
+{
+ return _dcpomatic_player;
+}
+
+std::string
+variant::dcpomatic_playlist_editor()
+{
+ return _dcpomatic_playlist_editor;
+}
+
+std::string
+variant::dcpomatic_verifier()
+{
+ return _dcpomatic_verifier;
+}
+
+std::string
+variant::insert_dcpomatic(std::string const& s)
+{
+ return String::compose(s, _dcpomatic);
+}
+
+std::string
+variant::insert_dcpomatic_encode_server(std::string const& s)
+{
+ return String::compose(s, _dcpomatic_encode_server);
+}
+
+std::string
+variant::insert_dcpomatic_kdm_creator(std::string const& s)
+{
+ return String::compose(s, _dcpomatic_kdm_creator);
+}
+
+std::string
+variant::dcpomatic_app()
+{
+ return _dcpomatic_app;
+}
+
+std::string
+variant::dcpomatic_batch_converter_app()
+{
+ return _dcpomatic_batch_converter_app;
+}
+
+std::string
+variant::dcpomatic_player_app()
+{
+ return _dcpomatic_player_app;
+}
+
--- /dev/null
+/*
+ Copyright (C) 2024 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "compose.hpp"
+
+
+namespace variant
+{
+
+std::string dcpomatic();
+std::string dcpomatic_batch_converter();
+std::string dcpomatic_combiner();
+std::string dcpomatic_disk_writer();
+std::string dcpomatic_editor();
+std::string dcpomatic_encode_server();
+std::string dcpomatic_kdm_creator();
+std::string dcpomatic_player();
+std::string dcpomatic_playlist_editor();
+std::string dcpomatic_verifier();
+
+std::string insert_dcpomatic(std::string const& s);
+std::string insert_dcpomatic_encode_server(std::string const& s);
+std::string insert_dcpomatic_kdm_creator(std::string const& s);
+
+std::string dcpomatic_app();
+std::string dcpomatic_batch_converter_app();
+std::string dcpomatic_player_app();
+
+}
+
upmixer_b.cc
usl.cc
util.cc
+ variant.cc
verify_dcp_job.cc
video_content.cc
video_decoder.cc
#include "wx/video_waveform_dialog.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/analytics.h"
#include "lib/audio_content.h"
#include "lib/check_content_job.h"
#include "lib/text_content.h"
#include "lib/transcode_job.h"
#include "lib/update_checker.h"
+#include "lib/variant.h"
#include "lib/version.h"
#include "lib/video_content.h"
#include <dcp/exceptions.h>
auto const dir = e.file().parent_path();
if (dcp::filesystem::exists(dir / "ASSETMAP") || dcp::filesystem::exists(dir / "ASSETMAP.xml")) {
error_dialog (
- this, _("Could not open this folder as a DCP-o-matic project."),
- _("It looks like you are trying to open a DCP. File -> Open is for loading DCP-o-matic projects, not DCPs. To import a DCP, create a new project with File -> New and then click the \"Add DCP...\" button.")
+ this, variant::wx::insert_dcpomatic(_("Could not open this folder as a %s project.")),
+ variant::wx::insert_dcpomatic(
+ _("It looks like you are trying to open a DCP. File -> Open is for loading %s projects, not DCPs. "
+ "To import a DCP, create a new project with File -> New and then click the \"Add DCP...\" button."))
);
} else {
auto const p = std_to_wx(file.string ());
if (!found_bad_chars.empty()) {
message += wxString::Format (_("Try removing the %s characters from your folder name."), std_to_wx(found_bad_chars).data());
} else {
- message += _("Please check that you do not have Windows controlled folder access enabled for DCP-o-matic.");
+ message += variant::wx::insert_dcpomatic(_("Please check that you do not have Windows controlled folder access enabled for %s."));
}
error_dialog (this, message, std_to_wx(e.what()));
#else
body += i.first + "\n" + i.second + "\n\n";
}
if (dialog.email().find("@") == string::npos) {
- error_dialog (this, _("You must enter a valid email address when sending translations, "
- "otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions."));
+ error_dialog(
+ this,
+ variant::wx::insert_dcpomatic(
+ _("You must enter a valid email address when sending translations, "
+ "otherwise the %s maintainers cannot credit you or contact you with questions.")
+ )
+ );
} else {
- Email email(dialog.email(), { "carl@dcpomatic.com" }, "DCP-o-matic translations", body);
+ Email email(dialog.email(), { "carl@dcpomatic.com" }, variant::insert_dcpomatic("%1 translations"), body);
try {
email.send("main.carlh.net", 2525, EmailProtocol::STARTTLS);
} catch (NetworkError& e) {
add_item (jobs_menu, _("Make &KDMs...\tCtrl-K"), ID_jobs_make_kdms, NEEDS_FILM);
/* [Shortcut] Ctrl+D:Make DKDMs */
add_item (jobs_menu, _("Make &DKDMs...\tCtrl-D"), ID_jobs_make_dkdms, NEEDS_FILM);
- add_item (jobs_menu, _("Make DKDM for DCP-o-matic..."), ID_jobs_make_self_dkdm, NEEDS_FILM | NEEDS_ENCRYPTION);
+ add_item(jobs_menu, variant::wx::insert_dcpomatic(_("Make DKDM for %s...")), ID_jobs_make_self_dkdm, NEEDS_FILM | NEEDS_ENCRYPTION);
jobs_menu->AppendSeparator ();
/* [Shortcut] Ctrl+E:Export video file */
add_item (jobs_menu, _("Export video file...\tCtrl-E"), ID_jobs_export_video_file, NEEDS_FILM);
wxMenu* help = new wxMenu;
#ifdef __WXOSX__
- add_item (help, _("About DCP-o-matic"), wxID_ABOUT, ALWAYS);
+ add_item(help, variant::wx::insert_dcpomatic(_("About %s")), wxID_ABOUT, ALWAYS);
#else
add_item (help, _("About"), wxID_ABOUT, ALWAYS);
#endif
UpdateDialog dialog(this, uc->stable(), uc->test());
dialog.ShowModal();
} else if (uc->state() == UpdateChecker::State::FAILED) {
- error_dialog (this, _("The DCP-o-matic download server could not be contacted."));
+ error_dialog(this, variant::wx::insert_dcpomatic(_("The %s download server could not be contacted.")));
} else {
- error_dialog (this, _("There are no new versions of DCP-o-matic available."));
+ error_dialog(this, variant::wx::insert_dcpomatic(_("There are no new versions of %s available.")));
}
_update_news_requested = false;
void set_title ()
{
- auto s = wx_to_std(_("DCP-o-matic"));
+ auto s = variant::dcpomatic();
if (_film) {
if (_film->directory()) {
s += " - " + _film->directory()->string();
{ wxCMD_LINE_SWITCH, "n", "new", "create new film", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, "c", "content", "add content file / directory", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, "d", "dcp", "add content DCP", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
- { wxCMD_LINE_SWITCH, "v", "version", "show DCP-o-matic version", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_SWITCH, "v", "version", "show version", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, "", "config", "directory containing config.xml and cinemas.xml", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
setvbuf(hf_in, NULL, _IONBF, 128);
*stdin = *hf_in;
- cout << "DCP-o-matic is starting." << "\n";
+ cout << variant::insert_dcpomatic("%1 is starting.") << "\n";
}
#endif
wxInitAllImageHandlers ();
_splash = maybe_show_splash ();
- SetAppName (_("DCP-o-matic"));
+ SetAppName(variant::wx::dcpomatic());
if (!wxApp::OnInit()) {
return false;
*/
Config::Bad.connect (boost::bind(&App::config_bad, this, _1));
- _frame = new DOMFrame (_("DCP-o-matic"));
+ _frame = new DOMFrame(variant::wx::dcpomatic());
SetTopWindow (_frame);
_frame->Maximize ();
close_splash ();
if (running_32_on_64 ()) {
NagDialog::maybe_nag (
_frame, Config::NAG_32_ON_64,
- _("You are running the 32-bit version of DCP-o-matic on a 64-bit version of Windows. This will limit the memory available to DCP-o-matic and may cause errors. You are strongly advised to install the 64-bit version of DCP-o-matic."),
+ wxString::Format(
+ _("You are running the 32-bit version of %s on a 64-bit version of Windows. "
+ "This will limit the memory available to %s and may cause errors. You are "
+ "strongly advised to install the 64-bit version of %s."),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ ),
false);
}
catch (exception& e)
{
close_splash();
- error_dialog (nullptr, wxString::Format ("DCP-o-matic could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic(_("%s could not start.")), std_to_wx(e.what()));
}
return true;
}
RecreateChainDialog dialog(
_frame, _("Recreate signing certificates"),
- _("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error\n"
- "which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
- "the certificate chain for signing DCPs and KDMs?"),
+ variant::wx::insert_dcpomatic(
+ _("The certificate chain that %s uses for signing DCPs and KDMs contains a small error\n"
+ "which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
+ "the certificate chain for signing DCPs and KDMs?")
+ ),
_("Do nothing"),
Config::NAG_BAD_SIGNER_CHAIN_UTF8
);
}
RecreateChainDialog dialog(
_frame, _("Recreate signing certificates"),
- _("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period\n"
- "that is too long. This will cause problems playing back DCPs on some systems.\n"
- "Do you want to re-create the certificate chain for signing DCPs and KDMs?"),
+ variant::wx::insert_dcpomatic(
+ _("The certificate chain that %s uses for signing DCPs and KDMs has a validity period\n"
+ "that is too long. This will cause problems playing back DCPs on some systems.\n"
+ "Do you want to re-create the certificate chain for signing DCPs and KDMs?")
+ ),
_("Do nothing"),
Config::NAG_BAD_SIGNER_CHAIN_VALIDITY
);
{
RecreateChainDialog dialog(
_frame, _("Recreate signing certificates"),
- _("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs is inconsistent and\n"
- "cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"
- "the certificate chain for signing DCPs and KDMs?"),
- _("Close DCP-o-matic")
+ wxString::Format(
+ _("The certificate chain that %s uses for signing DCPs and KDMs is inconsistent and\n"
+ "cannot be used. %s cannot start unless you re-create it. Do you want to re-create\n"
+ "the certificate chain for signing DCPs and KDMs?"),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ ),
+ variant::wx::insert_dcpomatic(_("Close %s"))
);
if (dialog.ShowModal() != wxID_OK) {
exit (EXIT_FAILURE);
{
RecreateChainDialog dialog(
_frame, _("Recreate KDM decryption chain"),
- _("The certificate chain that DCP-o-matic uses for decrypting KDMs is inconsistent and\n"
- "cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"
- "the certificate chain for decrypting KDMs? You may want to say \"No\" here and back up your\n"
- "configuration before continuing."),
- _("Close DCP-o-matic")
+ wxString::Format(
+ _("The certificate chain that %s uses for decrypting KDMs is inconsistent and\n"
+ "cannot be used. %s cannot start unless you re-create it. Do you want to re-create\n"
+ "the certificate chain for decrypting KDMs? You may want to say \"No\" here and back up your\n"
+ "configuration before continuing."),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ ),
+ variant::wx::insert_dcpomatic(_("Close %s"))
);
if (dialog.ShowModal() != wxID_OK) {
exit (EXIT_FAILURE);
{
RecreateChainDialog dialog(
_frame, _("Recreate signing certificates"),
- _("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error\n"
- "which will prevent DCPs from being validated correctly on some systems. This error was caused\n"
- "by a bug in DCP-o-matic which has now been fixed. Do you want to re-create the certificate chain\n"
- "for signing DCPs and KDMs?"),
+ wxString::Format(
+ _("The certificate chain that %s uses for signing DCPs and KDMs contains a small error\n"
+ "which will prevent DCPs from being validated correctly on some systems. This error was caused\n"
+ "by a bug in %s which has now been fixed. Do you want to re-create the certificate chain\n"
+ "for signing DCPs and KDMs?"),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ ),
_("Do nothing"),
Config::NAG_BAD_SIGNER_DN_QUALIFIER
);
#include "wx/wx_ptr.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/compose.hpp"
#include "lib/config.h"
#include "lib/dcpomatic_socket.h"
{
wxInitAllImageHandlers ();
- SetAppName (_("DCP-o-matic Batch Converter"));
+ SetAppName(variant::wx::dcpomatic_batch_converter());
is_batch_converter = true;
Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1));
*/
Config::drop ();
- _frame = new DOMFrame (_("DCP-o-matic Batch Converter"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_batch_converter());
SetTopWindow (_frame);
_frame->Maximize ();
if (splash) {
server->StartJob.connect(bind(&DOMFrame::start_job, _frame, _1));
new thread (boost::bind (&JobServer::run, server));
} catch (boost::system::system_error& e) {
- error_dialog(_frame, _("Could not listen for new batch jobs. Perhaps another instance of the DCP-o-matic Batch Converter is running."));
+ error_dialog(
+ _frame,
+ variant::wx::insert_dcpomatic_batch_converter(
+ _("Could not listen for new batch jobs. Perhaps another instance of the %s is running.")
+ ));
}
signal_manager = new wxSignalManager (this);
#include "lib/signal_manager.h"
#include "lib/transcode_job.h"
#include "lib/util.h"
+#include "lib/variant.h"
#include "lib/version.h"
#include "lib/video_content.h"
#include <dcp/filesystem.h>
help (string n)
{
cerr << "Syntax: " << n << " [OPTION] [<FILM>]\n"
- << " -v, --version show DCP-o-matic version\n"
+ << variant::insert_dcpomatic(" -v, --version show %1 version\n")
<< " -h, --help show this help\n"
<< " -f, --flags show flags passed to C++ compiler on build\n"
<< " -n, --no-progress do not print progress to stdout\n"
<< " -j, --json <port> run a JSON server on the specified port\n"
<< " -k, --keep-going keep running even when the job is complete\n"
<< " -s, --servers <file> specify servers to use in a text file\n"
- << " -l, --list-servers just display a list of encoding servers that DCP-o-matic is configured to use; don't encode\n"
+ << variant::insert_dcpomatic(" -l, --list-servers just display a list of encoding servers that %1 is configured to use; don't encode\n")
<< " -d, --dcp-path echo DCP's path to stdout on successful completion (implies -n)\n"
<< " -c, --config <dir> directory containing config.xml and cinemas.xml\n"
<< " --dump just dump a summary of the film's settings; don't encode\n"
#include "wx/dir_picker_ctrl.h"
#include "wx/editable_list.h"
#include "wx/wx_signal_manager.h"
+#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/combine_dcp_job.h"
#include "lib/config.h"
#include "lib/constants.h"
auto jm = JobManager::instance ();
jm->add (make_shared<CombineDCPJob>(_inputs, output, wx_to_std(_annotation_text->GetValue())));
- bool const ok = display_progress(_("DCP-o-matic Combiner"), _("Combining DCPs"));
+ bool const ok = display_progress(variant::wx::dcpomatic_combiner(), _("Combining DCPs"));
if (!ok) {
return;
}
Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1));
Config::Warning.connect (boost::bind (&App::config_warning, this, _1));
- SetAppName (_("DCP-o-matic Combiner"));
+ SetAppName(variant::wx::dcpomatic_combiner());
if (!wxApp::OnInit()) {
return false;
*/
Config::drop ();
- _frame = new DOMFrame(_("DCP-o-matic Combiner"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_combiner());
SetTopWindow (_frame);
_frame->Show ();
}
catch (exception& e)
{
- error_dialog(nullptr, wxString::Format("DCP-o-matic Combiner could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, wxString::Format(_("%s could not start (%s)"), variant::wx::dcpomatic_combiner()), std_to_wx(e.what()));
return false;
}
#include "wx/wx_util.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/config.h"
#include "lib/constants.h"
#include "lib/copy_to_drive_job.h"
#if defined(DCPOMATIC_WINDOWS)
auto m = make_wx<MessageDialog>(
this,
- _("DCP-o-matic Disk Writer"),
+ variant::wx::dcpomatic_disk_writer(),
_("Do you see a 'User Account Control' dialogue asking about dcpomatic2_disk_writer.exe? If so, click 'Yes', then try again.")
);
m->ShowModal ();
#elif defined(DCPOMATIC_OSX)
auto m = make_wx<MessageDialog>(
this,
- _("DCP-o-matic Disk Writer"),
- _("Did you install the DCP-o-matic Disk Writer.pkg from the .dmg? Please check and try again.")
+ variant::wx::dcpomatic_disk_writer(),
+ variant::wx::insert_dcpomatic(_("Did you install the %s Disk Writer.pkg from the .dmg? Please check and try again."))
);
m->ShowModal ();
return;
if (!reply || reply->type() != DiskWriterBackEndResponse::Type::OK) {
auto m = make_wx<MessageDialog>(
this,
- _("DCP-o-matic Disk Writer"),
+ variant::wx::dcpomatic_disk_writer(),
wxString::Format(
_("The drive %s could not be unmounted.\nClose any application that is using it, then try again. (%s)"),
std_to_wx(drive.description()),
Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this));
Config::Warning.connect (boost::bind (&App::config_warning, this, _1));
- SetAppName (_("DCP-o-matic Disk Writer"));
+ SetAppName(variant::wx::dcpomatic_disk_writer());
if (!wxApp::OnInit()) {
return false;
return false;
}
if (!warning->confirmed()) {
- message_dialog(nullptr, _("You did not correctly confirm that you read the warning that was just shown. DCP-o-matic Disk Writer will close now. Please try again."));
+ message_dialog(
+ nullptr,
+ variant::wx::insert_dcpomatic_disk_writer(
+ _("You did not correctly confirm that you read the warning that was just shown. %s will close now. Please try again.")
+ )
+ );
return false;
}
}
- _frame = new DOMFrame (_("DCP-o-matic Disk Writer"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_disk_writer());
SetTopWindow (_frame);
_frame->Show ();
}
catch (exception& e)
{
- error_dialog (0, wxString::Format ("DCP-o-matic could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, wxString::Format(_("%s could not start"), variant::wx::dcpomatic_disk_writer()), std_to_wx(e.what()));
return false;
}
#include "wx/id.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/dcpomatic_log.h"
#include "lib/null_log.h"
+#include "lib/variant.h"
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel.h>
{
public:
DOMFrame ()
- : wxFrame(nullptr, -1, _("DCP-o-matic Editor"))
+ : wxFrame(nullptr, -1, variant::wx::dcpomatic_editor())
, _main_sizer(new wxBoxSizer(wxVERTICAL))
{
dcpomatic_log = make_shared<NullLog>();
#if defined(DCPOMATIC_WINDOWS)
maybe_open_console();
- std::cout << "DCP-o-matic Editor is starting." << "\n";
+ std::cout << variant::dcpomatic_editor() << " is starting." << "\n";
#endif
auto bar = new wxMenuBar;
auto help = new wxMenu;
#ifdef __WXOSX__
- help->Append (wxID_ABOUT, _("About DCP-o-matic"));
+ help->Append(wxID_ABOUT, variant::wx::insert_dcpomatic_editor(_("About %s")));
#else
help->Append (wxID_ABOUT, _("About"));
#endif
splash = maybe_show_splash ();
- SetAppName (_("DCP-o-matic Editor"));
+ SetAppName(variant::wx::dcpomatic_editor());
if (!wxApp::OnInit()) {
return false;
if (splash) {
splash->Destroy ();
}
- error_dialog (0, _("DCP-o-matic Editor could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_editor(_("%s could not start.")), std_to_wx(e.what()));
}
return true;
#include "wx/static_text.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/cinema.h"
#include "lib/collator.h"
#include "lib/compose.hpp"
#include "lib/kdm_with_metadata.h"
#include "lib/screen.h"
#include "lib/send_kdm_email_job.h"
+#include "lib/variant.h"
#include <dcp/encrypted_kdm.h>
#include <dcp/decrypted_kdm.h>
#include <dcp/exceptions.h>
setvbuf(hf_in, NULL, _IONBF, 128);
*stdin = *hf_in;
- std::cout << "DCP-o-matic KDM creator is starting." << "\n";
+ std::cout << variant::insert_dcpomatic_kdm_creator("%1 is starting.\n");
}
#endif
wxMenu* help = new wxMenu;
#ifdef __WXOSX__
- help->Append (wxID_ABOUT, _("About DCP-o-matic"));
+ help->Append(wxID_ABOUT, variant::wx::insert_dcpomatic_kdm_creator(_("About %s")));
#else
help->Append (wxID_ABOUT, _("About"));
#endif
if (e.starts_too_early()) {
error_dialog(this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));
} else {
- error_dialog(this, _("The KDM end period is after (or close to) the end of the signing certificates' validity period. Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+ error_dialog(
+ this,
+ variant::wx::insert_dcpomatic_kdm_creator(
+ _("The KDM end period is after (or close to) the end of the signing certificates' validity period. "
+ "Either use an earlier end time for this KDM or re-create your signing certificates in the %s preferences window.")
+ )
+ );
}
return;
} catch (dcp::NotEncryptedError& e) {
splash = maybe_show_splash ();
- SetAppName (_("DCP-o-matic KDM Creator"));
+ SetAppName(variant::wx::dcpomatic_kdm_creator());
if (!wxApp::OnInit()) {
return false;
*/
Config::drop ();
- _frame = new DOMFrame (_("DCP-o-matic KDM Creator"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_kdm_creator());
SetTopWindow (_frame);
_frame->Maximize ();
if (splash) {
if (splash) {
splash->Destroy ();
}
- error_dialog (0, _("DCP-o-matic could not start"), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_kdm_creator(_("%s could not start")), std_to_wx(e.what()));
}
return true;
#include "wx/wx_ptr.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/compose.hpp"
#include "lib/config.h"
#include "lib/constants.h"
#include "lib/server.h"
#include "lib/text_content.h"
#include "lib/update_checker.h"
+#include "lib/variant.h"
#include "lib/verify_dcp_job.h"
#include "lib/video_content.h"
#include <dcp/cpl.h>
DOMFrame ()
- : wxFrame (nullptr, -1, _("DCP-o-matic Player"))
+ : wxFrame(nullptr, -1, variant::wx::dcpomatic_player())
, _mode (Config::instance()->player_mode())
/* Use a panel as the only child of the Frame so that we avoid
the dark-grey background on Windows.
#if defined(DCPOMATIC_WINDOWS)
maybe_open_console ();
- cout << "DCP-o-matic Player is starting." << "\n";
+ cout << variant::dcpomatic_player() << " is starting." << "\n";
#endif
auto bar = new wxMenuBar;
auto job = make_shared<ExamineContentJob>(_film, dcp);
_examine_job_connection = job->Finished.connect(bind(&DOMFrame::add_dcp_to_film, this, weak_ptr<Job>(job), weak_ptr<Content>(dcp)));
JobManager::instance()->add (job);
- bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading content"));
+ bool const ok = display_progress(variant::wx::dcpomatic_player(), _("Loading content"));
if (!ok || !report_errors_from_last_job(this)) {
return;
}
error_dialog (
this,
wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())),
- _(
- "This looks like a DCP-o-matic project folder, which cannot be loaded into the player. "
- "Choose the DCP folder inside the DCP-o-matic project folder if that's what you want to play."
- )
+ wxString::Format(
+ _("This looks like a %s project folder, which cannot be loaded into the player. "
+ "Choose the DCP folder inside the %s project folder if that's what you want to play."),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ )
);
} catch (dcp::ReadError& e) {
error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what()));
auto help = new wxMenu;
#ifdef __WXOSX__
- help->Append (wxID_ABOUT, _("About DCP-o-matic"));
+ help->Append(wxID_ABOUT, variant::wx::insert_dcpomatic_player(_("About %s")));
#else
help->Append (wxID_ABOUT, _("About"));
#endif
DCPOMATIC_ASSERT (dcp);
dcp->add_ov (wx_to_std(c->GetPath()));
JobManager::instance()->add(make_shared<ExamineContentJob>(_film, dcp));
- bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading content"));
+ bool const ok = display_progress(variant::wx::dcpomatic_player(), _("Loading content"));
if (!ok || !report_errors_from_last_job(this)) {
return;
}
DCPOMATIC_ASSERT (dcp);
auto job = make_shared<VerifyDCPJob>(dcp->directories(), _kdms);
- VerifyDCPProgressDialog progress(this, _("DCP-o-matic Player"));
+ VerifyDCPProgressDialog progress(this, variant::wx::dcpomatic_player());
bool const completed = progress.run(job);
progress.Close();
auto dialog = make_wx<UpdateDialog>(this, uc->stable (), uc->test ());
dialog->ShowModal ();
} else if (uc->state() == UpdateChecker::State::FAILED) {
- error_dialog (this, _("The DCP-o-matic download server could not be contacted."));
+ error_dialog(this, variant::wx::insert_dcpomatic(_("The %s download server could not be contacted.")));
} else {
- error_dialog (this, _("There are no new versions of DCP-o-matic available."));
+ error_dialog(this, variant::wx::insert_dcpomatic(_("There are no new versions of %s available.")));
}
_update_news_requested = false;
splash = maybe_show_splash ();
- SetAppName (_("DCP-o-matic Player"));
+ SetAppName(variant::wx::dcpomatic_player());
if (!wxApp::OnInit()) {
return false;
if (splash) {
splash->Destroy ();
}
- error_dialog (0, _("DCP-o-matic Player could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_player(_("%s could not start")), std_to_wx(e.what()));
}
return true;
#include "wx/playlist_editor_config_dialog.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/config.h"
#include "lib/constants.h"
#include "lib/cross.h"
help->Append(wxID_PREFERENCES, _("&Preferences...\tCtrl-,"));
}
help->Append(wxID_EXIT, _("&Exit"));
- help->Append(wxID_ABOUT, _("About DCP-o-matic"));
+ help->Append(wxID_ABOUT, variant::wx::insert_dcpomatic_playlist_editor(_("About %s")));
m->Append(help, _("&Help"));
#else
try
{
wxInitAllImageHandlers ();
- SetAppName (_("DCP-o-matic Playlist Editor"));
+ SetAppName(variant::wx::dcpomatic_playlist_editor());
if (!wxApp::OnInit()) {
return false;
*/
Config::drop ();
- _frame = new DOMFrame (_("DCP-o-matic Playlist Editor"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_playlist_editor());
SetTopWindow (_frame);
_frame->Maximize ();
_frame->Show ();
}
catch (exception& e)
{
- error_dialog (0, _("DCP-o-matic could not start"), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_playlist_editor(_("%s could not start %s")), std_to_wx(e.what()));
return true;
}
#include "wx/static_text.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/config.h"
#ifdef DCPOMATIC_GROK
#include "lib/grok/context.h"
public:
StatusDialog ()
: wxDialog (
- nullptr, wxID_ANY, _("DCP-o-matic Encode Server"),
+ nullptr, wxID_ANY, variant::wx::dcpomatic_encode_server(),
wxDefaultPosition, wxDefaultSize,
#ifdef DCPOMATIC_OSX
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxSTAY_ON_TOP
error_dialog (nullptr, std_to_wx(e.what()));
wxTheApp->ExitMainLoop ();
} catch (...) {
- error_dialog (nullptr, _("An unknown error has occurred with the DCP-o-matic server."));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_encode_server(_("An unknown error has occurred with the %s.")));
wxTheApp->ExitMainLoop ();
}
}
*/
+#include "lib/config.h"
#include "lib/config.h"
#include "lib/dcp_video.h"
+#include "lib/dcpomatic_log.h"
+#include "lib/encode_server.h"
#include "lib/exceptions.h"
-#include "lib/util.h"
-#include "lib/config.h"
-#include "lib/image.h"
#include "lib/file_log.h"
#ifdef DCPOMATIC_GROK
#include "lib/grok/context.h"
#endif
+#include "lib/image.h"
#include "lib/null_log.h"
+#include "lib/util.h"
+#include "lib/variant.h"
#include "lib/version.h"
-#include "lib/encode_server.h"
-#include "lib/dcpomatic_log.h"
+#include <boost/algorithm/string.hpp>
#include <boost/array.hpp>
#include <boost/asio.hpp>
-#include <boost/algorithm/string.hpp>
#include <boost/thread.hpp>
-#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
+#include <boost/thread/mutex.hpp>
#include <unistd.h>
#include <errno.h>
#include <getopt.h>
#include <vector>
using std::cerr;
-using std::string;
using std::cout;
using std::shared_ptr;
+using std::string;
static void
help (string n)
{
cerr << "Syntax: " << n << " [OPTION]\n"
- << " -v, --version show DCP-o-matic version\n"
+ << variant::insert_dcpomatic(" -v, --version show %1 version\n")
<< " -h, --help show this help\n"
<< " -t, --threads number of parallel encoding threads to use\n"
<< " --verbose be verbose to stdout\n"
server.run ();
} catch (boost::system::system_error& e) {
if (e.code() == boost::system::errc::address_in_use) {
- cerr << argv[0] << ": address already in use. Is another DCP-o-matic server instance already running?\n";
+ cerr << argv[0] << variant::insert_dcpomatic(": address already in use. Is another %1 server instance already running?\n");
exit (EXIT_FAILURE);
}
cerr << argv[0] << ": " << e.what() << "\n";
#include "wx/verify_dcp_progress_panel.h"
#include "wx/verify_dcp_result_panel.h"
#include "wx/wx_util.h"
+#include "wx/wx_variant.h"
#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/job_manager.h"
bool OnInit() override
{
try {
- SetAppName(_("DCP-o-matic Verifier"));
+ SetAppName(variant::wx::dcpomatic_verifier());
if (!wxApp::OnInit()) {
return false;
*/
Config::drop();
- _frame = new DOMFrame(_("DCP-o-matic Verifier"));
+ _frame = new DOMFrame(variant::wx::dcpomatic_verifier());
SetTopWindow(_frame);
_frame->SetSize({480, 640});
_frame->Show();
}
catch (exception& e)
{
- error_dialog(nullptr, wxString::Format("DCP-o-matic Verifier could not start."), std_to_wx(e.what()));
+ error_dialog(nullptr, variant::wx::insert_dcpomatic_verifier("%s could not start."), std_to_wx(e.what()));
}
return true;
#include "about_dialog.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/compose.hpp"
#include "lib/version.h"
#include <dcp/warnings.h>
AboutDialog::AboutDialog (wxWindow* parent)
- : wxDialog (parent, wxID_ANY, _("About DCP-o-matic"))
+ : wxDialog(parent, wxID_ANY, variant::wx::insert_dcpomatic(_("About %s")))
{
auto overall_sizer = new wxBoxSizer (wxVERTICAL);
auto sizer = new wxBoxSizer (wxVERTICAL);
wxFont version_font (*wxNORMAL_FONT);
version_font.SetWeight (wxFONTWEIGHT_BOLD);
- auto t = new StaticText (this, _("DCP-o-matic"));
+ auto t = new StaticText(this, variant::wx::dcpomatic());
t->SetFont (title_font);
sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
#include "check_box.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/analyse_audio_job.h"
#include "lib/audio_analysis.h"
#include "lib/audio_content.h"
_film_content_connection = film->ContentChange.connect(boost::bind(&AudioDialog::content_change, this, _1, _3));
DCPOMATIC_ASSERT (film->directory());
if (content) {
- SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(content->path(0).string())));
+ SetTitle(wxString::Format(_("%s audio - %s"), variant::wx::dcpomatic(), std_to_wx(content->path(0).string())));
} else {
- SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
+ SetTitle(wxString::Format(_("%s audio - %s"), variant::wx::dcpomatic(), std_to_wx(film->directory().get().string())));
}
if (content) {
#include "dcpomatic_button.h"
#include "nag_dialog.h"
#include "static_text.h"
+#include "wx_variant.h"
#include "lib/constants.h"
#include <dcp/file.h>
#include <dcp/filesystem.h>
++r;
auto restart = add_label_to_sizer (
- table, _panel, _("(restart DCP-o-matic to see language changes)"), false, wxGBPosition (r, 0), wxGBSpan (1, 2)
+ table, _panel, variant::wx::insert_dcpomatic(_("(restart %s to see language changes)")), false, wxGBPosition (r, 0), wxGBSpan (1, 2)
);
wxFont font = restart->GetFont();
font.SetStyle (wxFONTSTYLE_ITALIC);
if (new_chain->chain_valid() && new_chain->private_key_valid()) {
Config::instance()->set_decryption_chain(new_chain);
} else {
- error_dialog(_panel, _("Invalid DCP-o-matic export file"));
+ error_dialog(_panel, variant::wx::insert_dcpomatic(_("Invalid %s export file")));
}
}
#include "timing_panel.h"
#include "video_panel.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/audio_content.h"
#include "lib/case_insensitive_sorter.h"
#include "lib/compose.hpp"
} catch (ProjectFolderError &) {
error_dialog (
_parent,
- _(
- "This looks like a DCP-o-matic project folder, which cannot be added to a different project. "
- "Choose the DCP folder inside the DCP-o-matic project folder if that's what you want to import."
- )
+ wxString::Format(
+ _(
+ "This looks like a %s project folder, which cannot be added to a different project. "
+ "Choose the DCP folder inside the %s project folder if that's what you want to import."
+ ),
+ variant::wx::dcpomatic(),
+ variant::wx::dcpomatic()
+ )
);
} catch (exception& e) {
error_dialog(_parent, e.what());
#include "content_view.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/config.h"
#include "lib/content_factory.h"
#include "lib/cross.h"
dir = home_directory ();
}
- wxProgressDialog progress (_("DCP-o-matic"), _("Reading content directory"));
+ wxProgressDialog progress(variant::wx::dcpomatic(), _("Reading content directory"));
auto jm = JobManager::instance ();
list<shared_ptr<ExamineContentJob>> jobs;
*/
+
#include "disk_warning_dialog.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
+
DiskWarningDialog::DiskWarningDialog ()
: wxDialog(nullptr, wxID_ANY, _("Important notice"))
auto const confirmation = _("I am sure");
text->SetLabelMarkup(wxString::Format(
- _("The <b>DCP-o-matic Disk Writer</b> is\n\n<span weight=\"bold\" size=\"20480\" foreground=\"red\">BETA-GRADE TEST SOFTWARE</span>\n\n"
+ _("The <b>%s</b> is\n\n<span weight=\"bold\" size=\"20480\" foreground=\"red\">BETA-GRADE TEST SOFTWARE</span>\n\n"
"and may\n\n<span weight=\"bold\" size=\"20480\" foreground=\"red\">DESTROY DATA!</span>\n\n"
"If you are sure you want to continue please type\n\n<tt>%s</tt>\n\ninto the box below, then click OK."),
- confirmation));
+ variant::wx::dcpomatic_disk_writer(), confirmation));
}
bool
#include "recipients_panel.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/config.h"
#include "lib/film.h"
#include "lib/job_manager.h"
if (e.starts_too_early()) {
error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));
} else {
- error_dialog (this, _("The KDM end period is after (or close to) the end of the signing certificates' validity period. Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+ error_dialog(
+ this,
+ variant::wx::insert_dcpomatic(
+ _("The KDM end period is after (or close to) the end of the signing certificates' validity period. "
+ "Either use an earlier end time for this KDM or re-create your signing certificates in the %s preferences window.")
+ )
+ );
}
return;
} catch (runtime_error& e) {
#include "grok/gpu_config_panel.h"
#endif
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/config.h"
#include "lib/cross.h"
#include "lib/dcp_content_type.h"
int r = 0;
add_language_controls (table, r);
- add_label_to_sizer (table, _panel, _("Number of threads DCP-o-matic should use"), true, wxGBPosition (r, 0));
+ add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic(_("Number of threads %s should use")), true, wxGBPosition(r, 0));
_master_encoding_threads = new wxSpinCtrl (_panel);
table->Add (_master_encoding_threads, wxGBPosition (r, 1));
++r;
- add_label_to_sizer (table, _panel, _("Number of threads DCP-o-matic encode server should use"), true, wxGBPosition (r, 0));
+ add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic_encode_server(_("Number of threads %s should use")), true, wxGBPosition(r, 0));
_server_encoding_threads = new wxSpinCtrl (_panel);
table->Add (_server_encoding_threads, wxGBPosition (r, 1));
++r;
Email email(
wx_to_std(dialog.from()),
{ wx_to_std(dialog.to()) },
- wx_to_std(_("DCP-o-matic test email")),
- wx_to_std(_("This is a test email from DCP-o-matic."))
+ wx_to_std(variant::wx::insert_dcpomatic(_("%s test email"))),
+ wx_to_std(variant::wx::insert_dcpomatic(_("This is a test email from %s.")))
);
auto config = Config::instance();
try {
add_label_to_sizer (table, _panel, _("Issuer"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_issuer = new wxTextCtrl (_panel, wxID_ANY);
- _issuer->SetToolTip (_("This will be written to the DCP's XML files as the <Issuer>. If it is blank, a default value mentioning DCP-o-matic will be used."));
+ _issuer->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's XML files as the <Issuer>. If it is blank, a default value mentioning %s will be used.")
+ ));
table->Add (_issuer, 1, wxALL | wxEXPAND);
add_label_to_sizer (table, _panel, _("Creator"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_creator = new wxTextCtrl (_panel, wxID_ANY);
- _creator->SetToolTip (_("This will be written to the DCP's XML files as the <Creator>. If it is blank, a default value mentioning DCP-o-matic will be used."));
+ _creator->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's XML files as the <Creator>. If it is blank, a default value mentioning %s will be used.")
+ ));
table->Add (_creator, 1, wxALL | wxEXPAND);
add_label_to_sizer (table, _panel, _("Company name"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_company_name = new wxTextCtrl (_panel, wxID_ANY);
- _company_name->SetToolTip (_("This will be written to the DCP's MXF files as the 'company name'. If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+ _company_name->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's MXF files as the 'company name'. If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+ ));
table->Add (_company_name, 1, wxALL | wxEXPAND);
add_label_to_sizer (table, _panel, _("Product name"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_product_name = new wxTextCtrl (_panel, wxID_ANY);
- _product_name->SetToolTip (_("This will be written to the DCP's MXF files as the 'product name'. If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+ _product_name->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's MXF files as the 'product name'. If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+ ));
table->Add (_product_name, 1, wxALL | wxEXPAND);
add_label_to_sizer (table, _panel, _("Product version"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_product_version = new wxTextCtrl (_panel, wxID_ANY);
- _product_version->SetToolTip (_("This will be written to the DCP's MXF files as the 'product version'. If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+ _product_version->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's MXF files as the 'product version'. If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+ ));
table->Add (_product_version, 1, wxALL | wxEXPAND);
add_label_to_sizer (table, _panel, _("JPEG2000 comment"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_j2k_comment = new wxTextCtrl (_panel, wxID_ANY);
- _j2k_comment->SetToolTip (_("This will be written to the DCP's JPEG2000 data as a comment. If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+ _j2k_comment->SetToolTip(
+ variant::wx::insert_dcpomatic(
+ _("This will be written to the DCP's JPEG2000 data as a comment. If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+ ));
table->Add (_j2k_comment, 1, wxALL | wxEXPAND);
_panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
_allow_any_container = new CheckBox(_panel, _("Allow full-frame and non-standard container ratios"));
table->Add(_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
- auto restart = new StaticText(_panel, _("(restart DCP-o-matic to see all ratios)"));
+ auto restart = new StaticText(_panel, variant::wx::insert_dcpomatic(_("(restart %s to see all ratios)")));
auto font = restart->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
font.SetPointSize(font.GetPointSize() - 1);
_video_display_mode = new wxChoice (_panel, wxID_ANY);
table->Add (_video_display_mode);
- auto restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to change display mode)"), false);
+ auto restart = add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic(_("(restart %s to change display mode)")), false);
auto font = restart->GetFont();
font.SetStyle (wxFONTSTYLE_ITALIC);
font.SetPointSize (font.GetPointSize() - 1);
#include "message_dialog.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/analyse_audio_job.h"
#include "lib/compose.hpp"
#include "lib/config.h"
if (_job->enable_notify() && _notify->GetValue()) {
if (Config::instance()->notification(Config::MESSAGE_BOX)) {
- wxMessageBox (std_to_wx(_job->name() + ": " + _job->status()), _("DCP-o-matic"), wxICON_INFORMATION);
+ wxMessageBox(std_to_wx(_job->name() + ": " + _job->status()), variant::wx::dcpomatic(), wxICON_INFORMATION);
}
if (Config::instance()->notification(Config::EMAIL)) {
string body = Config::instance()->notification_email();
#include "screens_panel.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/cinema.h"
#include "lib/config.h"
#include "lib/film.h"
if (e.starts_too_early()) {
error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));
} else {
- error_dialog (this, _("The KDM end period is after (or close to) the end of the signing certificates' validity period. Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+ error_dialog(
+ this,
+ variant::wx::insert_dcpomatic(
+ _("The KDM end period is after (or close to) the end of the signing certificates' validity "
+ "period. Either use an earlier end time for this KDM or re-create your signing certificates "
+ "in the %s preferences window."))
+ );
}
return;
} catch (runtime_error& e) {
#include "server_dialog.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/config.h"
#include "lib/cross.h"
#include "lib/dcp_content_type.h"
table->Add (_video_display_mode, wxGBPosition(r, 1));
++r;
- wxStaticText* restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to change display mode)"), false, wxGBPosition(r, 0));
+ wxStaticText* restart = add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic_player(_("(restart %s to change display mode)")), false, wxGBPosition(r, 0));
wxFont font = restart->GetFont();
font.SetStyle (wxFONTSTYLE_ITALIC);
font.SetPointSize (font.GetPointSize() - 1);
wxPreferencesEditor*
create_player_config_dialog ()
{
- auto e = new wxPreferencesEditor (_("DCP-o-matic Player Preferences"));
+ auto e = new wxPreferencesEditor(variant::wx::insert_dcpomatic_player(_("%s Preferences")));
#ifdef DCPOMATIC_OSX
/* Width that we force some of the config panels to be on OSX so that
#include "playlist_controls.h"
#include "static_text.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/compose.hpp"
#include "lib/constants.h"
#include "lib/cross.h"
void
PlaylistControls::select_playlist (int selected, int position)
{
- wxProgressDialog dialog (_("DCP-o-matic"), "Loading playlist and KDMs");
+ wxProgressDialog dialog(variant::wx::dcpomatic(), "Loading playlist and KDMs");
for (auto const& i: _playlists[selected].get()) {
dialog.Pulse ();
{
DCPOMATIC_ASSERT (_selected_playlist);
- wxProgressDialog dialog (_("DCP-o-matic"), "Loading content");
+ wxProgressDialog dialog(variant::wx::dcpomatic(), "Loading content");
setup_sensitivity ();
dialog.Pulse ();
*/
-#include "playlist_editor_config_dialog.h"
+
#include "config_dialog.h"
+#include "playlist_editor_config_dialog.h"
+#include "wx_variant.h"
+
/** @file src/playlist_editor_config_dialog.cc
* @brief A dialogue to edit DCP-o-matic Playlist Editor configuration.
wxPreferencesEditor*
create_playlist_editor_config_dialog ()
{
- auto e = new wxPreferencesEditor (_("DCP-o-matic Playlist Editor Preferences"));
+ auto e = new wxPreferencesEditor(variant::wx::insert_dcpomatic_playlist_editor(_("%s Preferences")));
#ifdef DCPOMATIC_OSX
/* Width that we force some of the config panels to be on OSX so that
#include "screen_dialog.h"
#include "screens_panel.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/cinema.h"
#include "lib/config.h"
#include "lib/screen.h"
dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
Config::instance()->add_cinema(cinema);
} catch (FileError& e) {
- error_dialog(GetParent(), _("Could not write cinema details to the cinemas.xml file. Check that the location of cinemas.xml is valid in DCP-o-matic's preferences."), std_to_wx(e.what()));
+ error_dialog(
+ GetParent(),
+ variant::wx::insert_dcpomatic(
+ _("Could not write cinema details to the cinemas.xml file. Check that the location of "
+ "cinemas.xml is valid in %s's preferences.")
+ ),
+ std_to_wx(e.what())
+ );
return;
}
try {
Config::instance()->changed(Config::CINEMAS);
} catch (FileError& e) {
- error_dialog(GetParent(), _("Could not write cinema details to the cinemas.xml file. Check that the location of cinemas.xml is valid in DCP-o-matic's preferences."), std_to_wx(e.what()));
+ error_dialog(
+ GetParent(),
+ variant::wx::insert_dcpomatic(
+ _("Could not write cinema details to the cinemas.xml file. Check that the location of "
+ "cinemas.xml is valid in %s's preferences.")
+ ),
+ std_to_wx(e.what())
+ );
return false;
}
#include "gl_video_view.h"
#include "system_information_dialog.h"
#include "wx_util.h"
+#include "wx_variant.h"
#ifdef DCPOMATIC_OSX
if (!gl) {
add (_("OpenGL version"), true);
- add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false);
+ add(variant::wx::insert_dcpomatic(_("unknown (OpenGL not enabled in %s)")), false);
} else {
auto information = gl->information();
auto add_string = [this, &information](GLenum name, wxString label) {
: TableDialog (parent, _("System information"), 2, 1, false)
{
add (_("OpenGL version"), true);
- add (_("OpenGL renderer not supported by this DCP-o-matic version"), false);
+ add(variant::wx::insert_dcpomatic(_("OpenGL renderer not supported by this %s version")), false);
}
#endif
#include "static_text.h"
#include "try_unmount_dialog.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
TryUnmountDialog::TryUnmountDialog (wxWindow* parent, wxString description)
- : wxDialog (parent, wxID_ANY, _("DCP-o-matic Disk Writer"))
+ : wxDialog(parent, wxID_ANY, variant::wx::dcpomatic_disk_writer())
{
auto sizer = new wxBoxSizer (wxVERTICAL);
auto text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(width, -1));
sizer->Add (text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
text->SetLabelMarkup (
- wxString::Format(_("The drive <b>%s</b> is mounted.\n\nIt must be unmounted before DCP-o-matic can write to it.\n\nShould DCP-o-matic try to unmount it now?"), description)
+ wxString::Format(
+ _("The drive <b>%s</b> is mounted.\n\nIt must be unmounted before %s can write to it.\n\nShould DCP-o-matic try to unmount it now?"),
+ description, variant::wx::dcpomatic()
+ )
);
text->Wrap(width);
#include "static_text.h"
#include "update_dialog.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/hyperlink.h>
wxStaticText* message;
if ((stable || test) && !(stable && test)) {
- message = new StaticText (this, _("A new version of DCP-o-matic is available."));
+ message = new StaticText(this, variant::wx::insert_dcpomatic(_("A new version of %s is available.")));
} else {
- message = new StaticText (this, _("New versions of DCP-o-matic are available."));
+ message = new StaticText(this, variant::wx::insert_dcpomatic(_("New versions of %s are available.")));
}
overall_sizer->Add (message, 0, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
video_view.cc
video_waveform_dialog.cc
video_waveform_plot.cc
- wx_util.cc
wx_signal_manager.cc
+ wx_util.cc
+ wx_variant.cc
"""
def configure(conf):
#include "static_text.h"
#include "wx_ptr.h"
#include "wx_util.h"
+#include "wx_variant.h"
#include "lib/config.h"
#include "lib/cross.h"
#include "lib/job.h"
void
error_dialog (wxWindow* parent, wxString m, optional<wxString> e)
{
- auto d = make_wx<wxMessageDialog>(parent, m, _("DCP-o-matic"), wxOK | wxICON_ERROR);
+ auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_ERROR);
if (e) {
wxString em = *e;
em[0] = wxToupper (em[0]);
void
message_dialog (wxWindow* parent, wxString m)
{
- auto d = make_wx<wxMessageDialog>(parent, m, _("DCP-o-matic"), wxOK | wxICON_INFORMATION);
+ auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_INFORMATION);
d->ShowModal ();
}
bool
confirm_dialog (wxWindow* parent, wxString m)
{
- auto d = make_wx<wxMessageDialog>(parent, m, _("DCP-o-matic"), wxYES_NO | wxICON_QUESTION);
+ auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxYES_NO | wxICON_QUESTION);
return d->ShowModal() == wxID_YES;
}
--- /dev/null
+/*
+ Copyright (C) 2024 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "wx_util.h"
+#include "wx_variant.h"
+#include "lib/variant.h"
+
+
+
+wxString
+variant::wx::dcpomatic()
+{
+ return std_to_wx(variant::dcpomatic());
+}
+
+wxString
+variant::wx::dcpomatic_batch_converter()
+{
+ return std_to_wx(variant::dcpomatic_batch_converter());
+}
+
+wxString
+variant::wx::dcpomatic_combiner()
+{
+ return std_to_wx(variant::dcpomatic_combiner());
+}
+
+wxString
+variant::wx::dcpomatic_disk_writer()
+{
+ return std_to_wx(variant::dcpomatic_disk_writer());
+}
+
+wxString
+variant::wx::dcpomatic_editor()
+{
+ return std_to_wx(variant::dcpomatic_editor());
+}
+
+wxString
+variant::wx::dcpomatic_encode_server()
+{
+ return std_to_wx(variant::dcpomatic_encode_server());
+}
+
+wxString
+variant::wx::dcpomatic_kdm_creator()
+{
+ return std_to_wx(variant::dcpomatic_kdm_creator());
+}
+
+wxString
+variant::wx::dcpomatic_player()
+{
+ return std_to_wx(variant::dcpomatic_player());
+}
+
+wxString
+variant::wx::dcpomatic_playlist_editor()
+{
+ return std_to_wx(variant::dcpomatic_playlist_editor());
+}
+
+wxString
+variant::wx::dcpomatic_verifier()
+{
+ return std_to_wx(variant::dcpomatic_verifier());
+}
+
+wxString
+variant::wx::insert_dcpomatic(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic());
+}
+
+wxString
+variant::wx::insert_dcpomatic_batch_converter(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_batch_converter());
+}
+
+wxString
+variant::wx::insert_dcpomatic_disk_writer(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_disk_writer());
+}
+
+wxString
+variant::wx::insert_dcpomatic_editor(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_editor());
+}
+
+wxString
+variant::wx::insert_dcpomatic_encode_server(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_encode_server());
+}
+
+wxString
+variant::wx::insert_dcpomatic_kdm_creator(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_kdm_creator());
+}
+
+wxString
+variant::wx::insert_dcpomatic_player(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_player());
+}
+
+wxString
+variant::wx::insert_dcpomatic_playlist_editor(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_playlist_editor());
+}
+
+wxString
+variant::wx::insert_dcpomatic_verifier(wxString const& s)
+{
+ return wxString::Format(s, dcpomatic_verifier());
+}
--- /dev/null
+/*
+ Copyright (C) 2024 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include <wx/wx.h>
+
+
+namespace variant {
+namespace wx {
+
+
+wxString dcpomatic();
+wxString dcpomatic_batch_converter();
+wxString dcpomatic_combiner();
+wxString dcpomatic_disk_writer();
+wxString dcpomatic_editor();
+wxString dcpomatic_encode_server();
+wxString dcpomatic_kdm_creator();
+wxString dcpomatic_player();
+wxString dcpomatic_playlist_editor();
+wxString dcpomatic_verifier();
+
+wxString insert_dcpomatic(wxString const& s);
+wxString insert_dcpomatic_batch_converter(wxString const& s);
+wxString insert_dcpomatic_disk_writer(wxString const& s);
+wxString insert_dcpomatic_editor(wxString const& s);
+wxString insert_dcpomatic_encode_server(wxString const& s);
+wxString insert_dcpomatic_kdm_creator(wxString const& s);
+wxString insert_dcpomatic_player(wxString const& s);
+wxString insert_dcpomatic_playlist_editor(wxString const& s);
+wxString insert_dcpomatic_verifier(wxString const& s);
+
+
+}
+}