Try to improve i18n a bit.
authorCarl Hetherington <cth@carlh.net>
Wed, 6 Feb 2013 12:59:52 +0000 (12:59 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 6 Feb 2013 12:59:52 +0000 (12:59 +0000)
14 files changed:
src/tools/dvdomatic.cc
src/wx/config_dialog.cc
src/wx/dci_metadata_dialog.cc
src/wx/film_editor.cc
src/wx/film_viewer.cc
src/wx/gain_calculator_dialog.cc
src/wx/job_manager_view.cc
src/wx/job_wrapper.cc
src/wx/new_film_dialog.cc
src/wx/properties_dialog.cc
src/wx/server_dialog.cc
src/wx/wx_util.cc
src/wx/wx_util.h
wscript

index 9a1db3fedd50c64c8b402e83b681bccc7af4289b..0565d3a1c871aadf4177bb919f14e7bf4a0631a1 100644 (file)
@@ -64,7 +64,7 @@ public:
        {
                stringstream s;
                s << "Save changes to film \"" << film->name() << "\" before closing?";
-               _dialog = new wxMessageDialog (0, std_to_wx (s.str()), wxT ("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
+               _dialog = new wxMessageDialog (0, std_to_wx (s.str()), _("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
        }
 
        ~FilmChangedDialog ()
@@ -263,7 +263,7 @@ public:
                if (r == wxID_OK) {
 
                        if (boost::filesystem::exists (d->get_path())) {
-                               error_dialog (this, String::compose ("The directory %1 already exists.", d->get_path()));
+                               error_dialog (this, wxString::Format (_("The directory %s already exists"), d->get_path().c_str()));
                                return;
                        }
                        
@@ -279,7 +279,7 @@ public:
 
        void file_open (wxCommandEvent &)
        {
-               wxDirDialog* c = new wxDirDialog (this, wxT ("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
+               wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
                int const r = c->ShowModal ();
                
                if (r == wxID_OK) {
@@ -289,7 +289,9 @@ public:
                                film->log()->set_level (log_level);
                                set_film ();
                        } catch (std::exception& e) {
-                               error_dialog (this, String::compose ("Could not open film at %1 (%2)", wx_to_std (c->GetPath()), e.what()));
+                               wxString p = c->GetPath ();
+                               wxCharBuffer b = p.ToUTF8 ();
+                               error_dialog (this, wxString::Format (_("Could not open film at %s (%s)"), p.data(), e.what()));
                        }
                }
 
index b656a5278b5cd32ede5fc8f75e508335cc58182a..07e32a4578a0ecd44a2d825a4e97c03265c770e5 100644 (file)
@@ -46,32 +46,32 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        wxFlexGridSizer* table = new wxFlexGridSizer (3, 6, 6);
        table->AddGrowableCol (1, 1);
 
-       add_label_to_sizer (table, this, "TMS IP address");
+       add_label_to_sizer (table, this, _("TMS IP address"));
        _tms_ip = new wxTextCtrl (this, wxID_ANY);
        table->Add (_tms_ip, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "TMS target path");
+       add_label_to_sizer (table, this, _("TMS target path"));
        _tms_path = new wxTextCtrl (this, wxID_ANY);
        table->Add (_tms_path, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "TMS user name");
+       add_label_to_sizer (table, this, _("TMS user name"));
        _tms_user = new wxTextCtrl (this, wxID_ANY);
        table->Add (_tms_user, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "TMS password");
+       add_label_to_sizer (table, this, _("TMS password"));
        _tms_password = new wxTextCtrl (this, wxID_ANY);
        table->Add (_tms_password, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "Threads to use for encoding on this host");
+       add_label_to_sizer (table, this, _("Threads to use for encoding on this host"));
        _num_local_encoding_threads = new wxSpinCtrl (this);
        table->Add (_num_local_encoding_threads, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "Default directory for new films");
+       add_label_to_sizer (table, this, _("Default directory for new films"));
 #ifdef __WXMSW__
        _default_directory = new DirPickerCtrl (this);
 #else  
@@ -80,12 +80,12 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        table->Add (_default_directory, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "Default DCI name details");
+       add_label_to_sizer (table, this, _("Default DCI name details"));
        _default_dci_metadata_button = new wxButton (this, wxID_ANY, _("Edit..."));
        table->Add (_default_dci_metadata_button);
        table->AddSpacer (1);
 
-       add_label_to_sizer (table, this, "Reference scaler for A/B");
+       add_label_to_sizer (table, this, _("Reference scaler for A/B"));
        _reference_scaler = new wxChoice (this, wxID_ANY);
        vector<Scaler const *> const sc = Scaler::all ();
        for (vector<Scaler const *>::const_iterator i = sc.begin(); i != sc.end(); ++i) {
@@ -96,7 +96,7 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        table->AddSpacer (0);
 
        {
-               add_label_to_sizer (table, this, "Reference filters for A/B");
+               add_label_to_sizer (table, this, _("Reference filters for A/B"));
                wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _reference_filters = new wxStaticText (this, wxID_ANY, wxT (""));
                s->Add (_reference_filters, 1, wxEXPAND);
@@ -106,7 +106,7 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
                table->AddSpacer (0);
        }
 
-       add_label_to_sizer (table, this, "Encoding Servers");
+       add_label_to_sizer (table, this, _("Encoding Servers"));
        _servers = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (220, 100), wxLC_REPORT | wxLC_SINGLE_SEL);
        wxListItem ip;
        ip.SetId (0);
index c5682e19ebd94e773d97439beb9e5f8bd03d8a5b..c08c58ed460abb15846f0c637968119024c51be5 100644 (file)
@@ -30,31 +30,31 @@ DCIMetadataDialog::DCIMetadataDialog (wxWindow* parent, DCIMetadata dm)
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
        table->AddGrowableCol (1, 1);
 
-       add_label_to_sizer (table, this, "Audio Language (e.g. EN)");
+       add_label_to_sizer (table, this, _("Audio Language (e.g. EN)"));
        _audio_language = new wxTextCtrl (this, wxID_ANY);
        table->Add (_audio_language, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Subtitle Language (e.g. FR)");
+       add_label_to_sizer (table, this, _("Subtitle Language (e.g. FR)"));
        _subtitle_language = new wxTextCtrl (this, wxID_ANY);
        table->Add (_subtitle_language, 1, wxEXPAND);
        
-       add_label_to_sizer (table, this, "Territory (e.g. UK)");
+       add_label_to_sizer (table, this, _("Territory (e.g. UK)"));
        _territory = new wxTextCtrl (this, wxID_ANY);
        table->Add (_territory, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Rating (e.g. 15)");
+       add_label_to_sizer (table, this, _("Rating (e.g. 15)"));
        _rating = new wxTextCtrl (this, wxID_ANY);
        table->Add (_rating, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Studio (e.g. TCF)");
+       add_label_to_sizer (table, this, _("Studio (e.g. TCF)"));
        _studio = new wxTextCtrl (this, wxID_ANY);
        table->Add (_studio, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Facility (e.g. DLA)");
+       add_label_to_sizer (table, this, _("Facility (e.g. DLA)"));
        _facility = new wxTextCtrl (this, wxID_ANY);
        table->Add (_facility, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Package Type (e.g. OV)");
+       add_label_to_sizer (table, this, _("Package Type (e.g. OV)"));
        _package_type = new wxTextCtrl (this, wxID_ANY);
        table->Add (_package_type, 1, wxEXPAND);
 
index f274416fb6225cfa4b3f42fd93b8b06b7e8c1d29..4b8f6ee33d9666b330c75f7a6838e830a4f19eba 100644 (file)
@@ -97,71 +97,72 @@ FilmEditor::make_film_panel ()
        pad->Add (_film_sizer, 0, wxALL, 8);
        _film_panel->SetSizer (pad);
 
-       add_label_to_sizer (_film_sizer, _film_panel, "Name");
+       add_label_to_sizer (_film_sizer, _film_panel, _("Name"));
        _name = new wxTextCtrl (_film_panel, wxID_ANY);
        _film_sizer->Add (_name, 1, wxEXPAND);
 
-       add_label_to_sizer (_film_sizer, _film_panel, "DCP Name");
+       add_label_to_sizer (_film_sizer, _film_panel, _("DCP Name"));
        _dcp_name = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
        _film_sizer->Add (_dcp_name, 0, wxALIGN_CENTER_VERTICAL | wxSHRINK);
 
-       _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Use DCI name"));
+       _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, _("Use DCI name"));
        _film_sizer->Add (_use_dci_name, 1, wxEXPAND);
-       _edit_dci_button = new wxButton (_film_panel, wxID_ANY, wxT ("Details..."));
+       _edit_dci_button = new wxButton (_film_panel, wxID_ANY, _("Details..."));
        _film_sizer->Add (_edit_dci_button, 0);
 
-       add_label_to_sizer (_film_sizer, _film_panel, "Content");
-       _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), wxT ("Select Content File"), wxT("*.*"));
+       add_label_to_sizer (_film_sizer, _film_panel, _("Content"));
+       _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), _("Select Content File"), wxT("*.*"));
        _film_sizer->Add (_content, 1, wxEXPAND);
 
-       _trust_content_header = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Trust content's header"));
+       _trust_content_header = new wxCheckBox (_film_panel, wxID_ANY, _("Trust content's header"));
        video_control (_trust_content_header);
        _film_sizer->Add (_trust_content_header, 1);
        _film_sizer->AddSpacer (0);
 
-       add_label_to_sizer (_film_sizer, _film_panel, "Content Type");
+       add_label_to_sizer (_film_sizer, _film_panel, _("Content Type"));
        _dcp_content_type = new wxChoice (_film_panel, wxID_ANY);
        _film_sizer->Add (_dcp_content_type);
 
-       video_control (add_label_to_sizer (_film_sizer, _film_panel, "Frames Per Second"));
+       video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Frames Per Second")));
        _frames_per_second = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
        _film_sizer->Add (video_control (_frames_per_second), 1, wxALIGN_CENTER_VERTICAL);
        
-       video_control (add_label_to_sizer (_film_sizer, _film_panel, "Original Size"));
+       video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Original Size")));
        _original_size = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
        _film_sizer->Add (video_control (_original_size), 1, wxALIGN_CENTER_VERTICAL);
        
-       video_control (add_label_to_sizer (_film_sizer, _film_panel, "Length"));
+       video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Length")));
        _length = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
        _film_sizer->Add (video_control (_length), 1, wxALIGN_CENTER_VERTICAL);
 
 
        {
-               video_control (add_label_to_sizer (_film_sizer, _film_panel, "Trim frames"));
+               video_control (add_label_to_sizer (_film_sizer, _film_panel, _("Trim frames")));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-               video_control (add_label_to_sizer (s, _film_panel, "Start"));
+               video_control (add_label_to_sizer (s, _film_panel, _("Start")));
                _trim_start = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (video_control (_trim_start));
-               video_control (add_label_to_sizer (s, _film_panel, "End"));
+               video_control (add_label_to_sizer (s, _film_panel, _("End")));
                _trim_end = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (video_control (_trim_end));
 
                _film_sizer->Add (s);
        }
 
-       _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, wxT ("A/B"));
+       _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, _("A/B"));
        video_control (_dcp_ab);
        _film_sizer->Add (_dcp_ab, 1);
        _film_sizer->AddSpacer (0);
 
        /* STILL-only stuff */
        {
-               still_control (add_label_to_sizer (_film_sizer, _film_panel, "Duration"));
+               still_control (add_label_to_sizer (_film_sizer, _film_panel, _("Duration")));
                wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _still_duration = new wxSpinCtrl (_film_panel);
                still_control (_still_duration);
                s->Add (_still_duration, 1, wxEXPAND);
-               still_control (add_label_to_sizer (s, _film_panel, "s"));
+               /* TRANSLATORS: `s' here is an abbreviation for seconds, the unit of time */
+               still_control (add_label_to_sizer (s, _film_panel, _("s")));
                _film_sizer->Add (s);
        }
 
@@ -221,24 +222,27 @@ FilmEditor::make_video_panel ()
        pad->Add (_video_sizer, 0, wxALL, 8);
        _video_panel->SetSizer (pad);
 
-       add_label_to_sizer (_video_sizer, _video_panel, "Format");
+       add_label_to_sizer (_video_sizer, _video_panel, _("Format"));
        _format = new wxChoice (_video_panel, wxID_ANY);
        _video_sizer->Add (_format);
 
        {
-               add_label_to_sizer (_video_sizer, _video_panel, "Crop");
+               add_label_to_sizer (_video_sizer, _video_panel, _("Crop"));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 
-               add_label_to_sizer (s, _video_panel, "L");
+               /* TRANSLATORS: L, R, T and B are abbreviations for Left, Right, Top, Bottom, the four edges
+                  of the picture frame.
+               */
+               add_label_to_sizer (s, _video_panel, _("L"));
                _left_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (_left_crop, 0);
-               add_label_to_sizer (s, _video_panel, "R");
+               add_label_to_sizer (s, _video_panel, _("R"));
                _right_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (_right_crop, 0);
-               add_label_to_sizer (s, _video_panel, "T");
+               add_label_to_sizer (s, _video_panel, _("T"));
                _top_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (_top_crop, 0);
-               add_label_to_sizer (s, _video_panel, "B");
+               add_label_to_sizer (s, _video_panel, _("B"));
                _bottom_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
                s->Add (_bottom_crop, 0);
 
@@ -247,18 +251,18 @@ FilmEditor::make_video_panel ()
 
        /* VIDEO-only stuff */
        {
-               video_control (add_label_to_sizer (_video_sizer, _video_panel, "Filters"));
+               video_control (add_label_to_sizer (_video_sizer, _video_panel, _("Filters")));
                wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-               _filters = new wxStaticText (_video_panel, wxID_ANY, wxT ("None"));
+               _filters = new wxStaticText (_video_panel, wxID_ANY, _("None"));
                video_control (_filters);
                s->Add (_filters, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM | wxRIGHT, 6);
-               _filters_button = new wxButton (_video_panel, wxID_ANY, wxT ("Edit..."));
+               _filters_button = new wxButton (_video_panel, wxID_ANY, _("Edit..."));
                video_control (_filters_button);
                s->Add (_filters_button, 0);
                _video_sizer->Add (s, 1);
        }
 
-       video_control (add_label_to_sizer (_video_sizer, _video_panel, "Scaler"));
+       video_control (add_label_to_sizer (_video_sizer, _video_panel, _("Scaler")));
        _scaler = new wxChoice (_video_panel, wxID_ANY);
        _video_sizer->Add (video_control (_scaler), 1);
 
@@ -267,7 +271,7 @@ FilmEditor::make_video_panel ()
                _scaler->Append (std_to_wx ((*i)->name()));
        }
 
-       add_label_to_sizer (_video_sizer, _video_panel, "Colour look-up table");
+       add_label_to_sizer (_video_sizer, _video_panel, _("Colour look-up table"));
        _colour_lut = new wxChoice (_video_panel, wxID_ANY);
        for (int i = 0; i < 2; ++i) {
                _colour_lut->Append (std_to_wx (colour_lut_index_to_name (i)));
@@ -276,11 +280,11 @@ FilmEditor::make_video_panel ()
        _video_sizer->Add (_colour_lut, 1, wxEXPAND);
 
        {
-               add_label_to_sizer (_video_sizer, _video_panel, "JPEG2000 bandwidth");
+               add_label_to_sizer (_video_sizer, _video_panel, _("JPEG2000 bandwidth"));
                wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _j2k_bandwidth = new wxSpinCtrl (_video_panel, wxID_ANY);
                s->Add (_j2k_bandwidth, 1);
-               add_label_to_sizer (s, _video_panel, "MBps");
+               add_label_to_sizer (s, _video_panel, _("MBps"));
                _video_sizer->Add (s, 1);
        }
 
@@ -304,11 +308,11 @@ FilmEditor::make_audio_panel ()
        _audio_panel->SetSizer (pad);
 
        {
-               video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Gain"));
+               video_control (add_label_to_sizer (_audio_sizer, _audio_panel, _("Audio Gain")));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _audio_gain = new wxSpinCtrl (_audio_panel);
                s->Add (video_control (_audio_gain), 1);
-               video_control (add_label_to_sizer (s, _audio_panel, "dB"));
+               video_control (add_label_to_sizer (s, _audio_panel, _("dB")));
                _audio_gain_calculate_button = new wxButton (_audio_panel, wxID_ANY, _("Calculate..."));
                video_control (_audio_gain_calculate_button);
                s->Add (_audio_gain_calculate_button, 1, wxEXPAND);
@@ -316,11 +320,12 @@ FilmEditor::make_audio_panel ()
        }
 
        {
-               video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Delay"));
+               video_control (add_label_to_sizer (_audio_sizer, _audio_panel, _("Audio Delay")));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _audio_delay = new wxSpinCtrl (_audio_panel);
                s->Add (video_control (_audio_delay), 1);
-               video_control (add_label_to_sizer (s, _audio_panel, "ms"));
+               /* TRANSLATORS: this is an abbreviation for milliseconds, the unit of time */
+               video_control (add_label_to_sizer (s, _audio_panel, _("ms")));
                _audio_sizer->Add (s);
        }
 
@@ -341,18 +346,21 @@ FilmEditor::make_audio_panel ()
 
        assert (MAX_AUDIO_CHANNELS == 6);
 
-       char const * channels[] = {
-               "Left",
-               "Right",
-               "Centre",
-               "Lfe (sub)",
-               "Left surround",
-               "Right surround"
+       /* TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
+          enhancement channel (sub-woofer)./
+       */
+       wxString const channels[] = {
+               _("Left"),
+               _("Right"),
+               _("Centre"),
+               _("Lfe (sub)"),
+               _("Left surround"),
+               _("Right surround"),
        };
 
        for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
                add_label_to_sizer (_audio_sizer, _audio_panel, channels[i]);
-               _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), wxT ("Select Audio File"), wxT ("*.wav"));
+               _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), _("Select Audio File"), wxT ("*.wav"));
                _audio_sizer->Add (_external_audio[i], 1, wxEXPAND);
        }
 
@@ -369,23 +377,23 @@ FilmEditor::make_subtitle_panel ()
        pad->Add (_subtitle_sizer, 0, wxALL, 8);
        _subtitle_panel->SetSizer (pad);
 
-       _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, wxT("With Subtitles"));
+       _with_subtitles = new wxCheckBox (_subtitle_panel, wxID_ANY, _("With Subtitles"));
        video_control (_with_subtitles);
        _subtitle_sizer->Add (_with_subtitles, 1);
        
        _subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY);
        _subtitle_sizer->Add (video_control (_subtitle_stream));
 
-       video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Offset"));
+       video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, _("Subtitle Offset")));
        _subtitle_offset = new wxSpinCtrl (_subtitle_panel);
        _subtitle_sizer->Add (video_control (_subtitle_offset), 1);
 
        {
-               video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Scale"));
+               video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, _("Subtitle Scale")));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                _subtitle_scale = new wxSpinCtrl (_subtitle_panel);
                s->Add (video_control (_subtitle_scale));
