Use ScopeGuard for _no_check_selection
[dcpomatic.git] / src / wx / disk_warning_dialog.cc
index 8f581c2d1f1b5e5365f138de556060eb736e833f..531b7f4f9d6d01856a00fb5790b10b9507b60cfa 100644 (file)
@@ -23,7 +23,7 @@
 #include "wx_util.h"
 
 DiskWarningDialog::DiskWarningDialog ()
-       : wxDialog (0, wxID_ANY, _("Important notice"))
+       : wxDialog(nullptr, wxID_ANY, _("Important notice"))
 {
        auto sizer = new wxBoxSizer (wxVERTICAL);
        auto text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(400, 300));
@@ -40,15 +40,19 @@ DiskWarningDialog::DiskWarningDialog ()
        sizer->Layout ();
        sizer->SetSizeHints (this);
 
-       text->SetLabelMarkup (
+       /// TRANSLATORS: the user will be asked to type this phrase into a text entry to confirm that they have read
+       /// the warning about using the disk writer.
+       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"
                  "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>I am sure</tt>\n\ninto the box below, then click OK.")
-               );
+                 "If you are sure you want to continue please type\n\n<tt>%s</tt>\n\ninto the box below, then click OK."),
+               confirmation));
 }
 
 bool
 DiskWarningDialog::confirmed () const
 {
-       return _yes->GetValue() == "I am sure";
+       return _yes->GetValue() == _("I am sure");
 }