[eog] Make statusbar strings translatable



commit f3902a4159d04bcb2f80203507178e7b01970575
Author: Khaled Hosny <khaledhosny eglug org>
Date:   Fri Oct 9 19:06:28 2009 +0200

    Make statusbar strings translatable
    
    Fixes #597059. Makes statusbar message and image counter translatable.

 src/eog-statusbar.c |   12 +++++++++++-
 src/eog-window.c    |   19 ++++++++++++-------
 2 files changed, 23 insertions(+), 8 deletions(-)
---
diff --git a/src/eog-statusbar.c b/src/eog-statusbar.c
index ebe1983..0561a66 100644
--- a/src/eog-statusbar.c
+++ b/src/eog-statusbar.c
@@ -112,7 +112,17 @@ eog_statusbar_set_image_number (EogStatusbar *statusbar,
 
 	gtk_statusbar_pop (GTK_STATUSBAR (statusbar->priv->img_num_statusbar), 0);
 
-	msg = g_strdup_printf ("%d / %d", num, tot);
+	/* Translators: This string is displayed in the statusbar.
+	 * The first token is the image number, the second is total image
+	 * count.
+	 *
+	 * Translate to "%Id" if you want to use localized digits, or
+	 * translate to "%d" otherwise.
+	 *
+	 * Note that translating this doesn't guarantee that you get localized
+	 * digits. That needs support from your system and locale definition
+	 * too.*/
+	msg = g_strdup_printf (_("%d / %d"), num, tot);
 
 	gtk_statusbar_push (GTK_STATUSBAR (statusbar->priv->img_num_statusbar), 0, msg);
 
diff --git a/src/eog-window.c b/src/eog-window.c
index 64f7bc2..bf3bb92 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -761,13 +761,18 @@ update_status_bar (EogWindow *window)
 
 			size_string = g_format_size_for_display (bytes);
 
-			/* [image width] x [image height] pixels  [bytes]    [zoom in percent] */
-			str = g_strdup_printf ("%i x %i %s  %s    %i%%",
-					       width,
-					       height,
-					       ngettext ("pixel", "pixels", height),
-					       size_string,
-					       zoom);
+			/* Translators: This is the string displayed in the statusbar
+			 * The tokens are from left to right:
+			 * - image width
+			 * - image height
+			 * - image size in bytes
+			 * - zoom in percent */
+			str = g_strdup_printf (ngettext("%i x %i pixel  %s    %i%%",
+							"%i x %i pixels  %s    %i%%", height),
+						width,
+						height,
+						size_string,
+						zoom);
 
 			g_free (size_string);
 		}



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