[gnome-photos/wip/uajain/issue88] properties: Use ngettext for plural forms



commit b4a5b5bf435b8112efa71f1135814ad0f6019e3f
Author: Umang Jain <mailumangjain gmail com>
Date:   Thu Feb 15 22:38:11 2018 +0530

    properties: Use ngettext for plural forms
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/88

 src/photos-properties-dialog.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index ff5b5e4a..af03c07c 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -652,7 +652,10 @@ photos_properties_dialog_constructed (GObject *object)
       GtkWidget *dims_data;
       g_autofree gchar *dims_str = NULL;
 
-      dims_str = g_strdup_printf ("%" G_GINT64_FORMAT " × %" G_GINT64_FORMAT " pixels", width, height);
+      dims_str = g_strdup_printf (ngettext ("%" G_GINT64_FORMAT " × %" G_GINT64_FORMAT " pixel",
+                                            "%" G_GINT64_FORMAT " × %" G_GINT64_FORMAT " pixels",
+                                            height),
+                                            width, height);
       dims_data = gtk_label_new (dims_str);
       gtk_widget_set_halign (dims_data, GTK_ALIGN_START);
       gtk_grid_attach_next_to (GTK_GRID (self->grid), dims_data, dimensions_w, GTK_POS_RIGHT, 2, 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]