-               video_control (add_label_to_sizer (s, _subtitle_panel, "%"));
+               video_control (add_label_to_sizer (s, _subtitle_panel, _("%")));
                _subtitle_sizer->Add (s);
        }
 
@@ -449,7 +457,7 @@ FilmEditor::content_changed (wxCommandEvent &)
                _film->set_content (wx_to_std (_content->GetPath ()));
        } catch (std::exception& e) {
                _content->SetPath (std_to_wx (_film->directory ()));
-               error_dialog (this, String::compose ("Could not set content: %1", e.what ()));
+               error_dialog (this, wxString::Format (_("Could not set content: %s"), e.what ()));
        }
 }
 
index e103df7765befaa0f81acfd7e06b6c3ddc3280f8..4e5f3830060d6bd9d23067d5294ff352ba62cf59 100644 (file)
@@ -388,7 +388,7 @@ FilmViewer::get_frame ()
        } catch (DecodeError& e) {
                _play_button->SetValue (false);
                check_play_state ();
-               error_dialog (this, String::compose ("Could not decode video for view (%1)", e.what()));
+               error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), e.what()));
        }
 }
 
index 3f07faf062e4239835d692f8466d30c438fb7822..7f4b774c0eac82516a00d05d8d34215b9b42f9e2 100644 (file)
@@ -29,11 +29,11 @@ GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent)
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
        table->AddGrowableCol (1, 1);
 
