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);
_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");
} 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();
} 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