diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-07 00:01:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-07 00:01:27 +0000 |
| commit | bbb40798ca846edc18a26d396cc9b066c085b8fd (patch) | |
| tree | 8eec57377aacb7512bbc8a40a22999705c58331c | |
| parent | 8df09c2ea6db672a6a0efecd62af5b8d9cc19dcf (diff) | |
| parent | 7fd57a4523af7f59037d03f78aee727987932094 (diff) | |
Merge branch 'direct-mxf' of ssh://carlh.dnsalias.org/home/carl/git/dvdomatic into direct-mxf
| -rw-r--r-- | src/tools/dvdomatic.cc | 10 | ||||
| -rw-r--r-- | src/wx/config_dialog.cc | 20 | ||||
| -rw-r--r-- | src/wx/dci_metadata_dialog.cc | 14 | ||||
| -rw-r--r-- | src/wx/film_editor.cc | 203 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 2 | ||||
| -rw-r--r-- | src/wx/gain_calculator_dialog.cc | 4 | ||||
| -rw-r--r-- | src/wx/job_manager_view.cc | 2 | ||||
| -rw-r--r-- | src/wx/job_wrapper.cc | 4 | ||||
| -rw-r--r-- | src/wx/new_film_dialog.cc | 6 | ||||
| -rw-r--r-- | src/wx/properties_dialog.cc | 16 | ||||
| -rw-r--r-- | src/wx/server_dialog.cc | 6 | ||||
| -rw-r--r-- | src/wx/wx_util.cc | 12 | ||||
| -rw-r--r-- | src/wx/wx_util.h | 6 | ||||
| -rw-r--r-- | windows/installer.nsi.32.in | 2 | ||||
| -rw-r--r-- | windows/installer.nsi.64.in | 2 | ||||
| -rw-r--r-- | wscript | 3 |
16 files changed, 163 insertions, 149 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 9a1db3fed..0565d3a1c 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -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())); } } diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index b656a5278..07e32a457 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -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); diff --git a/src/wx/dci_metadata_dialog.cc b/src/wx/dci_metadata_dialog.cc index c5682e19e..c08c58ed4 100644 --- a/src/wx/dci_metadata_dialog.cc +++ b/src/wx/dci_metadata_dialog.cc @@ -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); diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index f274416fb..634e417df 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -92,77 +92,79 @@ void FilmEditor::make_film_panel () { _film_panel = new wxPanel (_notebook); - _film_sizer = new wxFlexGridSizer (2, 4, 4); - wxBoxSizer* pad = new wxBoxSizer (wxVERTICAL); - pad->Add (_film_sizer, 0, wxALL, 8); - _film_panel->SetSizer (pad); + _film_sizer = new wxBoxSizer (wxVERTICAL); + _film_panel->SetSizer (_film_sizer); - add_label_to_sizer (_film_sizer, _film_panel, "Name"); + wxFlexGridSizer* grid = new wxFlexGridSizer (2, 4, 4); + _film_sizer->Add (grid, 0, wxALL, 8); + + add_label_to_sizer (grid, _film_panel, _("Name")); _name = new wxTextCtrl (_film_panel, wxID_ANY); - _film_sizer->Add (_name, 1, wxEXPAND); + grid->Add (_name, 1, wxEXPAND); - add_label_to_sizer (_film_sizer, _film_panel, "DCP Name"); + add_label_to_sizer (grid, _film_panel, _("DCP Name")); _dcp_name = new wxStaticText (_film_panel, wxID_ANY, wxT ("")); - _film_sizer->Add (_dcp_name, 0, wxALIGN_CENTER_VERTICAL | wxSHRINK); + grid->Add (_dcp_name, 0, wxALIGN_CENTER_VERTICAL | wxSHRINK); - _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Use DCI name")); - _film_sizer->Add (_use_dci_name, 1, wxEXPAND); - _edit_dci_button = new wxButton (_film_panel, wxID_ANY, wxT ("Details...")); - _film_sizer->Add (_edit_dci_button, 0); + _use_dci_name = new wxCheckBox (_film_panel, wxID_ANY, _("Use DCI name")); + grid->Add (_use_dci_name, 1, wxEXPAND); + _edit_dci_button = new wxButton (_film_panel, wxID_ANY, _("Details...")); + grid->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("*.*")); - _film_sizer->Add (_content, 1, wxEXPAND); + add_label_to_sizer (grid, _film_panel, _("Content")); + _content = new wxFilePickerCtrl (_film_panel, wxID_ANY, wxT (""), _("Select Content File"), wxT("*.*")); + grid->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); + grid->Add (_trust_content_header, 1); + grid->AddSpacer (0); - add_label_to_sizer (_film_sizer, _film_panel, "Content Type"); + add_label_to_sizer (grid, _film_panel, _("Content Type")); _dcp_content_type = new wxChoice (_film_panel, wxID_ANY); - _film_sizer->Add (_dcp_content_type); + grid->Add (_dcp_content_type); - video_control (add_label_to_sizer (_film_sizer, _film_panel, "Frames Per Second")); + video_control (add_label_to_sizer (grid, _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); + grid->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 (grid, _film_panel, _("Original Size"))); _original_size = new wxStaticText (_film_panel, wxID_ANY, wxT ("")); - _film_sizer->Add (video_control (_original_size), 1, wxALIGN_CENTER_VERTICAL); + grid->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 (grid, _film_panel, _("Length"))); _length = new wxStaticText (_film_panel, wxID_ANY, wxT ("")); - _film_sizer->Add (video_control (_length), 1, wxALIGN_CENTER_VERTICAL); + grid->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 (grid, _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); + grid->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); + grid->Add (_dcp_ab, 1); + grid->AddSpacer (0); /* STILL-only stuff */ { - still_control (add_label_to_sizer (_film_sizer, _film_panel, "Duration")); + still_control (add_label_to_sizer (grid, _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")); - _film_sizer->Add (s); + /* TRANSLATORS: `s' here is an abbreviation for seconds, the unit of time */ + still_control (add_label_to_sizer (s, _film_panel, _("s"))); + grid->Add (s); } vector<DCPContentType const *> const ct = DCPContentType::all (); @@ -216,72 +218,76 @@ void FilmEditor::make_video_panel () { _video_panel = new wxPanel (_notebook); - _video_sizer = new wxFlexGridSizer (2, 4, 4); - wxBoxSizer* pad = new wxBoxSizer (wxVERTICAL); - pad->Add (_video_sizer, 0, wxALL, 8); - _video_panel->SetSizer (pad); + _video_sizer = new wxBoxSizer (wxVERTICAL); + _video_panel->SetSizer (_video_sizer); + + wxFlexGridSizer* grid = new wxFlexGridSizer (2, 4, 4); + _video_sizer->Add (grid, 0, wxALL, 8); - add_label_to_sizer (_video_sizer, _video_panel, "Format"); + add_label_to_sizer (grid, _video_panel, _("Format")); _format = new wxChoice (_video_panel, wxID_ANY); - _video_sizer->Add (_format); + grid->Add (_format); { - add_label_to_sizer (_video_sizer, _video_panel, "Crop"); + add_label_to_sizer (grid, _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); - _video_sizer->Add (s); + grid->Add (s); } /* VIDEO-only stuff */ { - video_control (add_label_to_sizer (_video_sizer, _video_panel, "Filters")); + video_control (add_label_to_sizer (grid, _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); + grid->Add (s, 1); } - video_control (add_label_to_sizer (_video_sizer, _video_panel, "Scaler")); + video_control (add_label_to_sizer (grid, _video_panel, _("Scaler"))); _scaler = new wxChoice (_video_panel, wxID_ANY); - _video_sizer->Add (video_control (_scaler), 1); + grid->Add (video_control (_scaler), 1); vector<Scaler const *> const sc = Scaler::all (); for (vector<Scaler const *>::const_iterator i = sc.begin(); i != sc.end(); ++i) { _scaler->Append (std_to_wx ((*i)->name())); } - add_label_to_sizer (_video_sizer, _video_panel, "Colour look-up table"); + add_label_to_sizer (grid, _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))); } _colour_lut->SetSelection (0); - _video_sizer->Add (_colour_lut, 1, wxEXPAND); + grid->Add (_colour_lut, 1, wxEXPAND); { - add_label_to_sizer (_video_sizer, _video_panel, "JPEG2000 bandwidth"); + add_label_to_sizer (grid, _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"); - _video_sizer->Add (s, 1); + add_label_to_sizer (s, _video_panel, _("MBps")); + grid->Add (s, 1); } _left_crop->SetRange (0, 1024); @@ -298,62 +304,67 @@ void FilmEditor::make_audio_panel () { _audio_panel = new wxPanel (_notebook); - _audio_sizer = new wxFlexGridSizer (2, 4, 4); - wxBoxSizer* pad = new wxBoxSizer (wxVERTICAL); - pad->Add (_audio_sizer, 0, wxALL, 8); - _audio_panel->SetSizer (pad); + _audio_sizer = new wxBoxSizer (wxVERTICAL); + _audio_panel->SetSizer (_audio_sizer); + + wxFlexGridSizer* grid = new wxFlexGridSizer (2, 4, 4); + _audio_sizer->Add (grid, 0, wxALL, 8); { - video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Gain")); + video_control (add_label_to_sizer (grid, _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); - _audio_sizer->Add (s); + grid->Add (s); } { - video_control (add_label_to_sizer (_audio_sizer, _audio_panel, "Audio Delay")); + video_control (add_label_to_sizer (grid, _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")); - _audio_sizer->Add (s); + /* TRANSLATORS: this is an abbreviation for milliseconds, the unit of time */ + video_control (add_label_to_sizer (s, _audio_panel, _("ms"))); + grid->Add (s); } { _use_content_audio = new wxRadioButton (_audio_panel, wxID_ANY, _("Use content's audio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); - _audio_sizer->Add (video_control (_use_content_audio)); + grid->Add (video_control (_use_content_audio)); wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); _audio_stream = new wxChoice (_audio_panel, wxID_ANY); s->Add (video_control (_audio_stream), 1); _audio = new wxStaticText (_audio_panel, wxID_ANY, wxT ("")); s->Add (video_control (_audio), 1, wxALIGN_CENTER_VERTICAL | wxLEFT, 8); - _audio_sizer->Add (s, 1, wxEXPAND); + grid->Add (s, 1, wxEXPAND); } _use_external_audio = new wxRadioButton (_audio_panel, wxID_ANY, _("Use external audio")); - _audio_sizer->Add (_use_external_audio); - _audio_sizer->AddSpacer (0); + grid->Add (_use_external_audio); + grid->AddSpacer (0); 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")); - _audio_sizer->Add (_external_audio[i], 1, wxEXPAND); + add_label_to_sizer (grid, _audio_panel, channels[i]); + _external_audio[i] = new wxFilePickerCtrl (_audio_panel, wxID_ANY, wxT (""), _("Select Audio File"), wxT ("*.wav")); + grid->Add (_external_audio[i], 1, wxEXPAND); } _audio_gain->SetRange (-60, 60); @@ -364,29 +375,29 @@ void FilmEditor::make_subtitle_panel () { _subtitle_panel = new wxPanel (_notebook); - _subtitle_sizer = new wxFlexGridSizer (2, 4, 4); - wxBoxSizer* pad = new wxBoxSizer (wxVERTICAL); - pad->Add (_subtitle_sizer, 0, wxALL, 8); - _subtitle_panel->SetSizer (pad); + _subtitle_sizer = new wxBoxSizer (wxVERTICAL); + _subtitle_panel->SetSizer (_subtitle_sizer); + wxFlexGridSizer* grid = new wxFlexGridSizer (2, 4, 4); + _subtitle_sizer->Add (grid, 0, wxALL, 8); - _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); + grid->Add (_with_subtitles, 1); _subtitle_stream = new wxChoice (_subtitle_panel, wxID_ANY); - _subtitle_sizer->Add (video_control (_subtitle_stream)); + grid->Add (video_control (_subtitle_stream)); - video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Offset")); + video_control (add_label_to_sizer (grid, _subtitle_panel, _("Subtitle Offset"))); _subtitle_offset = new wxSpinCtrl (_subtitle_panel); - _subtitle_sizer->Add (video_control (_subtitle_offset), 1); + grid->Add (video_control (_subtitle_offset), 1); { - video_control (add_label_to_sizer (_subtitle_sizer, _subtitle_panel, "Subtitle Scale")); + video_control (add_label_to_sizer (grid, _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, "%")); - _subtitle_sizer->Add (s); + video_control (add_label_to_sizer (s, _subtitle_panel, _("%"))); + grid->Add (s); } _subtitle_offset->SetRange (-1024, 1024); @@ -449,7 +460,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 ())); } } diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index e103df776..4e5f38300 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -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())); } } diff --git a/src/wx/gain_calculator_dialog.cc b/src/wx/gain_calculator_dialog.cc index 3f07faf06..7f4b774c0 100644 --- a/src/wx/gain_calculator_dialog.cc +++ b/src/wx/gain_calculator_dialog.cc @@ -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); diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index 9c7040584..a5c02b163 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -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 (); } } diff --git a/src/wx/job_wrapper.cc b/src/wx/job_wrapper.cc index f2056cf49..cb02ecd02 100644 --- a/src/wx/job_wrapper.cc +++ b/src/wx/job_wrapper.cc @@ -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 ())); } } diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc index eb6f2849b..90c2d727e 100644 --- a/src/wx/new_film_dialog.cc +++ b/src/wx/new_film_dialog.cc @@ -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 diff --git a/src/wx/properties_dialog.cc b/src/wx/properties_dialog.cc index 0cf75cf51..338d0f972 100644 --- a/src/wx/properties_dialog.cc +++ b/src/wx/properties_dialog.cc @@ -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()) { diff --git a/src/wx/server_dialog.cc b/src/wx/server_dialog.cc index 7b394a484..1b5b71dc9 100644 --- a/src/wx/server_dialog.cc +++ b/src/wx/server_dialog.cc @@ -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); diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 413071ea6..632dbc32e 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -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)); diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 0c77735eb..dd069a9d7 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -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/windows/installer.nsi.32.in b/windows/installer.nsi.32.in index 7b34dfea6..7669ece9d 100644 --- a/windows/installer.nsi.32.in +++ b/windows/installer.nsi.32.in @@ -93,7 +93,7 @@ CreateShortCut "$DESKTOP\DVD-o-matic.lnk" "$INSTDIR\bin\dvdomatic.exe" "" CreateShortCut "$DESKTOP\DVD-o-matic encode server.lnk" "$INSTDIR\bin\servomatic_gui.exe" "" CreateDirectory "$SMPROGRAMS\DVD-o-matic" -CreateShortCut "$SMPROGRAMS\DVD-o-matic\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 +CreateShortCut "$SMPROGRAMS\DVD-o-matic\Uninstall DVD-o-matic.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\DVD-o-matic\DVD-o-matic.lnk" "$INSTDIR\bin\dvdomatic.exe" "" "$INSTDIR\bin\dvdomatic.exe" 0 CreateShortCut "$SMPROGRAMS\DVD-o-matic\DVD-o-matic encode server.lnk" "$INSTDIR\bin\servomatic_gui.exe" "" "$INSTDIR\bin\servomatic_gui.exe" 0 diff --git a/windows/installer.nsi.64.in b/windows/installer.nsi.64.in index d4fa99659..4f8d7ec48 100644 --- a/windows/installer.nsi.64.in +++ b/windows/installer.nsi.64.in @@ -103,7 +103,7 @@ CreateShortCut "$DESKTOP\DVD-o-matic.lnk" "$INSTDIR\bin\dvdomatic.exe" "" CreateShortCut "$DESKTOP\DVD-o-matic encode server.lnk" "$INSTDIR\bin\servomatic_gui.exe" "" CreateDirectory "$SMPROGRAMS\DVD-o-matic" -CreateShortCut "$SMPROGRAMS\DVD-o-matic\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 +CreateShortCut "$SMPROGRAMS\DVD-o-matic\Uninstall DVD-o-matic.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\DVD-o-matic\DVD-o-matic.lnk" "$INSTDIR\bin\dvdomatic.exe" "" "$INSTDIR\bin\dvdomatic.exe" 0 CreateShortCut "$SMPROGRAMS\DVD-o-matic\DVD-o-matic encode server.lnk" "$INSTDIR\bin\servomatic_gui.exe" "" "$INSTDIR\bin\servomatic_gui.exe" 0 @@ -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: |