-       add_label_to_sizer (table, this, "I want to play this back at fader");
+       add_label_to_sizer (table, this, _("I want to play this back at fader"));
        _wanted = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
        table->Add (_wanted, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "But I have to use fader");
+       add_label_to_sizer (table, this, _("But I have to use fader"));
        _actual = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
        table->Add (_actual, 1, wxEXPAND);
 
index 9c70405846cc1587baf8e3fcfd350a4bfd2267df..a5c02b16336ea636b9ce3b19fcfeb736270bf522 100644 (file)
@@ -95,7 +95,7 @@ JobManagerView::update ()
                                _job_records[*i].message->SetLabel (std_to_wx (st));
                                _job_records[*i].gauge->SetValue (p * 100);
                        } else {
-                               _job_records[*i].message->SetLabel (wxT ("Running"));
+                               _job_records[*i].message->SetLabel (_("Running"));
                                _job_records[*i].gauge->Pulse ();
                        }
                }
index f2056cf498abacd429c92464d9176082e3e7c5c0..cb02ecd0257dbddd771e80d131d2cc9f799d4a49 100644 (file)
@@ -35,8 +35,8 @@ JobWrapper::make_dcp (wxWindow* parent, shared_ptr<Film> film, bool transcode)
        try {
                film->make_dcp (transcode);
        } catch (BadSettingError& e) {
-               error_dialog (parent, String::compose ("Bad setting for %1 (%2)", e.setting(), e.what ()));
+               error_dialog (parent, wxString::Format (_("Bad setting for %s (%s)"), e.setting().c_str(), e.what()));
        } catch (std::exception& e) {
-               error_dialog (parent, String::compose ("Could not make DCP: %1", e.what ()));
+               error_dialog (parent, wxString::Format (_("Could not make DCP: %s"), e.what ()));
        }
 }
