From a28d6f64de8577dcdc2de20ac69d54289122c241 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 9 Aug 2024 02:04:42 +0200 Subject: Fix missing i18n markup. --- src/tools/dcpomatic_editor.cc | 2 +- src/tools/dcpomatic_player.cc | 2 +- src/tools/dcpomatic_server.cc | 6 +++--- src/wx/full_language_tag_dialog.cc | 12 ++++++------ src/wx/metadata_dialog.cc | 4 ++-- src/wx/playlist_controls.cc | 24 ++++++++++++------------ src/wx/smpte_metadata_dialog.cc | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc index 960d658ee..07e720a71 100644 --- a/src/tools/dcpomatic_editor.cc +++ b/src/tools/dcpomatic_editor.cc @@ -221,7 +221,7 @@ public: add_label_to_sizer(sizer, this, _("Reels"), true, wxGBPosition(r, 0)); _reels = new EditableList, ReelEditor>( this, - { EditableListColumn("Name", 600, true) }, + { EditableListColumn(_("Name"), 600, true) }, [this]() { return _cpl->reels(); }, [this](vector> reels) { _cpl->set(reels); diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 1226f3042..1ff2707a8 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -791,7 +791,7 @@ private: auto image = video->image(boost::bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, false); image_as_jpeg(image, 80).write(path); } else { - error_dialog (this, _(wxString::Format("Unrecognised file extension %s (use .jpg, .jpeg or .png)", std_to_wx(ext)))); + error_dialog(this, wxString::Format(_("Unrecognised file extension %s (use .jpg, .jpeg or .png)"), std_to_wx(ext))); } done = true; }); diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index ef232a2a2..3a3894dae 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -238,8 +238,8 @@ public: wxMenu* CreatePopupMenu () override { auto menu = new wxMenu; - menu->Append (ID_status, std_to_wx ("Status...")); - menu->Append (ID_quit, std_to_wx ("Quit")); + menu->Append(ID_status, _("Status...")); + menu->Append(ID_quit, _("Quit")); return menu; } @@ -257,7 +257,7 @@ public: icon.CopyFromBitmap (bitmap); #endif - SetIcon (icon, std_to_wx ("DCP-o-matic Encode Server")); + SetIcon(icon, _("DCP-o-matic Encode Server")); } private: diff --git a/src/wx/full_language_tag_dialog.cc b/src/wx/full_language_tag_dialog.cc index 2360214f2..65c2716d7 100644 --- a/src/wx/full_language_tag_dialog.cc +++ b/src/wx/full_language_tag_dialog.cc @@ -60,15 +60,15 @@ FullLanguageTagDialog::FullLanguageTagDialog (wxWindow* parent, dcp::LanguageTag _current_tag_list->AppendColumn({}, wxLIST_FORMAT_LEFT, 400); auto button_sizer = new wxBoxSizer (wxVERTICAL); - _add_script = new wxButton(this, wxID_ANY, "Add script"); + _add_script = new wxButton(this, wxID_ANY, _("Add script")); button_sizer->Add (_add_script, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); - _add_region = new wxButton(this, wxID_ANY, "Add region"); + _add_region = new wxButton(this, wxID_ANY, _("Add region")); button_sizer->Add (_add_region, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); - _add_variant = new wxButton(this, wxID_ANY, "Add variant"); + _add_variant = new wxButton(this, wxID_ANY, _("Add variant")); button_sizer->Add (_add_variant, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); - _add_external = new wxButton(this, wxID_ANY, "Add external"); + _add_external = new wxButton(this, wxID_ANY, _("Add external")); button_sizer->Add (_add_external, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); - _remove = new wxButton(this, wxID_ANY, "Remove"); + _remove = new wxButton(this, wxID_ANY, _("Remove")); button_sizer->Add (_remove, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); _choose_subtag_panel = new LanguageSubtagPanel (this); @@ -219,7 +219,7 @@ FullLanguageTagDialog::add_to_current_tag (dcp::LanguageTag::SubtagType type, op if (subtag) { it.SetText(std_to_wx(subtag->description)); } else { - it.SetText ("Select..."); + it.SetText(_("Select...")); } _current_tag_list->SetItem (it); _current_tag_list->SetItemState (_current_tag_list->GetItemCount() - 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); diff --git a/src/wx/metadata_dialog.cc b/src/wx/metadata_dialog.cc index 8691d2f02..9b2aa99eb 100644 --- a/src/wx/metadata_dialog.cc +++ b/src/wx/metadata_dialog.cc @@ -215,8 +215,8 @@ MetadataDialog::setup_standard (wxPanel* panel, wxSizer* sizer) sizer->Add(_release_territory->sizer(), 0, wxEXPAND); vector columns; - columns.push_back(EditableListColumn("Agency", 200, true)); - columns.push_back(EditableListColumn("Label", 400, true)); + columns.push_back(EditableListColumn(_("Agency"), 200, true)); + columns.push_back(EditableListColumn(_("Label"), 400, true)); _ratings = new EditableList ( panel, columns, diff --git a/src/wx/playlist_controls.cc b/src/wx/playlist_controls.cc index f51bcc4e2..171b5a830 100644 --- a/src/wx/playlist_controls.cc +++ b/src/wx/playlist_controls.cc @@ -59,8 +59,8 @@ PlaylistControls::PlaylistControls(wxWindow* parent, FilmViewer& viewer) , _play_button (new Button(this, _("Play"))) , _pause_button (new Button(this, _("Pause"))) , _stop_button (new Button(this, _("Stop"))) - , _next_button (new Button(this, "Next")) - , _previous_button (new Button(this, "Previous")) + , _next_button(new Button(this, _("Next"))) + , _previous_button(new Button(this, _("Previous"))) { _button_sizer->Add (_previous_button, 0, wxEXPAND); _button_sizer->Add (_play_button, 0, wxEXPAND); @@ -79,11 +79,11 @@ PlaylistControls::PlaylistControls(wxWindow* parent, FilmViewer& viewer) auto spl_header = new wxBoxSizer(wxHORIZONTAL); { - auto m = new StaticText(this, "Playlists"); + auto m = new StaticText(this, _("Playlists")); m->SetFont (subheading_font); spl_header->Add (m, 1, wxALIGN_CENTER_VERTICAL); } - _refresh_spl_view = new Button (this, "Refresh"); + _refresh_spl_view = new Button(this, _("Refresh")); spl_header->Add (_refresh_spl_view, 0, wxBOTTOM, DCPOMATIC_SIZER_GAP / 2); left_sizer->Add (spl_header, 0, wxLEFT | wxRIGHT | wxEXPAND, DCPOMATIC_SIZER_GAP); @@ -93,11 +93,11 @@ PlaylistControls::PlaylistControls(wxWindow* parent, FilmViewer& viewer) auto content_header = new wxBoxSizer(wxHORIZONTAL); { - auto m = new StaticText(this, "Content"); + auto m = new StaticText(this, _("Content")); m->SetFont (subheading_font); content_header->Add (m, 1, wxALIGN_CENTER_VERTICAL); } - _refresh_content_view = new Button (this, "Refresh"); + _refresh_content_view = new Button(this, _("Refresh")); content_header->Add (_refresh_content_view, 0, wxBOTTOM, DCPOMATIC_SIZER_GAP / 2); left_sizer->Add (content_header, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, DCPOMATIC_SIZER_GAP); @@ -316,13 +316,13 @@ PlaylistControls::spl_selection_changed () } if (_playlists[selected].missing()) { - error_dialog (this, "This playlist cannot be loaded as some content is missing."); + error_dialog(this, _("This playlist cannot be loaded as some content is missing.")); deselect_playlist (); return; } if (_playlists[selected].get().empty()) { - error_dialog (this, "This playlist is empty."); + error_dialog(this, _("This playlist is empty.")); return; } @@ -332,7 +332,7 @@ PlaylistControls::spl_selection_changed () void PlaylistControls::select_playlist (int selected, int position) { - wxProgressDialog dialog(variant::wx::dcpomatic(), "Loading playlist and KDMs"); + wxProgressDialog dialog(variant::wx::dcpomatic(), _("Loading playlist and KDMs")); for (auto const& i: _playlists[selected].get()) { dialog.Pulse (); @@ -345,12 +345,12 @@ PlaylistControls::select_playlist (int selected, int position) dcp->add_kdm (*kdm); dcp->examine (_film, shared_ptr()); } catch (KDMError& e) { - error_dialog (this, "Could not load KDM."); + error_dialog(this, _("Could not load KDM.")); } } if (dcp->needs_kdm()) { /* We didn't get a KDM for this */ - error_dialog (this, "This playlist cannot be loaded as a KDM is missing or incorrect."); + error_dialog(this, _("This playlist cannot be loaded as a KDM is missing or incorrect.")); deselect_playlist (); return; } @@ -404,7 +404,7 @@ PlaylistControls::update_current_content () { DCPOMATIC_ASSERT (_selected_playlist); - wxProgressDialog dialog(variant::wx::dcpomatic(), "Loading content"); + wxProgressDialog dialog(variant::wx::dcpomatic(), _("Loading content")); setup_sensitivity (); dialog.Pulse (); diff --git a/src/wx/smpte_metadata_dialog.cc b/src/wx/smpte_metadata_dialog.cc index 8471199bd..3c8c516e9 100644 --- a/src/wx/smpte_metadata_dialog.cc +++ b/src/wx/smpte_metadata_dialog.cc @@ -106,7 +106,7 @@ SMPTEMetadataDialog::setup_advanced (wxPanel* panel, wxSizer* sizer) } vector columns; - columns.push_back (EditableListColumn("Version", 350, true)); + columns.push_back(EditableListColumn(_("Version"), 350, true)); _content_versions = new EditableList ( panel, columns, -- cgit v1.2.3