[gnome-games] [same-gnome-clutter] Mark "Game Over!" as translatable



commit b08d9e7a159e34f88d97efc435c0720bc8c467ae
Author: Tim Horton <hortont424 gmail com>
Date:   Sun Jul 19 23:25:21 2009 -0400

    [same-gnome-clutter] Mark "Game Over!" as translatable

 same-gnome-clutter/src/Light.js |  208 +++++++++++++++++++-------------------
 same-gnome-clutter/src/Score.js |   18 +---
 2 files changed, 110 insertions(+), 116 deletions(-)
---
diff --git a/same-gnome-clutter/src/Light.js b/same-gnome-clutter/src/Light.js
index 0c2552f..874c826 100644
--- a/same-gnome-clutter/src/Light.js
+++ b/same-gnome-clutter/src/Light.js
@@ -8,117 +8,117 @@ Light = new GType({
     name: "Light",
     init: function(self)
     {
-	// Private
-	var closed = false;
-	var light_x, light_y;
-	var state = Math.floor(Math.random() * Settings.colors);
-	
-	function theme_changed()
-	{
-		self.remove_actor(self.on);
-		self.on = new Clutter.Clone({source: Settings.theme.colors[state]});
-		self.on.set_size(main.tile_size, main.tile_size);	
-		self.add_actor(self.on);
-	}
+		// Private
+		var closed = false;
+		var light_x, light_y;
+		var state = Math.floor(Math.random() * Settings.colors);
+	
+		function theme_changed()
+		{
+			self.remove_actor(self.on);
+			self.on = new Clutter.Clone({source: Settings.theme.colors[state]});
+			self.on.set_size(main.tile_size, main.tile_size);	
+			self.add_actor(self.on);
+		}
 		
-	// Public
-	this.visited = false;
+		// Public
+		this.visited = false;
+	
+		this.on = new Clutter.Clone({source: Settings.theme.colors[state]});
+	
+		this.get_state = function ()
+		{
+			return state;
+		};
 	
-	this.on = new Clutter.Clone({source: Settings.theme.colors[state]});
+		this.animate_out = function (timeline)
+		{
+			this.on.animate_with_timeline(Clutter.AnimationMode.LINEAR, timeline,
+			{
+				height: main.tile_size * 2,
+				width: main.tile_size * 2,
+				x: -main.tile_size/2,
+				y: -main.tile_size/2
+			});
+			
+			this.animate_with_timeline(Clutter.AnimationMode.LINEAR, timeline,
+			{
+			   opacity: 0
+			});
+			
+			timeline.signal.completed.connect(this.hide_light, this);
+			
+			GLib.main_context_iteration();
+		};
+	
+		this.animate_to = function (new_x, new_y, timeline)
+		{
+			var anim_mode = Settings.zealous ?
+				            	Clutter.AnimationMode.EASE_OUT_BOUNCE :
+				            	Clutter.AnimationMode.EASE_OUT_QUAD;
+			this.animate_with_timeline(anim_mode, timeline,
+			{
+				x: new_x,
+				y: new_y
+			});
+			
+			GLib.main_context_iteration();
+		};
+	
+		this.get_closed = function ()
+		{
+			return closed;
+		};
 	
-	this.get_state = function ()
-	{
-	    return state;
-	};
+		this.close_tile = function (timeline)
+		{
+			closed = true;
+			this.animate_out(timeline);
+		};
 	
-	this.animate_out = function (timeline)
-	{
-	    this.on.animate_with_timeline(Clutter.AnimationMode.LINEAR, timeline,
+		this.hide_light = function (timeline, light)
 		{
-			height: main.tile_size * 2,
-			width: main.tile_size * 2,
-			x: -main.tile_size/2,
-			y: -main.tile_size/2
-		});
-	    
-	    this.animate_with_timeline(Clutter.AnimationMode.LINEAR, timeline,
+			light.hide();
+			
+			delete on;
+			
+			if(light.anim)
+			delete light.anim;
+			
+			return false;
+		};
+	
+		this.set_light_x = function (new_x)
 		{
-		   opacity: 0
-		});
-	    
-	    timeline.signal.completed.connect(this.hide_light, this);
-	    
-	    GLib.main_context_iteration();
-	};
-	
-	this.animate_to = function (new_x, new_y, timeline)
-	{
-		var anim_mode = Settings.zealous ?
-		                	Clutter.AnimationMode.EASE_OUT_BOUNCE :
-		                	Clutter.AnimationMode.EASE_OUT_QUAD;
-		this.animate_with_timeline(anim_mode, timeline,
+			light_x = new_x;
+		};
+	
+		this.set_light_y = function (new_y)
 		{
-			x: new_x,
-			y: new_y
-		});
-	    
-	    GLib.main_context_iteration();
-	};
-	
-	this.get_closed = function ()
-	{
-	    return closed;
-	};
-	
-	this.close_tile = function (timeline)
-	{
-	    closed = true;
-	    this.animate_out(timeline);
-	};
-	
-	this.hide_light = function (timeline, light)
-	{
-	    light.hide();
-	    
-	    delete on;
-	    
-	    if(light.anim)
-		delete light.anim;
-	    
-	    return false;
-	};
-	
-	this.set_light_x = function (new_x)
-	{
-	    light_x = new_x;
-	};
-	
-	this.set_light_y = function (new_y)
-	{
-	    light_y = new_y;
-	};
-	
-	this.get_light_x = function ()
-	{
-	    return light_x;
-	};
-	
-	this.get_light_y = function ()
-	{
-	    return light_y;
-	};
-	
-	// Implementation
-	this.on.set_size(main.tile_size, main.tile_size);
-	
-	this.opacity = 180;
-	this.reactive = true;
-	
-	this.set_anchor_point(main.tile_size / 2, main.tile_size / 2);
-	
-	this.add_actor(this.on);
-	
-	Settings.Watcher.signal.theme_changed.connect(theme_changed);
+			light_y = new_y;
+		};
+	
+		this.get_light_x = function ()
+		{
+			return light_x;
+		};
+	
+		this.get_light_y = function ()
+		{
+			return light_y;
+		};
+	
+		// Implementation
+		this.on.set_size(main.tile_size, main.tile_size);
+	
+		this.opacity = 180;
+		this.reactive = true;
+	
+		this.set_anchor_point(main.tile_size / 2, main.tile_size / 2);
+	
+		this.add_actor(this.on);
+	
+		Settings.Watcher.signal.theme_changed.connect(theme_changed);
     }
 });
 
