[gnome-mahjongg] Improve clock label



commit f5433178bd55340a3dd2bdabd890a4d8ad46d4d3
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jun 21 18:27:31 2014 -0500

    Improve clock label

 src/gnome-mahjongg.vala |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-mahjongg.vala b/src/gnome-mahjongg.vala
index 78b90de..e7348c8 100644
--- a/src/gnome-mahjongg.vala
+++ b/src/gnome-mahjongg.vala
@@ -643,7 +643,26 @@ public class Mahjongg : Gtk.Application
         var hours = elapsed / 3600;
         var minutes = (elapsed - hours * 3600) / 60;
         var seconds = elapsed - hours * 3600 - minutes * 60;
-        clock_label.set_text ("%s: %02d:%02d:%02d".printf (_("Time"), hours, minutes, seconds));
+        if (hours > 0)
+        {
+            /* Translators: sorry. This is the clock label when the game has exceeded
+             * one hour in length. The first %02d is hours, the middle %02d is minutes,
+             * and the last is seconds. In between are ratio characters and LTR order
+             * marks, so that nothing gets reversed in RTL languages. You probably only
+             * need to change the English on the left. Probably.
+             */
+            clock_label.set_text (_("Time: 
%02d\xE2\x88\xB6\xE2\x80\x8E%02d\xE2\x88\xB6\xE2\x80\x8E%02d").printf (hours, minutes, seconds));
+        }
+        else
+        {
+            /* Translators: sorry. This is the clock label when the game is less than
+             * one hour in length. The first %02d is minutes and the last is seconds.
+             * In between is a ratio character and LTR order mark, so that nothing gets
+             * reversed in RTL languages. You probably only need to change the English
+             * on the left. Probably.
+             */
+            clock_label.set_text (_("Time: %02d\xE2\x88\xB6\xE2\x80\x8E%02d").printf (minutes, seconds));
+        }
     }
 
     private void help_cb ()


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