From 6152716003fd3da23573fd9112514732220f6b8b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 25 Nov 2011 19:26:48 +0000 Subject: [PATCH] Make a few strings into format strings for translations. Closes #1093. Originally committed to SVN as r5908. --- aegisub/src/dialog_style_editor.cpp | 2 +- aegisub/src/dialog_style_manager.cpp | 24 ++++++++---------------- aegisub/src/dialog_video_details.cpp | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp index adeacb1fe..e14be528c 100644 --- a/aegisub/src/dialog_style_editor.cpp +++ b/aegisub/src/dialog_style_editor.cpp @@ -88,7 +88,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con if (copy_style) { is_new = true; style = this->style = new AssStyle(*style); - style->name += _(" - Copy"); + style->name = wxString::Format(_("%s - Copy"), style->name); } else if (!style) { is_new = true; diff --git a/aegisub/src/dialog_style_manager.cpp b/aegisub/src/dialog_style_manager.cpp index 9be3af80d..2496460a9 100644 --- a/aegisub/src/dialog_style_manager.cpp +++ b/aegisub/src/dialog_style_manager.cpp @@ -740,19 +740,14 @@ void DialogStyleManager::OnStorageDelete (wxCommandEvent &) { wxArrayInt selections; int n = StorageList->GetSelections(selections); - wxString message; - if (n!=1) { - message = _("Are you sure you want to delete these "); - message += wxString::Format("%i",n); - message += _(" styles?"); - } - else message = _("Are you sure you want to delete this style?"); + wxString message = n == 1 ? + _("Are you sure you want to delete this style?") : + wxString::Format(_("Are you sure you want to delete these %d styles?"), n); int option = wxMessageBox(message, _("Confirm delete from storage"), wxYES_NO | wxICON_EXCLAMATION , this); if (option == wxYES) { - AssStyle *temp; for (int i=0;iGetSelections(selections); - wxString message; - if (n != 1) - message = wxString::Format(_("Are you sure you want to delete these %d styles?"), n); - else - message = _("Are you sure you want to delete this style?"); + wxString message = n == 1 ? + _("Are you sure you want to delete this style?") : + wxString::Format(_("Are you sure you want to delete these %d styles?"), n); int option = wxMessageBox(message, _("Confirm delete from current"), wxYES_NO | wxICON_EXCLAMATION , this); if (option == wxYES) { - AssStyle *temp; for (int i=0;iass->Line.remove(temp); delete temp; } diff --git a/aegisub/src/dialog_video_details.cpp b/aegisub/src/dialog_video_details.cpp index 4c92abdc3..1be45abdb 100644 --- a/aegisub/src/dialog_video_details.cpp +++ b/aegisub/src/dialog_video_details.cpp @@ -86,7 +86,7 @@ DialogVideoDetails::DialogVideoDetails(agi::Context *c) make_field(this, fg, _("File name:"), c->videoController->videoName); make_field(this, fg, _("FPS:"), wxString::Format("%.3f", fps)); make_field(this, fg, _("Resolution:"), wxString::Format("%dx%d (%s)", width, height, pretty_ar(width, height))); - make_field(this, fg, _("Length:"), wxString::Format("%d frames (%s)", framecount, pretty_time_stamp(framecount, fps))); + make_field(this, fg, _("Length:"), wxString::Format(_("%d frames (%s)"), framecount, pretty_time_stamp(framecount, fps))); make_field(this, fg, _("Decoder:"), c->videoController->GetProvider()->GetDecoderName()); wxStaticBoxSizer *video_sizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Video"));