diff --git a/same-gnome-clutter/src/Score.js b/same-gnome-clutter/src/Score.js
index 9a29718..e354d38 100644
--- a/same-gnome-clutter/src/Score.js
+++ b/same-gnome-clutter/src/Score.js
@@ -73,39 +73,33 @@ ScoreView = new GType({
 			main.stage.add_actor(this);
 			this.show();
 			
-			var a = this.animate(Clutter.AnimationMode.EASE_OUT_SINE,600,
+			var a = this.animate(Clutter.AnimationMode.EASE_OUT_SINE, 600,
 			{
 			    depth:  500,
 			    opacity: 0
 			});
 
-			a.timeline.start();			
+			a.timeline.start();
 			a.timeline.signal.completed.connect(this.hide_score, this);
 		};
 		
 		this.animate_final_score = function (points)
 		{
 			label.set_font_name("Bitstrem Vera Sans 50");
-			label.set_markup("<b>Game Over!</b>\n" + points + " points");
+			label.set_markup("<b>" + _("Game Over!") + "</b>\n" + points + " " + _("points"));
 			label.set_line_alignment(Pango.Alignment.CENTER);
 			
 			main.stage.add_actor(this);
 			this.show();
 			
-			//this.opacity = 0;
-			//this.y = -this.height;
 			this.scale_x = this.scale_y = 0;
 			
 			var a = this.animate(Clutter.AnimationMode.EASE_OUT_ELASTIC,2000,
 			{
-			    scale_x: 1,
-			    scale_y: 1,
-				//y: [GObject.TYPE_INT, stage.width / 2],
-			    opacity: 255,
+				scale_x: 1,
+				scale_y: 1,
+				opacity: 255
 			});
-			
-			a.timeline.start();
-			//a.timeline.signal.completed.connect(this.hide_score, this);
 		};
 		
 		// Implementation



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