Fix for wx 2.8.
[dcpomatic.git] / src / wx / film_editor.cc
index 3ccdac7137555c71d2e323aa6f1464a81977047a..85046644506de7672131087d6ef1f83918a37dec 100644 (file)
@@ -124,7 +124,7 @@ FilmEditor::make_film_panel ()
        _dcp_content_type = new wxChoice (_film_panel, wxID_ANY);
        grid->Add (_dcp_content_type);
 
-       video_control (add_label_to_sizer (grid, _film_panel, _("Frames Per Second")));
+       video_control (add_label_to_sizer (grid, _film_panel, _("Original Frame Rate")));
        _frames_per_second = new wxStaticText (_film_panel, wxID_ANY, wxT (""));
        grid->Add (video_control (_frames_per_second), 1, wxALIGN_CENTER_VERTICAL);
        
@@ -162,7 +162,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);
        }
@@ -228,28 +228,21 @@ FilmEditor::make_video_panel ()
        _format = new wxChoice (_video_panel, wxID_ANY);
        grid->Add (_format);
 
-       {
-               add_label_to_sizer (grid, _video_panel, _("Crop"));
-               wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+       add_label_to_sizer (grid, _video_panel, _("Left crop"));
+       _left_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+       grid->Add (_left_crop);
 
-               /* 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"));
-               _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"));
-               _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"));
-               _bottom_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
-               s->Add (_bottom_crop, 0);
-
-               grid->Add (s);
-       }
+       add_label_to_sizer (grid, _video_panel, _("Right crop"));
+       _right_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+       grid->Add (_right_crop);
+       
+       add_label_to_sizer (grid, _video_panel, _("Top crop"));
+       _top_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+       grid->Add (_top_crop);
+       
+       add_label_to_sizer (grid, _video_panel, _("Bottom crop"));
+       _bottom_crop = new wxSpinCtrl (_video_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+       grid->Add (_bottom_crop);
 
        /* VIDEO-only stuff */
        {
@@ -327,7 +320,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);
        }
@@ -349,9 +342,8 @@ FilmEditor::make_audio_panel ()
 
        assert (MAX_AUDIO_CHANNELS == 6);
 
-       /* TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
-          enhancement channel (sub-woofer)./
-       */
+       /// TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
+       /// enhancement channel (sub-woofer).
        wxString const channels[] = {
                _("Left"),
                _("Right"),
@@ -624,9 +616,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()) {
@@ -761,7 +753,7 @@ FilmEditor::set_film (shared_ptr<Film> f)
        if (_film) {
                FileChanged (_film->directory ());
        } else {
-               FileChanged ("");
+               FileChanged (wx_to_std (N_("")));
        }
        
        film_changed (Film::NAME);
@@ -1139,11 +1131,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 ()));
        }
 }
@@ -1176,7 +1168,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));