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



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

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

 src/photos-properties-dialog.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index ff5b5e4a..08421eb3 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -652,7 +652,11 @@ 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]