[gnome-games] Sudoku: Conditional display of active time
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] Sudoku: Conditional display of active time
- Date: Sat, 10 Apr 2010 10:52:07 +0000 (UTC)
commit f5f9bfc11b818d1c16e8a734c9ed39736bcf15ed
Author: Claude Paroz <claude 2xlibre net>
Date: Sat Apr 10 12:48:38 2010 +0200
Sudoku: Conditional display of active time
GNOME Bug #587622
gnome-sudoku/src/lib/main.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 5931b3c..6f88339 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -418,11 +418,14 @@ class UI (gconf_wrapper.GConfWrapper):
self.gconf['difficulty'] = self.gconf['difficulty'] + 0.1
self.timer.finish_timing()
self.sudoku_tracker.finish_game(self)
- sublabel = _("You completed the puzzle in %(totalTime)s (%(activeTime)s active)") % {'totalTime': self.timer.total_time_string(),
- 'activeTime': self.timer.active_time_string()
- }
+ if self.timer.active_time != self.timer.total_time:
+ sublabel = _("You completed the puzzle in %(totalTime)s (%(activeTime)s active).") % {'totalTime': self.timer.total_time_string(),
+ 'activeTime': self.timer.active_time_string()
+ }
+ else:
+ sublabel = _("You completed the puzzle in %(totalTime)s.") % {'totalTime': self.timer.total_time_string()}
sublabel += "\n"
- sublabel += ngettext("You got %(n)s hint", "You got %(n)s hints", self.gsd.hints) % {'n':self.gsd.hints}
+ sublabel += ngettext("You got %(n)s hint.", "You got %(n)s hints.", self.gsd.hints) % {'n':self.gsd.hints}
sublabel += "\n"
if self.gsd.impossible_hints:
sublabel += ngettext("You had %(n)s impossibility pointed out.",
@@ -430,8 +433,8 @@ class UI (gconf_wrapper.GConfWrapper):
self.gsd.impossible_hints) % {'n':self.gsd.impossible_hints}
sublabel += "\n"
if self.gsd.auto_fills:
- sublabel += ngettext("You used the auto-fill %(n)s time",
- "You used the auto-fill %(n)s times",
+ sublabel += ngettext("You used the auto-fill %(n)s time.",
+ "You used the auto-fill %(n)s times.",
self.gsd.auto_fills) % {'n':self.gsd.auto_fills}
import dancer
self.dancer = dancer.GridDancer(self.gsd)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]