diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-22 01:44:00 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-22 01:44:00 +0000 |
commit | 9eca7915e2ea5003c92d9d741b44af207933f688 (patch) | |
tree | defb75fc2e09954467cfcb52367078a40fdb5176 | |
parent | 37b680cd15ba0d7f902a19e56b6b4d324de535e9 (diff) |
Fix some i18n problems.
git-svn-id: svn://localhost/ardour2/branches/3.0@8326 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/stereo_panner.cc | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 9ad9e38f8e..9be3d50841 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -497,17 +497,18 @@ PlugUIBase::plugin_going_away () void PlugUIBase::set_latency_label () { - char buf[64]; framecnt_t const l = insert->effective_latency (); framecnt_t const sr = insert->session().frame_rate (); + string t; + if (l < sr / 1000) { - snprintf (buf, sizeof (buf), "latency (%" PRId64 " samples)", l); + t = string_compose (_("latency (%1 samples)"), l); } else { - snprintf (buf, sizeof (buf), "latency (%.2f msecs)", (float) l / ((float) sr / 1000.0f)); + t = string_compose (_("latency (%1 ms)"), (float) l / ((float) sr / 1000.0f)); } - latency_label.set_text (buf); + latency_label.set_text (t); } void diff --git a/gtk2_ardour/stereo_panner.cc b/gtk2_ardour/stereo_panner.cc index 86d9055373..6684667a74 100644 --- a/gtk2_ardour/stereo_panner.cc +++ b/gtk2_ardour/stereo_panner.cc @@ -190,7 +190,7 @@ StereoPanner::on_expose_event (GdkEventExpose* ev) cairo_select_font_face (cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); if (state != Mono) { cairo_set_source_rgba (cr, UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t)); - cairo_show_text (cr, "L"); + cairo_show_text (cr, _("L")); } /* right box */ @@ -211,9 +211,9 @@ StereoPanner::on_expose_event (GdkEventExpose* ev) (lr_box_size/2)+step_down + 13); cairo_set_source_rgba (cr, UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t)); if (state == Mono) { - cairo_show_text (cr, "M"); + cairo_show_text (cr, _("M")); } else { - cairo_show_text (cr, "R"); + cairo_show_text (cr, _("R")); } /* draw the central box */ |