diff options
author | Waqar Ahmed <waqar.17a@gmail.com> | 2019-09-09 19:40:56 +0500 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2020-01-11 19:45:22 +0000 |
commit | 6784266e3dff2269aa522c6749a1cc3be87188b2 (patch) | |
tree | ba3e0c0c86ed8664337f66313172ca883a0b1fa9 /extensions/audio-video-properties | |
parent | eeb0e92c8b57245d1d5c55210400970bd099038a (diff) | |
download | nautilus-6784266e3dff2269aa522c6749a1cc3be87188b2.tar.gz |
audio-video-properties:fix string not translatable
"Frames per second" string in audio-video-properties tab was unavailable for translation.
To fix this, handle the string with g_dngettext() and allow for both singular and plural translation.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/990
Diffstat (limited to 'extensions/audio-video-properties')
-rw-r--r-- | extensions/audio-video-properties/bacon-video-widget-properties.c | 3 | ||||
-rw-r--r-- | extensions/audio-video-properties/meson.build | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/extensions/audio-video-properties/bacon-video-widget-properties.c b/extensions/audio-video-properties/bacon-video-widget-properties.c index 88d62636b..b2b2aaf37 100644 --- a/extensions/audio-video-properties/bacon-video-widget-properties.c +++ b/extensions/audio-video-properties/bacon-video-widget-properties.c @@ -25,6 +25,7 @@ #include <gtk/gtk.h> #include <glib/gi18n-lib.h> #include <string.h> +#include <math.h> #include "bacon-video-widget-properties.h" @@ -230,7 +231,7 @@ bacon_video_widget_properties_set_framerate (BaconVideoWidgetProperties *props, g_return_if_fail (BACON_IS_VIDEO_WIDGET_PROPERTIES (props)); if (framerate > 1.0) { - temp = g_strdup_printf ("%0.2f frames per second", framerate); + temp = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, "%0.2f frame per second", "%0.2f frames per second", (int) (ceilf (framerate))), framerate); } else { temp = g_strdup (C_("Frame rate", "N/A")); } diff --git a/extensions/audio-video-properties/meson.build b/extensions/audio-video-properties/meson.build index 0b8dcdc7f..b67de9d56 100644 --- a/extensions/audio-video-properties/meson.build +++ b/extensions/audio-video-properties/meson.build @@ -7,6 +7,8 @@ resources = gnome.compile_resources( c_name: 'nautilus_audio_video_properties', ) +libm = cc.find_library('m') + libtotem_properties_page_sources = files( 'totem-properties-main.c', 'totem-properties-view.c', @@ -15,6 +17,7 @@ libtotem_properties_page_sources = files( ) + resources libtotem_properties_page_deps = [ + libm, gst_tag_dep, gst_pbutils_dep, ] |