index eb6f2849b5cdd5ebc910b794bbff3ddcbb5bb6b9..90c2d727ef27defab61568d07025d7ec1408af76 100644 (file)
@@ -30,7 +30,7 @@ using namespace std;
 using namespace boost;
 
 NewFilmDialog::NewFilmDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, wxString (_("New Film")))
+       : wxDialog (parent, wxID_ANY, _("New Film"))
 {
        wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
        SetSizer (overall_sizer);
@@ -39,11 +39,11 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent)
        table->AddGrowableCol (1, 1);
        overall_sizer->Add (table, 1, wxEXPAND | wxALL, 6);
 
-       add_label_to_sizer (table, this, "Film name");
+       add_label_to_sizer (table, this, _("Film name"));
        _name = new wxTextCtrl (this, wxID_ANY);
        table->Add (_name, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Create in folder");
+       add_label_to_sizer (table, this, _("Create in folder"));
 #ifdef __WXMSW__
        _folder = new DirPickerCtrl (this);
 #else  
index 0cf75cf5175bad2d56ca668f46c7d5f41cf54b5c..338d0f972c7e7a104a872f95a3add26942a0d83d 100644 (file)
@@ -38,20 +38,20 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, shared_ptr<Film> film)
 {
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 3, 6);
 
-       add_label_to_sizer (table, this, "Frames");
-       _frames = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+       add_label_to_sizer (table, this, _("Frames"));
+       _frames = new wxStaticText (this, wxID_ANY, wxT (""));
        table->Add (_frames, 1, wxALIGN_CENTER_VERTICAL);
 
