diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-01 20:13:03 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-01 20:13:03 +0000 |
| commit | dd7cf1ef6e860243b80f4c47a99393244f63a3d5 (patch) | |
| tree | a158d4f59dbb9f1806c1aa00104c123edcfbccce /src/wx | |
| parent | f4c18d89c2fd68a0dbf03b4c72e25cc8214a3a5b (diff) | |
| parent | 7b3f53a88e86154587269826064aa4c0a067f253 (diff) | |
Merge master.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/audio_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/audio_plot.cc | 2 | ||||
| -rw-r--r-- | src/wx/config_dialog.cc | 4 | ||||
| -rw-r--r-- | src/wx/film_editor.cc | 18 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 2 | ||||
| -rw-r--r-- | src/wx/properties_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/server_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/wscript | 51 |
8 files changed, 47 insertions, 36 deletions
diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index 74586fa13..5bac8eabe 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -98,7 +98,7 @@ AudioDialog::set_film (boost::shared_ptr<Film> f) _film_changed_connection = _film->Changed.connect (bind (&AudioDialog::film_changed, this, _1)); _film_audio_analysis_finished_connection = _film->AudioAnalysisFinished.connect (bind (&AudioDialog::try_to_load_analysis, this)); - SetTitle (std_to_wx (String::compose ("DVD-o-matic audio - %1", _film->name()))); + SetTitle (std_to_wx (String::compose (wx_to_std (_("DVD-o-matic audio - %1")), _film->name()))); } void diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index 068b74ffd..af8460a16 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -115,7 +115,7 @@ AudioPlot::paint (wxPaintEvent &) wxDouble db_label_height; wxDouble db_label_descent; wxDouble db_label_leading; - gc->GetTextExtent (_("-80dB"), &_db_label_width, &db_label_height, &db_label_descent, &db_label_leading); + gc->GetTextExtent ("-80dB", &_db_label_width, &db_label_height, &db_label_descent, &db_label_leading); _db_label_width += 8; diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 07e32a457..b28c350ea 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -154,7 +154,7 @@ ConfigDialog::ConfigDialog (wxWindow* parent) _reference_scaler->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::reference_scaler_changed), 0, this); pair<string, string> p = Filter::ffmpeg_strings (config->reference_filters ()); - _reference_filters->SetLabel (std_to_wx (p.first + " " + p.second)); + _reference_filters->SetLabel (std_to_wx (p.first) + N_(" ") + std_to_wx (p.second)); _reference_filters_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::edit_reference_filters_clicked), 0, this); vector<ServerDescription*> servers = config->servers (); @@ -313,7 +313,7 @@ ConfigDialog::reference_filters_changed (vector<Filter const *> f) { Config::instance()->set_reference_filters (f); pair<string, string> p = Filter::ffmpeg_strings (Config::instance()->reference_filters ()); - _reference_filters->SetLabel (std_to_wx (p.first + " " + p.second)); + _reference_filters->SetLabel (std_to_wx (p.first) + N_(" ") + std_to_wx (p.second)); } void diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 499cb1a43..362243ef3 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -164,7 +164,7 @@ FilmEditor::make_film_panel () _still_duration = new wxSpinCtrl (_film_panel); still_control (_still_duration); s->Add (_still_duration, 1, wxEXPAND); - /* TRANSLATORS: `s' here is an abbreviation for seconds, the unit of time */ + /// 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); } @@ -327,7 +327,7 @@ FilmEditor::make_audio_panel () wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); _audio_delay = new wxSpinCtrl (_audio_panel); s->Add (video_control (_audio_delay), 1); - /* TRANSLATORS: this is an abbreviation for milliseconds, the unit of time */ + /// TRANSLATORS: this is an abbreviation for milliseconds, the unit of time video_control (add_label_to_sizer (s, _audio_panel, _("ms"))); grid->Add (s); } @@ -610,9 +610,9 @@ FilmEditor::film_changed (Film::Property p) break; case Film::LENGTH: if (_film->frames_per_second() > 0 && _film->length()) { - s << _film->length().get() << " frames; " << seconds_to_hms (_film->length().get() / _film->frames_per_second()); + s << _film->length().get() << " " << _("frames") << "; " << seconds_to_hms (_film->length().get() / _film->frames_per_second()); } else if (_film->length()) { - s << _film->length().get() << " frames"; + s << _film->length().get() << " " << _("frames"); } _length->SetLabel (std_to_wx (s.str ())); if (_film->length()) { @@ -747,7 +747,7 @@ FilmEditor::set_film (shared_ptr<Film> f) if (_film) { FileChanged (_film->directory ()); } else { - FileChanged (""); + FileChanged (wx_to_std (N_(""))); } if (_audio_dialog) { @@ -1130,11 +1130,11 @@ FilmEditor::setup_audio_details () } else { stringstream s; if (_film->audio_stream()->channels() == 1) { - s << "1 channel"; + s << _("1 channel"); } else { - s << _film->audio_stream()->channels () << " channels"; + s << _film->audio_stream()->channels () << " " << _("channels"); } - s << ", " << _film->audio_stream()->sample_rate() << "Hz"; + s << ", " << _film->audio_stream()->sample_rate() << _("Hz"); _audio->SetLabel (std_to_wx (s.str ())); } } @@ -1167,7 +1167,7 @@ FilmEditor::setup_dcp_name () { string s = _film->dcp_name (true); if (s.length() > 28) { - _dcp_name->SetLabel (std_to_wx (s.substr (0, 28) + "...")); + _dcp_name->SetLabel (std_to_wx (s.substr (0, 28)) + N_("...")); _dcp_name->SetToolTip (std_to_wx (s)); } else { _dcp_name->SetLabel (std_to_wx (s)); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 6d46b2c21..5eba7fd80 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -51,7 +51,7 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p) : wxPanel (p) , _panel (new wxPanel (this)) , _slider (new wxSlider (this, wxID_ANY, 0, 0, 4096)) - , _play_button (new wxToggleButton (this, wxID_ANY, wxT ("Play"))) + , _play_button (new wxToggleButton (this, wxID_ANY, _("Play"))) , _display_frame_x (0) , _got_frame (false) , _clear_required (false) diff --git a/src/wx/properties_dialog.cc b/src/wx/properties_dialog.cc index a57aaf5b9..e93d06dbe 100644 --- a/src/wx/properties_dialog.cc +++ b/src/wx/properties_dialog.cc @@ -54,7 +54,7 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, shared_ptr<Film> film) _frames->SetLabel (std_to_wx (lexical_cast<string> (_film->length().get()))); double const disk = ((double) _film->j2k_bandwidth() / 8) * _film->length().get() / (_film->frames_per_second () * 1073741824); stringstream s; - s << fixed << setprecision (1) << disk << "Gb"; + s << fixed << setprecision (1) << disk << _("Gb"); _disk->SetLabel (std_to_wx (s.str ())); } else { _frames->SetLabel (_("unknown")); diff --git a/src/wx/server_dialog.cc b/src/wx/server_dialog.cc index 1b5b71dc9..7a9cf95c7 100644 --- a/src/wx/server_dialog.cc +++ b/src/wx/server_dialog.cc @@ -27,7 +27,7 @@ ServerDialog::ServerDialog (wxWindow* parent, ServerDescription* server) if (server) { _server = server; } else { - _server = new ServerDescription ("localhost", 1); + _server = new ServerDescription (wx_to_std (N_("localhost")), 1); } wxFlexGridSizer* table = new wxFlexGridSizer (2, 4, 4); diff --git a/src/wx/wscript b/src/wx/wscript index 3fa40f55a..cc303f5e8 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -1,3 +1,28 @@ +import os +import glob +from waflib import Logs +import i18n + +sources = """ + audio_dialog.cc + audio_plot.cc + config_dialog.cc + dci_metadata_dialog.cc + dir_picker_ctrl.cc + film_editor.cc + film_viewer.cc + filter_dialog.cc + filter_view.cc + gain_calculator_dialog.cc + job_manager_view.cc + job_wrapper.cc + new_film_dialog.cc + properties_dialog.cc + server_dialog.cc + wx_util.cc + wx_ui_signaller.cc + """ + def configure(conf): conf.check_cfg(package = '', path = conf.options.wx_config, args = '--cppflags --cxxflags --libs', uselib_store = 'WXWIDGETS', mandatory = True) @@ -12,24 +37,10 @@ def build(bld): obj.export_includes = ['.'] obj.uselib = 'WXWIDGETS' obj.use = 'libdvdomatic' - obj.source = """ - audio_dialog.cc - audio_plot.cc - config_dialog.cc - dci_metadata_dialog.cc - dir_picker_ctrl.cc - film_editor.cc - film_viewer.cc - filter_dialog.cc - filter_view.cc - gain_calculator_dialog.cc - job_manager_view.cc - job_wrapper.cc - new_film_dialog.cc - properties_dialog.cc - server_dialog.cc - wx_util.cc - wx_ui_signaller.cc - """ - + obj.source = sources obj.target = 'dvdomatic-wx' + + i18n.po_to_mo(os.path.join('src', 'wx'), 'libdvdomatic-wx', bld) + +def pot(bld): + i18n.pot(os.path.join('src', 'wx'), sources, 'libdvdomatic-wx') |
