diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-14 13:05:35 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-14 13:05:35 +0000 |
commit | a571b28dd4507aea892c04c9675ebe67359c8b39 (patch) | |
tree | 427c7e5e58e8b88caa5a9c221bbe17270b7e5cfc | |
parent | bb92cf3b2434fbeb547fb8df88ade0d1688ff823 (diff) |
Fix some gettext plural forms. Should fix #3604.
git-svn-id: svn://localhost/ardour2/branches/3.0@8268 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/processor_box.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/region_view.cc | 33 |
2 files changed, 21 insertions, 24 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index bc5b78e28f..5db759ce85 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -767,18 +767,22 @@ ProcessorBox::weird_plugin_dialog (Plugin& p, Route::ProcessorStreams streams) text += _("\nThis plugin has:\n"); if (has_midi) { - text += string_compose("\t%1 ", p.get_info()->n_inputs.n_midi()) + _("MIDI input(s)\n"); + uint32_t const n = p.get_info()->n_inputs.n_midi (); + text += string_compose (ngettext ("\t%1 MIDI input", "\t%1 MIDI inputs", n), n); } if (has_audio) { - text += string_compose("\t%1 ", p.get_info()->n_inputs.n_audio()) + _("audio input(s)\n"); + uint32_t const n = p.get_info()->n_inputs.n_audio (); + text += string_compose (ngettext ("\t%1 audio input", "\t%1 audio inputs", n), n); } text += _("\nBut at the insertion point, there are:\n"); if (has_midi) { - text += string_compose("\t%1 ", streams.count.n_midi()) + _("MIDI channel(s)\n"); + uint32_t const n = streams.count.n_midi (); + text += string_compose (ngettext ("\t%1 MIDI channel\n", "\t%1 MIDI channels\n", n), n); } if (has_audio) { - text += string_compose("\t%1 ", streams.count.n_audio()) + _("audio channel(s)\n"); + uint32_t const n = streams.count.n_audio (); + text += string_compose (ngettext ("\t%1 audio channel\n", "\t%1 audio channels\n", n), n); } text += string_compose (_("\n%1 is unable to insert this plugin here.\n"), PROGRAM_NAME); diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index e84d25c9f3..5163b65287 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -305,19 +305,11 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres _silence_text->property_x() = trackview.editor().frame_to_pixel (silences.front().first - _region->start()) + 10.0; _silence_text->property_y() = 20.0; - double ms; - char const * sunits; - char const * noun; - - if (silences.size() > 1) { - noun = _("silent segments"); - } else { - noun = _("silent segment"); - } - - ms = (float) shortest/_region->session().frame_rate(); + double ms = (float) shortest/_region->session().frame_rate(); /* ms are now in seconds */ + + char const * sunits; if (ms >= 60.0) { sunits = _("minutes"); @@ -328,7 +320,11 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres } else { sunits = _("secs"); } - + + string text = string_compose (ngettext ("%1 silent segment", "%1 silent segments", silences.size()), silences.size()) + + ", " + + string_compose (_("shortest = %1 %2"), ms, sunits); + if (seen_audible) { /* ms are now in seconds */ double ma = shortest_audible / _region->session().frame_rate(); @@ -343,14 +339,11 @@ RegionView::set_silent_frames (const AudioIntervalResult& silences, double thres } else { aunits = _("secs"); } - - _silence_text->property_text() = string_compose (_("%1 %2, shortest = %3 %4\n (shortest audible segment = %5 %6)"), - silences.size(), noun, - ms, sunits, ma, aunits).c_str(); - } else { - _silence_text->property_text() = string_compose (_("%1 %2, shortest = %3 %4"), - silences.size(), noun, ms, sunits).c_str(); - } + + text += string_compose (_("\n (shortest audible segment = %1 %2)"), ma, aunits); + } + + _silence_text->property_text() = text.c_str (); } void |