-       add_label_to_sizer (table, this, "Disk space required for frames");
-       _disk_for_frames = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+       add_label_to_sizer (table, this, _("Disk space required for frames"));
+       _disk_for_frames = new wxStaticText (this, wxID_ANY, wxT (""));
        table->Add (_disk_for_frames, 1, wxALIGN_CENTER_VERTICAL);
        
-       add_label_to_sizer (table, this, "Total disk space required");
-       _total_disk = new wxStaticText (this, wxID_ANY, std_to_wx (""));
+       add_label_to_sizer (table, this, _("Total disk space required"));
+       _total_disk = new wxStaticText (this, wxID_ANY, wxT (""));
        table->Add (_total_disk, 1, wxALIGN_CENTER_VERTICAL);
 
-       add_label_to_sizer (table, this, "Frames already encoded");
-       _encoded = new ThreadedStaticText (this, "counting...", boost::bind (&PropertiesDialog::frames_already_encoded, this));
+       add_label_to_sizer (table, this, _("Frames already encoded"));
+       _encoded = new ThreadedStaticText (this, _("counting..."), boost::bind (&PropertiesDialog::frames_already_encoded, this));
        table->Add (_encoded, 1, wxALIGN_CENTER_VERTICAL);
 
        if (_film->length()) {
index 7b394a484addd3a75114cd7fdb61c25b54a75285..1b5b71dc997784c7e2a927f0a7a010379c9cba86 100644 (file)
@@ -22,7 +22,7 @@
 #include "wx_util.h"
 
 ServerDialog::ServerDialog (wxWindow* parent, ServerDescription* server)
-       : wxDialog (parent, wxID_ANY, wxString (_("Server")))
+       : wxDialog (parent, wxID_ANY, _("Server"))
 {
        if (server) {
                _server = server;
@@ -33,11 +33,11 @@ ServerDialog::ServerDialog (wxWindow* parent, ServerDescription* server)
        wxFlexGridSizer* table = new wxFlexGridSizer (2, 4, 4);
        table->AddGrowableCol (1, 1);
 
-       add_label_to_sizer (table, this, "Host name or IP address");
+       add_label_to_sizer (table, this, _("Host name or IP address"));
        _host = new wxTextCtrl (this, wxID_ANY);
        table->Add (_host, 1, wxEXPAND);
 
-       add_label_to_sizer (table, this, "Threads to use");
+       add_label_to_sizer (table, this, _("Threads to use"));
        _threads = new wxSpinCtrl (this, wxID_ANY);
        table->Add (_threads, 1, wxEXPAND);
 
index 413071ea6989e0e395a5b5b64b23d2212f57dace..632dbc32e034b8ee39b8d507bfff97779a43b005 100644 (file)
@@ -36,9 +36,9 @@ using namespace boost;
  *  @param prop Proportion to pass when calling Add() on the wxSizer.
  */
 wxStaticText *
-add_label_to_sizer (wxSizer* s, wxWindow* p, string t, int prop)
+add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, int prop)
 {
-       wxStaticText* m = new wxStaticText (p, wxID_ANY, std_to_wx (t));
+       wxStaticText* m = new wxStaticText (p, wxID_ANY, t);
        s->Add (m, prop, wxALIGN_CENTER_VERTICAL | wxALL, 6);
        return m;
 }
@@ -48,9 +48,9 @@ add_label_to_sizer (wxSizer* s, wxWindow* p, string t, int prop)
  *  @param m Message.
  */
 void
-error_dialog (wxWindow* parent, string m)
+error_dialog (wxWindow* parent, wxString m)
 {
-       wxMessageDialog* d = new wxMessageDialog (parent, std_to_wx (m), wxT ("DVD-o-matic"), wxOK);
+       wxMessageDialog* d = new wxMessageDialog (parent, m, _("DVD-o-matic"), wxOK);
        d->ShowModal ();
        d->Destroy ();
 }
@@ -79,8 +79,8 @@ int const ThreadedStaticText::_update_event_id = 10000;
  *  @param initial Initial text for the wxStaticText while the computation is being run.
  *  @param fn Function which works out what the wxStaticText content should be and returns it.
  */
-ThreadedStaticText::ThreadedStaticText (wxWindow* parent, string initial, function<string ()> fn)
-       : wxStaticText (parent, wxID_ANY, std_to_wx (initial))
+ThreadedStaticText::ThreadedStaticText (wxWindow* parent, wxString initial, function<string ()> fn)
+       : wxStaticText (parent, wxID_ANY, initial)
 {
        Connect (_update_event_id, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ThreadedStaticText::thread_finished), 0, this);
        _thread = new thread (bind (&ThreadedStaticText::run, this, fn));
index 0c77735eb2abf985317fedcaf110c145311a5f8c..dd069a9d745228c5e82024c5a9b94f6399b1589d 100644 (file)
@@ -28,8 +28,8 @@ class wxSpinCtrl;
  *  @brief Some utility functions and classes.
  */
 
-extern void error_dialog (wxWindow *, std::string);
-extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, std::string, int prop = 0);
+extern void error_dialog (wxWindow *, wxString);
+extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, int prop = 0);
 extern std::string wx_to_std (wxString);
 extern wxString std_to_wx (std::string);
 
@@ -41,7 +41,7 @@ extern wxString std_to_wx (std::string);
 class ThreadedStaticText : public wxStaticText
 {
 public:
-       ThreadedStaticText (wxWindow* parent, std::string initial, boost::function<std::string ()> fn);
+       ThreadedStaticText (wxWindow* parent, wxString initial, boost::function<std::string ()> fn);
        ~ThreadedStaticText ();
 
 private:
diff --git a/wscript b/wscript
index f84f9d13bd768e48e9f168fefe75bd5165320d6d..1dba6bb6701d70a82092bb83acccbd9b71649f71 100644 (file)
--- a/wscript
+++ b/wscript
@@ -89,7 +89,8 @@ def configure(conf):
 
     conf.check_cfg(package = 'sndfile', args = '--cflags --libs', uselib_store = 'SNDFILE', mandatory = True)
     conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
-    conf.check_cfg(package = 'liblzma', args = '--cflags --libs', uselib_store = 'LZMA', mandatory = True)
+    if conf.options.target_windows is False:
+        conf.check_cfg(package = 'liblzma', args = '--cflags --libs', uselib_store = 'LZMA', mandatory = True)
     conf.check_cfg(package = '', path = 'Magick++-config', args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True)
 
     if conf.options.static: