[gnome-sudoku] Use GLib.ngettext to show puzzle completion time



commit ed0612d2099f3eca7103d87392f95b1ef7d388dc
Author: Parin Porecha <parinporecha gmail com>
Date:   Mon Aug 18 00:04:26 2014 +0200

    Use GLib.ngettext to show puzzle completion time
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731139

 lib/sudoku-game.vala |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/lib/sudoku-game.vala b/lib/sudoku-game.vala
index 234ef38..193dfa5 100644
--- a/lib/sudoku-game.vala
+++ b/lib/sudoku-game.vala
@@ -120,14 +120,11 @@ public class SudokuGame : Object
 
     public static string seconds_to_minutes_string (double time_in_seconds)
     {
-        var MINUTE = _("minute");
-        var MINUTES = _("minutes");
-
         var minutes = (int) time_in_seconds / 60;
         if (minutes == 0)
             minutes = 1;
 
-        var minute_string = (minutes == 1) ? MINUTE : MINUTES;
+        var minute_string = ngettext (_("minute"), _("minutes"), minutes);
         var time_string = "%d %s".printf (minutes, minute_string);
 
         return time_string;


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