[gnome-games] swell-foop: Use ngettext for final score label
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] swell-foop: Use ngettext for final score label
- Date: Thu, 31 May 2012 21:35:05 +0000 (UTC)
commit 97e011b0224ba60bea592b32624808154045b56d
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jun 1 09:34:59 2012 +1200
swell-foop: Use ngettext for final score label
swell-foop/src/game-view.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/swell-foop/src/game-view.vala b/swell-foop/src/game-view.vala
index 3c87964..c6bd633 100644
--- a/swell-foop/src/game-view.vala
+++ b/swell-foop/src/game-view.vala
@@ -335,7 +335,9 @@ public class ScoreActor : Clutter.Group
public void animate_final_score (uint points)
{
label.set_font_name ("Bitstrem Vera Sans 50");
- label.set_markup ("<b>" + _("Game Over!") + "</b>\n" + points.to_string () + _ ("points"));
+ var points_label = ngettext (/* Label showing the number of points at the end of the game */
+ "%u point", "%u points", points).printf (points);
+ label.set_markup ("<b>%s</b>\n%s".printf (_("Game Over!"), points_label));
label.set_line_alignment (Pango.Alignment.CENTER);
/* The score will be shown repeatedly therefore we need to reset some important properties
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]