From f919265b8db6bb85209bb57d74e6067913e5aa95 Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Fri, 6 Apr 2012 11:32:20 +0000 Subject: [PATCH] Effect not yet ready for prime time and is not included with Audacity. Save translators from translating its strings. --- src/effects/SpikeCleaner.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/effects/SpikeCleaner.cpp b/src/effects/SpikeCleaner.cpp index abc33d444..8d8be364b 100644 --- a/src/effects/SpikeCleaner.cpp +++ b/src/effects/SpikeCleaner.cpp @@ -14,6 +14,7 @@ This is a simple version, Audacity could do with a more sophisticated approach to this. + *//****************************************************************//** \class SpikeCleanerDialog @@ -23,6 +24,14 @@ a more sophisticated approach to this. + +// JKC: This effect is not yet good enough to be included in Audacity. +// To save translators from translating it the transaltable strings +// are marked by _TRANSLATABLE( which is not recognised by gettext and so +// won't appear in the .pot file. +// gettext isn't smart enough to ignore commented out code. +#ifdef NOT_READY_FOR_PRIME_TIME + #include "../Audacity.h" #include @@ -66,7 +75,7 @@ void EffectSpikeCleaner::End() bool EffectSpikeCleaner::PromptUser() { - SpikeCleanerDialog dlog(mParent, -1, _("Spike Cleaner")); + SpikeCleanerDialog dlog(mParent, -1, _TRANSLATABLE("Spike Cleaner")); dlog.mSpikeMaxDurationMs = mSpikeMaxDurationMs; dlog.mSpikeDbChoiceIndex = mSpikeDbChoiceIndex; dlog.TransferDataToWindow(); @@ -157,12 +166,12 @@ SpikeCleanerDialog::SpikeCleanerDialog(wxWindow *parent, wxWindowID id, { wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); wxStaticText *statText = new wxStaticText(this, -1, - _("SpikeCleaner by Lynn Allan")); + _TRANSLATABLE("SpikeCleaner by Lynn Allan")); mainSizer->Add(statText, 0, wxALIGN_CENTRE | wxALL, 5); wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL); - statText = new wxStaticText(this, -1, _("Max Spike Duration (milliseconds): \n(99999 or greater is off)")); + statText = new wxStaticText(this, -1, _TRANSLATABLE("Max Spike Duration (milliseconds):")); hSizer->Add(statText, 0, wxALIGN_CENTRE | wxALL, 5); wxString spikeMaxDurationMsStr; @@ -175,7 +184,7 @@ SpikeCleanerDialog::SpikeCleanerDialog(wxWindow *parent, wxWindowID id, mainSizer->Add(hSizer, 0, wxALIGN_CENTRE | wxALL, 5); hSizer = new wxBoxSizer(wxHORIZONTAL); - statText = new wxStaticText(this, -1, _("Theshold for silence: ")); + statText = new wxStaticText(this, -1, _TRANSLATABLE("Theshold for silence: ")); hSizer->Add(statText, 0, wxALIGN_CENTRE | wxALL, 5); mSpikeDbSilenceThresholdChoice = new wxChoice(this, ID_DB_SILENCE_THRESHOLD_CHOICE, @@ -185,10 +194,10 @@ SpikeCleanerDialog::SpikeCleanerDialog(wxWindow *parent, wxWindowID id, mainSizer->Add(hSizer, 0, wxALIGN_CENTRE | wxALL, 5); hSizer = new wxBoxSizer(wxHORIZONTAL); - wxButton *cancel = new wxButton(this, wxID_CANCEL, _("&Cancel")); + wxButton *cancel = new wxButton(this, wxID_CANCEL, _TRANSLATABLE("&Cancel")); hSizer->Add(cancel, 0, wxALIGN_CENTRE|wxALL, 5); - wxButton *ok = new wxButton(this, wxID_OK, _("&OK")); + wxButton *ok = new wxButton(this, wxID_OK, _TRANSLATABLE("&OK")); ok->SetDefault(); hSizer->Add(ok, 0, wxALIGN_CENTRE|wxALL, 5); @@ -230,3 +239,5 @@ void SpikeCleanerDialog::OnCancel(wxCommandEvent &event) { EndModal(false); } + +#endif \ No newline at end of file